From f5ed42f875325bbadce5e43fe7131e295724359d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 13 Jul 2006 02:40:46 +0000 Subject: [PATCH] enable building just the unicode version, or both unicode and ansi git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/all/build-all | 6 +- wxPython/distrib/all/build-environ.cfg | 2 +- wxPython/distrib/all/build-osx | 11 +++- wxPython/distrib/all/build-rpm | 11 ++-- wxPython/distrib/all/build-windows | 12 +++- wxPython/distrib/all/do-build-osx | 2 +- wxPython/distrib/all/do-build-rpm | 28 +++++---- wxPython/distrib/all/do-build-windows | 82 +++++++++++++++----------- 8 files changed, 95 insertions(+), 59 deletions(-) diff --git a/wxPython/distrib/all/build-all b/wxPython/distrib/all/build-all index dde73c9a06..2d005d1374 100755 --- a/wxPython/distrib/all/build-all +++ b/wxPython/distrib/all/build-all @@ -120,9 +120,10 @@ def usage(): print " skipdocs Don't rebuild the docs" print " skipwin Don't do the remote Windows build" print " skiposx Don't do the remote OSX build" - print " skiplinux Don't do the remote Linux build" + print " skiplinux Don't do the remote Linux (RPM) build" print " skipclean Don't do the cleanup step on the remote builds" print " skipupload Don't upload the builds to starship" + print " ansi Also do the ansi builds" print "" print " nocohost Don't start the coLinux sessions if they are" print " not already online" @@ -173,6 +174,9 @@ def main(args): elif flag == "skipupload": config.skipupload = "yes" + elif flag == "ansi": + config.buildansi = "yes" + elif flag == "nocohost": config.startcohost = "no" diff --git a/wxPython/distrib/all/build-environ.cfg b/wxPython/distrib/all/build-environ.cfg index eb3e7dc040..f04856678a 100644 --- a/wxPython/distrib/all/build-environ.cfg +++ b/wxPython/distrib/all/build-environ.cfg @@ -39,4 +39,4 @@ skipclean = no skipupload = no skipnewdocs = no startcohost = yes - +buildansi = no diff --git a/wxPython/distrib/all/build-osx b/wxPython/distrib/all/build-osx index 6c53d29d66..b31c82c461 100755 --- a/wxPython/distrib/all/build-osx +++ b/wxPython/distrib/all/build-osx @@ -12,12 +12,21 @@ flags=$4 if [ $skiposx != yes ]; then # test if the target machine is online if ping -q -c1 -w1 $host > /dev/null; then - echo " The $host machine is online, OSX build continuing..." + echo "The $host machine is online, OSX build continuing..." else echo "The $host machine is **OFFLINE**, skipping the OSX build." exit 0 fi + if [ $chartype == ansi -a $buildansi == no ]; then + echo "Skipping ansi-only build host" + exit 0 + fi + + if [ $chartype == both -a $buildansi == no ]; then + chartype=unicode + fi + echo "Copying source files and build script..." ssh root@$host "mkdir -p $OSX_BUILD && rm -rf $OSX_BUILD/* || true" diff --git a/wxPython/distrib/all/build-rpm b/wxPython/distrib/all/build-rpm index 9438872a78..d04f25ba70 100755 --- a/wxPython/distrib/all/build-rpm +++ b/wxPython/distrib/all/build-rpm @@ -7,11 +7,12 @@ set -o errexit coHost=$1 host=$2 reltag=$3 -shift;shift;shift -pyver=$@ +pyver=$4 -if [ $pyver = config ]; then - pyver=$PYVER +if [ $buildansi = yes ]; then + CHARTYPE=both +else + CHARTYPE=unicode fi @@ -81,7 +82,7 @@ if [ $skiplinux != yes ]; then echo "Running build script on $host..." cmd=./do-build-rpm - ssh root@$host "cd $LINUX_BUILD && $cmd $reltag $skipclean $VERSION $pyver" + ssh root@$host "cd $LINUX_BUILD && $cmd $reltag $skipclean $VERSION $pyver $CHARTYPE" echo "Fetching the results..." scp "root@$host:$LINUX_BUILD/wxPython*.i[0-9]86.rpm" $STAGING_DIR diff --git a/wxPython/distrib/all/build-windows b/wxPython/distrib/all/build-windows index 7e51c96be5..056f9add42 100755 --- a/wxPython/distrib/all/build-windows +++ b/wxPython/distrib/all/build-windows @@ -6,6 +6,13 @@ set -o errexit PYVER=$1 +if [ $buildansi = yes ]; then + CHARTYPE=both +else + CHARTYPE=unicode +fi + + if [ $skipwin != yes ]; then # test if the target machine is online if ping -q -c1 -w1 $WIN_HOST > /dev/null; then @@ -15,15 +22,16 @@ if [ $skipwin != yes ]; then return 0 fi - echo "Copying source file and build script..." + echo "Copying source, docs and build script..." scp $STAGING_DIR/wxPython-src-$VERSION.tar.bz2 \ + $STAGING_DIR/wxPython-docs-$VERSION.tar.bz2 \ distrib/all/do-build-windows \ $WIN_HOST:$WIN_BUILD echo "Running build script on $WIN_HOST..." wxdir=$WIN_BUILD/wxPython-src-$VERSION cmd=./do-build-windows - ssh $WIN_HOST "cd $WIN_BUILD && $cmd $wxdir $WIN_BUILD $skipclean $VERSION $PYVER && rm $cmd" + ssh $WIN_HOST "cd $WIN_BUILD && $cmd $wxdir $WIN_BUILD $skipclean $VERSION $PYVER $CHARTYPE && rm $cmd" echo "Fetching the results..." scp "$WIN_HOST:$WIN_BUILD/wxPython*-win32*" $STAGING_DIR diff --git a/wxPython/distrib/all/do-build-osx b/wxPython/distrib/all/do-build-osx index e97c0a9626..0da2b049d8 100755 --- a/wxPython/distrib/all/do-build-osx +++ b/wxPython/distrib/all/do-build-osx @@ -52,8 +52,8 @@ cd $WXDIR/wxPython export TARBALLDIR=$DESTDIR mkdir -p dist if [ $CHARTYPE = both ]; then - distrib/mac/wxPythonOSX/build $PYVER inplace unicode $FLAGS distrib/mac/wxPythonOSX/build $PYVER inplace ansi $FLAGS + distrib/mac/wxPythonOSX/build $PYVER inplace unicode $FLAGS else distrib/mac/wxPythonOSX/build $PYVER inplace $CHARTYPE $FLAGS fi diff --git a/wxPython/distrib/all/do-build-rpm b/wxPython/distrib/all/do-build-rpm index 15a89e1f78..e36b8d03b2 100755 --- a/wxPython/distrib/all/do-build-rpm +++ b/wxPython/distrib/all/do-build-rpm @@ -18,16 +18,16 @@ set -o errexit echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" -if [ $# -lt 4 ]; then - echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..." +if [ $# -lt 5 ]; then + echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER CHARTYPE" exit 1 fi RELEASE=$1 SKIPCLEAN=$2 VERSION=$3 -shift;shift;shift -PYVER=$@ +PYVER=$4 +CHARTYPE=$5 rpmtop=_rpm_top @@ -71,16 +71,20 @@ done cp wxPython-src-$VERSION.tar.bz2 $rpmtop/SOURCES -echo "******************** PYVER = " $PYVER -for ver in $PYVER; do - echo "Building the RPMs for Python $ver..." +echo "************************************************" +echo "Building the RPMs for Python $PYVER, $CHARTYPE" - ## for now let's just do the gtk2 builds - ##DoRPMBuild $ver gtk 0 +## for now let's just do the gtk2 builds +##if [ $CHARTYPE = both -o $CHARTYPE = ansi ]; then +## DoRPMBuild $ver gtk 0 +##fi - DoRPMBuild $ver gtk2 0 - DoRPMBuild $ver gtk2 1 -done +if [ $CHARTYPE = both -o $CHARTYPE = ansi ]; then + DoRPMBuild $PYVER gtk2 0 +fi +if [ $CHARTYPE = both -o $CHARTYPE = unicode ]; then + DoRPMBuild $PYVER gtk2 1 +fi echo "*** Moving RPMs to ." diff --git a/wxPython/distrib/all/do-build-windows b/wxPython/distrib/all/do-build-windows index 4fe7658a46..014c351219 100755 --- a/wxPython/distrib/all/do-build-windows +++ b/wxPython/distrib/all/do-build-windows @@ -18,8 +18,8 @@ set -o errexit echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" -if [ $# -lt 5 ]; then - echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..." +if [ $# -lt 6 ]; then + echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER CHARTYPE" exit 1 fi @@ -28,7 +28,7 @@ DESTDIR=$2 SKIPCLEAN=$3 VERSION=$4 PYVER=$5 - +CHARTYPE=$6 # WXDIR is the cygwin path, WXWIN is the DOS path WXWIN=`cygpath -w $WXDIR` @@ -89,37 +89,47 @@ rm .my.sedexpr echo "Building the wx DLLs..." -.make hybrid -.make hybrid-uni +if [ $CHARTYPE = both -o $CHARTYPE = ansi ]; then + .make hybrid +fi +if [ $CHARTYPE = both -o $CHARTYPE = unicode ]; then + .make hybrid-uni +fi + + +# echo "Building tex2rtf..." +# cd $WXDIR/utils/tex2rtf/src +# $WXDIR/build/msw/.mymake hybrid +# cp vc_mswhdll/tex2rtf.exe $WXDIR/lib/vc_dll/tex2rtf.exe +# echo "Translating docs to html..." +# DOCDIR=$WXDIR/docs +# cd $DOCDIR/latex/wx +# mkdir -p $DOCDIR/html/wx +# cp *.gif $DOCDIR/html/wx +# cp *.css $DOCDIR/html/wx +# DOCSRC=`cygpath -w $DOCDIR/latex/wx/manual.tex` +# DOCDEST=`cygpath -w $DOCDIR/html/wx/wx.htm` +# DOCINI=`cygpath -w $DOCDIR/latex/wx/tex2rtf_css.ini` -echo "Building tex2rtf..." -cd $WXDIR/utils/tex2rtf/src -$WXDIR/build/msw/.mymake hybrid -cp vc_mswhdll/tex2rtf.exe $WXDIR/lib/vc_dll/tex2rtf.exe +# $WXDIR/lib/vc_dll/tex2rtf.exe $DOCSRC $DOCDEST -twice -html -macros $DOCINI + + +echo "Extracting html docs..." +mkdir -p $WXDIR/docs/html/wx +cd $WXDIR/docs/html/wx +rm -rf * +tar xjf $DESTDIR/wxPython-docs-$VERSION.tar.bz2 +rm $DESTDIR/wxPython-docs-$VERSION.tar.bz2 +unzip wxPython-$VERSION/docs/wx.zip echo "Building the HTMLHelp file..." -DOCDIR=$WXDIR/docs -cd $DOCDIR/latex/wx -mkdir -p $DOCDIR/html/wx -cp *.gif $DOCDIR/html/wx -cp *.css $DOCDIR/html/wx -DOCSRC=`cygpath -w $DOCDIR/latex/wx/manual.tex` -DOCDEST=`cygpath -w $DOCDIR/html/wx/wx.htm` -DOCINI=`cygpath -w $DOCDIR/latex/wx/tex2rtf_css.ini` - -$WXDIR/lib/vc_dll/tex2rtf.exe $DOCSRC $DOCDEST -twice -html -macros $DOCINI - -cd $DOCDIR/html/wx -cp $DOCDIR/latex/wx/wx.css . +cd $WXDIR/docs/html/wx +##cp $DOCDIR/latex/wx/wx.css . $TOOLS/HTMLHelpWorkshop/hhc.exe wx.hhp || true mkdir -p ../../htmlhelp mv wx.chm ../../htmlhelp -# rm -f $DOCDIR/html/wx/*.con -# rm -f $DOCDIR/html/wx/*.ref -# rm -f $DOCDIR/latex/wx/*.con -# rm -f $DOCDIR/latex/wx/*.ref @@ -127,16 +137,16 @@ mv wx.chm ../../htmlhelp echo "Building wxPython and installers..." cd $WXDIR/wxPython mkdir -p dist - -for ver in $PYVER; do - echo $ver - b $ver d UNICODE=0 USE_SWIG=0 - b $ver h UNICODE=0 USE_SWIG=0 EP_ADD_OPTS=1 - b $ver r UNICODE=0 USE_SWIG=0 - b $ver d UNICODE=1 USE_SWIG=0 - b $ver h UNICODE=1 USE_SWIG=0 EP_ADD_OPTS=1 - b $ver r UNICODE=1 USE_SWIG=0 -done +if [ $CHARTYPE = both -o $CHARTYPE = ansi ]; then + b $PYVER d UNICODE=0 USE_SWIG=0 + b $PYVER h UNICODE=0 USE_SWIG=0 EP_ADD_OPTS=1 + b $PYVER r UNICODE=0 USE_SWIG=0 +fi +if [ $CHARTYPE = both -o $CHARTYPE = unicode ]; then + b $PYVER d UNICODE=1 USE_SWIG=0 + b $PYVER h UNICODE=1 USE_SWIG=0 EP_ADD_OPTS=1 + b $PYVER r UNICODE=1 USE_SWIG=0 +fi echo "Building the developer package..." WXWIN=`cygpath -w $WXDIR` -- 2.45.2