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