mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Build script for Puzzles using bob. I've also added a piece of extra
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]
This commit is contained in:
77
Buildscr
Normal file
77
Buildscr
Normal file
@ -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 $@
|
@ -13,3 +13,7 @@ GAMES += blackbox
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(blackbox) \
|
A(blackbox) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
blackbox.exe
|
||||||
|
!end
|
||||||
|
@ -15,3 +15,7 @@ GAMES += bridges
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(bridges) \
|
A(bridges) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
bridges.exe
|
||||||
|
!end
|
||||||
|
4
cube.R
4
cube.R
@ -13,3 +13,7 @@ GAMES += cube
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(cube) \
|
A(cube) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
cube.exe
|
||||||
|
!end
|
||||||
|
@ -13,3 +13,7 @@ GAMES += dominosa
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(dominosa) \
|
A(dominosa) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
dominosa.exe
|
||||||
|
!end
|
||||||
|
@ -13,3 +13,7 @@ GAMES += fifteen
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(fifteen) \
|
A(fifteen) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
fifteen.exe
|
||||||
|
!end
|
||||||
|
4
flip.R
4
flip.R
@ -15,3 +15,7 @@ GAMES += flip
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(flip) \
|
A(flip) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
flip.exe
|
||||||
|
!end
|
||||||
|
4
guess.R
4
guess.R
@ -13,3 +13,7 @@ GAMES += guess
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(guess) \
|
A(guess) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
guess.exe
|
||||||
|
!end
|
||||||
|
@ -13,3 +13,7 @@ GAMES += inertia
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(inertia) \
|
A(inertia) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
inertia.exe
|
||||||
|
!end
|
||||||
|
@ -18,3 +18,7 @@ GAMES += lightup
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(lightup) \
|
A(lightup) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
lightup.exe
|
||||||
|
!end
|
||||||
|
4
loopy.R
4
loopy.R
@ -15,3 +15,7 @@ GAMES += loopy
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(loopy) \
|
A(loopy) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
loopy.exe
|
||||||
|
!end
|
||||||
|
@ -15,7 +15,7 @@ case "$#" in
|
|||||||
if test "x$rev" = "xexported"; then rev=; fi
|
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"
|
rev="$1"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
4
map.R
4
map.R
@ -18,3 +18,7 @@ GAMES += map
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(map) \
|
A(map) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
map.exe
|
||||||
|
!end
|
||||||
|
4
mines.R
4
mines.R
@ -18,3 +18,7 @@ GAMES += mines
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(mines) \
|
A(mines) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
mines.exe
|
||||||
|
!end
|
||||||
|
4
net.R
4
net.R
@ -17,3 +17,7 @@ GAMES += net
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(net) \
|
A(net) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
netgame.exe
|
||||||
|
!end
|
||||||
|
@ -15,3 +15,7 @@ GAMES += netslide
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(netslide) \
|
A(netslide) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
netslide.exe
|
||||||
|
!end
|
||||||
|
@ -16,3 +16,7 @@ GAMES += pattern
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(pattern) \
|
A(pattern) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
pattern.exe
|
||||||
|
!end
|
||||||
|
4
pegs.R
4
pegs.R
@ -15,3 +15,7 @@ GAMES += pegs
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(pegs) \
|
A(pegs) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
pegs.exe
|
||||||
|
!end
|
||||||
|
4
rect.R
4
rect.R
@ -13,3 +13,7 @@ GAMES += rect
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(rect) \
|
A(rect) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
rect.exe
|
||||||
|
!end
|
||||||
|
@ -13,3 +13,7 @@ GAMES += samegame
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(samegame) \
|
A(samegame) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
samegame.exe
|
||||||
|
!end
|
||||||
|
@ -13,3 +13,7 @@ GAMES += sixteen
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(sixteen) \
|
A(sixteen) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
sixteen.exe
|
||||||
|
!end
|
||||||
|
4
slant.R
4
slant.R
@ -18,3 +18,7 @@ GAMES += slant
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(slant) \
|
A(slant) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
slant.exe
|
||||||
|
!end
|
||||||
|
4
solo.R
4
solo.R
@ -16,3 +16,7 @@ GAMES += solo
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(solo) \
|
A(solo) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
solo.exe
|
||||||
|
!end
|
||||||
|
4
tents.R
4
tents.R
@ -18,3 +18,7 @@ GAMES += tents
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(tents) \
|
A(tents) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
tents.exe
|
||||||
|
!end
|
||||||
|
@ -13,3 +13,7 @@ GAMES += twiddle
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(twiddle) \
|
A(twiddle) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
twiddle.exe
|
||||||
|
!end
|
||||||
|
@ -21,3 +21,7 @@ GAMES += unequal
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(unequal) \
|
A(unequal) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
unequal.exe
|
||||||
|
!end
|
||||||
|
@ -15,3 +15,7 @@ GAMES += untangle
|
|||||||
!begin >list.c
|
!begin >list.c
|
||||||
A(untangle) \
|
A(untangle) \
|
||||||
!end
|
!end
|
||||||
|
|
||||||
|
!begin >wingames.lst
|
||||||
|
untangle.exe
|
||||||
|
!end
|
||||||
|
Reference in New Issue
Block a user