]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/all/do-build-osx
upload to wxpython.wxcommunity.com instead of starship
[wxWidgets.git] / wxPython / distrib / all / do-build-osx
CommitLineData
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
18set -o errexit
19#set -o xtrace
20
21echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
22
23if [ $# -lt 6 ]; then
0f475e8a 24 echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER CHARTYPE [FLAGS]"
e4bb5998
RD
25 exit 1
26fi
27
28WXDIR=$1
29DESTDIR=$2
30SKIPCLEAN=$3
31VERSION=$4
0f475e8a
RD
32PYVER=$5
33CHARTYPE=$6
34FLAGS=$7
e4bb5998
RD
35
36
37#export PATH=/sw/bin:/usr/local/bin:$PATH
38export PATH=/sw/bin:/sw/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:.:/usr/X11R6/bin
39echo "PATH =" $PATH
40echo "which gcc = " `which gcc`
41#exit 0
42
43# untar the source
bf158fe6 44echo "Unarchiving wxPython-src-$VERSION.tar.bz2"
e4bb5998 45cd $DESTDIR
bf158fe6
RD
46tar xjf wxPython-src-$VERSION.tar.bz2
47rm wxPython-src-$VERSION.tar.bz2
e4bb5998
RD
48
49
50echo "Invoking wxPythonOSX build script..."
51cd $WXDIR/wxPython
52export TARBALLDIR=$DESTDIR
53mkdir -p dist
0f475e8a 54if [ $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
57else
58 distrib/mac/wxPythonOSX/build $PYVER inplace $CHARTYPE $FLAGS
e4bb5998 59fi
e4bb5998
RD
60
61echo "Copying installers to $DESTDIR..."
62cp dist/*.dmg $DESTDIR
63cd $DESTDIR
64
65
66if [ $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
71fi
72
73echo "-=-=-=- Goodbye! -=-=-=-"