Stop the analysis pass in Loopy's redraw routine from being
[sgt/puzzles] / winiss.pl
1 #!/usr/bin/perl
2
3 # Perl script to generate an Inno Setup installer script for
4 # Puzzles. This has to be scripted so that it can read wingames.lst
5 # and automatically adjust to the current available set of puzzles.
6
7 # Usage:
8 #
9 # $ ./winiss.pl 1234 wingames.lst > puzzles.iss
10 #
11 # where `1234' is the revision number which will be encoded in the
12 # installer's version indicators.
13
14 use warnings;
15
16 $rev = shift @ARGV;
17 ($revclean=$rev) =~ s/M$//;
18 $lst = shift @ARGV;
19 open LST, "<", $lst;
20 while (<LST>) {
21 chomp;
22 @_ = split /:/;
23 push @exes, $_[0];
24 $names{$_[0]} = $_[1];
25 }
26 close LST;
27
28 print '; -*- no -*-'."\n";
29 print ';'."\n";
30 print '; -- Inno Setup installer script for Puzzles.'."\n";
31 print ''."\n";
32 print '[Setup]'."\n";
33 print 'AppName=Simon Tatham\'s Portable Puzzle Collection'."\n";
34 print 'AppVerName=Puzzles revision '.$rev."\n";
35 print 'VersionInfoTextVersion=Revision '.$rev."\n";
36 print 'AppVersion=r'.$rev."\n";
37 print 'VersionInfoVersion=0.0.'.$revclean.'.0'."\n";
38 print 'AppPublisher=Simon Tatham'."\n";
39 print 'AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/'."\n";
40 print 'DefaultDirName={pf}\Simon Tatham\'s Portable Puzzle Collection'."\n";
41 print 'DefaultGroupName=Simon Tatham\'s Puzzles'."\n";
42 # print 'SetupIconFile=fixmethinkoneup.ico'."\n";
43 # print 'UninstallDisplayIcon={app}\fixmethinkoneup.exe'."\n";
44 print 'ChangesAssociations=no'."\n";
45 print 'Compression=zip/9'."\n";
46 print 'AllowNoIcons=yes'."\n";
47 print ''."\n";
48 print '[Files]'."\n";
49 for $exe (@exes) {
50 print 'Source: "'.$exe.'"; DestDir: "{app}"; Flags: promptifolder replacesameversion uninsrestartdelete'."\n";
51 }
52 print 'Source: "website.url"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
53 print 'Source: "puzzles.chm"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
54 print 'Source: "puzzles.hlp"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
55 print 'Source: "puzzles.cnt"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
56 print 'Source: "LICENCE"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
57 print ''."\n";
58 print '[Icons]'."\n";
59 for $exe (@exes) {
60 print 'Name: "{group}\\'.$names{$exe}.'"; Filename: "{app}\\'.$exe.'"'."\n";
61 }
62 print '; We have to fall back from the .chm to the older .hlp file on some Windows'."\n";
63 print '; versions.'."\n";
64 print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.chm"; MinVersion: 4.1,5.0'."\n";
65 print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.hlp"; OnlyBelowVersion: 4.1,5.0'."\n";
66 print 'Name: "{group}\Puzzles Web Site"; Filename: "{app}\website.url"'."\n";