]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/build_packages.sh
suppress gcc warnings about class having private dtor and no friends
[wxWidgets.git] / wxPython / distrib / build_packages.sh
CommitLineData
f58a6c81
KO
1#!/bin/bash
2
3PY_VERSION=$1
4shift
5
919de94c
KO
6unicode=no
7debug=no
8
9for flag in $*; do
10 case ${flag} in
11 debug) debug=yes ;;
12 unicode) unicode=yes ;;
13 esac
14done
15
f58a6c81
KO
16if [ "$WXWIN" = "" ]; then
17 export WXWIN=`pwd`/../..
18fi
19
20echo "wxWidgets directory is: $WXWIN"
21
22if [ "$OSTYPE" = "cygwin" ]; then
23 # do setup of build environment vars
24 if [ "$TOOLS" = "" ]; then
25 export TOOLS=`cygpath C:\\`
26 fi
27
28 if [ "$SWIGDIR" = "" ]; then
29 export SWIGDIR=$TOOLS/SWIG-1.3.24
30 fi
31
82378a4f
KO
32 DEBUG_FLAG=
33 UNICODE_FLAG=
34 if [ $debug = yes ]; then
35 DEBUG_FLAG=--debug
36 fi
37 if [ $unicode = yes ]; then
38 UNICODE_FLAG="UNICODE=1"
39 fi
40
f58a6c81
KO
41 # copy wxPython build scripts
42 cp $WXWIN/wxPython/distrib/msw/.m* $WXWIN/build/msw
43
44 # setup wxPython defines
45 cp $WXWIN/include/wx/msw/setup0.h $WXWIN/include/wx/msw/setup.h
82378a4f 46 $TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/create_setup.h.py` $UNICODE_FLAG
f58a6c81 47
82378a4f 48 export PATH=${PATH}:${WXWIN}/lib/vc_dll:${TOOLS}/Python${PY_VERSION}
f58a6c81
KO
49
50 cd $WXWIN/build/msw
51 # remove old build files
52 rm -rf vc_msw*
53 UNI=
919de94c 54 if [ $unicode = yes ]; then
f58a6c81
KO
55 UNI=-uni
56 fi
57 ./.make hybrid$UNI
58
59 # make tools for docs creation, etc.
60 ./.make_tools
61
62 # update the language files
63 cd $WXWIN/locale
64 make allmo
65
82378a4f 66 $TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/makemo.py`
f58a6c81 67
82378a4f 68 cd $WXWIN/wxPython
f58a6c81
KO
69
70 rm -rf build build.unicode
71 rm -rf wx/*.pyd
72
73 # re-generate SWIG files
82378a4f 74 $WXWIN/wxPython/b $PY_VERSION t
f58a6c81
KO
75
76 # build the hybrid extension
77 # NOTE: Win Python needs Windows-style pathnames, so we
78 # need to convert
82378a4f
KO
79 export WXWIN=`cygpath -w $WXWIN`
80 export SWIGDIR=`cygpath -w $SWIGDIR`
f58a6c81 81
82378a4f 82 $WXWIN/wxPython/b $PY_VERSION h $DEBUG_FLAG $UNICODE_FLAG
f58a6c81
KO
83
84 # make the dev package
82378a4f 85 $WXWIN/wxPython/distrib/makedev
f58a6c81 86
82378a4f 87 $TOOLS/Python$PY_VERSION/python `cygpath -d $WXWIN/wxPython/distrib/make_installer_inno4.py` $UNICODE_FLAG
f58a6c81
KO
88elif [ "$OSTYPE" = "darwin" ]; then
89 cd $WXWIN/wxPython
90
91 # re-generate SWIG files
82378a4f 92 $WXWIN/wxPython/b $PY_VERSION t
f58a6c81 93
fc87210f
KO
94 PY_DOT_VER=2.3
95 if [ "$PY_VERSION" = "24" ]; then
96 PY_DOT_VER=2.4
97 fi
98
99 UNICODE_OPT=
919de94c 100 if [ $unicode = yes ]; then
fc87210f
KO
101 UNICODE_OPT=unicode
102 fi
103
104 sudo distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT
f58a6c81
KO
105else
106 echo "OSTYPE $OSTYPE not yet supported by this build script."
107fi
82378a4f
KO
108
109# Now make the demo and docs tarballs
110cd $WXWIN/wxPython
111$WXWIN/wxPython/distrib/makedocs
112$WXWIN/wxPython/distrib/makedemo
113