]>
git.saurik.com Git - wxWidgets.git/blob - utils/tex2rtf/distrib/makeinno.bat
2 Rem Make an Inno Setup distribution list, where files and dirs are represented by
3 Rem sections like this:
5 Rem Name: {app}\backgrounds
8 Rem Source: C:\dir\file.htm; DestDir: {app}\; DestName: file.htm
10 set tex2rtf
=%WXWIN%\utils
\tex
2rtf
12 Rem Generate a list of all files in the distribution.
13 Rem We have to be in the right directory already.
14 dir /BS
>& %TEMP%\files
1.tmp
16 Rem Now we iterate through the list of files, writing out the middle section of
18 Rem We have to remove the first part of the path,
19 Rem by truncating the start by the size of the current directory.
21 set sz
=%@EVAL
[%@LEN
[%_CWD
]+1]
22 set len
=%@LINES
[%TEMP
\files
1.tmp
]
24 erase /Y
%TEMP
\files
2.tmp
27 echo.
>> %temp
\files
2.tmp
28 echo [Dirs
] >> %temp
\files
2.tmp
31 set line
=%@LINE
[%TEMP
\files
1.tmp
,%i
]
33 if not isdir
%line enddo
35 set n
=%@EVAL
[%sz2
-%sz
]
36 set line2
=%@SUBSTR
[%line
,%sz
,%n
]
37 if "%line2%" == "" enddo
39 echo Name
: {app
}\
%line2
>> %TEMP
\files
2.tmp
42 echo.
>>%TEMP
\files
2.tmp
46 echo.
>> %temp
\files
2.tmp
47 echo [Files] >> %temp
\files
2.tmp
50 set line
=%@LINE
[%TEMP
\files
1.tmp
,%i
]
54 set n
=%@EVAL
[%sz2
-%sz
]
55 set line2
=%@SUBSTR
[%line
,%sz
,%n
]
56 set filename
=%@FILENAME
[%line2
]
57 set dirname
=%@
PATH[%line2
]
59 echo Source
: %line
; DestDir
: {app
}\
%dirname
; DestName
: %filename
>> %TEMP
\files
2.tmp
62 Rem Concatenate the 3 sections
63 cat
%tex2rtf%\distrib\innotop.txt
%TEMP%\files
2.tmp
%tex2rtf%\distrib\innobott.txt
> %tex2rtf%\distrib
\tex
2rtf.iss
65 erase /Y
%TEMP
\files
1.tmp
66 rem erase /Y %TEMP\files2.tmp