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