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