]>
Commit | Line | Data |
---|---|---|
8fc3a8c9 KO |
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 bzip-dist-only | |
31 | mv $WXDEST/wxgtk/release/*.gz $WXDEST/wxgtk/release/*.bz2 $WXDEST | |
32 | } | |
33 | ||
34 | dospinwxmgl() | |
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 | ||
57 | dospinwxbase() | |
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 | ||
80 | dospinwxx11() | |
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... | |
99 | make -j1 dist bzip-dist-only | |
100 | ||
101 | cp $WXDEST/wxx11/release/*.tar.gz $WXDEST | |
102 | cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST | |
103 | } | |
104 | ||
105 | dospinwxmotif() | |
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... | |
124 | make -j1 dist bzip-dist-only | |
125 | ||
126 | cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST | |
127 | cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST | |
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 | |
143 | # rm -f -r $WXDEST/wxmotif | |
144 | } | |
145 | ||
146 | docopydocs() | |
147 | { | |
148 | cp $WXSRC/docs/readme.txt $WXDEST/readme-${WXVER}.txt | |
149 | cp $WXSRC/docs/changes.txt $WXDEST/changes-${WXVER}.txt | |
150 | cp $WXSRC/docs/mgl/readme.txt $WXDEST/readme-mgl-${WXVER}.txt | |
151 | cp $WXSRC/docs/mgl/install.txt $WXDEST/install-mgl-${WXVER}.txt | |
152 | cp $WXSRC/docs/x11/readme.txt $WXDEST/readme-x11-${WXVER}.txt | |
153 | cp $WXSRC/docs/x11/readme-nanox.txt $WXDEST/readme-nanox-${WXVER}.txt | |
154 | cp $WXSRC/docs/x11/install.txt $WXDEST/install-x11-${WXVER}.txt | |
155 | cp $WXSRC/docs/motif/readme.txt $WXDEST/readme-motif-${WXVER}.txt | |
156 | cp $WXSRC/docs/motif/install.txt $WXDEST/install-motif-${WXVER}.txt | |
157 | cp $WXSRC/docs/msw/readme.txt $WXDEST/readme-msw-${WXVER}.txt | |
158 | cp $WXSRC/docs/msw/install.txt $WXDEST/install-msw-${WXVER}.txt | |
159 | cp $WXSRC/docs/gtk/readme.txt $WXDEST/readme-gtk-${WXVER}.txt | |
160 | cp $WXSRC/docs/gtk/install.txt $WXDEST/install-gtk-${WXVER}.txt | |
161 | cp $WXSRC/docs/mac/readme.txt $WXDEST/readme-mac-${WXVER}.txt | |
162 | cp $WXSRC/docs/mac/install.txt $WXDEST/install-mac-${WXVER}.txt | |
163 | cp $WXSRC/docs/os2/install.txt $WXDEST/install-os2-${WXVER}.txt | |
164 | } | |
165 | ||
166 | dospindocs() | |
167 | { | |
168 | mkdir -p $WXSRC/docs/html/wx | |
169 | mkdir -p $WXSRC/docs/html/tex2rtf | |
170 | mkdir -p $WXSRC/docs/html/fl | |
171 | mkdir -p $WXSRC/docs/html/ogl | |
172 | mkdir -p $WXSRC/docs/htb | |
173 | ||
174 | rm -f -r $WXSRC/docs/html/wx/*.htm* | |
175 | rm -f -r $WXSRC/docs/htb/wx.htb | |
176 | ||
177 | echo Making HTML wxWidgets manual... | |
178 | cd $WXSRC/docs/latex/wx | |
179 | cp *.gif $WXSRC/docs/html/wx | |
180 | tex2rtf manual.tex $WXSRC/docs/html/wx/wx.htm -twice -html | |
181 | ||
182 | echo Making HTB wxWidgets manual... | |
183 | cd $WXSRC/docs/html/wx | |
184 | zip -q $WXSRC/docs/htb/wx.htb *.html *.gif *.hhp *.hhc *.hhk | |
185 | ||
186 | echo Archiving manuals... | |
187 | # TODO | |
188 | ||
189 | echo Done making manuals. | |
190 | } | |
191 | ||
192 | PROGNAME=$0 | |
193 | WXSRC=$1 | |
194 | WXDEST=$2 | |
195 | WXVER=$3 | |
196 | ||
197 | SPINWXX11=0 | |
198 | SPINWXGTK=0 | |
199 | SPINWXMOTIF=0 | |
200 | SPINWXMAC=0 | |
201 | SPINWXBASE=0 | |
202 | SPINWXMGL=0 | |
203 | SPINDOCS=0 | |
204 | SPINEVERYTHING=0 | |
205 | UPDATECVS=0 | |
206 | SILENT=0 | |
207 | ||
208 | usage() | |
209 | { | |
210 | echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]" | |
211 | echo Options: | |
212 | echo " --help Display this help message" | |
213 | echo " --wxgtk Spin wxGTK" | |
214 | echo " --wxbase Spin wxBase" | |
215 | echo " --wxx11 Spin wxX11" | |
216 | echo " --wxmotif Spin wxMotif" | |
217 | echo " --wxmgl Spin wxMGL" | |
218 | echo " --docs Spin docs" | |
219 | echo " --all Spin EVERYTHING" | |
220 | echo " --updatecvs Update from CVS" | |
221 | ||
222 | exit 1 | |
223 | } | |
224 | ||
225 | init="" | |
226 | if [ "$1" = "" ] | |
227 | then | |
228 | usage | |
229 | exit | |
230 | fi | |
231 | ||
232 | if [ "$2" = "" ] | |
233 | then | |
234 | usage | |
235 | exit | |
236 | fi | |
237 | ||
238 | if [ "$3" = "" ] | |
239 | then | |
240 | usage | |
241 | exit | |
242 | fi | |
243 | ||
244 | # Process command line options. | |
245 | shift 3 | |
246 | for i in "$@"; do | |
247 | case "$i" in | |
248 | --wxx11) SPINWXX11=1 ;; | |
249 | --wxgtk) SPINWXGTK=1 ;; | |
250 | --wxmac) SPINWXMAC=1 ;; | |
251 | --wxbase) SPINWXBASE=1 ;; | |
252 | --wxmgl) SPINWXMGL=1 ;; | |
253 | --wxmotif) SPINWXMOTIF=1 ;; | |
254 | --all) SPINEVERYTHING=1 ;; | |
255 | --updatecvs) UPDATECVS=1 ;; | |
256 | --silent) SILENT=1 ;; | |
257 | *) | |
258 | usage | |
259 | exit | |
260 | ;; | |
261 | esac | |
262 | done | |
263 | ||
264 | # we don't want this when batch building tarballs. | |
265 | if [ "$SILENT" = "0" ]; then | |
266 | echo CTRL-C if this is not correct. | |
267 | read dummy | |
268 | fi | |
269 | ||
270 | if [ "$UPDATECVS" = "1" ]; then | |
271 | doupdatecvs | |
272 | fi | |
273 | ||
274 | if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
275 | dospinwxx11 | |
276 | fi | |
277 | ||
278 | if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
279 | dospinwxgtk | |
280 | fi | |
281 | ||
282 | if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
283 | dospinwxmotif | |
284 | fi | |
285 | ||
286 | if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
287 | dospinwxmac | |
288 | fi | |
289 | ||
290 | if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
291 | dospinwxmgl | |
292 | fi | |
293 | ||
294 | if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
295 | dospinwxbase | |
296 | fi | |
297 | ||
298 | if [ "$SPINDOCS" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
299 | dospindocs | |
300 | fi | |
301 | ||
302 | docopydocs |