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.
9 # $ ./winiss.pl 1234 wingames.lst > puzzles.iss
11 # where `1234' is the revision number which will be encoded in the
12 # installer's version indicators.
15 ($revclean=$rev) =~ s/M$//;
22 $names{$_[0]} = $_[1];
26 print '; -*- no -*-'."\n";
28 print '; -- Inno Setup installer script for Puzzles.'."\n";
31 print 'AppName=Simon Tatham\'s Portable Puzzle Collection'."\n";
32 print 'AppVerName=Puzzles revision '.$rev."\n";
33 print 'VersionInfoTextVersion=Revision '.$rev."\n";
34 print 'AppVersion=r'.$rev."\n";
35 print 'VersionInfoVersion=0.0.'.$revclean.'.0'."\n";
36 print 'AppPublisher=Simon Tatham'."\n";
37 print 'AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/'."\n";
38 print 'DefaultDirName={pf}\Simon Tatham\'s Portable Puzzle Collection'."\n";
39 print 'DefaultGroupName=Simon Tatham\'s Puzzles'."\n";
40 # print 'SetupIconFile=fixmethinkoneup.ico'."\n";
41 # print 'UninstallDisplayIcon={app}\fixmethinkoneup.exe'."\n";
42 print 'ChangesAssociations=no'."\n";
43 print 'Compression=zip/9'."\n";
44 print 'AllowNoIcons=yes'."\n";
48 print 'Source: "'.$exe.'"; DestDir: "{app}"; Flags: promptifolder replacesameversion uninsrestartdelete'."\n";
50 print 'Source: "website.url"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
51 print 'Source: "puzzles.chm"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
52 print 'Source: "puzzles.hlp"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
53 print 'Source: "puzzles.cnt"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
54 print 'Source: "LICENCE"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
58 print 'Name: "{group}\\'.$names{$exe}.'"; Filename: "{app}\\'.$exe.'"'."\n";
60 print '; We have to fall back from the .chm to the older .hlp file on some Windows'."\n";
61 print '; versions.'."\n";
62 print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.chm"; MinVersion: 4.1,5.0'."\n";
63 print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.hlp"; OnlyBelowVersion: 4.1,5.0'."\n";
64 print 'Name: "{group}\Puzzles Web Site"; Filename: "{app}\website.url"'."\n";