4 # Build wxWindows 2 for Windows distribution.
5 # This builds all required binaries and documents before calling
6 # zipdist.sh to make the archives.
8 # To use this script, you need:
10 # - CygWin installation, for bash etc.
11 # - VC++ 6 or higher, to compile the binaries
12 # - WinHelp compiler, HTML Help compiler, Tex2RTF on your path
15 # Julian Smart, October 2000
17 SRC
=`cygpath -u $WXWIN`
19 TMPDIR
=`cygpath -u $TEMP`
22 # For some reason, if we pipe output to egrep, we see output, but not otherwise.
23 WARNINGS
=": decorated name|: see reference|: see declaration|C4786|VC98\\\\INCLUDE|template<>"
26 VCPATH
="/c/Program Files/Microsoft Visual Studio/common/msdev98/bin:/c/Program Files/Microsoft Visual Studio/VC98/bin:DevStudio/VC/bin:/c/Program Files/Microsoft Visual Studio/common/tools:/c/Program Files/HTML Help Workshop"
27 INCLUDE
="C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE;C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE;C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE;C:\Program Files\Tcl\include;C:\Program Files\HTML Help Workshop\include"
28 LIB
="C:\Program Files\Microsoft Visual Studio\VC98\lib;C:\Program Files\Microsoft Visual Studio\VC98\MFC\lib;C:\Program Files\Tcl\lib;C:\Program Files\HTML Help Workshop\lib"
29 TCLHOME
=C
:/PROGRA~
1/Tcl
export TCLHOME
30 PATH
="$PATH:$VCPATH" export PATH
35 egrep ": error C|fatal error" $TMPDIR/buildlog.txt
> $TMPDIR/errorlog.txt
36 if [ -s $TMPDIR/errorlog.txt
]; then
37 echo Did not build
$0 successfully.
43 if [ ! -d "$SRC" ]; then
44 echo "$SRC" does not exist.
48 if [ ! -d "$SRC/deliver" ]; then
52 if [ ! -e $SRC/include
/wx
/msw
/setup.h
]; then
53 cp "$SRC/include/wx/msw/setup0.h" "$SRC/include/wx/msw/setup.h"
54 echo setup0.h has been copied to setup.h.
55 echo You must now edit this
file to restore release settings
,
56 echo then run this
script again.
58 notepad.exe
"$SRC/include/wx/msw/setup.h"
60 if [ ! -d "$SRC/bin" ]; then
63 if [ ! -e "$SRC/bin/DBVIEW.EXE" ]; then
64 echo Please put DBGVIEW.EXE
, DBGVIEW.CNT
, DBGVIEW.HLP into
$SRC/bin
65 echo and run the
script again.
72 echo "---------------------------------"
73 echo "Building wxWindows documents"
74 nmake
-f makefile.vc cleandocs docs
76 cd "$SRC/utils/dialoged/src"
77 nmake
-f makefile.vc html htmlhelp htb hlp pdfrtf
79 cd "$SRC/utils/tex2rtf/src"
80 nmake
-f makefile.vc html htmlhelp htb hlp pdfrtf
82 cd "$SRC/contrib/src/ogl"
83 nmake
-f makefile.vc html htmlhelp htb hlp pdfrtf
85 cd "$SRC/contrib/src/mmedia"
87 nmake
-f makefile.vc html htmlhelp hlp pdfrtf
92 echo "---------------------------------"
93 echo "Building wxWindows using VC++"
95 echo Building wxWindows Release library
in `pwd`
96 echo Command
: msdev wxvc.dsw
/useenv
/make "wxvc - Win32 Release" /rebuild
97 msdev wxvc.dsw
/useenv
/make "wxvc - Win32 Release" /rebuild
| egrep -v "$WARNINGS"
100 build_dialog_editor
() {
101 echo "---------------------------------"
102 echo "Building Dialog Editor using VC++"
103 cd "$SRC/utils/dialoged/src"
104 msdev DialogEdVC.dsw
/useenv
/make "DialogEdVC - Win32 Release" /rebuild
| egrep -v "$WARNINGS" | tee $TMPDIR/buildlog.txt
106 check_compile
"Dialog Editor"
110 echo "---------------------------------"
111 echo "Building Tex2RTF using VC++"
112 cd "$SRC/utils/tex2rtf/src"
113 msdev Tex2RTFVC.dsw
/useenv
/make "Tex2RTFVC - Win32 Release" /rebuild
| egrep -v "$WARNINGS" | tee $TMPDIR/buildlog.txt
115 check_compile
"Tex2RTF"
119 echo "---------------------------------"
120 echo "Building Life! using VC++"
122 msdev LifeVC.dsw
/useenv
/make "LifeVC - Win32 Release" /rebuild
| egrep -v "$WARNINGS" | tee $TMPDIR/buildlog.txt
124 check_compile
"Life! Demo"
127 build_executables
() {
134 cp "$SRC/utils/dialoged/src/Release/dialoged.exe" "$SRC/bin"
135 cp "$SRC/docs/winhelp/dialoged.*" "$SRC/bin"
137 cp "$SRC/utils/tex2rtf/src/Release/tex2rtf.exe" "$SRC/bin"
138 cp "$SRC/docs/winhelp/tex2rtf.*" "$SRC/bin"
140 cp "$SRC/demos/life/life.exe" "$SRC/demos/life/breeder.lif" "$SRC/bin"
143 # Process command line options.
148 echo Usage
: $0 "[ options ]"
149 echo Generates documentation and binaries
for creating a distribution
,
150 echo and optionally generates the zip
/setup.exe distribution by
151 echo calling zipdist.sh.
154 echo " --help Display this help message"
155 echo " --wise Build zips and setup.exe after creating docs and binaries"
161 mkdir -p $SRC/docs
/pdf
162 mkdir -p $SRC/docs
/html
163 mkdir -p $SRC/docs
/htmlhelp
164 mkdir -p $SRC/docs
/htb
169 if [ "$OK" = "1" ]; then
173 if [ "$OK" = "1" ]; then
177 if [ "$OK" = "1" ]; then
181 if [ "$OK" = "1" ]; then
185 if [ "$OK" = "1" && "$DOWISE" = "1" ]; then
186 $SRC/distrib
/msw
/zipdist.sh
--wise
189 if [ "$OK" = "1" ]; then
190 echo Finished successfully.
192 echo Finished unsuccessfully. There were errors.
195 echo Press
return to
continue.