]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/zipdist.sh
Added Word template for formatting wxWindows manual
[wxWidgets.git] / distrib / msw / zipdist.sh
1 #! /bin/sh
2
3 # Zip up an external, generic + Windows distribution of wxWindows 2
4 src=`cygpath -u $WXWIN`
5 dest=$src/deliver
6 wise=0
7 wiseonly=0
8
9 # Set this to the required version
10 version=2.3.0
11
12 dowise()
13 {
14 cd $dest
15
16 # Unzip the Windows files into 'wx'
17 mkdir $dest/wx
18
19 # After this change of directory, we're in the
20 # temporary 'wx' directory and not acting on
21 # the source wxWindows directory.
22 cd $dest/wx
23 unzip -o ../wxWindows-$version-msw.zip
24 unzip -o ../wxWindows-$version-gen.zip
25 unzip -o ../wxWindows-$version-vc.zip
26 unzip -o ../wxWindows-$version-bc.zip
27 unzip -o ../wxWindows-$version-HTMLHelp.zip
28 unzip -o ../extradoc.zip
29 # Need Word file, for Remstar DB classes
30 unzip -o ../wxWindows-$version-Word.zip
31 unzip -o ../ogl3.zip
32 unzip -o ../jpeg.zip
33 unzip -o ../tiff.zip
34 unzip -o ../tex2rtf2.zip
35
36 # Now delete a few files that are unnecessary
37 # attrib -R *
38 rm -f BuildCVS.txt *.in *.spec *.guess *.sub mkinstalldirs modules install-sh *.sh descrip.mms
39 rm -f configure samples/configure samples/*.in demos/configure demos/*.in contrib/configure contrib/*.in
40 rm -f setup.h.in setup.h_vms
41 rm -f -r Makefile.in
42 rm -f docs/html/wxbook.htm docs/html/roadmap.htm
43 rm -f contrib/docs/winhelp/mmedia.*
44 rm -f contrib/docs/winhelp/stc.*
45 rm -f contrib/docs/htmlhelp/mmedia.*
46 rm -f contrib/docs/htmlhelp/stc.*
47 rm -f contrib/docs/pdf/*.*
48 rm -f -r contrib/docs/latex/ogl
49 rm -f src/mingegcs.bat
50 rm -f distrib
51
52 # Now copy some binary files to 'bin'
53 mkdir bin
54 cp $src/bin/dialoged.exe bin
55 cp $src/bin/tex2rtf.exe bin
56 cp $src/bin/dbgview.* bin
57 cp $src/bin/life.exe bin
58 cp $src/docs/winhelp/dialoged.hlp $src/docs/winhelp/dialoged.cnt bin
59 cp $src/docs/winhelp/tex2rtf.hlp $src/docs/winhelp/tex2rtf.cnt bin
60
61 # Make wxMSW-xxx.zip
62 zip -r ../wxMSW-$version.zip *
63
64 # Time to regenerate the WISE install script, wxwin2.wse.
65 # NB: if you've changed wxwin2.wse using WISE, call splitwise.exe
66 # from within distrib/msw, to split off wisetop.txt and wisebott.txt.
67 echo Calling 'makewise' to generate wxwin2.wse...
68
69 sh $WXWIN/distrib/msw/makewise.sh
70
71 rm -f $dest/setup.*
72
73 # Now invoke WISE install on the new wxwin2.wse
74 echo Invoking WISE...
75 /c/progra~1/wise/wise32.exe /C $WXWIN\\distrib\\msw\\wxwin2.wse
76 echo Press return to continue with the wxWindows distribution...
77 read dummy
78
79 cd $dest
80
81 # tidy up capitalisation of filenames
82 mv setup.EXE s
83 mv s setup.exe
84
85 mv setup.w02 s
86 mv s setup.w02
87
88 mv setup.w03 s
89 mv s setup.w03
90
91 mv setup.w04 s
92 mv s setup.w04
93
94 mv setup.w05 s
95 mv s setup.w05
96
97 mv setup.w06 s
98 mv s setup.w06
99
100 mv setup.w07 s
101 mv s setup.w07
102
103 mv setup.w08 s
104 mv s setup.w08
105
106 mv setup.w09 s
107 mv s setup.w09
108
109 # Put all the setup files into a single zip archive.
110 zip wxMSW-$version-setup.zip readme.txt setup.*
111 }
112
113 expandlines()
114 {
115 toexpand=$1
116 outputfile=$2
117
118 rm -f $outputfile
119 touch $outputfile
120 for line in `cat $toexpand` ; do
121 if [ $line != "" ]; then
122 ls $line >> $outputfile
123 fi
124 done
125 }
126
127 # Process command line options.
128 for i in "$@"; do
129 case "$i" in
130 --wise) wise=1 ;;
131 --wiseonly) wiseonly=1 ;;
132 *)
133 echo Usage: $0 "[ options ]" 1>&2
134 echo Options:
135 echo " --help Display this help message"
136 echo " --wise Build setup.exe"
137 exit 1
138 ;;
139 esac
140 done
141
142 if [ ! -d "$src" ]; then
143 echo $src not found.
144 exit 1
145 fi
146
147 if [ ! -d "$dest" ]; then
148 echo $dest not found.
149 exit 1
150 fi
151
152 echo Creating distribution in $dest. Press return to continue.
153 read dummy
154
155 if [ "$wiseonly" != "0" ]; then
156 dowise
157 exit 0
158 fi
159
160 # Remove all existing files
161 rm -f $dest/wx*.zip
162 rm -f $dest/*.htb
163 rm -f $dest/ogl3.zip
164 rm -f $dest/tex2rtf2.zip
165 rm -f $dest/jpeg.zip
166 rm -f $dest/tiff.zip
167 rm -f $dest/dialoged.zip
168 rm -f $dest/utils.zip
169 rm -f $dest/extradoc.zip
170 rm -f $dest/*-win32.zip
171
172 if [ ! -d "$dest/wx" ]; then
173 rm -f -r $dest/wx
174 fi
175
176
177 cd $src
178 echo Zipping...
179
180 # Below is the old-style separated-out format. This is retained only
181 # for local use, and for creating wxMSW-xxx.zip.
182
183 # We can't use e.g. this:
184 # ls `cat $src/distrib/msw/makefile.rsp` zip -@ -u $dest/wxWindows-$version-gen.zip
185 # because there's not enough space on the command line, plus we need to ignore the
186 # blank lines.
187
188 expandlines $src/distrib/msw/generic.rsp temp.txt
189 zip -@ $dest/wxWindows-$version-gen.zip < temp.txt
190
191 expandlines $src/distrib/msw/makefile.rsp temp.txt
192 zip -@ -u $dest/wxWindows-$version-gen.zip < temp.txt
193
194 expandlines $src/distrib/msw/msw.rsp temp.txt
195 zip -@ $dest/wxWindows-$version-msw.zip < temp.txt
196
197 expandlines $src/distrib/msw/makefile.rsp temp.txt
198 zip -@ -u $dest/wxWindows-$version-msw.zip < temp.txt
199
200 expandlines $src/distrib/msw/gtk.rsp temp.txt
201 zip -@ $dest/wxWindows-$version-gtk.zip < temp.txt
202
203 expandlines $src/distrib/msw/makefile.rsp temp.txt
204 zip -@ -u $dest/wxWindows-$version-gtk.zip < temp.txt
205
206 expandlines $src/distrib/msw/stubs.rsp temp.txt
207 zip -@ $dest/wxWindows-$version-stubs.zip < temp.txt
208
209 expandlines $src/distrib/msw/motif.rsp temp.txt
210 zip -@ $dest/wxWindows-$version-mot.zip < temp.txt
211
212 expandlines $src/distrib/msw/makefile.rsp temp.txt
213 zip -@ -u $dest/wxWindows-$version-mot.zip < temp.txt
214
215
216 expandlines $src/distrib/msw/docsrc.rsp temp.txt
217 zip -@ $dest/wxWindows-$version-DocSource.zip < temp.txt
218
219 expandlines $src/distrib/msw/wx_hlp.rsp temp.txt
220 zip -@ $dest/wxWindows-$version-WinHelp.zip < temp.txt
221
222 expandlines $src/distrib/msw/wx_html.rsp temp.txt
223 zip -@ $dest/wxWindows-$version-HTML.zip < temp.txt
224
225 expandlines $src/distrib/msw/wx_pdf.rsp temp.txt
226 zip -@ $dest/wxWindows-$version-PDF.zip < temp.txt
227
228 expandlines $src/distrib/msw/wx_word.rsp temp.txt
229 zip -@ $dest/wxWindows-$version-Word.zip < temp.txt
230
231 expandlines $src/distrib/msw/wx_htb.rsp temp.txt
232 zip -@ $dest/wxWindows-$version-HTB.zip < temp.txt
233
234 expandlines $src/distrib/msw/wx_chm.rsp temp.txt
235 zip -@ $dest/wxWindows-$version-HTMLHelp.zip < temp.txt
236
237 # PDF/HTML docs that should go into the Windows setup because
238 # there are no WinHelp equivalents
239 expandlines $src/distrib/msw/extradoc.rsp temp.txt
240 zip -@ $dest/extradoc.zip < temp.txt
241
242 # VC++ project files
243 expandlines $src/distrib/msw/vc.rsp temp.txt
244 zip -@ $dest/wxWindows-$version-vc.zip < temp.txt
245
246 # BC++ project files
247 expandlines $src/distrib/msw/bc.rsp temp.txt
248 zip -@ $dest/wxWindows-$version-bc.zip < temp.txt
249
250 # CodeWarrior project files
251 expandlines $src/distrib/msw/cw.rsp temp.txt
252 zip -@ $dest/wxWindows-$version-cw.zip < temp.txt
253
254 # OGL 3
255 expandlines $src/distrib/msw/ogl.rsp temp.txt
256 zip -@ $dest/ogl3.zip < temp.txt
257
258 # MMedia
259 expandlines $src/distrib/msw/mmedia.rsp temp.txt
260 zip -@ $dest/mmedia.zip < temp.txt
261
262 # STC (Scintilla widget)
263 expandlines $src/distrib/msw/stc.rsp temp.txt
264 zip -@ $dest/stc.zip < temp.txt
265
266 # Tex2RTF
267 expandlines $src/distrib/msw/tex2rtf.rsp temp.txt
268 zip -@ $dest/tex2rtf2.zip < temp.txt
269
270 # JPEG source
271 expandlines $src/distrib/msw/jpeg.rsp temp.txt
272 zip -@ $dest/jpeg.zip < temp.txt
273
274 # TIFF source
275 expandlines $src/distrib/msw/tiff.rsp temp.txt
276 zip -@ $dest/tiff.zip < temp.txt
277
278 # Dialog Editor source and binary
279 rm -f $dest/dialoged_source.zip
280 expandlines $src/distrib/msw/dialoged.rsp temp.txt
281 zip -@ $dest/dialoged_source.zip < temp.txt
282 zip -j $dest/dialoged.zip $dest/dialoged_source.zip $src/bin/dialoged.exe $src/docs/winhelp/dialoged.hlp $src/docs/winhelp/dialoged.cnt
283 rm -f $dest/dialoged_source.zip
284
285 # Misc. utils not in the main distribution
286 expandlines $src/distrib/msw/utils.rsp temp.txt
287 zip -@ $dest/utils.zip < temp.txt
288 expandlines $src/distrib/msw/utilmake.rsp temp.txt
289 zip -@ -u $dest/utilmake.zip < temp.txt
290
291 rm -f temp.txt
292
293 # Make dialoged-win32.zip and tex2rtf-win32.zip
294
295 cd $src/bin
296
297 zip $dest/dialoged-win32.zip dialoged.*
298 zip $dest/tex2rtf-win32.zip tex2rtf.*
299
300 cp $src/docs/changes.txt $dest
301 cp $src/docs/msw/install.txt $dest/install_msw.txt
302 cp $src/docs/motif/install.txt $dest/install_motif.txt
303 cp $src/docs/gtk/install.txt $dest/install_gtk.txt
304 cp $src/docs/readme.txt $dest
305 cp $src/docs/motif/readme.txt $dest/readme_motif.txt
306 cp $src/docs/gtk/readme.txt $dest/readme_gtk.txt
307 cp $src/docs/msw/readme.txt $dest/readme_msw.txt
308 cp $src/docs/readme_vms.txt $dest
309 cp $src/docs/motif/makewxmotif $dest
310 cp $src/docs/gtk/makewxgtk $dest
311
312 # Skip WISE setup if wise is 0.
313 if [ "$wise" = "1" ]; then
314 dowise
315 fi
316
317 echo wxWindows archived.
318