]> git.saurik.com Git - wxWidgets.git/blame - distrib/scripts/unix/maketarballs
optimization for faster execution: don't use wxString::Replace() all the times a...
[wxWidgets.git] / distrib / scripts / unix / maketarballs
CommitLineData
8fc3a8c9
KO
1#!/bin/sh
2# Makes the wxWidgets tarballs with 'make dist'
3
1646ae22
KO
4PROGNAME=$0
5WXSRC=$1
6WXDEST=$2
7WXVER=$3
8
9# for docopyreadmefiles and docopysetup_h
10SCRIPTDIR=$WXSRC/distrib/scripts
11. $SCRIPTDIR/utils.inc
12
8fc3a8c9
KO
13doupdatecvs()
14{
15 cd $WXSRC
16 echo Updating from CVS...
17 cvswx update -d -P
18}
19
20dospinwxgtk()
21{
22 echo Making wxGTK tarballs...
23
24 if [ ! -d $WXDEST ]; then
25 mkdir $WXDEST
26 fi
27
28 rm -f -r $WXDEST/wxgtk
29 mkdir $WXDEST/wxgtk
30 mkdir $WXDEST/wxgtk/release
31
32 cd $WXSRC
33 cd locale
34 make allmo
35 cd $WXDEST/wxgtk/release
36 echo Configuring...
37 $WXSRC/configure --no-recursion
38 echo Making...
39 make -j1 dist bzip-dist-only
40 mv $WXDEST/wxgtk/release/*.gz $WXDEST/wxgtk/release/*.bz2 $WXDEST
41}
42
43dospinwxmgl()
44{
45 echo Making wxMGL tarballs...
46
47 if [ ! -d $WXDEST ]; then
48 mkdir $WXDEST
49 fi
50
51 rm -f -r $WXDEST/wxmgl
52 mkdir $WXDEST/wxmgl
53 mkdir $WXDEST/wxmgl/release
54
55 cd $WXSRC
56 cd locale
57 make allmo
58 cd $WXDEST/wxmgl/release
59 echo Configuring...
60 $WXSRC/configure --no-recursion --with-mgl
61 echo Making...
62 make -j1 dist bzip-dist-only
63 mv $WXDEST/wxmgl/release/*.gz $WXDEST/wxmgl/release/*.bz2 $WXDEST
64}
65
66dospinwxbase()
67{
68 echo Making wxBase tarballs...
69
70 if [ ! -d $WXDEST ]; then
71 mkdir $WXDEST
72 fi
73
74 rm -f -r $WXDEST/wxbase
75 mkdir $WXDEST/wxbase
76 mkdir $WXDEST/wxbase/release
77
78 cd $WXSRC
79 cd locale
80 make allmo
81 cd $WXDEST/wxbase/release
82 echo Configuring...
83 $WXSRC/configure --no-recursion --disable-gui
84 echo Making...
85 make -j1 dist bzip-dist-only
86 mv $WXDEST/wxbase/release/*.gz $WXDEST/wxbase/release/*.bz2 $WXDEST
87}
88
89dospinwxx11()
90{
91 echo Making wxX11 tarballs...
92
93 if [ ! -d $WXDEST ]; then
94 mkdir $WXDEST
95 fi
96
97 rm -f -r $WXDEST/wxx11
98 mkdir $WXDEST/wxx11
99 mkdir $WXDEST/wxx11/release
100
101 cd $WXSRC
102 cd locale
103 make allmo
104 cd $WXDEST/wxx11/release
105 echo Configuring...
106 $WXSRC/configure --with-x11 --no-recursion
107 echo Making...
108 make -j1 dist bzip-dist-only
109
110 cp $WXDEST/wxx11/release/*.tar.gz $WXDEST
111 cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST
112}
113
114dospinwxmotif()
115{
116 echo Making wxMotif tarballs...
117
118 if [ ! -d $WXDEST ]; then
119 mkdir $WXDEST
120 fi
121
122 rm -f -r $WXDEST/wxmotif
123 mkdir $WXDEST/wxmotif
124 mkdir $WXDEST/wxmotif/release
125
126 cd $WXSRC
127 cd locale
128 make allmo
129 cd $WXDEST/wxmotif/release
130 echo Configuring...
131 $WXSRC/configure --with-motif --no-recursion
132 echo Making...
133 make -j1 dist bzip-dist-only
134
135 cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST
136 cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST
137
138 echo Rearchiving wxMotif tarballs to change wxMOTIF to wxMotif...
139 cd $WXDEST
140 mkdir wxMotif.tmp
141 cd wxMotif.tmp
142 rm -f -r *
143 tar xfz ../wxMOTIF-$WXVER.tar.gz
144 mv wxMOTIF-$WXVER wxMotif-$WXVER
145 rm -f ../wxMOTIF-$WXVER.tar.gz
146 rm -f ../wxMOTIF-$WXVER.tar.bz2
147 tar cf ../wxMotif-$WXVER.tar *
148 gzip -c ../wxMotif-$WXVER.tar > ../wxMotif-$WXVER.tar.gz
149 bzip2 -f9 ../wxMotif-$WXVER.tar
150 cd ..
151 rm -f -r wxMotif.tmp
152# rm -f -r $WXDEST/wxmotif
153}
154
8fc3a8c9
KO
155dospindocs()
156{
157 mkdir -p $WXSRC/docs/html/wx
158 mkdir -p $WXSRC/docs/html/tex2rtf
159 mkdir -p $WXSRC/docs/html/fl
160 mkdir -p $WXSRC/docs/html/ogl
161 mkdir -p $WXSRC/docs/htb
162
163 rm -f -r $WXSRC/docs/html/wx/*.htm*
164 rm -f -r $WXSRC/docs/htb/wx.htb
165
166 echo Making HTML wxWidgets manual...
167 cd $WXSRC/docs/latex/wx
168 cp *.gif $WXSRC/docs/html/wx
169 tex2rtf manual.tex $WXSRC/docs/html/wx/wx.htm -twice -html
170
171 echo Making HTB wxWidgets manual...
172 cd $WXSRC/docs/html/wx
173 zip -q $WXSRC/docs/htb/wx.htb *.html *.gif *.hhp *.hhc *.hhk
174
175 echo Archiving manuals...
176 # TODO
177
178 echo Done making manuals.
179}
180
8fc3a8c9
KO
181SPINWXX11=0
182SPINWXGTK=0
183SPINWXMOTIF=0
184SPINWXMAC=0
185SPINWXBASE=0
186SPINWXMGL=0
187SPINDOCS=0
188SPINEVERYTHING=0
189UPDATECVS=0
190SILENT=0
191
192usage()
193{
194 echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
195 echo Options:
196 echo " --help Display this help message"
197 echo " --wxgtk Spin wxGTK"
198 echo " --wxbase Spin wxBase"
199 echo " --wxx11 Spin wxX11"
200 echo " --wxmotif Spin wxMotif"
201 echo " --wxmgl Spin wxMGL"
202 echo " --docs Spin docs"
203 echo " --all Spin EVERYTHING"
204 echo " --updatecvs Update from CVS"
205
206 exit 1
207}
208
209init=""
210if [ "$1" = "" ]
211then
212 usage
213 exit
214fi
215
216if [ "$2" = "" ]
217then
218 usage
219 exit
220fi
221
222if [ "$3" = "" ]
223then
224 usage
225 exit
226fi
227
228# Process command line options.
229shift 3
230for i in "$@"; do
231 case "$i" in
232 --wxx11) SPINWXX11=1 ;;
233 --wxgtk) SPINWXGTK=1 ;;
234 --wxmac) SPINWXMAC=1 ;;
235 --wxbase) SPINWXBASE=1 ;;
236 --wxmgl) SPINWXMGL=1 ;;
237 --wxmotif) SPINWXMOTIF=1 ;;
238 --all) SPINEVERYTHING=1 ;;
239 --updatecvs) UPDATECVS=1 ;;
240 --silent) SILENT=1 ;;
241 *)
242 usage
243 exit
244 ;;
245 esac
246done
247
248# we don't want this when batch building tarballs.
249if [ "$SILENT" = "0" ]; then
250 echo CTRL-C if this is not correct.
251 read dummy
252fi
253
254if [ "$UPDATECVS" = "1" ]; then
255 doupdatecvs
256fi
257
258if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
259 dospinwxx11
260fi
261
262if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
263 dospinwxgtk
264fi
265
266if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
267 dospinwxmotif
268fi
269
270if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
271 dospinwxmac
272fi
273
274if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
275 dospinwxmgl
276fi
277
278if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
279 dospinwxbase
280fi
281
282if [ "$SPINDOCS" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
283 dospindocs
284fi