]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/all/do-build-osx
build tweaks, also drop most Python 2.3 builds
[wxWidgets.git] / wxPython / distrib / all / do-build-osx
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 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
15 #
16 # ---------------------------------------------------------------------------
17
18 set -o errexit
19 #set -o xtrace
20
21 echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
22
23 if [ $# -lt 6 ]; then
24 echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER CHARTYPE [FLAGS]"
25 exit 1
26 fi
27
28 WXDIR=$1
29 DESTDIR=$2
30 SKIPCLEAN=$3
31 VERSION=$4
32 PYVER=$5
33 CHARTYPE=$6
34 FLAGS=$7
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
44 echo "Unarchiving wxPython-src-$VERSION.tar.bz2"
45 cd $DESTDIR
46 tar xjf wxPython-src-$VERSION.tar.bz2
47 rm wxPython-src-$VERSION.tar.bz2
48
49
50 echo "Invoking wxPythonOSX build script..."
51 cd $WXDIR/wxPython
52 export TARBALLDIR=$DESTDIR
53 mkdir -p dist
54 if [ $CHARTYPE = both ]; then
55 distrib/mac/wxPythonOSX/build $PYVER inplace ansi $FLAGS
56 distrib/mac/wxPythonOSX/build $PYVER inplace unicode $FLAGS
57 else
58 distrib/mac/wxPythonOSX/build $PYVER inplace $CHARTYPE $FLAGS
59 fi
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
69 rm wxPython-docs-$VERSION.tar.bz2
70 rm wxPython-demo-$VERSION.tar.bz2
71 fi
72
73 echo "-=-=-=- Goodbye! -=-=-=-"