Qt frontend: correctly size window after selection of new game params.
[sgt-puzzles/ydirson.git] / wceinf.pl
blob8bfc11774bdd6525e54ad0a674f62208c87f07d1
1 #!/usr/bin/perl
3 # Perl script to generate a .INF file for building a Pocket PC .CAB
4 # archive of Puzzles. This has to be scripted so that it can read
5 # wingames.lst and automatically adjust to the current available
6 # set of puzzles.
8 # Usage:
10 # $ ./wceinf.pl wingames.lst > puzzles.inf
12 $lst = shift @ARGV;
13 open LST, "<", $lst;
14 while (<LST>) {
15 chomp;
16 split /:/;
17 push @exes, $_[0];
18 $names{$_[0]} = $_[1];
20 close LST;
22 print '[Version]'."\n";
23 print 'Signature = "$Windows NT$" ; required as-is'."\n";
24 print 'Provider = "Simon Tatham" ; full app name will be "<Provider> <AppName>"'."\n";
25 print 'CESignature = "$Windows CE$" ; required as-is'."\n";
26 print ''."\n";
27 print '[CEStrings]'."\n";
28 print 'AppName = "Puzzle Collection" ; full app name will be "<Provider> <AppName>"'."\n";
29 print 'InstallDir = %CE8%\%AppName% ; "\Program Files\Games\Puzzle Collection" (default install directory)'."\n";
30 print ''."\n";
31 print '[CEDevice.x86]'."\n";
32 print 'ProcessorType = 686'."\n";
33 print ''."\n";
34 print '[CEDevice.ARM]'."\n";
35 print 'ProcessorType = 2577'."\n";
36 print ''."\n";
37 print '[SourceDisksNames.x86] ; CPU-dependent files'."\n";
38 print '2 = ,"x86 Files",,.'."\n";
39 print ''."\n";
40 print '[SourceDisksNames.ARMV4] ; CPU-dependent files'."\n";
41 print '2 = ,"ARM Files",,.'."\n";
42 print ''."\n";
43 print '[SourceDisksFiles]'."\n";
44 for $exe (@exes) {
45 print $exe.' = 2'."\n";
47 print ''."\n";
48 print '[DefaultInstall]'."\n";
49 print 'CopyFiles = PuzzleFiles'."\n";
50 print 'CEShortcuts = Links'."\n";
51 print ''."\n";
52 print '[DestinationDirs]'."\n";
53 print 'PuzzleFiles = 0, %InstallDir%'."\n";
54 print 'Links = 0, %CE14%\Puzzles'."\n";
55 print ''."\n";
56 print ';File copy list.'."\n";
57 print '[PuzzleFiles]'."\n";
58 for $exe (@exes) {
59 print $exe."\n";
61 print ''."\n";
62 print '[Links]'."\n";
63 for $exe (@exes) {
64 print '"'.$names{$exe}.'",0,'.$exe."\n";