diff options
author | Franklin Wei <frankhwei536@gmail.com> | 2016-11-20 15:16:41 -0500 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2016-12-18 18:13:22 +0100 |
commit | 1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99 (patch) | |
tree | 8e7f2d6b0cbdb5d15c13457b2c3e1de69f598440 /apps/plugins/puzzles/winiss.pl | |
parent | 3ee79724f6fb033d50e26ef37b33d3f8cedf0c5b (diff) | |
download | rockbox-1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99.tar.gz rockbox-1a6a8b52f7aa4e2da6f4c34a0c743c760b8cfd99.zip |
Port of Simon Tatham's Puzzle Collection
Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9
MIT Licensed. Some games still crash and others are unplayable due to
issues with controls. Still need a "real" polygon filling algorithm.
Currently builds one plugin per puzzle (about 40 in total, around 100K
each on ARM), but can easily be made to build a single monolithic
overlay (800K or so on ARM).
The following games are at least partially broken for various reasons,
and have been disabled on this commit:
Cube: failed assertion with "Icosahedron" setting
Keen: input issues
Mines: weird stuff happens on target
Palisade: input issues
Solo: input issues, occasional crash on target
Towers: input issues
Undead: input issues
Unequal: input and drawing issues (concave polys)
Untangle: input issues
Features left to do:
- In-game help system
- Figure out the weird bugs
Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
Diffstat (limited to 'apps/plugins/puzzles/winiss.pl')
-rwxr-xr-x | apps/plugins/puzzles/winiss.pl | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/apps/plugins/puzzles/winiss.pl b/apps/plugins/puzzles/winiss.pl new file mode 100755 index 0000000000..eca02d3b15 --- /dev/null +++ b/apps/plugins/puzzles/winiss.pl | |||
@@ -0,0 +1,79 @@ | |||
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 gamedesc.txt | ||
5 | # and automatically adjust to the current available set of puzzles. | ||
6 | |||
7 | # Usage: | ||
8 | # | ||
9 | # $ ./winiss.pl 20140922.sdfsdf gamedesc.txt > puzzles.iss | ||
10 | # | ||
11 | # where the first argument is the version number which will be encoded | ||
12 | # in the installer's version indicators. The first component of that | ||
13 | # version number will be expected to be a YYYYMMDD-format date. | ||
14 | |||
15 | use warnings; | ||
16 | use Time::Local; | ||
17 | |||
18 | $ver = shift @ARGV; | ||
19 | |||
20 | # Parse the date out of $ver, and convert it into an integer number of | ||
21 | # days since an arbitrary epoch. This number is used for the Windows | ||
22 | # version resource (which wants a monotonic 16-bit integer). The epoch | ||
23 | # is chosen so that the first build using this date-based mechanism | ||
24 | # has a higher number than the last build in which that number was | ||
25 | # derived from a Subversion revision. | ||
26 | die "bad date format" if $ver !~ /^(\d{4})(\d{2})(\d{2})/; | ||
27 | $date = timegm(0,0,0,$3,$2-1,$1); | ||
28 | $integer_date = int($date / 86400) - 6000; | ||
29 | |||
30 | $desc = shift @ARGV; | ||
31 | open DESC, "<", $desc; | ||
32 | while (<DESC>) { | ||
33 | chomp; | ||
34 | @_ = split /:/; | ||
35 | push @exes, $_[1]; | ||
36 | $names{$_[1]} = $_[2]; | ||
37 | } | ||
38 | close DESC; | ||
39 | |||
40 | print '; -*- no -*-'."\n"; | ||
41 | print ';'."\n"; | ||
42 | print '; -- Inno Setup installer script for Puzzles.'."\n"; | ||
43 | print ''."\n"; | ||
44 | print '[Setup]'."\n"; | ||
45 | print 'AppName=Simon Tatham\'s Portable Puzzle Collection'."\n"; | ||
46 | print 'AppVerName=Puzzles version '.$ver."\n"; | ||
47 | print 'VersionInfoTextVersion=Version '.$ver."\n"; | ||
48 | print 'AppVersion=r'.$ver."\n"; | ||
49 | print 'VersionInfoVersion=0.0.'.$integer_date.'.0'."\n"; | ||
50 | print 'AppPublisher=Simon Tatham'."\n"; | ||
51 | print 'AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/'."\n"; | ||
52 | print 'DefaultDirName={pf}\Simon Tatham\'s Portable Puzzle Collection'."\n"; | ||
53 | print 'DefaultGroupName=Simon Tatham\'s Puzzles'."\n"; | ||
54 | # print 'SetupIconFile=fixmethinkoneup.ico'."\n"; | ||
55 | # print 'UninstallDisplayIcon={app}\fixmethinkoneup.exe'."\n"; | ||
56 | print 'ChangesAssociations=no'."\n"; | ||
57 | print 'Compression=zip/9'."\n"; | ||
58 | print 'AllowNoIcons=yes'."\n"; | ||
59 | print 'OutputBaseFilename=installer'."\n"; | ||
60 | print ''."\n"; | ||
61 | print '[Files]'."\n"; | ||
62 | for $exe (@exes) { | ||
63 | print 'Source: "'.$exe.'"; DestDir: "{app}"; Flags: promptifolder replacesameversion uninsrestartdelete'."\n"; | ||
64 | } | ||
65 | print 'Source: "website.url"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n"; | ||
66 | print 'Source: "puzzles.chm"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n"; | ||
67 | print 'Source: "puzzles.hlp"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n"; | ||
68 | print 'Source: "puzzles.cnt"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n"; | ||
69 | print 'Source: "LICENCE"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n"; | ||
70 | print ''."\n"; | ||
71 | print '[Icons]'."\n"; | ||
72 | for $exe (@exes) { | ||
73 | print 'Name: "{group}\\'.$names{$exe}.'"; Filename: "{app}\\'.$exe.'"'."\n"; | ||
74 | } | ||
75 | print '; We have to fall back from the .chm to the older .hlp file on some Windows'."\n"; | ||
76 | print '; versions.'."\n"; | ||
77 | print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.chm"; MinVersion: 4.1,5.0'."\n"; | ||
78 | print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.hlp"; OnlyBelowVersion: 4.1,5.0'."\n"; | ||
79 | print 'Name: "{group}\Puzzles Web Site"; Filename: "{app}\website.url"'."\n"; | ||