aboutsummaryrefslogtreecommitdiff
path: root/winiss.pl
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2013-06-08 16:29:15 +0000
committerSimon Tatham <anakin@pobox.com>2013-06-08 16:29:15 +0000
commit5dda5cf1d039767c632fe5e58ed7b95f5a615c0f (patch)
treec48aa26d44fe83cb32a83f6e665f6e97bd70cb53 /winiss.pl
parentb6ee9debcfe46c7ed4e958511e754f150f4e9773 (diff)
downloadpuzzles-5dda5cf1d039767c632fe5e58ed7b95f5a615c0f.zip
puzzles-5dda5cf1d039767c632fe5e58ed7b95f5a615c0f.tar.gz
puzzles-5dda5cf1d039767c632fe5e58ed7b95f5a615c0f.tar.bz2
puzzles-5dda5cf1d039767c632fe5e58ed7b95f5a615c0f.tar.xz
Rename wingames.lst to gamedesc.txt, and add a couple of extra fields
to it giving each game's "internal" name (as seen in the source file, .R etc) and also a brief description of the game. The idea of the latter is that it should be usable as a comment field in .desktop files and similar. [originally from svn r9858]
Diffstat (limited to 'winiss.pl')
-rwxr-xr-xwiniss.pl16
1 files changed, 8 insertions, 8 deletions
diff --git a/winiss.pl b/winiss.pl
index 7416ace..9e796e0 100755
--- a/winiss.pl
+++ b/winiss.pl
@@ -1,12 +1,12 @@
#!/usr/bin/perl
# Perl script to generate an Inno Setup installer script for
-# Puzzles. This has to be scripted so that it can read wingames.lst
+# Puzzles. This has to be scripted so that it can read gamedesc.txt
# and automatically adjust to the current available set of puzzles.
# Usage:
#
-# $ ./winiss.pl 1234 wingames.lst > puzzles.iss
+# $ ./winiss.pl 1234 gamedesc.txt > puzzles.iss
#
# where `1234' is the revision number which will be encoded in the
# installer's version indicators.
@@ -15,15 +15,15 @@ use warnings;
$rev = shift @ARGV;
($revclean=$rev) =~ s/M$//;
-$lst = shift @ARGV;
-open LST, "<", $lst;
-while (<LST>) {
+$desc = shift @ARGV;
+open DESC, "<", $desc;
+while (<DESC>) {
chomp;
@_ = split /:/;
- push @exes, $_[0];
- $names{$_[0]} = $_[1];
+ push @exes, $_[1];
+ $names{$_[1]} = $_[2];
}
-close LST;
+close DESC;
print '; -*- no -*-'."\n";
print ';'."\n";