]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/all/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..."
30 shift;shift;shift;shift
34 # WXDIR is the cygwin path, WXWIN is the DOS path
36 WXWIN
=`cygpath -w $WXDIR`
40 # # Fix the PATH. (Why is this needed??)
41 # PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/robind/bin:.:$WXDIR/lib/vc_dll:$PATH
43 # echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
45 # echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
50 echo "Unarchiving wxPython-src-$VERSION.tar.gz"
52 tar xzf wxPython
-src-$VERSION.
tar.gz
53 rm wxPython
-src-$VERSION.
tar.gz
57 echo "Converting wxPython line endings to CRLF..."
59 names
=`find wxPython -name "*.py" -o -name "*.txt" -o -name "*.htm*" -o -name "*.css" -o -name "*.xml" `
63 # change to the right spot in the source tree and copy our build scripts
64 echo "Setting up for the build..."
66 cp $WXDIR/wxPython
/distrib
/msw
/.m
* .
69 # replace some settings in setup0.h and write to setup.h
70 cat > .my.sedexpr
<<EOF
71 s/wxDIALOG_UNIT_COMPATIBILITY *1/wxDIALOG_UNIT_COMPATIBILITY 0/g
72 s/wxUSE_DEBUG_CONTEXT *0/wxUSE_DEBUG_CONTEXT 1/g
73 s/wxUSE_MEMORY_TRACING *0/wxUSE_MEMORY_TRACING 1/g
74 s/wxUSE_DIALUP_MANAGER *1/wxUSE_DIALUP_MANAGER 0/g
75 s/wxUSE_GLCANVAS *0/wxUSE_GLCANVAS 1/g
76 s/wxUSE_POSTSCRIPT *0/wxUSE_POSTSCRIPT 1/g
77 s/wxUSE_AFM_FOR_POSTSCRIPT *1/wxUSE_AFM_FOR_POSTSCRIPT 0/g
78 s/wxUSE_DISPLAY *0/wxUSE_DISPLAY 1/g
80 cat $WXDIR/include
/wx
/msw
/setup0.h
| sed -f .my.sedexpr
> $WXDIR/include
/wx
/msw
/setup.h
84 echo "Building the wx DLLs..."
89 #echo "Building the wx tools..."
92 # cheat and just copy the .CHM files from the regular project dir
93 # TODO: Copy over the wxPython-docs fle and run hhc on the contents of that.
94 mkdir -p $WXDIR/docs
/htmlhelp
95 cp `cygpath $WXWIN_OLD/docs/htmlhelp`/*.chm
$WXDIR/docs
/htmlhelp
98 echo "Building wxPython and installers..."
102 for ver
in $PYVER; do
105 b
$ver h USE_SWIG
=0 EP_ADD_OPTS
=1
107 b
$ver d UNICODE
=1 USE_SWIG
=0
108 b
$ver h UNICODE
=1 USE_SWIG
=0 EP_ADD_OPTS
=1
109 b
$ver r UNICODE
=1 USE_SWIG
=0
112 echo "Building the developer package..."
113 WXWIN
=`cygpath -w $WXDIR`
115 4nt
/c distrib
/makedev.bat
$VERSION
118 echo "Copying installers to $DESTDIR..."
119 mv dist
/wxPython
* $DESTDIR
123 if [ $SKIPCLEAN != yes ]; then
124 echo "Cleaning up..."
128 echo "-=-=-=- Goodbye! -=-=-=-"