]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/all/do-build-windows
2 # ---------------------------------------------------------------------------
3 # Build wxWidgets and wxPython on a Windows box. This is normally called
4 # from build-all but it should be able to be used standalone too...
6 # The command line must have the following parameters:
8 # 1. the path to the base of the wx source tree
9 # 2. the path of where to put the resulting installers
10 # 3. skipclean flag (yes|no)
12 # 5. the remaining args are the versions of Python to build for
14 # ---------------------------------------------------------------------------
19 echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
22 echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER CHARTYPE"
33 # WXDIR is the cygwin path, WXWIN is the DOS path
34 WXWIN
=`cygpath -w $WXDIR`
37 export TOOLS
=/cygdrive
/c
/TOOLS
41 if [ $PYVER = 2.3 ]; then
42 echo "Using MSVC ver 6"
46 echo "Using MSVC ver 7"
53 echo "Unarchiving wxPython-src-$VERSION.tar.bz2"
55 tar xjf wxPython
-src-$VERSION.
tar.bz2
56 rm wxPython
-src-$VERSION.
tar.bz2
60 echo "Converting wxPython line endings to CRLF..."
62 names
=`find wxPython -name "*.py" -o -name "*.txt" -o -name "*.htm*" -o -name "*.css" -o -name "*.xml" `
66 # change to the right spot in the source tree and copy our build scripts
67 echo "Setting up for the build..."
69 cp $WXDIR/wxPython
/distrib
/msw
/.m
* .
73 # replace some settings in setup0.h and write to setup.h
74 cat > .my.sedexpr
<<EOF
75 s/wxDIALOG_UNIT_COMPATIBILITY *1/wxDIALOG_UNIT_COMPATIBILITY 0/g
76 s/wxUSE_EXCEPTIONS *1/wxUSE_EXCEPTIONS 0/g
77 s/wxUSE_DEBUG_CONTEXT *0/wxUSE_DEBUG_CONTEXT 1/g
78 s/wxUSE_MEMORY_TRACING *0/wxUSE_MEMORY_TRACING 1/g
79 s/wxUSE_DIALUP_MANAGER *1/wxUSE_DIALUP_MANAGER 0/g
80 s/wxUSE_GLCANVAS *0/wxUSE_GLCANVAS 1/g
81 s/wxUSE_POSTSCRIPT *0/wxUSE_POSTSCRIPT 1/g
82 s/wxUSE_AFM_FOR_POSTSCRIPT *1/wxUSE_AFM_FOR_POSTSCRIPT 0/g
83 s/wxUSE_DISPLAY *0/wxUSE_DISPLAY 1/g
84 s/wxUSE_DIB_FOR_BITMAP *0/wxUSE_DIB_FOR_BITMAP 1/g
85 s/wxUSE_DEBUGREPORT *1/wxUSE_DEBUGREPORT 0/g
87 cat $WXDIR/include
/wx
/msw
/setup0.h
| sed -f .my.sedexpr
> $WXDIR/include
/wx
/msw
/setup.h
91 echo "Building the wx DLLs..."
92 if [ $CHARTYPE = both
-o $CHARTYPE = ansi
]; then
95 if [ $CHARTYPE = both
-o $CHARTYPE = unicode
]; then
100 # echo "Building tex2rtf..."
101 # cd $WXDIR/utils/tex2rtf/src
102 # $WXDIR/build/msw/.mymake hybrid
103 # cp vc_mswhdll/tex2rtf.exe $WXDIR/lib/vc_dll/tex2rtf.exe
105 # echo "Translating docs to html..."
107 # cd $DOCDIR/latex/wx
108 # mkdir -p $DOCDIR/html/wx
109 # cp *.gif $DOCDIR/html/wx
110 # cp *.css $DOCDIR/html/wx
111 # DOCSRC=`cygpath -w $DOCDIR/latex/wx/manual.tex`
112 # DOCDEST=`cygpath -w $DOCDIR/html/wx/wx.htm`
113 # DOCINI=`cygpath -w $DOCDIR/latex/wx/tex2rtf_css.ini`
115 # $WXDIR/lib/vc_dll/tex2rtf.exe $DOCSRC $DOCDEST -twice -html -macros $DOCINI
118 echo "Extracting html docs..."
119 mkdir -p $WXDIR/docs
/html
/wx
120 cd $WXDIR/docs
/html
/wx
122 tar xjf
$DESTDIR/wxPython
-docs-$VERSION.
tar.bz2
123 rm $DESTDIR/wxPython
-docs-$VERSION.
tar.bz2
124 unzip wxPython
-$VERSION/docs
/wx.
zip
126 echo "Building the HTMLHelp file..."
127 cd $WXDIR/docs
/html
/wx
128 ##cp $DOCDIR/latex/wx/wx.css .
129 $TOOLS/HTMLHelpWorkshop
/hhc.exe wx.hhp
|| true
130 mkdir -p ..
/..
/htmlhelp
131 mv wx.chm ..
/..
/htmlhelp
137 echo "Building wxPython and installers..."
140 if [ $CHARTYPE = both
-o $CHARTYPE = ansi
]; then
141 b
$PYVER d UNICODE
=0 USE_SWIG
=0
142 b
$PYVER h UNICODE
=0 USE_SWIG
=0 EP_ADD_OPTS
=1
143 b
$PYVER r UNICODE
=0 USE_SWIG
=0
145 if [ $CHARTYPE = both
-o $CHARTYPE = unicode
]; then
146 b
$PYVER d UNICODE
=1 USE_SWIG
=0
147 b
$PYVER h UNICODE
=1 USE_SWIG
=0 EP_ADD_OPTS
=1
148 b
$PYVER r UNICODE
=1 USE_SWIG
=0
151 echo "Building the developer package..."
152 WXWIN
=`cygpath -w $WXDIR`
154 $TOOLS/4dos
/4nt
/c distrib
/makedev.bat
$VERSION
157 echo "Copying installers to $DESTDIR..."
158 mv dist
/wxPython
* $DESTDIR
162 if [ $SKIPCLEAN != yes ]; then
163 echo "Cleaning up..."
167 echo "-=-=-=- Goodbye! -=-=-=-"