aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Buildscr14
-rw-r--r--blackbox.R2
-rw-r--r--bridges.R2
-rw-r--r--cube.R2
-rw-r--r--dominosa.R2
-rw-r--r--fifteen.R2
-rw-r--r--flip.R2
-rw-r--r--galaxies.R2
-rw-r--r--guess.R2
-rw-r--r--inertia.R2
-rw-r--r--lightup.R2
-rw-r--r--loopy.R2
-rw-r--r--map.R2
-rw-r--r--mines.R2
-rw-r--r--net.R2
-rw-r--r--netslide.R2
-rw-r--r--pattern.R2
-rw-r--r--pegs.R2
-rw-r--r--rect.R2
-rw-r--r--samegame.R2
-rw-r--r--sixteen.R2
-rw-r--r--slant.R2
-rw-r--r--solo.R2
-rw-r--r--tents.R2
-rw-r--r--twiddle.R2
-rw-r--r--unequal.R2
-rw-r--r--untangle.R2
-rw-r--r--website.url2
-rwxr-xr-xwiniss.pl64
29 files changed, 102 insertions, 30 deletions
diff --git a/Buildscr b/Buildscr
index dde4726..5e02090 100644
--- a/Buildscr
+++ b/Buildscr
@@ -24,9 +24,11 @@ delegate osx
return puzzles/Puzzles.dmg
enddelegate
-# Build the Windows binaries and the CHM file.
+# Build the Windows binaries and installer, and the CHM file.
in puzzles do make -f Makefile.doc clean
in puzzles do make -f Makefile.doc chm
+in puzzles do make -f Makefile.doc # build help file for installer
+in puzzles do perl winiss.pl $(revision) wingames.lst > puzzles.iss
delegate windows
# Ignore the poorly controlled return value from HHC, and instead
# just test that the output file was generated.
@@ -34,13 +36,16 @@ delegate windows
# FIXME: Cygwin alternative?
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc clean'
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc VER=-DREVISION=$(revision)'
+ # Build installer.
+ in puzzles do iscc puzzles.iss
return puzzles/puzzles.chm
return puzzles/*.exe
+ return puzzles/Output/setup.exe
enddelegate
# Build the help file and the HTML docs.
-in puzzles do make -f Makefile.doc clean
-in puzzles do make -f Makefile.doc
+in puzzles do make -f Makefile.doc clean # remove CHM-target HTML
+in puzzles do make -f Makefile.doc # and rebuild help file...
in puzzles do mkdir doc
in puzzles do mkdir devel
in puzzles/doc do halibut --html -Chtml-contents-filename:index.html -Chtml-index-filename:indexpage.html -Chtml-template-filename:%k.html -Chtml-template-fragment:%k ../puzzles.but
@@ -51,7 +56,7 @@ in puzzles/devel do halibut --html -Chtml-contents-filename:index.html -Chtml-in
# excludes the command-line auxiliary utilities such as solosolver,
# and nullgame.exe) into a subdirectory for easy access.
in puzzles do mkdir winbin
-in puzzles do mv `cat wingames.lst` winbin
+in puzzles do mv `cut -f1 -d: wingames.lst` winbin
# Make a zip file of the Windows binaries and help files.
in puzzles do zip -j puzzles.zip winbin/*.exe puzzles.chm puzzles.hlp puzzles.cnt
@@ -77,6 +82,7 @@ deliver puzzles/puzzles.chm $@
deliver puzzles/puzzles.hlp $@
deliver puzzles/puzzles.cnt $@
deliver puzzles/puzzles.zip $@
+deliver puzzles/Output/setup.exe puzzles-r$(revision)-installer.exe
# This one isn't in the puzzles subdir, because makedist.sh left it
# one level up.
deliver puzzles*.tar.gz $@
diff --git a/blackbox.R b/blackbox.R
index a561a7e..20504ad 100644
--- a/blackbox.R
+++ b/blackbox.R
@@ -15,5 +15,5 @@ GAMES += blackbox
!end
!begin >wingames.lst
-blackbox.exe
+blackbox.exe:Black Box
!end
diff --git a/bridges.R b/bridges.R
index f5e00f1..519f4ab 100644
--- a/bridges.R
+++ b/bridges.R
@@ -17,5 +17,5 @@ GAMES += bridges
!end
!begin >wingames.lst
-bridges.exe
+bridges.exe:Bridges
!end
diff --git a/cube.R b/cube.R
index 7f080d6..276510e 100644
--- a/cube.R
+++ b/cube.R
@@ -15,5 +15,5 @@ GAMES += cube
!end
!begin >wingames.lst
-cube.exe
+cube.exe:Cube
!end
diff --git a/dominosa.R b/dominosa.R
index a03071b..4fe065a 100644
--- a/dominosa.R
+++ b/dominosa.R
@@ -15,5 +15,5 @@ GAMES += dominosa
!end
!begin >wingames.lst
-dominosa.exe
+dominosa.exe:Dominosa
!end
diff --git a/fifteen.R b/fifteen.R
index 0102c4e..ba0c9eb 100644
--- a/fifteen.R
+++ b/fifteen.R
@@ -15,5 +15,5 @@ GAMES += fifteen
!end
!begin >wingames.lst
-fifteen.exe
+fifteen.exe:Fifteen
!end
diff --git a/flip.R b/flip.R
index 8e2aeea..66dc2e2 100644
--- a/flip.R
+++ b/flip.R
@@ -17,5 +17,5 @@ GAMES += flip
!end
!begin >wingames.lst
-flip.exe
+flip.exe:Flip
!end
diff --git a/galaxies.R b/galaxies.R
index 3a33132..a0f0e43 100644
--- a/galaxies.R
+++ b/galaxies.R
@@ -20,5 +20,5 @@ GAMES += galaxies
!end
!begin >wingames.lst
-galaxies.exe
+galaxies.exe:Galaxies
!end
diff --git a/guess.R b/guess.R
index 4336c3a..8bc4655 100644
--- a/guess.R
+++ b/guess.R
@@ -15,5 +15,5 @@ GAMES += guess
!end
!begin >wingames.lst
-guess.exe
+guess.exe:Guess
!end
diff --git a/inertia.R b/inertia.R
index 836e1fe..b82870c 100644
--- a/inertia.R
+++ b/inertia.R
@@ -15,5 +15,5 @@ GAMES += inertia
!end
!begin >wingames.lst
-inertia.exe
+inertia.exe:Inertia
!end
diff --git a/lightup.R b/lightup.R
index adaf19a..aa7eab5 100644
--- a/lightup.R
+++ b/lightup.R
@@ -20,5 +20,5 @@ GAMES += lightup
!end
!begin >wingames.lst
-lightup.exe
+lightup.exe:Light Up
!end
diff --git a/loopy.R b/loopy.R
index a2049fd..7c19d45 100644
--- a/loopy.R
+++ b/loopy.R
@@ -17,5 +17,5 @@ GAMES += loopy
!end
!begin >wingames.lst
-loopy.exe
+loopy.exe:Loopy
!end
diff --git a/map.R b/map.R
index 80f8f4d..11b518f 100644
--- a/map.R
+++ b/map.R
@@ -20,5 +20,5 @@ GAMES += map
!end
!begin >wingames.lst
-map.exe
+map.exe:Map
!end
diff --git a/mines.R b/mines.R
index 1758abc..e51988a 100644
--- a/mines.R
+++ b/mines.R
@@ -20,5 +20,5 @@ GAMES += mines
!end
!begin >wingames.lst
-mines.exe
+mines.exe:Mines
!end
diff --git a/net.R b/net.R
index 266b7a6..e184546 100644
--- a/net.R
+++ b/net.R
@@ -19,5 +19,5 @@ GAMES += net
!end
!begin >wingames.lst
-netgame.exe
+netgame.exe:Net
!end
diff --git a/netslide.R b/netslide.R
index 61a4293..54a6706 100644
--- a/netslide.R
+++ b/netslide.R
@@ -17,5 +17,5 @@ GAMES += netslide
!end
!begin >wingames.lst
-netslide.exe
+netslide.exe:Netslide
!end
diff --git a/pattern.R b/pattern.R
index 512e2cb..0c05bbd 100644
--- a/pattern.R
+++ b/pattern.R
@@ -18,5 +18,5 @@ GAMES += pattern
!end
!begin >wingames.lst
-pattern.exe
+pattern.exe:Pattern
!end
diff --git a/pegs.R b/pegs.R
index e5e080e..ff99cb5 100644
--- a/pegs.R
+++ b/pegs.R
@@ -17,5 +17,5 @@ GAMES += pegs
!end
!begin >wingames.lst
-pegs.exe
+pegs.exe:Pegs
!end
diff --git a/rect.R b/rect.R
index 3d4bf97..8250376 100644
--- a/rect.R
+++ b/rect.R
@@ -15,5 +15,5 @@ GAMES += rect
!end
!begin >wingames.lst
-rect.exe
+rect.exe:Rectangles
!end
diff --git a/samegame.R b/samegame.R
index 44b94ba..9e90b2c 100644
--- a/samegame.R
+++ b/samegame.R
@@ -15,5 +15,5 @@ GAMES += samegame
!end
!begin >wingames.lst
-samegame.exe
+samegame.exe:Same Game
!end
diff --git a/sixteen.R b/sixteen.R
index c5e25cd..9935ced 100644
--- a/sixteen.R
+++ b/sixteen.R
@@ -15,5 +15,5 @@ GAMES += sixteen
!end
!begin >wingames.lst
-sixteen.exe
+sixteen.exe:Sixteen
!end
diff --git a/slant.R b/slant.R
index f15b39e..9c4d575 100644
--- a/slant.R
+++ b/slant.R
@@ -20,5 +20,5 @@ GAMES += slant
!end
!begin >wingames.lst
-slant.exe
+slant.exe:Slant
!end
diff --git a/solo.R b/solo.R
index 7e1ff2a..8a5c52d 100644
--- a/solo.R
+++ b/solo.R
@@ -18,5 +18,5 @@ GAMES += solo
!end
!begin >wingames.lst
-solo.exe
+solo.exe:Solo
!end
diff --git a/tents.R b/tents.R
index cee89ce..a41780f 100644
--- a/tents.R
+++ b/tents.R
@@ -20,5 +20,5 @@ GAMES += tents
!end
!begin >wingames.lst
-tents.exe
+tents.exe:Tents
!end
diff --git a/twiddle.R b/twiddle.R
index d0e841a..2b8897e 100644
--- a/twiddle.R
+++ b/twiddle.R
@@ -15,5 +15,5 @@ GAMES += twiddle
!end
!begin >wingames.lst
-twiddle.exe
+twiddle.exe:Twiddle
!end
diff --git a/unequal.R b/unequal.R
index f40a5a7..5083857 100644
--- a/unequal.R
+++ b/unequal.R
@@ -23,5 +23,5 @@ GAMES += unequal
!end
!begin >wingames.lst
-unequal.exe
+unequal.exe:Unequal
!end
diff --git a/untangle.R b/untangle.R
index 4187cba..f7a7867 100644
--- a/untangle.R
+++ b/untangle.R
@@ -17,5 +17,5 @@ GAMES += untangle
!end
!begin >wingames.lst
-untangle.exe
+untangle.exe:Untangle
!end
diff --git a/website.url b/website.url
new file mode 100644
index 0000000..2ab37f6
--- /dev/null
+++ b/website.url
@@ -0,0 +1,2 @@
+[InternetShortcut]
+URL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/
diff --git a/winiss.pl b/winiss.pl
new file mode 100755
index 0000000..bd2ac05
--- /dev/null
+++ b/winiss.pl
@@ -0,0 +1,64 @@
+#!/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
+# and automatically adjust to the current available set of puzzles.
+
+# Usage:
+#
+# $ ./winiss.pl 1234 wingames.lst > puzzles.iss
+#
+# where `1234' is the revision number which will be encoded in the
+# installer's version indicators.
+
+$rev = shift @ARGV;
+($revclean=$rev) =~ s/M$//;
+$lst = shift @ARGV;
+open LST, "<", $lst;
+while (<LST>) {
+ chomp;
+ split /:/;
+ push @exes, $_[0];
+ $names{$_[0]} = $_[1];
+}
+close LST;
+
+print '; -*- no -*-'."\n";
+print ';'."\n";
+print '; -- Inno Setup installer script for Puzzles.'."\n";
+print ''."\n";
+print '[Setup]'."\n";
+print 'AppName=Simon Tatham\'s Portable Puzzle Collection'."\n";
+print 'AppVerName=Puzzles revision '.$rev."\n";
+print 'VersionInfoTextVersion=Revision '.$rev."\n";
+print 'AppVersion=r'.$rev."\n";
+print 'VersionInfoVersion=0.0.'.$revclean.'.0'."\n";
+print 'AppPublisher=Simon Tatham'."\n";
+print 'AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/'."\n";
+print 'DefaultDirName={pf}\Simon Tatham\'s Portable Puzzle Collection'."\n";
+print 'DefaultGroupName=Simon Tatham\'s Puzzles'."\n";
+# print 'SetupIconFile=fixmethinkoneup.ico'."\n";
+# print 'UninstallDisplayIcon={app}\fixmethinkoneup.exe'."\n";
+print 'ChangesAssociations=no'."\n";
+print 'Compression=zip/9'."\n";
+print 'AllowNoIcons=yes'."\n";
+print ''."\n";
+print '[Files]'."\n";
+for $exe (@exes) {
+ print 'Source: "'.$exe.'"; DestDir: "{app}"; Flags: promptifolder replacesameversion uninsrestartdelete'."\n";
+}
+print 'Source: "website.url"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
+print 'Source: "puzzles.chm"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
+print 'Source: "puzzles.hlp"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
+print 'Source: "puzzles.cnt"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
+print 'Source: "LICENCE"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
+print ''."\n";
+print '[Icons]'."\n";
+for $exe (@exes) {
+ print 'Name: "{group}\\'.$names{$exe}.'"; Filename: "{app}\\'.$exe.'"'."\n";
+}
+print '; We have to fall back from the .chm to the older .hlp file on some Windows'."\n";
+print '; versions.'."\n";
+print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.chm"; MinVersion: 4.1,5.0'."\n";
+print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.hlp"; OnlyBelowVersion: 4.1,5.0'."\n";
+print 'Name: "{group}\Puzzles Web Site"; Filename: "{app}\website.url"'."\n";