]> git.saurik.com Git - wxWidgets.git/blame - wxPython/b.win32
fix building/running of tex2rtf
[wxWidgets.git] / wxPython / b.win32
CommitLineData
bdac31ba
RD
1#!/bin/bash
2# ----------------------------------------------------------------------
3
5e66e38e 4if [ "$SWIGDIR" = "" ]; then
94b2c6e6 5 SWIGDIR=$PROJECTS\\SWIG-1.3.29
5e66e38e
KO
6fi
7
bdac31ba
RD
8
9# Use non-default python?
f60a22bd 10case $1 in
e2b154e3
RD
11 21 | 2.1) VER=21; shift ;;
12 22 | 2.2) VER=22; shift ;;
13 23 | 2.3) VER=23; shift ;;
14 24 | 2.4) VER=24; shift ;;
a608c09d 15 25 | 2.5) VER=25; shift ;;
f60a22bd 16
e2b154e3 17 *) VER=24
f60a22bd
RD
18esac
19
20PYTHON=$TOOLS/python$VER/python.exe
bdac31ba
RD
21
22SETUP="$PYTHON -u setup.py"
23$PYTHON -c "import sys;print '\n', sys.version, '\n'"
24
25
454a21e9
RD
26FLAGS="USE_SWIG=1 SWIG=$SWIGDIR\\swig.exe"
27UNIFLAG="UNICODE=1"
28
29for p in $*; do
30 if [ "$p" = "UNICODE=0" -o "$p" = "UNICODE=1" ]; then
31 UNIFLAG=""
32 break
33 fi
34done
35
36FLAGS="$FLAGS $UNIFLAG"
37
38
39
40
41
bdac31ba
RD
42
43# "c" --> clean
44if [ "$1" = "c" ]; then
45 shift
46 CMD="$SETUP $FLAGS clean $@"
47 OTHERCMD="rm wx/*.pyd"
48
49# just remove the *.pyd's
50elif [ "$1" = "d" ]; then
51 shift
52 CMD="rm wx/*.pyd"
53
54# touch all the *.i files so swig will regenerate
55elif [ "$1" = "t" ]; then
56 shift
57 CMD=
58 find . -name "*.i" | xargs -l touch
59
60# "i" --> install
61elif [ "$1" = "i" ]; then
62 shift
63 CMD="$SETUP build install"
64
65# "r" --> make installer
66elif [ "$1" = "r" ]; then
67 shift
68 CMD="$PYTHON -u distrib\make_installer.py $@"
69
70# "s" --> source dist
71elif [ "$1" = "s" ]; then
72 shift
73 CMD="$SETUP sdist"
74
75# "f" --> FINAL
76elif [ "$1" == "f" ]; then
77 shift
78 CMD="$SETUP $FLAGS FINAL=1 build_ext --inplace $@"
79
80# "h" --> HYBRID
81elif [ "$1" = "h" ]; then
82 shift
83 CMD="$SETUP $FLAGS HYBRID=1 build_ext --inplace $@"
84
85# "a" --> make all installers
86elif [ "$1" = "a" ]; then
87 shift
88 CMD=
89
1d84f787
RD
90 $0 23 d UNICODE=0
91 $0 23 h UNICODE=0
92 $0 23 r UNICODE=0
bdac31ba
RD
93 $0 23 d UNICODE=1
94 $0 23 h UNICODE=1
95 $0 23 r UNICODE=1
96
1d84f787
RD
97 $0 24 d UNICODE=0
98 $0 24 h UNICODE=0
99 $0 24 r UNICODE=0
100 $0 24 d UNICODE=1
101 $0 24 h UNICODE=1
102 $0 24 r UNICODE=1
103
bdac31ba
RD
104
105# "b" --> both debug and hybrid builds
106elif [ "$1" = "b" ]; then
107 shift
108 CMD="echo Finished!"
109 $0 $VER $@
110 $0 $VER h $@
111
cb56afc4 112# (no command arg) --> normal debug build for development
bdac31ba
RD
113else
114 CMD="$SETUP $FLAGS HYBRID=0 build_ext --inplace --debug $@"
115fi
116
117
118
119if [ "$CMD" != "" ]; then
120 echo $CMD
121 $CMD
122fi
123
124if [ "$OTHERCMD" != "" ]; then
125 echo $OTHERCMD
126 $OTHERCMD
127fi
128