3
# This script generates the Visual Studio 6 build files for Windows.
9
function cleansolution() {
11
rm -f ${name}.dsw ${name}.sln;
14
function cleanproject() {
16
rm -f ${name}.dsp ${name}.vcproj;
21
cleansolution ${project}
22
cleanproject ${project}
23
cleanproject ${project}_install
24
cleanproject ${project}_uninstall
25
cleanproject ${project}_docs
27
rm -f install-headers.bat uninstall-headers.bat
30
build="`cygpath -w $build_pwd | sed -e 's/\\\\/\\\\\\\\/g'`"
31
build_pwd="`pwd | sed -e 's/\\//\\\\\\\\/g'`\\\\"
33
source_pwd=`cd ../..; pwd`
34
source="`cygpath -w $source_pwd | sed -e 's/\\\\/\\\\\\\\/g'`"
35
source_pwd="`(cd ../..; pwd) | sed -e 's/\\//\\\\\\\\/g'`"
37
../../configure --with-msvcrt=mtd --with-suffix=d \
38
--enable-debug --enable-symbols || exit 1
39
mv src/config.h src/config-debug.h
41
../../configure --enable-msvcdsp --with-msvcrt=mt \
42
--disable-debug --disable-symbols --enable-optimization || exit 1
43
mv src/config.h src/config-release.h
45
cp ../misc/config-wrapper.h src/config.h
51
-e "s/$build_pwd//g" \
52
-e "s/$source/..\\\\../g" \
53
-e "s/$source_pwd/..\\\\../g" \
54
-e 's/COIN_DLL/COIN_NOT_DLL/g' \
55
-e '/_MAKE_DLL/ { s/COIN_NOT_DLL/COIN_DLL/g; }' \
56
-e '/^# ADD .*LINK32.*\/debug/ { s/COINDIR)\\lib\\coin3.lib/COINDIR)\\lib\\coin3d.lib/g; }' \
57
-e '/^# ADD .*LINK32.*\/debug/ { s/QTDIR)\\lib\\Qt\([^ ]*\)4.lib/QTDIR)\\lib\\Qt\1d4.lib/g; }' \
59
<${project}.dsp >new.dsp
61
mv new.dsp ${project}.dsp
65
-e "s/$build_pwd//g" \
66
-e "s/$source/..\\\\../g" \
67
-e "s/$source_pwd/..\\\\../g" \
69
<install-headers.bat >new.bat
71
mv new.bat ../misc/install-headers.bat
75
-e "s/$build_pwd//g" \
76
-e "s/$source/..\\\\../g" \
77
-e "s/$source_pwd/..\\\\../g" \
79
<uninstall-headers.bat >new.bat
81
mv new.bat ../misc/uninstall-headers.bat
85
echo "* Make sure there are no absolute paths in the project files"
86
grep -i c: ${project}.dsp ${project}.dsw
87
echo "* Make sure 'Public Headers' group is preceded by 2s 'End Group' lines."
88
echo "* Fix up DLL library dependencies, so Debug Builds use debug dependencies."
89
echo "* Upgrade project files by running devenv soqt1.dsw"
90
echo "* Run ./fixvcproj.sh if you are using msvc7."
92
find . -name "moc_*" | xargs rm
94
# How can I avoid the modal upgrade prompt-dialog for MSVC7.1 here???
95
# devenv /command "File.OpenProject $build\\${project}.dsp"