Use WiX to generate an MSI-based Puzzles installer.

I've reused most of the install script I wrote for PuTTY recently,
minus the selectable-features dialog, and plus some preliminary Mason
templating to automatically build the right set of puzzle binaries
into the installer.

Stable GUIDs are autogenerated by the same technique I use in PuTTY's
Visual Studio project file generation: hash a fixed pile of randomly
generated bits (that is, randomly generated _once_ and used forever)
with each filename or other identifier and use those as your random
number source.
This commit is contained in:
Simon Tatham
2016-03-10 18:37:24 +00:00
parent de91c4eac7
commit fc6cc8fb2b
2 changed files with 340 additions and 2 deletions

View File

@ -53,6 +53,7 @@ enddelegate
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 mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt"}' winwix.mc > puzzles.wxs
in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss
delegate windows
# Ignore the poorly controlled return value from HHC, and instead
@ -67,12 +68,14 @@ delegate windows
# program name, and that it can take multiple .exe filename
# arguments and sign them all in place.
ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ *.exe
# Build installer.
# Build installers.
in puzzles with wix do/win candle puzzles.wxs && light -ext WixUIExtension -sval puzzles.wixobj
in puzzles with innosetup do/win iscc puzzles.iss
ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ -n "Simon Tatham's Portable Puzzle Collection Installer" Output/setup.exe
ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ -n "Simon Tatham's Portable Puzzle Collection Installer" puzzles.msi Output/setup.exe
return puzzles/puzzles.chm
return puzzles/*.exe
return puzzles/Output/setup.exe
return puzzles/puzzles.msi
enddelegate
in puzzles do chmod +x *.exe
@ -174,6 +177,7 @@ deliver puzzles/puzzles.chm $@
deliver puzzles/puzzles.hlp $@
deliver puzzles/puzzles.cnt $@
deliver puzzles/puzzles.zip $@
deliver puzzles/puzzles.msi puzzles-$(Version)-installer.msi
deliver puzzles/Output/setup.exe puzzles-$(Version)-installer.exe
deliver puzzles/*.jar java/$@
deliver puzzles/js/*.js js/$@