]>
Commit | Line | Data |
---|---|---|
e4bb5998 RD |
1 | #!/bin/bash |
2 | # --------------------------------------------------------------------------- | |
3 | # Build wxWidgets and wxPython on a OSX box. This is normally | |
4 | # called 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 | |
0f475e8a RD |
12 | # 5. the version of Python to build for |
13 | # 6. the character type (ansi|unicode|both) | |
14 | # 7. optional flags to pass on to the build script | |
e4bb5998 RD |
15 | # |
16 | # --------------------------------------------------------------------------- | |
17 | ||
18 | set -o errexit | |
19 | #set -o xtrace | |
20 | ||
21 | echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" | |
22 | ||
23 | if [ $# -lt 6 ]; then | |
0f475e8a | 24 | echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER CHARTYPE [FLAGS]" |
e4bb5998 RD |
25 | exit 1 |
26 | fi | |
27 | ||
28 | WXDIR=$1 | |
29 | DESTDIR=$2 | |
30 | SKIPCLEAN=$3 | |
31 | VERSION=$4 | |
0f475e8a RD |
32 | PYVER=$5 |
33 | CHARTYPE=$6 | |
34 | FLAGS=$7 | |
e4bb5998 RD |
35 | |
36 | ||
37 | #export PATH=/sw/bin:/usr/local/bin:$PATH | |
38 | export PATH=/sw/bin:/sw/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:.:/usr/X11R6/bin | |
39 | echo "PATH =" $PATH | |
40 | echo "which gcc = " `which gcc` | |
41 | #exit 0 | |
42 | ||
43 | # untar the source | |
bf158fe6 | 44 | echo "Unarchiving wxPython-src-$VERSION.tar.bz2" |
e4bb5998 | 45 | cd $DESTDIR |
bf158fe6 RD |
46 | tar xjf wxPython-src-$VERSION.tar.bz2 |
47 | rm wxPython-src-$VERSION.tar.bz2 | |
e4bb5998 RD |
48 | |
49 | ||
50 | echo "Invoking wxPythonOSX build script..." | |
51 | cd $WXDIR/wxPython | |
52 | export TARBALLDIR=$DESTDIR | |
53 | mkdir -p dist | |
0f475e8a | 54 | if [ $CHARTYPE = both ]; then |
0f475e8a | 55 | distrib/mac/wxPythonOSX/build $PYVER inplace ansi $FLAGS |
f5ed42f8 | 56 | distrib/mac/wxPythonOSX/build $PYVER inplace unicode $FLAGS |
0f475e8a RD |
57 | else |
58 | distrib/mac/wxPythonOSX/build $PYVER inplace $CHARTYPE $FLAGS | |
e4bb5998 | 59 | fi |
e4bb5998 RD |
60 | |
61 | echo "Copying installers to $DESTDIR..." | |
62 | cp dist/*.dmg $DESTDIR | |
63 | cd $DESTDIR | |
64 | ||
65 | ||
66 | if [ $SKIPCLEAN != yes ]; then | |
67 | echo "Cleaning up..." | |
68 | rm -r $WXDIR || true | |
bf158fe6 RD |
69 | rm wxPython-docs-$VERSION.tar.bz2 |
70 | rm wxPython-demo-$VERSION.tar.bz2 | |
e4bb5998 RD |
71 | fi |
72 | ||
73 | echo "-=-=-=- Goodbye! -=-=-=-" |