~ubuntu-branches/ubuntu/oneiric/soqt/oneiric

« back to all changes in this revision

Viewing changes to build/misc/generate.sh

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-03-01 11:41:00 UTC
  • mfrom: (1.1.4 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090301114100-f4zz3n1oasa52fgk
Tags: 1.4.2~svn20090224-2
* Upload upstream SVN head version containing fixes to build with Coin 3
  (Closes: #515729, #515736, #515742).  Upstream indicated to me that
  SVN is stable enough to release.

* control: Update Standards-Version to 3.8.0; no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# This script generates the Visual Studio 6 build files for Windows.
 
4
#
 
5
# 20041214 larsa
 
6
 
 
7
project=soqt1
 
8
 
 
9
function cleansolution() {
 
10
  name=$1;
 
11
  rm -f ${name}.dsw ${name}.sln;
 
12
}
 
13
 
 
14
function cleanproject() {
 
15
  name=$1;
 
16
  rm -f ${name}.dsp ${name}.vcproj;
 
17
}
 
18
 
 
19
proper=true;
 
20
 
 
21
cleansolution ${project}
 
22
cleanproject ${project}
 
23
cleanproject ${project}_install
 
24
cleanproject ${project}_uninstall
 
25
cleanproject ${project}_docs
 
26
 
 
27
rm -f install-headers.bat uninstall-headers.bat
 
28
 
 
29
build_pwd=`pwd`
 
30
build="`cygpath -w $build_pwd | sed -e 's/\\\\/\\\\\\\\/g'`"
 
31
build_pwd="`pwd | sed -e 's/\\//\\\\\\\\/g'`\\\\"
 
32
 
 
33
source_pwd=`cd ../..; pwd`
 
34
source="`cygpath -w $source_pwd | sed -e 's/\\\\/\\\\\\\\/g'`"
 
35
source_pwd="`(cd ../..; pwd) | sed -e 's/\\//\\\\\\\\/g'`"
 
36
 
 
37
../../configure --with-msvcrt=mtd --with-suffix=d \
 
38
  --enable-debug --enable-symbols || exit 1
 
39
mv src/config.h src/config-debug.h
 
40
 
 
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
 
44
 
 
45
cp ../misc/config-wrapper.h src/config.h
 
46
 
 
47
make || exit 1
 
48
 
 
49
sed \
 
50
  -e "s/$build/./g" \
 
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; }' \
 
58
  -e 's/$/\r/g' \
 
59
  <${project}.dsp >new.dsp
 
60
 
 
61
mv new.dsp ${project}.dsp
 
62
 
 
63
sed \
 
64
  -e "s/$build/./g" \
 
65
  -e "s/$build_pwd//g" \
 
66
  -e "s/$source/..\\\\../g" \
 
67
  -e "s/$source_pwd/..\\\\../g" \
 
68
  -e 's/$/\r/g' \
 
69
  <install-headers.bat >new.bat
 
70
 
 
71
mv new.bat ../misc/install-headers.bat
 
72
 
 
73
sed \
 
74
  -e "s/$build/./g" \
 
75
  -e "s/$build_pwd//g" \
 
76
  -e "s/$source/..\\\\../g" \
 
77
  -e "s/$source_pwd/..\\\\../g" \
 
78
  -e 's/$/\r/g' \
 
79
  <uninstall-headers.bat >new.bat
 
80
 
 
81
mv new.bat ../misc/uninstall-headers.bat
 
82
 
 
83
echo "Done."
 
84
echo ""
 
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."
 
91
 
 
92
find . -name "moc_*" | xargs rm
 
93
 
 
94
# How can I avoid the modal upgrade prompt-dialog for MSVC7.1 here???
 
95
# devenv /command "File.OpenProject $build\\${project}.dsp"
 
96