Stop the analysis pass in Loopy's redraw routine from being
[sgt/puzzles] / winiss.pl
CommitLineData
d09d659f 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
32cabe4c 14use warnings;
15
d09d659f 16$rev = shift @ARGV;
17($revclean=$rev) =~ s/M$//;
18$lst = shift @ARGV;
19open LST, "<", $lst;
20while (<LST>) {
21 chomp;
32cabe4c 22 @_ = split /:/;
d09d659f 23 push @exes, $_[0];
24 $names{$_[0]} = $_[1];
25}
26close LST;
27
28print '; -*- no -*-'."\n";
29print ';'."\n";
30print '; -- Inno Setup installer script for Puzzles.'."\n";
31print ''."\n";
32print '[Setup]'."\n";
33print 'AppName=Simon Tatham\'s Portable Puzzle Collection'."\n";
34print 'AppVerName=Puzzles revision '.$rev."\n";
35print 'VersionInfoTextVersion=Revision '.$rev."\n";
36print 'AppVersion=r'.$rev."\n";
37print 'VersionInfoVersion=0.0.'.$revclean.'.0'."\n";
38print 'AppPublisher=Simon Tatham'."\n";
39print 'AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/'."\n";
40print 'DefaultDirName={pf}\Simon Tatham\'s Portable Puzzle Collection'."\n";
41print 'DefaultGroupName=Simon Tatham\'s Puzzles'."\n";
42# print 'SetupIconFile=fixmethinkoneup.ico'."\n";
43# print 'UninstallDisplayIcon={app}\fixmethinkoneup.exe'."\n";
44print 'ChangesAssociations=no'."\n";
45print 'Compression=zip/9'."\n";
46print 'AllowNoIcons=yes'."\n";
47print ''."\n";
48print '[Files]'."\n";
49for $exe (@exes) {
50 print 'Source: "'.$exe.'"; DestDir: "{app}"; Flags: promptifolder replacesameversion uninsrestartdelete'."\n";
51}
52print 'Source: "website.url"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
53print 'Source: "puzzles.chm"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
54print 'Source: "puzzles.hlp"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
55print 'Source: "puzzles.cnt"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
56print 'Source: "LICENCE"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
57print ''."\n";
58print '[Icons]'."\n";
59for $exe (@exes) {
60 print 'Name: "{group}\\'.$names{$exe}.'"; Filename: "{app}\\'.$exe.'"'."\n";
61}
62print '; We have to fall back from the .chm to the older .hlp file on some Windows'."\n";
63print '; versions.'."\n";
64print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.chm"; MinVersion: 4.1,5.0'."\n";
65print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.hlp"; OnlyBelowVersion: 4.1,5.0'."\n";
66print 'Name: "{group}\Puzzles Web Site"; Filename: "{app}\website.url"'."\n";