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