X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4bb599887258fe5d1dc0bfd27433932ea7e4347..23c06cde5df85dbfd94e92e90de225618191153f:/wxPython/distrib/all/do-build-windows diff --git a/wxPython/distrib/all/do-build-windows b/wxPython/distrib/all/do-build-windows index cd40bdb2bf..050b6e3051 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 @@ -27,30 +27,33 @@ WXDIR=$1 DESTDIR=$2 SKIPCLEAN=$3 VERSION=$4 -shift;shift;shift;shift -PYVER=$@ - +PYVER=$5 +CHARTYPE=$6 # WXDIR is the cygwin path, WXWIN is the DOS path -WXWIN_OLD=$WXWIN WXWIN=`cygpath -w $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 +export WXDIR +export TOOLS=/cygdrive/c/TOOLS + + +# setup the compiler +if [ $PYVER = 2.3 ]; then + echo "Using MSVC ver 6" + . msvcset local 6 + echo `which cl.exe` +else + echo "Using MSVC ver 7" + . msvcset local 7 + echo `which cl.exe` +fi # untar the source -echo "Unarchiving wxPython-src-$VERSION.tar.gz" +echo "Unarchiving wxPython-src-$VERSION.tar.bz2" cd $DESTDIR -tar xzf wxPython-src-$VERSION.tar.gz -rm wxPython-src-$VERSION.tar.gz +tar xjf wxPython-src-$VERSION.tar.bz2 +rm wxPython-src-$VERSION.tar.bz2 # Fix line endings @@ -64,11 +67,13 @@ unix2dos -D $names echo "Setting up for the build..." cd $WXDIR/build/msw cp $WXDIR/wxPython/distrib/msw/.m* . +chmod +x .m* # replace some settings in setup0.h and write to setup.h cat > .my.sedexpr < $WXDIR/include/wx/msw/setup.h rm .my.sedexpr echo "Building the wx DLLs..." -.make hybrid -.make hybrid-uni +if [ $CHARTYPE = both -o $CHARTYPE = ansi ]; then + .make hybrid USE_GDIPLUS=1 +fi +if [ $CHARTYPE = both -o $CHARTYPE = unicode ]; then + .make hybrid-uni USE_GDIPLUS=1 +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` + +# $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..." +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 -#echo "Building the wx tools..." -#.make_tools -# cheat and just copy the .CHM files from the regular project dir -# TODO: Copy over the wxPython-docs 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 +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 -for ver in $PYVER; do - echo $ver - b $ver d USE_SWIG=0 - b $ver h USE_SWIG=0 EP_ADD_OPTS=1 - b $ver r 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 echo "Building the developer package..." WXWIN=`cygpath -w $WXDIR` export WXWIN -4nt /c distrib/makedev.bat $VERSION +$TOOLS/4dos/4nt /c distrib/makedev.bat $VERSION echo "Copying installers to $DESTDIR..."