X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a72b62e4380d61ebee64976ec80fc9e79fb3e58..29bfe46b4393e8b37092d684ff3c6f56bd20bd75:/wxPython/distrib/mac/wxPythonOSX/build?ds=sidebyside diff --git a/wxPython/distrib/mac/wxPythonOSX/build b/wxPython/distrib/mac/wxPythonOSX/build index 99d4a30e96..58456b12e3 100755 --- a/wxPython/distrib/mac/wxPythonOSX/build +++ b/wxPython/distrib/mac/wxPythonOSX/build @@ -15,17 +15,16 @@ fi function usage { echo "" - echo "Usage: $0 [apple|local] [command flags...]" + echo "Usage: $0 [panther|jaguar] [command flags...]" echo "" - echo " apple Build for Apple's python in /usr/bin" - echo " local Build for a locally installed python in /usr/local/bin" - echo " (for example Jaguar's MacPython)" + echo " panther Build for Apple's python in /usr/bin, such as on Panther" + echo " jaguar Build for a python in /usr/local/bin, such as on Jaguar" echo "" echo "optional command flags:" echo " skiptar Don't unpack the tarball" echo " use_cvs Use the CVS workspace instead of a tarfile" echo " skipconfig Don't run configure" - echo " skipbuild Don't build wxWindows or wxPython" + echo " skipbuild Don't build wxWidgets or wxPython" echo " skipinstall Don't do the installation step" echo " skipdmg Don't make the package or diskimage" echo " skipclean Don't do the cleanup at the end" @@ -40,9 +39,9 @@ fi KIND=$1 case $KIND in - apple) PYTHON=/usr/bin/python ;; - local) PYTHON=/usr/local/bin/python ;; - *) usage; exit 1 ;; + panther) PYTHON=/usr/bin/python ;; + jaguar) PYTHON=/usr/local/bin/python ;; + *) usage; exit 1 ;; esac PYTHONW=${PYTHON}w shift @@ -68,10 +67,11 @@ done VERSION=`$PYTHON -c "import setup;print setup.VERSION"` PYVER=`$PYTHON -c "import sys; print sys.version[:3]"` PYPREFIX=`$PYTHON -c "import sys; print sys.exec_prefix"` -SITEPACKAGES=$PYPREFIX/lib/python$PYVER/site-packages +PYLIB=$PYPREFIX/lib/python$PYVER +SITEPACKAGES=$PYLIB/site-packages -SRCDIR=/stuff/Development/wxPython/dist/$VERSION -TARBALL=$SRCDIR/wxPythonSrc-$VERSION.tar.gz +TARBALLDIR=/stuff/Development/wxPython/dist/$VERSION +TARBALL=$TARBALLDIR/wxPythonSrc-$VERSION.tar.gz PREFIX=/usr/lib/wxPython-$VERSION BINPREFIX=/usr/bin @@ -86,7 +86,7 @@ INSTALLDEVEL=$TMPDIR/install-devel DMGDIR=$TMPDIR/dmg RESOURCEDIR=$PROGDIR/resources DESTDIR=$PWD/dist - +SRCROOT=$BUILDROOT/wxPythonSrc-$VERSION #---------------------------------------------------------------------- @@ -96,7 +96,10 @@ mkdir -p $BUILDROOT mkdir -p $INSTALLROOT #mkdir -p $INSTALLDEVEL rm -rf $DMGDIR -mkdir -p $DMGDIR/root +mkdir -p $DMGDIR/root/Apps +mkdir -p $DMGDIR/root/Docs +mkdir -p $DMGDIR/root/Samples + pushd $BUILDROOT @@ -148,30 +151,31 @@ cd $WXDIR/bld #---------------------------------------------------------------------- -# Configure wxWindows +# Configure wxWidgets if [ -z "$skipconfig" ]; then ../configure \ --prefix=$PREFIX \ --with-mac \ --disable-monolithic \ --with-opengl \ + --enable-sound \ + --enable-display \ --enable-geometry \ - --enable-optimise \ --enable-precomp=no \ - \ - --with-libjpeg=builtin \ - --with-libpng=builtin \ - --with-libtiff=builtin \ - --with-zlib=builtin \ - \ --enable-debug_flag +## --enable-optimise \ +## --with-libjpeg=builtin \ +## --with-libpng=builtin \ +## --with-libtiff=builtin \ +## --with-zlib=builtin \ + fi -# Build wxWindows and wxPython +# Build wxWidgets and wxPython if [ -z "$skipbuild" ]; then - # Make wxWindows and some contribs + # Make wxWidgets and some contribs make make -C contrib/src/gizmos make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" @@ -201,9 +205,9 @@ if [ -z "$skipbuild" ]; then fi #---------------------------------------------------------------------- -# Install wxWindows if [ -z "$skipinstall" ]; then + # Install wxWidgets cd $WXDIR/bld make prefix=$INSTALLROOT$PREFIX install make -C contrib/src/gizmos prefix=$INSTALLROOT$PREFIX install @@ -221,23 +225,35 @@ if [ -z "$skipinstall" ]; then --root=$INSTALLROOT + # Apple's Python (on Panther) sym-links the site-packages dir to + # /Library/Python/$PYVER so we need to move the files so they are + # installed in the physical location, not the virtual one. + if [ "$KIND" = "panther" ]; then + mkdir -p $INSTALLROOT/Library/Python/$PYVER + mv $INSTALLROOT/$SITEPACKAGES/* $INSTALLROOT/Library/Python/$PYVER + rm -r $INSTALLROOT/System + SITEPACKAGES=/Library/Python/$PYVER + fi + + # install wxPython's tool scripts mkdir -p $INSTALLROOT$BINPREFIX cd $WXDIR/wxPython/scripts python$PYVER CreateMacScripts.py $INSTALLROOT $BINPREFIX + # Install wxrc cp $WXDIR/bld/contrib/utils/wxrc/wxrc $INSTALLROOT$BINPREFIX - # install the wxPython headers - cd $WXDIR/wxPython - cp -R include $INSTALLROOT$PREFIX - mkdir -p $INSTALLROOT$PREFIX/include/wx/wxPython/i_files - cp src/*.i $INSTALLROOT$PREFIX/include/wx/wxPython/i_files +# # install the wxPython headers +# cd $WXDIR/wxPython +# cp -R include $INSTALLROOT$PREFIX +# mkdir -p $INSTALLROOT$PREFIX/include/wx/wxPython/i_files +# cp src/*.i $INSTALLROOT$PREFIX/include/wx/wxPython/i_files - # TODO for $INSTALLROOT and $INSTALLDEVEL ? + # Set premissions for files in $INSTALLROOT chown -R root:admin $INSTALLROOT chmod -R g+w $INSTALLROOT fi @@ -256,14 +272,16 @@ if [ -z "$skipdmg" ]; then # Make the welcome message case $KIND in - apple) W_MSG="an Apple installed (Panther) version of" ;; - local) W_MSG="a locally built version (or Jaguar version) of" ;; + panther) W_MSG="the Panther (OS X 10.3.x) version of" ;; + jaguar) W_MSG="the Jaguar (OS X 10.2.x) version of" ;; esac cat > $RESOURCEDIR/Welcome.txt < $RESOURCEDIR/postflight < $DMGDIR/root/README.txt < "$DMGDIR/root/README 1st.txt" < "$DMGDIR/root/Docs/README 1st.txt" <