From e61e59643e96a3f43e32e863b3c980fd1566d04a Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Sat, 28 Jan 2006 02:11:22 +0000 Subject: [PATCH] Adding Reswig and Universal binary options to both build_packages.sh and the wxPythonOSX/build script. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/build_packages.sh | 14 ++++++++++++-- wxPython/distrib/mac/wxPythonOSX/build | 25 ++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/wxPython/distrib/build_packages.sh b/wxPython/distrib/build_packages.sh index fd730b23b6..0c55346f29 100755 --- a/wxPython/distrib/build_packages.sh +++ b/wxPython/distrib/build_packages.sh @@ -100,14 +100,17 @@ if [ "$OSTYPE" = "cygwin" ]; then $TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/make_installer_inno4.py` $UNICODE_FLAG elif [ "$OSTYPE" = "darwin" ]; then + OSX_VERSION=`sw_vers -productVersion` + echo "OS X Version: ${OSX_VERSION:0:4}" cd $WXWIN/wxPython if [ ! -d dist ]; then mkdir dist fi # re-generate SWIG files + RESWIG= if [ $reswig = yes ]; then - $WXWIN/wxPython/b $PY_VERSION t + RESWIG=reswig fi PY_DOT_VER=2.3 @@ -120,11 +123,18 @@ elif [ "$OSTYPE" = "darwin" ]; then UNICODE_OPT=unicode fi + # On Tiger, build Universal. + UNIV_OPT= + if [ ${OSX_VERSION:0:4} = "10.4" ]; then + UNIV_OPT="universal" + fi + #sudo $WXWIN/wxPython/distrib/makedocs $WXWIN/wxPython/distrib/makedemo export TARBALLDIR=$WXWIN/wxPython/dist + echo "distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT $RESWIG" - distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT + distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT $RESWIG $UNIV_OPT else echo "OSTYPE $OSTYPE not yet supported by this build script." fi diff --git a/wxPython/distrib/mac/wxPythonOSX/build b/wxPython/distrib/mac/wxPythonOSX/build index 9f71573171..0563285f0a 100755 --- a/wxPython/distrib/mac/wxPythonOSX/build +++ b/wxPython/distrib/mac/wxPythonOSX/build @@ -35,6 +35,9 @@ function usage { echo " skiptar Don't unpack the tarball" echo " inplace Don't use the tarball, build from the CVS tree instead" echo " (The Docs and Demo tarballs are still required for a full build.)" + echo " reswig Regenerate SWIG wrappers" + echo " universal Generate Universal wxWidgets binary (requires Universal Python " + echo " to general Universal wxPython)." echo " unicode Make a unicode build" echo " skipconfig Don't run configure" echo " skipbuild Don't build wxWidgets or wxPython" @@ -76,6 +79,8 @@ skipdmg=no skipclean=no inplace=no unicode=no +reswig=no +universal=no for flag in $*; do case ${flag} in @@ -83,11 +88,12 @@ for flag in $*; do skipconfig) skipconfig=yes; skiptar=yes ;; skipbuild) skipbuild=yes; skipconfig=yes; skiptar=yes ;; skipinstall) skipinstall=yes ;; - skipdmg) skipdmg=yes ;; + skipdmg) skipdmg=yes ;; skipclean) skipclean=yes ;; inplace) inplace=yes; skiptar=yes ;; unicode) unicode=yes ;; - + reswig) reswig=yes ;; + universal) universal=yes ;; *) echo "Unknown flag \"${flag}\"" usage exit 1 @@ -152,6 +158,7 @@ fi PREFIX=/usr/local/lib/wxPython-$CHARTYPE-$VERSION BINPREFIX=/usr/local/bin +SWIGBIN=/opt/swig/bin/swig WXROOT=`dirname $PWD` PROGDIR="`dirname \"$0\"`" TMPDIR=$PWD/_build_dmg @@ -226,6 +233,10 @@ if [ $KIND = panther ]; then OTHER_CFG_OPTS=--enable-mediactrl fi +UNIVOPT= +if [ $universal = yes ]; then + UNIVOPT=--enable-universal_binary +fi # Configure wxWidgets if [ $skipconfig != yes ]; then $WXDIR/configure \ @@ -240,7 +251,8 @@ if [ $skipconfig != yes ]; then --enable-precomp=no \ --enable-optimise \ --disable-debugreport \ - $UNICODEOPT $OTHER_CFG_OPTS + --disable-precompiled-headers \ + $UNICODEOPT $UNIVOPT $OTHER_CFG_OPTS fi @@ -265,6 +277,11 @@ if [ $skipbuild != yes ]; then make $MAKEJOBS -C contrib/src/gizmos make $MAKEJOBS -C contrib/src/stc +SWIGIT=0 +if [ $reswig = yes ]; then + SWIGIT=1 +fi + # Build wxPython cd $WXROOT/wxPython $PYTHON setup.py \ @@ -273,6 +290,8 @@ if [ $skipbuild != yes ]; then EP_ADD_OPTS=1 \ WX_CONFIG="$WXBLD/wx-config --inplace" \ BUILD_BASE=$WXBLD/wxPython \ + SWIG=$SWIGBIN \ + USE_SWIG=$SWIGIT \ build fi