chiark / gitweb /
Build script for Puzzles using bob. I've also added a piece of extra
authorSimon Tatham <anakin@pobox.com>
Sun, 4 Feb 2007 11:44:10 +0000 (11:44 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 4 Feb 2007 11:44:10 +0000 (11:44 +0000)
infrastructure to the mkfiles.pl framework for the convenience of
the build script: it generates `wingames.lst', a list of the Windows
binaries which are ship-worthy games as opposed to nullgame or
command-line auxiliary programs.

[originally from svn r7206]

27 files changed:
Buildscr [new file with mode: 0644]
blackbox.R
bridges.R
cube.R
dominosa.R
fifteen.R
flip.R
guess.R
inertia.R
lightup.R
loopy.R
makedist.sh
map.R
mines.R
net.R
netslide.R
pattern.R
pegs.R
rect.R
samegame.R
sixteen.R
slant.R
solo.R
tents.R
twiddle.R
unequal.R
untangle.R

diff --git a/Buildscr b/Buildscr
new file mode 100644 (file)
index 0000000..5c555ae
--- /dev/null
+++ b/Buildscr
@@ -0,0 +1,77 @@
+# -*- sh -*-
+# Build script to build Puzzles.
+
+# First build some local binaries, to run the icon build.
+in puzzles do perl mkfiles.pl
+in puzzles do make
+
+# Now build the screenshots and icons.
+in puzzles/icons do xvfb-run make web winicons gtkicons
+
+# Destroy the local binaries, mostly to avoid wasting network
+# bandwidth by transferring them to the delegate servers.
+in puzzles do make clean
+
+# Build the OS X .dmg archive.
+delegate osx
+  in puzzles do make -f Makefile.osx clean
+  in puzzles do make -f Makefile.osx release
+  return puzzles/Puzzles.dmg
+enddelegate
+
+# Build the Windows binaries and the CHM file.
+in puzzles do make -f Makefile.doc clean
+in puzzles do make -f Makefile.doc chm
+delegate windows
+  # Ignore the poorly controlled return value from HHC, and instead
+  # just test that the output file was generated.
+  in puzzles do hhc puzzles.hhp; test -f puzzles.chm
+  # FIXME: Cygwin alternative?
+  in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc clean'
+  in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc'
+  return puzzles/puzzles.chm
+  return puzzles/*.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 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
+in puzzles/devel do halibut --html -Chtml-contents-filename:index.html -Chtml-index-filename:indexpage.html -Chtml-template-filename:%k.html -Chtml-template-fragment:%k ../devel.but
+
+# Move the deliver-worthy Windows binaries (those specified in
+# wingames.lst, which is generated by mkfiles.pl and helpfully
+# 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
+
+# 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
+
+# Create the source archive. (That writes the archive into the
+# _parent_ directory, so be careful when we deliver it.)
+in puzzles do ./makedist.sh $(revision)
+
+# Set up .htaccess containing a redirect for the archive filename.
+in puzzles do echo "AddType application/octet-stream .chm" > .htaccess
+in puzzles do echo "AddType application/octet-stream .hlp" >> .htaccess
+in puzzles do echo "AddType application/octet-stream .cnt" >> .htaccess
+in puzzles do set -- puzzles*.tar.gz; echo RedirectMatch temp '(.*/)'puzzles.tar.gz '$$1'"$$1" >> .htaccess
+
+# Phew, we're done. Deliver everything!
+deliver puzzles/icons/*-web.png $@
+deliver puzzles/winbin/*.exe $@
+deliver puzzles/.htaccess $@
+deliver puzzles/doc/*.html doc/$@
+deliver puzzles/devel/*.html devel/$@
+deliver puzzles/Puzzles.dmg $@
+deliver puzzles/puzzles.chm $@
+deliver puzzles/puzzles.hlp $@
+deliver puzzles/puzzles.cnt $@
+deliver puzzles/puzzles.zip $@
+# This one isn't in the puzzles subdir, because makedist.sh left it
+# one level up.
+deliver puzzles*.tar.gz $@
index 423584004eda775438fbcfc60895b4564813b045..a561a7e56b3eb254ae92707bcd1859a5f931835a 100644 (file)
@@ -13,3 +13,7 @@ GAMES += blackbox
 !begin >list.c
     A(blackbox) \
 !end
+
+!begin >wingames.lst
+blackbox.exe
+!end
index 75b9731e3a8e10f2a48c5b41f9ede88794797f34..f5e00f1dc1846b5c65ef468e574c6cd3281f5c62 100644 (file)
--- a/bridges.R
+++ b/bridges.R
@@ -15,3 +15,7 @@ GAMES += bridges
 !begin >list.c
     A(bridges) \
 !end
+
+!begin >wingames.lst
+bridges.exe
+!end
diff --git a/cube.R b/cube.R
index f08e0000de53c93a9cc7237b9e29c20fdf18d6fc..7f080d6cc4bc13ce725326f715b3626a1a1fa6b1 100644 (file)
--- a/cube.R
+++ b/cube.R
@@ -13,3 +13,7 @@ GAMES += cube
 !begin >list.c
     A(cube) \
 !end
+
+!begin >wingames.lst
+cube.exe
+!end
index e243c43f3424a6b65951b19dc34f05e695e7db37..a03071b86e69009f53fc52510c930571a9d04fd7 100644 (file)
@@ -13,3 +13,7 @@ GAMES += dominosa
 !begin >list.c
     A(dominosa) \
 !end
+
+!begin >wingames.lst
+dominosa.exe
+!end
index a9e2108ceef7aaccd99c08087dbe9e59e5919936..0102c4e257fd790c6b815cc05861c93c7927d889 100644 (file)
--- a/fifteen.R
+++ b/fifteen.R
@@ -13,3 +13,7 @@ GAMES += fifteen
 !begin >list.c
     A(fifteen) \
 !end
+
+!begin >wingames.lst
+fifteen.exe
+!end
diff --git a/flip.R b/flip.R
index 40ca546744166e290c1b75aa2cd708e04751d0fe..8e2aeea3ecd4d220849dd19d70be6708fcd2add1 100644 (file)
--- a/flip.R
+++ b/flip.R
@@ -15,3 +15,7 @@ GAMES += flip
 !begin >list.c
     A(flip) \
 !end
+
+!begin >wingames.lst
+flip.exe
+!end
diff --git a/guess.R b/guess.R
index 0956e6583893723687c54dd309f64266127d8782..4336c3afaa7a49a2ae28493559cb38c7513cc4ad 100644 (file)
--- a/guess.R
+++ b/guess.R
@@ -13,3 +13,7 @@ GAMES += guess
 !begin >list.c
     A(guess) \
 !end
+
+!begin >wingames.lst
+guess.exe
+!end
index 867484e977101de3cab2de97241b19f00ae36265..836e1fea0443f49ff10c5a43468bbd31795f56dd 100644 (file)
--- a/inertia.R
+++ b/inertia.R
@@ -13,3 +13,7 @@ GAMES += inertia
 !begin >list.c
     A(inertia) \
 !end
+
+!begin >wingames.lst
+inertia.exe
+!end
index b4c4a3dfb17f9d30b6aa2d9b0b78dc4c138f0629..adaf19a6a40ccafad20625c0d2c19344991a213d 100644 (file)
--- a/lightup.R
+++ b/lightup.R
@@ -18,3 +18,7 @@ GAMES += lightup
 !begin >list.c
     A(lightup) \
 !end
+
+!begin >wingames.lst
+lightup.exe
+!end
diff --git a/loopy.R b/loopy.R
index 1856d5309aab0895d1ad8b87c49e912bc9902407..a2049fd01e59cf35aec33c7ff5e8c540d8219006 100644 (file)
--- a/loopy.R
+++ b/loopy.R
@@ -15,3 +15,7 @@ GAMES += loopy
 !begin >list.c
     A(loopy) \
 !end
+
+!begin >wingames.lst
+loopy.exe
+!end
index 4e695b606c1b9cf10965a33c87df8d666808b0bc..7af8fbf763b4b9d921262b0f940ebdc0d2559691 100755 (executable)
@@ -15,7 +15,7 @@ case "$#" in
     if test "x$rev" = "xexported"; then rev=; fi
     ;;
   *)
-    case "$1" in *[!0-9]*) echo "Malformed revision number '$1'">&2;exit 1;;esac
+    case "$1" in *[!0-9M]*) echo "Malformed revision number '$1'">&2;exit 1;;esac
     rev="$1"
     ;;
 esac
diff --git a/map.R b/map.R
index 20e6706a736b97f03651af002edf8318f2314b88..80f8f4d35ca42ee21c53bded158624da34848c88 100644 (file)
--- a/map.R
+++ b/map.R
@@ -18,3 +18,7 @@ GAMES += map
 !begin >list.c
     A(map) \
 !end
+
+!begin >wingames.lst
+map.exe
+!end
diff --git a/mines.R b/mines.R
index bc7e3a9b093185d2e520fa740a29a80155097341..1758abc96eb53f43aff7101352df1af742f23db9 100644 (file)
--- a/mines.R
+++ b/mines.R
@@ -18,3 +18,7 @@ GAMES += mines
 !begin >list.c
     A(mines) \
 !end
+
+!begin >wingames.lst
+mines.exe
+!end
diff --git a/net.R b/net.R
index 5edddb57de49a70757e003e1434f9e4cc4e7bbce..266b7a6575eea5d119d2b9429f469c28be838c86 100644 (file)
--- a/net.R
+++ b/net.R
@@ -17,3 +17,7 @@ GAMES += net
 !begin >list.c
     A(net) \
 !end
+
+!begin >wingames.lst
+netgame.exe
+!end
index b558de992991ec074a609e6395d5a9067774ea6c..61a429365a52096e7e539347c9d8d2c595813bb8 100644 (file)
@@ -15,3 +15,7 @@ GAMES += netslide
 !begin >list.c
     A(netslide) \
 !end
+
+!begin >wingames.lst
+netslide.exe
+!end
index 0b96d46fb78f0572bf1e04d0003c749a2c93eba4..512e2cbdbea64dbc1cea74da4658dcd375f5250c 100644 (file)
--- a/pattern.R
+++ b/pattern.R
@@ -16,3 +16,7 @@ GAMES += pattern
 !begin >list.c
     A(pattern) \
 !end
+
+!begin >wingames.lst
+pattern.exe
+!end
diff --git a/pegs.R b/pegs.R
index 97a175073d683e2c8e2f1a585dd914e9c65ccf22..e5e080e9a324212c4a72a1818cedf377d2b8d438 100644 (file)
--- a/pegs.R
+++ b/pegs.R
@@ -15,3 +15,7 @@ GAMES += pegs
 !begin >list.c
     A(pegs) \
 !end
+
+!begin >wingames.lst
+pegs.exe
+!end
diff --git a/rect.R b/rect.R
index e050b40d52d9839b6b0f0ae841fe8136cb92f68e..3d4bf97a31c689d82392dc0a3702a80fcbb5c64c 100644 (file)
--- a/rect.R
+++ b/rect.R
@@ -13,3 +13,7 @@ GAMES += rect
 !begin >list.c
     A(rect) \
 !end
+
+!begin >wingames.lst
+rect.exe
+!end
index fa1f2cadcf79785533bc2b9bf8ad0d1424a7bdeb..44b94ba790570ec5bcf69e48fd49dcc4d7828113 100644 (file)
@@ -13,3 +13,7 @@ GAMES += samegame
 !begin >list.c
     A(samegame) \
 !end
+
+!begin >wingames.lst
+samegame.exe
+!end
index 4a699618ab54a24882b0662ca4c7486d3e3db3e4..c5e25cdbad6c82d9bc13ed6141a1f7758392e9db 100644 (file)
--- a/sixteen.R
+++ b/sixteen.R
@@ -13,3 +13,7 @@ GAMES += sixteen
 !begin >list.c
     A(sixteen) \
 !end
+
+!begin >wingames.lst
+sixteen.exe
+!end
diff --git a/slant.R b/slant.R
index b615a9fc6b6c00888ade0f445c9eca01844a7853..f15b39e0c0010b171ac7fa3dbb26bb17044fc823 100644 (file)
--- a/slant.R
+++ b/slant.R
@@ -18,3 +18,7 @@ GAMES += slant
 !begin >list.c
     A(slant) \
 !end
+
+!begin >wingames.lst
+slant.exe
+!end
diff --git a/solo.R b/solo.R
index 126e338bc1c4cf145c97c69a86bcf4e16554ff33..7e1ff2af1fa1f80040fe995545338947df0168cb 100644 (file)
--- a/solo.R
+++ b/solo.R
@@ -16,3 +16,7 @@ GAMES += solo
 !begin >list.c
     A(solo) \
 !end
+
+!begin >wingames.lst
+solo.exe
+!end
diff --git a/tents.R b/tents.R
index c875289500cd837a5b1e06ab017775efa085e973..cee89ce507870d1f8dafd32dab2e952cb4a5c827 100644 (file)
--- a/tents.R
+++ b/tents.R
@@ -18,3 +18,7 @@ GAMES += tents
 !begin >list.c
     A(tents) \
 !end
+
+!begin >wingames.lst
+tents.exe
+!end
index 6b23df16f5171888b2070202317ced3cf2f220cb..d0e841a550e478036dfe411a0d0cd34736e0e40d 100644 (file)
--- a/twiddle.R
+++ b/twiddle.R
@@ -13,3 +13,7 @@ GAMES += twiddle
 !begin >list.c
     A(twiddle) \
 !end
+
+!begin >wingames.lst
+twiddle.exe
+!end
index d9bffd374f1167036df180038118f7d9106b3acd..f40a5a7dc7d53135c02588fb196add25373d26dd 100644 (file)
--- a/unequal.R
+++ b/unequal.R
@@ -21,3 +21,7 @@ GAMES += unequal
 !begin >list.c
     A(unequal) \
 !end
+
+!begin >wingames.lst
+unequal.exe
+!end
index fd74f319c053c6a5cd95986cc6c882d067f495c6..4187cbab0bd3bce608e26c0d6046af920633c357 100644 (file)
@@ -15,3 +15,7 @@ GAMES += untangle
 !begin >list.c
     A(untangle) \
 !end
+
+!begin >wingames.lst
+untangle.exe
+!end