]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/zipdist.sh
Added wxDbTable::SetOrderByColNums() function
[wxWidgets.git] / distrib / msw / zipdist.sh
CommitLineData
83b968da
JS
1#! /bin/sh
2
3# Zip up an external, generic + Windows distribution of wxWindows 2
4src=`cygpath -u $WXWIN`
5dest=$src/deliver
6wise=0
7wiseonly=0
8
9# Set this to the required version
10version=2.3.0
11
12dowise()
13{
83b968da
JS
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/*.*
1620f478 48 rm -f -r contrib/docs/latex/ogl
83b968da
JS
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
73a2995f 69 sh $WXWIN/distrib/msw/makewise.sh
83b968da
JS
70
71 rm -f $dest/setup.*
72
73 # Now invoke WISE install on the new wxwin2.wse
74 echo Invoking WISE...
1620f478 75 /c/progra~1/wise/wise32.exe /C $WXWIN\\distrib\\msw\\wxwin2.wse
83b968da
JS
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
1620f478
JS
106 mv setup.w09 s
107 mv s setup.w09
108
83b968da
JS
109 # Put all the setup files into a single zip archive.
110 zip wxMSW-$version-setup.zip readme.txt setup.*
111}
112
73a2995f
JS
113expandlines()
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}
83b968da
JS
126
127# Process command line options.
128for 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
140done
141
142if [ ! -d "$src" ]; then
143 echo $src not found.
144 exit 1
145fi
146
147if [ ! -d "$dest" ]; then
148 echo $dest not found.
149 exit 1
150fi
151
152echo Creating distribution in $dest. Press return to continue.
153read dummy
154
155if [ "$wiseonly" != "0" ]; then
156 dowise
157 exit 0
158fi
159
160# Remove all existing files
161rm -f $dest/wx*.zip
162rm -f $dest/*.htb
163rm -f $dest/ogl3.zip
164rm -f $dest/tex2rtf2.zip
165rm -f $dest/jpeg.zip
166rm -f $dest/tiff.zip
167rm -f $dest/dialoged.zip
168rm -f $dest/utils.zip
169rm -f $dest/extradoc.zip
170rm -f $dest/*-win32.zip
171
172if [ ! -d "$dest/wx" ]; then
173 rm -f -r $dest/wx
174fi
175
176
177cd $src
178echo 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.
73a2995f
JS
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
188expandlines $src/distrib/msw/generic.rsp temp.txt
189zip -@ $dest/wxWindows-$version-gen.zip < temp.txt
190
191expandlines $src/distrib/msw/makefile.rsp temp.txt
192zip -@ -u $dest/wxWindows-$version-gen.zip < temp.txt
193
194expandlines $src/distrib/msw/msw.rsp temp.txt
195zip -@ $dest/wxWindows-$version-msw.zip < temp.txt
196
197expandlines $src/distrib/msw/makefile.rsp temp.txt
198zip -@ -u $dest/wxWindows-$version-msw.zip < temp.txt
199
200expandlines $src/distrib/msw/gtk.rsp temp.txt
201zip -@ $dest/wxWindows-$version-gtk.zip < temp.txt
202
203expandlines $src/distrib/msw/makefile.rsp temp.txt
204zip -@ -u $dest/wxWindows-$version-gtk.zip < temp.txt
205
206expandlines $src/distrib/msw/stubs.rsp temp.txt
207zip -@ $dest/wxWindows-$version-stubs.zip < temp.txt
208
209expandlines $src/distrib/msw/motif.rsp temp.txt
210zip -@ $dest/wxWindows-$version-mot.zip < temp.txt
211
212expandlines $src/distrib/msw/makefile.rsp temp.txt
213zip -@ -u $dest/wxWindows-$version-mot.zip < temp.txt
214
215
216expandlines $src/distrib/msw/docsrc.rsp temp.txt
217zip -@ $dest/wxWindows-$version-DocSource.zip < temp.txt
218
219expandlines $src/distrib/msw/wx_hlp.rsp temp.txt
220zip -@ $dest/wxWindows-$version-WinHelp.zip < temp.txt
221
222expandlines $src/distrib/msw/wx_html.rsp temp.txt
223zip -@ $dest/wxWindows-$version-HTML.zip < temp.txt
224
225expandlines $src/distrib/msw/wx_pdf.rsp temp.txt
226zip -@ $dest/wxWindows-$version-PDF.zip < temp.txt
227
228expandlines $src/distrib/msw/wx_word.rsp temp.txt
229zip -@ $dest/wxWindows-$version-Word.zip < temp.txt
230
231expandlines $src/distrib/msw/wx_htb.rsp temp.txt
232zip -@ $dest/wxWindows-$version-HTB.zip < temp.txt
233
234expandlines $src/distrib/msw/wx_chm.rsp temp.txt
235zip -@ $dest/wxWindows-$version-HTMLHelp.zip < temp.txt
83b968da
JS
236
237# PDF/HTML docs that should go into the Windows setup because
238# there are no WinHelp equivalents
73a2995f
JS
239expandlines $src/distrib/msw/extradoc.rsp temp.txt
240zip -@ $dest/extradoc.zip < temp.txt
83b968da
JS
241
242# VC++ project files
73a2995f
JS
243expandlines $src/distrib/msw/vc.rsp temp.txt
244zip -@ $dest/wxWindows-$version-vc.zip < temp.txt
83b968da
JS
245
246# BC++ project files
73a2995f
JS
247expandlines $src/distrib/msw/bc.rsp temp.txt
248zip -@ $dest/wxWindows-$version-bc.zip < temp.txt
83b968da
JS
249
250# CodeWarrior project files
73a2995f
JS
251expandlines $src/distrib/msw/cw.rsp temp.txt
252zip -@ $dest/wxWindows-$version-cw.zip < temp.txt
83b968da
JS
253
254# OGL 3
73a2995f
JS
255expandlines $src/distrib/msw/ogl.rsp temp.txt
256zip -@ $dest/ogl3.zip < temp.txt
83b968da
JS
257
258# MMedia
73a2995f
JS
259expandlines $src/distrib/msw/mmedia.rsp temp.txt
260zip -@ $dest/mmedia.zip < temp.txt
83b968da
JS
261
262# STC (Scintilla widget)
73a2995f
JS
263expandlines $src/distrib/msw/stc.rsp temp.txt
264zip -@ $dest/stc.zip < temp.txt
83b968da
JS
265
266# Tex2RTF
73a2995f
JS
267expandlines $src/distrib/msw/tex2rtf.rsp temp.txt
268zip -@ $dest/tex2rtf2.zip < temp.txt
83b968da
JS
269
270# JPEG source
73a2995f
JS
271expandlines $src/distrib/msw/jpeg.rsp temp.txt
272zip -@ $dest/jpeg.zip < temp.txt
83b968da
JS
273
274# TIFF source
73a2995f
JS
275expandlines $src/distrib/msw/tiff.rsp temp.txt
276zip -@ $dest/tiff.zip < temp.txt
83b968da
JS
277
278# Dialog Editor source and binary
279rm -f $dest/dialoged_source.zip
73a2995f
JS
280expandlines $src/distrib/msw/dialoged.rsp temp.txt
281zip -@ $dest/dialoged_source.zip < temp.txt
83b968da
JS
282zip -j $dest/dialoged.zip $dest/dialoged_source.zip $src/bin/dialoged.exe $src/docs/winhelp/dialoged.hlp $src/docs/winhelp/dialoged.cnt
283rm -f $dest/dialoged_source.zip
284
285# Misc. utils not in the main distribution
73a2995f
JS
286expandlines $src/distrib/msw/utils.rsp temp.txt
287zip -@ $dest/utils.zip < temp.txt
288expandlines $src/distrib/msw/utilmake.rsp temp.txt
289zip -@ -u $dest/utilmake.zip < temp.txt
290
291rm -f temp.txt
83b968da 292
1620f478
JS
293# Make dialoged-win32.zip and tex2rtf-win32.zip
294
295cd $src/bin
296
297zip $dest/dialoged-win32.zip dialoged.*
298zip $dest/tex2rtf-win32.zip tex2rtf.*
299
83b968da
JS
300cp $src/docs/changes.txt $dest
301cp $src/docs/msw/install.txt $dest/install_msw.txt
302cp $src/docs/motif/install.txt $dest/install_motif.txt
303cp $src/docs/gtk/install.txt $dest/install_gtk.txt
304cp $src/docs/readme.txt $dest
305cp $src/docs/motif/readme.txt $dest/readme_motif.txt
306cp $src/docs/gtk/readme.txt $dest/readme_gtk.txt
307cp $src/docs/msw/readme.txt $dest/readme_msw.txt
308cp $src/docs/readme_vms.txt $dest
309cp $src/docs/motif/makewxmotif $dest
310cp $src/docs/gtk/makewxgtk $dest
311
312# Skip WISE setup if wise is 0.
73a2995f 313if [ "$wise" = "1" ]; then
83b968da
JS
314 dowise
315fi
316
317echo wxWindows archived.
318