]> git.saurik.com Git - wxWidgets.git/blob - utils/tex2rtf/distrib/makeinno.bat
fix for crash on 64 bit platforms (patch 1028942)
[wxWidgets.git] / utils / tex2rtf / distrib / makeinno.bat
1 @echo off
2 Rem Make an Inno Setup distribution list, where files and dirs are represented by
3 Rem sections like this:
4 Rem [Dirs]
5 Rem Name: {app}\backgrounds
6 Rem
7 Rem [Files]
8 Rem Source: C:\dir\file.htm; DestDir: {app}\; DestName: file.htm
9
10 set tex2rtf=%WXWIN%\utils\tex2rtf
11
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%\files1.tmp
15
16 Rem Now we iterate through the list of files, writing out the middle section of
17 Rem the file.
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.
20
21 set sz=%@EVAL[%@LEN[%_CWD]+1]
22 set len=%@LINES[%TEMP\files1.tmp]
23
24 erase /Y %TEMP\files2.tmp
25
26 Rem Add directories
27 echo. >> %temp\files2.tmp
28 echo [Dirs] >> %temp\files2.tmp
29
30 do i = 0 to %len by 1
31 set line=%@LINE[%TEMP\files1.tmp,%i]
32 Rem Skip files.
33 if not isdir %line enddo
34 set sz2=%@LEN[%line]
35 set n=%@EVAL[%sz2-%sz]
36 set line2=%@SUBSTR[%line,%sz,%n]
37 if "%line2%" == "" enddo
38
39 echo Name: {app}\%line2 >> %TEMP\files2.tmp
40 enddo
41
42 echo. >>%TEMP\files2.tmp
43
44 Rem Add files
45
46 echo. >> %temp\files2.tmp
47 echo [Files] >> %temp\files2.tmp
48
49 do i = 0 to %len by 1
50 set line=%@LINE[%TEMP\files1.tmp,%i]
51 Rem Skip directories.
52 if isdir %line enddo
53 set sz2=%@LEN[%line]
54 set n=%@EVAL[%sz2-%sz]
55 set line2=%@SUBSTR[%line,%sz,%n]
56 set filename=%@FILENAME[%line2]
57 set dirname=%@PATH[%line2]
58
59 echo Source: %line; DestDir: {app}\%dirname; DestName: %filename >> %TEMP\files2.tmp
60 enddo
61
62 Rem Concatenate the 3 sections
63 cat %tex2rtf%\distrib\innotop.txt %TEMP%\files2.tmp %tex2rtf%\distrib\innobott.txt > %tex2rtf%\distrib\tex2rtf.iss
64
65 erase /Y %TEMP\files1.tmp
66 rem erase /Y %TEMP\files2.tmp
67
68 goto end
69
70 :end