2005-09-19 21:56:22 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2005-09-23 01:13:28 -04:00
|
|
|
unicode=no
|
|
|
|
debug=no
|
2005-12-15 20:38:48 -05:00
|
|
|
reswig=no
|
|
|
|
all=no
|
|
|
|
|
|
|
|
if [ "$1" = "all" ]; then
|
|
|
|
all=yes
|
|
|
|
else
|
|
|
|
PY_VERSION=$1
|
|
|
|
fi
|
|
|
|
|
|
|
|
shift
|
2005-09-23 01:13:28 -04:00
|
|
|
|
|
|
|
for flag in $*; do
|
|
|
|
case ${flag} in
|
|
|
|
debug) debug=yes ;;
|
|
|
|
unicode) unicode=yes ;;
|
2005-12-15 20:38:48 -05:00
|
|
|
reswig) reswig=yes ;;
|
2005-09-23 01:13:28 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2005-09-19 21:56:22 -04:00
|
|
|
if [ "$WXWIN" = "" ]; then
|
|
|
|
export WXWIN=`pwd`/../..
|
|
|
|
fi
|
|
|
|
|
2005-12-15 20:38:48 -05:00
|
|
|
if [ $all = yes ]; then
|
|
|
|
$WXWIN/wxPython/distrib/build_packages.sh 23
|
|
|
|
$WXWIN/wxPython/distrib/build_packages.sh 23 unicode
|
|
|
|
$WXWIN/wxPython/distrib/build_packages.sh 24
|
|
|
|
$WXWIN/wxPython/distrib/build_packages.sh 24 unicode
|
|
|
|
fi
|
|
|
|
|
2005-09-19 21:56:22 -04:00
|
|
|
echo "wxWidgets directory is: $WXWIN"
|
|
|
|
|
|
|
|
if [ "$OSTYPE" = "cygwin" ]; then
|
|
|
|
# do setup of build environment vars
|
|
|
|
if [ "$TOOLS" = "" ]; then
|
|
|
|
export TOOLS=`cygpath C:\\`
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$SWIGDIR" = "" ]; then
|
|
|
|
export SWIGDIR=$TOOLS/SWIG-1.3.24
|
|
|
|
fi
|
|
|
|
|
2005-09-28 19:28:35 -04:00
|
|
|
DEBUG_FLAG=
|
|
|
|
UNICODE_FLAG=
|
|
|
|
if [ $debug = yes ]; then
|
|
|
|
DEBUG_FLAG=--debug
|
|
|
|
fi
|
|
|
|
if [ $unicode = yes ]; then
|
|
|
|
UNICODE_FLAG="UNICODE=1"
|
|
|
|
fi
|
|
|
|
|
2005-09-19 21:56:22 -04:00
|
|
|
# copy wxPython build scripts
|
|
|
|
cp $WXWIN/wxPython/distrib/msw/.m* $WXWIN/build/msw
|
|
|
|
|
|
|
|
# setup wxPython defines
|
|
|
|
cp $WXWIN/include/wx/msw/setup0.h $WXWIN/include/wx/msw/setup.h
|
2005-09-28 19:28:35 -04:00
|
|
|
$TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/create_setup.h.py` $UNICODE_FLAG
|
2005-09-19 21:56:22 -04:00
|
|
|
|
2005-09-28 19:28:35 -04:00
|
|
|
export PATH=${PATH}:${WXWIN}/lib/vc_dll:${TOOLS}/Python${PY_VERSION}
|
2005-09-19 21:56:22 -04:00
|
|
|
|
|
|
|
cd $WXWIN/build/msw
|
|
|
|
# remove old build files
|
|
|
|
rm -rf vc_msw*
|
|
|
|
UNI=
|
2005-09-23 01:13:28 -04:00
|
|
|
if [ $unicode = yes ]; then
|
2005-09-19 21:56:22 -04:00
|
|
|
UNI=-uni
|
|
|
|
fi
|
|
|
|
./.make hybrid$UNI
|
|
|
|
# make tools for docs creation, etc.
|
|
|
|
./.make_tools
|
|
|
|
|
2005-12-22 01:09:26 -05:00
|
|
|
cd $WXWIN/wxPython
|
|
|
|
|
2005-09-19 21:56:22 -04:00
|
|
|
# update the language files
|
2005-09-28 19:28:35 -04:00
|
|
|
$TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/makemo.py`
|
2005-09-19 21:56:22 -04:00
|
|
|
rm -rf build build.unicode
|
|
|
|
rm -rf wx/*.pyd
|
|
|
|
|
|
|
|
# re-generate SWIG files
|
2005-12-15 20:38:48 -05:00
|
|
|
if [ $reswig = yes ]; then
|
|
|
|
$WXWIN/wxPython/b $PY_VERSION t
|
|
|
|
fi
|
2005-09-19 21:56:22 -04:00
|
|
|
|
|
|
|
# build the hybrid extension
|
|
|
|
# NOTE: Win Python needs Windows-style pathnames, so we
|
|
|
|
# need to convert
|
2005-09-28 19:28:35 -04:00
|
|
|
export WXWIN=`cygpath -w $WXWIN`
|
|
|
|
export SWIGDIR=`cygpath -w $SWIGDIR`
|
2005-09-19 21:56:22 -04:00
|
|
|
|
2005-09-28 19:28:35 -04:00
|
|
|
$WXWIN/wxPython/b $PY_VERSION h $DEBUG_FLAG $UNICODE_FLAG
|
2005-09-19 21:56:22 -04:00
|
|
|
|
|
|
|
# make the dev package
|
2005-09-28 19:28:35 -04:00
|
|
|
$WXWIN/wxPython/distrib/makedev
|
2005-12-15 20:38:48 -05:00
|
|
|
$WXWIN/wxPython/distrib/makedocs
|
|
|
|
$WXWIN/wxPython/distrib/makedemo
|
2005-09-19 21:56:22 -04:00
|
|
|
|
2005-09-28 19:28:35 -04:00
|
|
|
$TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/make_installer_inno4.py` $UNICODE_FLAG
|
2005-09-19 21:56:22 -04:00
|
|
|
elif [ "$OSTYPE" = "darwin" ]; then
|
2006-01-27 21:11:22 -05:00
|
|
|
OSX_VERSION=`sw_vers -productVersion`
|
|
|
|
echo "OS X Version: ${OSX_VERSION:0:4}"
|
2005-09-19 21:56:22 -04:00
|
|
|
cd $WXWIN/wxPython
|
|
|
|
|
2005-12-15 20:38:48 -05:00
|
|
|
if [ ! -d dist ]; then
|
|
|
|
mkdir dist
|
|
|
|
fi
|
2005-09-19 21:56:22 -04:00
|
|
|
# re-generate SWIG files
|
2006-01-27 21:11:22 -05:00
|
|
|
RESWIG=
|
2005-12-15 20:38:48 -05:00
|
|
|
if [ $reswig = yes ]; then
|
2006-01-27 21:11:22 -05:00
|
|
|
RESWIG=reswig
|
2005-12-15 20:38:48 -05:00
|
|
|
fi
|
2005-09-19 21:56:22 -04:00
|
|
|
|
2005-09-21 00:43:48 -04:00
|
|
|
PY_DOT_VER=2.3
|
|
|
|
if [ "$PY_VERSION" = "24" ]; then
|
|
|
|
PY_DOT_VER=2.4
|
|
|
|
fi
|
|
|
|
|
|
|
|
UNICODE_OPT=
|
2005-09-23 01:13:28 -04:00
|
|
|
if [ $unicode = yes ]; then
|
2005-09-21 00:43:48 -04:00
|
|
|
UNICODE_OPT=unicode
|
|
|
|
fi
|
|
|
|
|
2006-01-27 21:11:22 -05:00
|
|
|
# On Tiger, build Universal.
|
|
|
|
UNIV_OPT=
|
|
|
|
if [ ${OSX_VERSION:0:4} = "10.4" ]; then
|
|
|
|
UNIV_OPT="universal"
|
|
|
|
fi
|
|
|
|
|
2005-12-15 20:38:48 -05:00
|
|
|
#sudo $WXWIN/wxPython/distrib/makedocs
|
|
|
|
$WXWIN/wxPython/distrib/makedemo
|
|
|
|
export TARBALLDIR=$WXWIN/wxPython/dist
|
2006-01-27 21:11:22 -05:00
|
|
|
echo "distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT $RESWIG"
|
2005-12-15 20:38:48 -05:00
|
|
|
|
2006-01-27 21:11:22 -05:00
|
|
|
distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT $RESWIG $UNIV_OPT
|
2005-09-19 21:56:22 -04:00
|
|
|
else
|
|
|
|
echo "OSTYPE $OSTYPE not yet supported by this build script."
|
|
|
|
fi
|
2005-09-28 19:28:35 -04:00
|
|
|
|
2005-12-15 20:38:48 -05:00
|
|
|
# return to original dir
|
|
|
|
cd $WXWIN/wxPython/distrib
|
2005-09-28 19:28:35 -04:00
|
|
|
|