]> git.saurik.com Git - wxWidgets.git/blame - utils/tex2rtf/distrib/zipdistinno.bat
Added GetResourcesDir and GetLocalizedResourcesDir to
[wxWidgets.git] / utils / tex2rtf / distrib / zipdistinno.bat
CommitLineData
56d34922
JS
1@echo off
2rem Zip up a distribution of Tex2RTF using Inno Setup.
3Rem This batch file requires the 4DOS/4NT command processor.
4set src=%WXWIN%\utils\tex2rtf
5set dest=%WXWIN%\deliver
6set inno=1
7set ReleaseDir=Release
8
9if "%src%" == "" goto usage
10if "%dest%" == "" goto usage
11
12if "%1" == "innoonly" set inno=1
13if "%1" == "innoonly" goto dounzip
14if "%1" == "inno" set inno=1
15
16echo About to archive Tex2RTF
17echo From %src%
18echo To %dest%
19echo CTRL-C if this is not correct.
20pause
21
22erase /E %dest%\tex2rtf.zip
23erase /E %dest%\tex2rtf_setup.exe
24erase /E %dest\tex2rtf_src.zip
25
26if direxist %dest%\tex2rtf erase /sxzy %dest%\tex2rtf\
27
28Rem *** First, determine version from symbols.h
29call ming2952
30echo `#include <stdio.h>` > tex2rtfver.c
31echo `#include "symbols.h"` >> tex2rtfver.c
32echo `int main() { printf("%.2f", TEX2RTF_VERSION_NUMBER); }` >> tex2rtfver.c
33gcc tex2rtfver.c -I%src%\src -o tex2rtfver.exe
34tex2rtfver.exe > tex2rtfversion.txt
35set ver=%@LINE[tex2rtfversion.txt,0]
36echo %ver%
37erase tex2rtfver.exe tex2rtfver.c
38set ver_filename=%ver%
39
40echo Updating docs...
41call msvc6
42
43pushd %src%\docs
44erase /Y tex2rtf_contents.html
45nmake -f makefile.vc htmlhelp htb
46popd
47
48cd %src%
49echo Zipping source...
50
51zip32 -@ %src%\tex2rtf_src.zip < %src%\distrib\src.rsp
52
53echo Adding files...
54
55copy %src%\src\%ReleaseDir%\tex2rtf.exe %src%
56copy %src%\docs\licence.txt %src%
57copy %src%\docs\lgpl.txt %src%
58copy %src%\docs\gpl.txt %src%
59copy %src%\docs\readme.txt %src%
60copy %src%\docs\tex2rtf.chm %src%
61copy %src%\distrib\tex2rtf.exe.manifest %src%
62copy %src%\tools\lacheck.exe %src%
63copy %src%\tools\lacheck.txt %src%
64Rem goto end
65
66upx %src%\tex2rtf.exe
67
68zip -@ %dest%\tex2rtf.zip < %src%\distrib\distrib.rsp
69zip -j -u %dest%\tex2rtf.zip %src%\tex2rtf.exe
70
71:dounzip
72
73cd %dest%
74
75mkdir tex2rtf
76cd tex2rtf
77unzip32 -o ..\tex2rtf.zip
78
79cd %dest%
80
81echo inno = %inno%
82
83Rem Skip Inno Setup setup if inno is 0.
84if "%inno%" == "0" goto end
85
86set tex2rtfver=%ver%
87
88echo ver is %ver%
89echo tex2rtfver is %tex2rtfver%
90
91echo Calling 'makeinno' to generate tex2rtf.iss...
92cd %dest%\tex2rtf
93call %src%\distrib\makeinno.bat
94
95sed -e "s/TEX2RTFVERSION/%tex2rtfver%/g" %src%\distrib\tex2rtf.iss > %TEMP%\tex2rtf.iss
96
97move %TEMP%\tex2rtf.iss %src%\distrib\tex2rtf.iss
98
99rem Now invoke Inno Setup install on the new tex2rtf.iss
100set innocmd="C:\Program Files\Inno Setup 2\compil32.exe" /cc %src%\distrib\tex2rtf.iss
101echo Invoking %innocmd%...
102cd %dest%
103start "Inno Setup" /w %innocmd%
104
105Rem Rename to give it a version
106move setup.exe tex2rtf_%ver_filename%_setup.exe
107
1c507b17
JS
108Rem Copy the source
109move %src%\tex2rtf_src.zip %dest%\tex2rtf-source-%tex2rtfver%.zip
110
56d34922
JS
111Rem clean up files
112cd %src%
113erase /EFY *.bmp *.htm *.exe *.hlp *.cnt *.txt *.rtf *.doc *.gif *.jpg *.manifest *.chm
114
115cd %dest%
116
117echo Tex2RTF archived.
118goto end
119
120:usage
121echo Tex2RTF distribution.
122
123:end