]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/zipdist.bat
mingw32/cygwin compilation fixes
[wxWidgets.git] / distrib / msw / zipdist.bat
1 @echo off
2 rem Zip up an external, generic + Windows distribution of wxWindows 2
3 set src=%wxwin%
4 set dest=%src%\deliver
5 set wise=0
6
7 Rem Set this to the required version
8 set version=2.3.0
9
10 if "%src%" == "" goto usage
11 if "%dest%" == "" goto usage
12 if "%1%" == "-help" goto usage
13 if "%1%" == "--help" goto usage
14 if "%1%" == "/?" goto usage
15 if "%1%" == "wiseonly" goto dounzip
16 if "%1%" == "wise" set wise=1
17 echo About to archive an external wxWindows distribution:
18 echo From %src%
19 echo To %dest%
20 if "%wise" == "1" echo with WISE setup creation.
21 echo CTRL-C if this is not correct.
22 pause
23
24 erase %dest%\wx*.zip
25 erase %dest%\*.htb
26 erase %dest%\ogl3.zip
27 erase %dest%\tex2rtf2.zip
28 erase %dest%\wxxml.zip
29 erase %dest%\jpeg.zip
30 erase %dest%\tiff.zip
31 erase %dest%\dialoged.zip
32 erase %dest%\utils.zip
33 erase %dest%\extradoc.zip
34 erase %dest%\*-win32.zip
35
36 if exist %dest%\wx\BuildCVS.txt rmdir /S %dest%\wx
37
38 cd %src%
39 echo Zipping...
40
41 Rem Zip up the complete wxMSW-xxx.zip file
42 Rem NO, do it by unarchiving component files, deleting/copying some files, then
43 Rem rearchiving.
44 Rem zip -@ %dest%\wxMSW-%version%.zip < %src%\distrib\msw\generic.rsp
45 Rem zip -@ -u %dest%\wxMSW-%version%.zip < %src%\distrib\msw\msw.rsp
46 Rem zip -@ -u %dest%\wxMSW-%version%.zip < %src%\distrib\msw\wx_chm.rsp
47 Rem zip -@ -u %dest%\wxMSW-%version%.zip < %src%\distrib\msw\jpeg.rsp
48 Rem zip -@ -u %dest%\wxMSW-%version%.zip < %src%\distrib\msw\tiff.rsp
49
50 Rem Below is the old-style separated-out format. This is retained only
51 Rem for local use, and for creating wxMSW-xxx.zip.
52 zip -@ %dest%\wxWindows-%version%-gen.zip < %src%\distrib\msw\generic.rsp
53 zip -@ -u %dest%\wxWindows-%version%-gen.zip < %src%\distrib\msw\makefile.rsp
54 zip -@ %dest%\wxWindows-%version%-msw.zip < %src%\distrib\msw\msw.rsp
55 zip -@ -u %dest%\wxWindows-%version%-msw.zip < %src%\distrib\msw\makefile.rsp
56 zip -@ %dest%\wxWindows-%version%-gtk.zip < %src%\distrib\msw\gtk.rsp
57 zip -@ -u %dest%\wxWindows-%version%-gtk.zip < %src%\distrib\msw\makefile.rsp
58 zip -@ %dest%\wxWindows-%version%-stubs.zip < %src%\distrib\msw\stubs.rsp
59 zip -@ %dest%\wxWindows-%version%-mot.zip < %src%\distrib\msw\motif.rsp
60 zip -@ -u %dest%\wxWindows-%version%-mot.zip < %src%\distrib\msw\makefile.rsp
61 Rem (Obsolete) zip -@ %dest%\wxWindows-%version%-user.zip < %src%\distrib\msw\user.rsp
62
63 zip -@ %dest%\wxWindows-%version%-DocSource.zip < %src%\distrib\msw\docsrc.rsp
64 zip -@ %dest%\wxWindows-%version%-WinHelp.zip < %src%\distrib\msw\wx_hlp.rsp
65 zip -@ %dest%\wxWindows-%version%-HTML.zip < %src%\distrib\msw\wx_html.rsp
66 zip -@ %dest%\wxWindows-%version%-PDF.zip < %src%\distrib\msw\wx_pdf.rsp
67 zip -@ %dest%\wxWindows-%version%-Word.zip < %src%\distrib\msw\wx_word.rsp
68 zip -@ %dest%\wxWindows-%version%-HTB.zip < %src%\distrib\msw\wx_htb.rsp
69 zip -@ %dest%\wxWindows-%version%-HTMLHelp.zip < %src%\distrib\msw\wx_chm.rsp
70
71 Rem PDF/HTML docs that should go into the Windows setup because
72 Rem there are no WinHelp equivalents
73 zip -@ %dest%\extradoc.zip < %src%\distrib\msw\extradoc.rsp
74
75 rem VC++ project files
76 zip -@ %dest%\wxWindows-%version%-vc.zip < %src%\distrib\msw\vc.rsp
77
78 rem BC++ project files
79 zip -@ %dest%\wxWindows-%version%-bc.zip < %src%\distrib\msw\bc.rsp
80
81 rem CodeWarrior project files
82 zip -@ %dest%\wxWindows-%version%-cw.zip < %src%\distrib\msw\cw.rsp
83
84 rem OGL 3
85 zip -@ %dest%\ogl3.zip < %src%\distrib\msw\ogl.rsp
86
87 rem wxXML
88 zip -@ %dest%\wxxml.zip < %src%\distrib\msw\xml.rsp
89
90 rem MMedia
91 zip -@ %dest%\mmedia.zip < %src%\distrib\msw\mmedia.rsp
92
93 rem STC (Scintilla widget)
94 zip -@ %dest%\stc.zip < %src%\distrib\msw\stc.rsp
95
96 rem GLCanvas: obsolete, now in main library
97 rem zip -@ %dest%\glcanvas.zip < %src%\distrib\msw\glcanvas.rsp
98
99 rem Tex2RTF
100 zip -@ %dest%\tex2rtf2.zip < %src%\distrib\msw\tex2rtf.rsp
101
102 rem JPEG source
103 zip -@ %dest%\jpeg.zip < %src%\distrib\msw\jpeg.rsp
104
105 rem TIFF source
106 zip -@ %dest%\tiff.zip < %src%\distrib\msw\tiff.rsp
107
108 rem Dialog Editor source and binary
109 erase %dest%\dialoged_source.zip
110 zip -@ %dest%\dialoged_source.zip < %src%\distrib\msw\dialoged.rsp
111 zip -j %dest%\dialoged.zip %dest%\dialoged_source.zip %src%\bin\dialoged.exe %src%\docs\winhelp\dialoged.hlp %src%\docs\winhelp\dialoged.cnt
112 erase %dest%\dialoged_source.zip
113
114 rem Misc. utils not in the main distribution
115 zip -@ %dest%\utils.zip < %src%\distrib\msw\utils.rsp
116 zip -@ -u %dest%\utils.zip < %src%\distrib\msw\utilmake.rsp
117
118 copy %src%\docs\changes.txt %dest%
119 copy %src%\docs\msw\install.txt %dest%\install_msw.txt
120 copy %src%\docs\motif\install.txt %dest%\install_motif.txt
121 copy %src%\docs\gtk\install.txt %dest%\install_gtk.txt
122 copy %src%\docs\readme.txt %dest%
123 copy %src%\docs\motif\readme.txt %dest%\readme_motif.txt
124 copy %src%\docs\gtk\readme.txt %dest%\readme_gtk.txt
125 copy %src%\docs\msw\readme.txt %dest%\readme_msw.txt
126 copy %src%\docs\readme_vms.txt %dest%
127 copy %src%\docs\motif\makewxmotif %dest%
128 copy %src%\docs\gtk\makewxgtk %dest%
129
130 Rem Skip WISE setup if wise is 0.
131 if "%wise%" == "0" goto end
132
133 :dounzip
134
135 Rem Make dialoged-win32.zip and tex2rtf-win32.zip
136
137 cd %src%\bin
138
139 zip %dest%\dialoged-win32.zip dialoged.*
140 zip %dest%\tex2rtf-win32.zip tex2rtf.*
141
142 cd %dest%
143
144 rem Unzip the Windows files into 'wx'
145 mkdir %dest%\wx
146
147 Rem After this change of directory, we're in the
148 Rem temporary 'wx' directory and not acting on
149 Rem the source wxWindows directory.
150 cd %dest%\wx
151 unzip -o ..\wxWindows-%version%-msw.zip
152 unzip -o ..\wxWindows-%version%-gen.zip
153 unzip -o ..\wxWindows-%version%-vc.zip
154 unzip -o ..\wxWindows-%version%-bc.zip
155 unzip -o ..\wxWindows-%version%-HTMLHelp.zip
156 unzip -o ..\extradoc.zip
157 Rem Need Word file, for Remstar DB classes
158 unzip -o ..\wxWindows-%version%-Word.zip
159 unzip -o ..\ogl3.zip
160 unzip -o ..\wxxml.zip
161 unzip -o ..\jpeg.zip
162 unzip -o ..\tiff.zip
163 unzip -o ..\tex2rtf2.zip
164
165 rem Now delete a few files that are unnecessary
166 attrib -R *
167 erase /Y BuildCVS.txt *.in *.spec *.guess *.sub mkinstalldirs modules install-sh *.sh descrip.mms
168 erase /Y configure samples\configure samples\*.in demos\configure demos\*.in contrib\configure contrib\*.in
169 erase /Y setup.h.in setup.h_vms
170 erase /SY Makefile.in
171 erase /Y docs\html\wxbook.htm docs\html\roadmap.htm
172 erase /Y contrib\docs\winhelp\mmedia.*
173 erase /Y contrib\docs\winhelp\stc.*
174 erase /Y contrib\docs\htmlhelp\mmedia.*
175 erase /Y contrib\docs\htmlhelp\stc.*
176 erase /Y contrib\docs\pdf\*.*
177 rmdir /S contrib\docs\latex\ogl
178 erase /Y src\mingegcs.bat
179 erase /Y distrib
180
181 rem Now copy some binary files to 'bin'
182 if not isdir bin mkdir bin
183 copy %src%\bin\dialoged.exe bin
184 copy %src%\bin\tex2rtf.exe bin
185 copy %src%\bin\dbgview.* bin
186 copy %src%\bin\life.exe bin
187 copy %src%\docs\winhelp\dialoged.hlp %src%\docs\winhelp\dialoged.cnt bin
188 copy %src%\docs\winhelp\tex2rtf.hlp %src%\docs\winhelp\tex2rtf.cnt bin
189
190 Rem Make wxMSW-xxx.zip
191 zip -r ..\wxMSW-%version%.zip *
192
193 rem Time to regenerate the WISE install script, wxwin2.wse.
194 rem NB: if you've changed wxwin2.wse using WISE, call splitwise.exe
195 rem from within distrib\msw, to split off wisetop.txt and wisebott.txt.
196 echo Calling 'makewise' to generate wxwin2.wse...
197 call %WXWIN%\distrib\msw\makewise.bat
198
199 erase /Y %dest%\setup.*
200
201 rem Now invoke WISE install on the new wxwin2.wse
202 set wisecmd="c:\Program Files\wise\wise32.exe" /C %WXWIN%\distrib\msw\wxwin2.wse
203 echo Invoking %wisecmd...
204 start %wisecmd
205 pause Press any key to continue with the wxWindows distribution...
206 Rem ren %WXWIN%\deliver\setup.EXE %WXWIN%\deliver\wxMSW-%version%-setup.exe
207
208 cd %dest%
209
210 Rem tidy up capitalisation of filenames
211 ren setup.EXE s
212 ren s setup.exe
213
214 ren setup.w02 s
215 ren s setup.w02
216
217 ren setup.w03 s
218 ren s setup.w03
219
220 ren setup.w04 s
221 ren s setup.w04
222
223 ren setup.w05 s
224 ren s setup.w05
225
226 ren setup.w06 s
227 ren s setup.w06
228
229 ren setup.w07 s
230 ren s setup.w07
231
232 ren setup.w08 s
233 ren s setup.w08
234
235 rem Put all the setup files into a single zip archive.
236 zip wxMSW-%version%-setup.zip readme.txt setup.*
237
238 echo wxWindows archived.
239
240 goto end
241
242 :usage
243 echo DOS wxWindows distribution. Zips up all GTK/Motif/MSW/doc files,
244 echo and optionally makes a deliver\wx directory and a setup.exe
245 echo if you specify 'wise' (skipping the zipping if you use 'wiseonly').
246 echo.
247 echo Usage: zipdist [wise | wiseonly]
248
249 :end