]>
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 | |
12 | # 5. the KIND (panther or jaguar) | |
13 | # *. the remaining args are the versions of Python to build for | |
14 | # | |
15 | # --------------------------------------------------------------------------- | |
16 | ||
17 | set -o errexit | |
18 | #set -o xtrace | |
19 | ||
20 | echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" | |
21 | ||
22 | if [ $# -lt 6 ]; then | |
23 | echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION KIND PYVER..." | |
24 | exit 1 | |
25 | fi | |
26 | ||
27 | WXDIR=$1 | |
28 | DESTDIR=$2 | |
29 | SKIPCLEAN=$3 | |
30 | VERSION=$4 | |
31 | KIND=$5 | |
32 | shift;shift;shift;shift;shift | |
33 | PYVER=$@ | |
34 | ||
35 | ||
36 | #export PATH=/sw/bin:/usr/local/bin:$PATH | |
37 | export PATH=/sw/bin:/sw/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:.:/usr/X11R6/bin | |
38 | echo "PATH =" $PATH | |
39 | echo "which gcc = " `which gcc` | |
40 | #exit 0 | |
41 | ||
42 | # untar the source | |
43 | echo "Unarchiving wxPython-src-$VERSION.tar.gz" | |
44 | cd $DESTDIR | |
45 | tar xzf wxPython-src-$VERSION.tar.gz | |
46 | rm wxPython-src-$VERSION.tar.gz | |
47 | ||
48 | ||
49 | echo "Invoking wxPythonOSX build script..." | |
50 | cd $WXDIR/wxPython | |
51 | export TARBALLDIR=$DESTDIR | |
52 | mkdir -p dist | |
53 | if [ $KIND = panther ]; then | |
54 | distrib/mac/wxPythonOSX/build $KIND inplace unicode | |
55 | fi | |
56 | distrib/mac/wxPythonOSX/build $KIND inplace | |
57 | ||
58 | ||
59 | echo "Copying installers to $DESTDIR..." | |
60 | cp dist/*.dmg $DESTDIR | |
61 | cd $DESTDIR | |
62 | ||
63 | ||
64 | if [ $SKIPCLEAN != yes ]; then | |
65 | echo "Cleaning up..." | |
66 | rm -r $WXDIR || true | |
67 | rm wxPython-docs-$VERSION.tar.gz | |
68 | rm wxPython-demo-$VERSION.tar.gz | |
69 | fi | |
70 | ||
71 | echo "-=-=-=- Goodbye! -=-=-=-" |