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