]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/all/build-windows
trim the whitespace from the daily build version text
[wxWidgets.git] / wxPython / distrib / all / build-windows
CommitLineData
36e91097
RD
1#!/bin/bash
2# ---------------------------------------------------------------------------
3# Build wxWidgets and wxPython on a Windows box. This is normally called
4# from build-all but it should be able to be used standalone too...
5#
6# The command line must have the following parameters:
7#
8# 1. the path to the base of the wx source tree
9# 2. the path of where to put the resulting installers
10# 3. skipclean flag (yes|no)
11# 4. the VERSION
12# 5. the remaining args are the versions of Python to build for
13#
14# ---------------------------------------------------------------------------
15
16set -o errexit
17#set -o xtrace
18
19echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
20
21if [ $# -lt 5 ]; then
22 echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..."
23 exit 1
24fi
25
26WXDIR=$1
27DESTDIR=$2
28SKIPCLEAN=$3
29VERSION=$4
30shift;shift;shift;shift
31PYVER=$@
32
33# WXDIR is the cygwin path, WXWIN is the DOS path
34WXWIN_OLD=$WXWIN
35WXWIN=`cygpath -w $WXDIR`
36export WXWIN
37
38# Fix the PATH. (Why is this needed??)
39PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/robind/bin:.:$WXDIR/lib/vc_dll:$PATH
40export PATH
41
42# change to the right spot and copy our build scripts
43cd $WXDIR/build/msw
44cp $WXDIR/wxPython/distrib/msw/.m* .
45
46# replace some settings in setup0.h and write to setup.h
47cat > .my.sedexpr <<EOF
48# s/wxDIALOG_UNIT_COMPATIBILITY *1/wxDIALOG_UNIT_COMPATIBILITY 0/g
49s/wxUSE_DEBUG_CONTEXT *0/wxUSE_DEBUG_CONTEXT 1/g
50s/wxUSE_MEMORY_TRACING *0/wxUSE_MEMORY_TRACING 1/g
51s/wxUSE_DIALUP_MANAGER *1/wxUSE_DIALUP_MANAGER 0/g
52s/wxUSE_GLCANVAS *0/wxUSE_GLCANVAS 1/g
53s/wxUSE_POSTSCRIPT *0/wxUSE_POSTSCRIPT 1/g
54s/wxUSE_AFM_FOR_POSTSCRIPT *1/wxUSE_AFM_FOR_POSTSCRIPT 0/g
55s/wxUSE_DISPLAY *0/wxUSE_DISPLAY 1/g
56EOF
57cat $WXDIR/include/wx/msw/setup0.h | sed -f .my.sedexpr > $WXDIR/include/wx/msw/setup.h
58rm .my.sedexpr
59
60
61echo "Building the wx DLLs..."
62.make hybrid
63.make hybrid-uni
64
65echo "Building the wx tools..."
66.make_tools
67
68# cheat and just copy the .CHM files from the regular project dir
69mkdir -p $WXDIR/docs/htmlhelp
70cp `cygpath $WXWIN_OLD/docs/htmlhelp`/*.chm $WXDIR/docs/htmlhelp
71
72
73echo "Building wxPython and installers..."
74cd $WXDIR/wxPython
8396fb3f 75mkdir -p dist
36e91097
RD
76
77for ver in $PYVER; do
78 echo $ver
79 b $ver d USE_SWIG=0
80 b $ver h USE_SWIG=0
81 b $ver r USE_SWIG=0
82 b $ver d UNICODE=1 USE_SWIG=0
83 b $ver h UNICODE=1 USE_SWIG=0
84 b $ver r UNICODE=1 USE_SWIG=0
85done
86
87echo "Building the developer package..."
884nt /c distrib/makedev.bat $VERSION
89
90
91echo "Copying installers to $DESTDIR..."
92mv dist/wxPythonWIN32* $DESTDIR
93cd $DESTDIR
94
95
96if [ $SKIPCLEAN != yes ]; then
97 echo "Cleaning up..."
98 rm -r $WXDIR
99fi
100
101echo "-=-=-=- Goodbye! -=-=-=-"