2 rem Zip up a distribution of Tex2RTF using Inno Setup.
3 Rem This batch file requires the 4DOS/4NT command processor.
4 set src
=%WXWIN%\utils
\tex
2rtf
5 set dest
=%WXWIN%\deliver
9 if "%src%" == "" goto usage
10 if "%dest%" == "" goto usage
12 if "%1" == "innoonly" set inno
=1
13 if "%1" == "innoonly" goto dounzip
14 if "%1" == "inno" set inno
=1
16 echo About to archive Tex2RTF
19 echo CTRL
-C
if this is
not correct.
22 erase /E
%dest%\tex
2rtf.zip
23 erase /E
%dest%\tex
2rtf_setup.exe
24 erase /E
%dest
\tex
2rtf_src.zip
26 if direxist
%dest%\tex
2rtf
erase /sxzy
%dest%\tex
2rtf\
28 Rem *** First, determine version from symbols.h
30 echo `#include
<stdio.h
>`
> tex2rtfver.c
31 echo `#include
"symbols.h"`
>> tex2rtfver.c
32 echo `int main
() { printf
("%.2f", TEX2RTF_VERSION_NUMBER
); }`
>> tex2rtfver.c
33 gcc tex2rtfver.c
-I
%src%\src
-o tex2rtfver.exe
34 tex2rtfver.exe
> tex2rtfversion.txt
35 set ver=%@LINE
[tex2rtfversion.txt
,0]
37 erase tex2rtfver.exe tex2rtfver.c
38 set ver_filename
=%ver%
44 erase /Y tex2rtf_contents.html
45 nmake
-f makefile.vc htmlhelp htb
49 echo Zipping source...
51 zip32
-@
%src%\tex
2rtf_src.zip
< %src%\distrib\src.rsp
55 copy %src%\src\
%ReleaseDir%\tex
2rtf.exe
%src%
56 copy %src%\docs\licence.txt
%src%
57 copy %src%\docs\lgpl.txt
%src%
58 copy %src%\docs\gpl.txt
%src%
59 copy %src%\docs
\readme.txt
%src%
60 copy %src%\docs
\tex
2rtf.chm
%src%
61 copy %src%\distrib
\tex
2rtf.exe.manifest
%src%
62 copy %src%\tools\lacheck.exe
%src%
63 copy %src%\tools\lacheck.txt
%src%
68 zip
-@
%dest%\tex
2rtf.zip
< %src%\distrib\distrib.rsp
69 zip
-j
-u
%dest%\tex
2rtf.zip
%src%\tex
2rtf.exe
77 unzip32
-o ..
\tex
2rtf.zip
83 Rem Skip Inno Setup setup if inno is 0.
84 if "%inno%" == "0" goto end
89 echo tex2rtfver is
%tex2rtfver%
91 echo Calling
'makeinno' to generate tex2rtf.iss...
93 call %src%\distrib\makeinno.bat
95 sed
-e
"s/TEX2RTFVERSION/%tex2rtfver%/g" %src%\distrib
\tex
2rtf.iss
> %TEMP%\tex
2rtf.iss
97 move %TEMP%\tex
2rtf.iss
%src%\distrib
\tex
2rtf.iss
99 rem Now invoke Inno Setup install on the new tex2rtf.iss
100 set innocmd
="C:\Program Files\Inno Setup 2\compil32.exe" /cc
%src%\distrib
\tex
2rtf.iss
101 echo Invoking
%innocmd%...
103 start "Inno Setup" /w
%innocmd%
105 Rem Rename to give it a version
106 move setup.exe tex2rtf_
%ver_filename%_setup.exe
109 move %src%\tex
2rtf_src.zip
%dest%\tex
2rtf
-source
-%tex2rtfver%.zip
113 erase /EFY
*.bmp
*.htm
*.exe
*.hlp
*.cnt
*.txt
*.rtf
*.doc
*.gif
*.jpg
*.manifest
*.chm
117 echo Tex2RTF archived.
121 echo Tex2RTF distribution.