X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=wceinf.pl;h=4756f3c2b8dd61f7b75fa87d94f6bcd53cd58d11;hb=a0a581c8b5422bf0c5ed3fde6aa25811e4eb89fc;hp=8bfc11774bdd6525e54ad0a674f62208c87f07d1;hpb=6da884911025f5bfe78ffbf5389725e2b487bb5d;p=sgt-puzzles.git diff --git a/wceinf.pl b/wceinf.pl index 8bfc117..4756f3c 100644 --- a/wceinf.pl +++ b/wceinf.pl @@ -2,22 +2,22 @@ # Perl script to generate a .INF file for building a Pocket PC .CAB # archive of Puzzles. This has to be scripted so that it can read -# wingames.lst and automatically adjust to the current available +# gamedesc.txt and automatically adjust to the current available # set of puzzles. # Usage: # -# $ ./wceinf.pl wingames.lst > puzzles.inf +# $ ./wceinf.pl gamedesc.txt > puzzles.inf -$lst = shift @ARGV; -open LST, "<", $lst; -while () { +$desc = shift @ARGV; +open DESC, "<", $desc; +while () { chomp; - split /:/; - push @exes, $_[0]; - $names{$_[0]} = $_[1]; + @_ = split /:/; + push @exes, $_[1]; + $names{$_[1]} = $_[2]; } -close LST; +close DESC; print '[Version]'."\n"; print 'Signature = "$Windows NT$" ; required as-is'."\n";