X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d66241556afede6743d3a8fc10240bd825e55bd2..a0d5472b1bd48a1e6cabb580fcc8864e0d7ccf59:/wxPython/distrib/all/build-windows?ds=sidebyside diff --git a/wxPython/distrib/all/build-windows b/wxPython/distrib/all/build-windows index 7024f4efca..fda836feca 100755 --- a/wxPython/distrib/all/build-windows +++ b/wxPython/distrib/all/build-windows @@ -1,128 +1,42 @@ #!/bin/bash -# --------------------------------------------------------------------------- -# Build wxWidgets and wxPython on a Windows box. This is normally called -# from build-all but it should be able to be used standalone too... -# -# The command line must have the following parameters: -# -# 1. the path to the base of the wx source tree -# 2. the path of where to put the resulting installers -# 3. skipclean flag (yes|no) -# 4. the VERSION -# 5. the remaining args are the versions of Python to build for -# -# --------------------------------------------------------------------------- +#---------------------------------------------------------------------- set -o errexit -#set -o xtrace -echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" -if [ $# -lt 5 ]; then - echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..." - exit 1 -fi - -WXDIR=$1 -DESTDIR=$2 -SKIPCLEAN=$3 -VERSION=$4 -shift;shift;shift;shift -PYVER=$@ - - -# WXDIR is the cygwin path, WXWIN is the DOS path -WXWIN_OLD=$WXWIN -WXWIN=`cygpath -m $WXDIR` -export WXWIN - - -# # Fix the PATH. (Why is this needed??) -# PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/robind/bin:.:$WXDIR/lib/vc_dll:$PATH -# export PATH -# echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" -# echo $PATH -# echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" -# exit 0 - - -# untar the source -echo "Unarchiving wxPythonSrc-$VERSION.tar.gz" -cd $DESTDIR -tar xzf wxPythonSrc-$VERSION.tar.gz -rm wxPythonSrc-$VERSION.tar.gz - - -# Fix line endings -echo "Converting wxPython line endings to CRLF..." -cd $WXDIR -names=`find wxPython -name "*.py" -o -name "*.txt" -o -name "*.htm*" -o -name "*.css" -o -name "*.h" -o -name "*.cpp" -o -name "*.c" -o -name "*.xml" ` -unix2dos -D $names - - -# change to the right spot in the source tree and copy our build scripts -echo "Setting up for the build..." -cd $WXDIR/build/msw -cp $WXDIR/wxPython/distrib/msw/.m* . - - -# replace some settings in setup0.h and write to setup.h -cat > .my.sedexpr < $WXDIR/include/wx/msw/setup.h -rm .my.sedexpr +PYVER=$1 - -echo "Building the wx DLLs..." -.make hybrid -.make hybrid-uni - - -echo "Building the wx tools..." -.make_tools - -# cheat and just copy the .CHM files from the regular project dir -# TODO: Copy over the wxPythonDocs fle and run hhc on the contents of that. -mkdir -p $WXDIR/docs/htmlhelp -cp `cygpath $WXWIN_OLD/docs/htmlhelp`/*.chm $WXDIR/docs/htmlhelp - - -echo "Building wxPython and installers..." -cd $WXDIR/wxPython -mkdir -p dist - -for ver in $PYVER; do - echo $ver - b $ver d USE_SWIG=0 - b $ver h USE_SWIG=0 - b $ver r USE_SWIG=0 - b $ver d UNICODE=1 USE_SWIG=0 - b $ver h UNICODE=1 USE_SWIG=0 - b $ver r UNICODE=1 USE_SWIG=0 -done - -echo "Building the developer package..." -WXWIN=`cygpath -w $WXDIR` -export WXWIN -4nt /c distrib/makedev.bat $VERSION - - -echo "Copying installers to $DESTDIR..." -mv dist/wxPythonWIN32* $DESTDIR -cd $DESTDIR - - -if [ $SKIPCLEAN != yes ]; then - echo "Cleaning up..." - rm -r $WXDIR || true +if [ $buildansi = yes ]; then + CHARTYPE=both +else + CHARTYPE=unicode fi -echo "-=-=-=- Goodbye! -=-=-=-" + +if [ $skipwin != yes ]; then + # test if the target machine is online + if ping -q -c1 -w1 $WIN_HOST > /dev/null; then + echo " The $WIN_HOST machine is online, Windows build continuing..." + else + echo "The $WIN_HOST machine is **OFFLINE**, skipping the Windows build." + return 0 + fi + + 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 $CHARTYPE && rm $cmd" + + echo "Fetching the results..." + scp "$WIN_HOST:$WIN_BUILD/wxPython*-win32*" $STAGING_DIR + ssh $WIN_HOST "rm $WIN_BUILD/wxPython*-win32*" + ssh $WIN_HOST "rm -rf $WIN_BUILD/*" + + echo "Done!" +fi \ No newline at end of file