Some automated build scripts that wrap Robin's and make it easier to build installers (without having access to his R-bot build network:).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2005-09-20 01:56:22 +00:00
parent 608a34bf5b
commit f58a6c817e
3 changed files with 858 additions and 0 deletions
+90
View File
@@ -0,0 +1,90 @@
#!/bin/bash
PY_VERSION=$1
shift
if [ "$WXWIN" = "" ]; then
export WXWIN=`pwd`/../..
fi
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
# 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
$TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/create_setup.h.py` $@
export PATH=${PATH}:${WXWIN}/lib/vc_dll
cd $WXWIN/build/msw
# remove old build files
rm -rf vc_msw*
UNI=
if [ "$UNICODE" != "" ]; then
UNI=-uni
fi
./.make hybrid$UNI
# make tools for docs creation, etc.
./.make_tools
# update the language files
cd $WXWIN/locale
make allmo
# TODO: Make the documentation
cd $WXWIN/wxPython
#distrib/makedocs
$TOOLS/Python$PY_VERSION/python `cygpath -d distrib/makemo.py`
rm -rf build build.unicode
rm -rf wx/*.pyd
# re-generate SWIG files
b $PY_VERSION t
# build the hybrid extension
# NOTE: Win Python needs Windows-style pathnames, so we
# need to convert
export WXWIN=`cygpath -d $WXWIN`
export SWIGDIR=`cygpath -d $SWIGDIR`
DEBUG_FLAG=
UNICODE_FLAG=
if [ "$DEBUG" != "" ]; then
DEBUG_FLAG=--debug
fi
if [ "$UNICODE" != "" ]; then
UNICODE_FLAG="UNICODE=1"
fi
b $PY_VERSION h $DEBUG_FLAG $UNICODE_FLAG
# make the dev package
#distrib/makedev
$TOOLS/Python$PY_VERSION/python distrib/make_installer_inno4.py $UNICODE_FLAG
exit
elif [ "$OSTYPE" = "darwin" ]; then
cd $WXWIN/wxPython
# re-generate SWIG files
./b $PY_VERSION t
sudo distrib/mac/wxPythonOSX/build 2.3 panther inplace
exit
else
echo "OSTYPE $OSTYPE not yet supported by this build script."
fi
+50
View File
@@ -0,0 +1,50 @@
import sys, os, string, shutil, re
#TODO: copy .make files to build/msw
# update setup_h defines to match official wxPython settings
defines = {
'wxDIALOG_UNIT_COMPATIBILITY' :'0',
'wxUSE_DEBUG_CONTEXT' :'0',
'wxUSE_MEMORY_TRACING' :'0',
'wxUSE_DIALUP_MANAGER' :'0',
'wxUSE_GLCANVAS' :'1',
'wxUSE_POSTSCRIPT' :'1',
'wxUSE_AFM_FOR_POSTSCRIPT' :'0',
'wxUSE_DISPLAY' :'1',
'wxUSE_DEBUGREPORT' :'0'
}
uni_defines = {
'wxUSE_UNICODE' :'1',
'wxUSE_UNICODE_MSLU' :'1'
}
debug_defines = {
'wxUSE_DEBUG_CONTEXT' :'1',
'wxUSE_MEMORY_TRACING' :'1',
}
if "UNICODE=1" in sys.argv:
defines.update(uni_defines)
if "DEBUG=1" in sys.argv:
defines.update(debug_defines)
setup_dir = os.path.join("..", "..", "include", "wx", "msw")
# copy the file over if it doesn't exist
setup_h = os.path.join(setup_dir, "setup.h")
setup0_h = os.path.join(setup_dir, "setup0.h")
if not os.path.exists(setup_h) and os.path.exists(setup0_h):
shutil.copyfile(setup0_h, setup_h)
setup_file = open(setup_h, "rb").read()
for define in defines:
setup_file, num_subs = re.subn("%s\s+\d" % (define), "%s\t%s" % (define, defines[define]), setup_file)
print "# of subs made for pattern %s: %d" % (define, num_subs)
output = open(setup_h, "wb")
output.write(setup_file)
output.close()
File diff suppressed because it is too large Load Diff