]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/bash | |
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... | |
5 | # | |
6 | # The command line must have the following parameters: | |
7 | # | |
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) | |
11 | # 4. the VERSION | |
12 | # 5. the remaining args are the versions of Python to build for | |
13 | # | |
14 | # --------------------------------------------------------------------------- | |
15 | ||
16 | set -o errexit | |
17 | #set -o xtrace | |
18 | ||
19 | echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" | |
20 | ||
21 | if [ $# -lt 5 ]; then | |
22 | echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..." | |
23 | exit 1 | |
24 | fi | |
25 | ||
26 | WXDIR=$1 | |
27 | DESTDIR=$2 | |
28 | SKIPCLEAN=$3 | |
29 | VERSION=$4 | |
30 | shift;shift;shift;shift | |
31 | PYVER=$@ | |
32 | ||
33 | # WXDIR is the cygwin path, WXWIN is the DOS path | |
34 | WXWIN_OLD=$WXWIN | |
35 | WXWIN=`cygpath -w $WXDIR` | |
36 | export WXWIN | |
37 | ||
38 | # Fix the PATH. (Why is this needed??) | |
39 | PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/robind/bin:.:$WXDIR/lib/vc_dll:$PATH | |
40 | export PATH | |
41 | ||
42 | # change to the right spot and copy our build scripts | |
43 | cd $WXDIR/build/msw | |
44 | cp $WXDIR/wxPython/distrib/msw/.m* . | |
45 | ||
46 | # replace some settings in setup0.h and write to setup.h | |
47 | cat > .my.sedexpr <<EOF | |
48 | # s/wxDIALOG_UNIT_COMPATIBILITY *1/wxDIALOG_UNIT_COMPATIBILITY 0/g | |
49 | s/wxUSE_DEBUG_CONTEXT *0/wxUSE_DEBUG_CONTEXT 1/g | |
50 | s/wxUSE_MEMORY_TRACING *0/wxUSE_MEMORY_TRACING 1/g | |
51 | s/wxUSE_DIALUP_MANAGER *1/wxUSE_DIALUP_MANAGER 0/g | |
52 | s/wxUSE_GLCANVAS *0/wxUSE_GLCANVAS 1/g | |
53 | s/wxUSE_POSTSCRIPT *0/wxUSE_POSTSCRIPT 1/g | |
54 | s/wxUSE_AFM_FOR_POSTSCRIPT *1/wxUSE_AFM_FOR_POSTSCRIPT 0/g | |
55 | s/wxUSE_DISPLAY *0/wxUSE_DISPLAY 1/g | |
56 | EOF | |
57 | cat $WXDIR/include/wx/msw/setup0.h | sed -f .my.sedexpr > $WXDIR/include/wx/msw/setup.h | |
58 | rm .my.sedexpr | |
59 | ||
60 | ||
61 | echo "Building the wx DLLs..." | |
62 | .make hybrid | |
63 | .make hybrid-uni | |
64 | ||
65 | echo "Building the wx tools..." | |
66 | .make_tools | |
67 | ||
68 | # cheat and just copy the .CHM files from the regular project dir | |
69 | mkdir -p $WXDIR/docs/htmlhelp | |
70 | cp `cygpath $WXWIN_OLD/docs/htmlhelp`/*.chm $WXDIR/docs/htmlhelp | |
71 | ||
72 | ||
73 | echo "Building wxPython and installers..." | |
74 | cd $WXDIR/wxPython | |
75 | ||
76 | for ver in $PYVER; do | |
77 | echo $ver | |
78 | b $ver d USE_SWIG=0 | |
79 | b $ver h USE_SWIG=0 | |
80 | b $ver r USE_SWIG=0 | |
81 | b $ver d UNICODE=1 USE_SWIG=0 | |
82 | b $ver h UNICODE=1 USE_SWIG=0 | |
83 | b $ver r UNICODE=1 USE_SWIG=0 | |
84 | done | |
85 | ||
86 | echo "Building the developer package..." | |
87 | 4nt /c distrib/makedev.bat $VERSION | |
88 | ||
89 | ||
90 | echo "Copying installers to $DESTDIR..." | |
91 | mv dist/wxPythonWIN32* $DESTDIR | |
92 | cd $DESTDIR | |
93 | ||
94 | ||
95 | if [ $SKIPCLEAN != yes ]; then | |
96 | echo "Cleaning up..." | |
97 | rm -r $WXDIR | |
98 | fi | |
99 | ||
100 | echo "-=-=-=- Goodbye! -=-=-=-" |