summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/Buildscr
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/puzzles/src/Buildscr')
-rw-r--r--apps/plugins/puzzles/src/Buildscr43
1 files changed, 29 insertions, 14 deletions
diff --git a/apps/plugins/puzzles/src/Buildscr b/apps/plugins/puzzles/src/Buildscr
index c72084477b..b8a585b43e 100644
--- a/apps/plugins/puzzles/src/Buildscr
+++ b/apps/plugins/puzzles/src/Buildscr
@@ -54,24 +54,30 @@ in puzzles do make -f Makefile.doc clean
54in puzzles do make -f Makefile.doc # build help files for installer 54in puzzles do make -f Makefile.doc # build help files for installer
55in puzzles do mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt"}' winwix.mc > puzzles.wxs 55in puzzles do mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt"}' winwix.mc > puzzles.wxs
56in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss 56in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss
57delegate windows 57ifneq "$(VISUAL_STUDIO)" "yes" then
58 # FIXME: Cygwin alternative? 58 in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl clean
59 in puzzles with visualstudio do/win nmake -f Makefile.vc clean 59 in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl VER=-DVER=$(Version)
60 in puzzles with visualstudio do/win nmake -f Makefile.vc VER=-DVER=$(Version)
61 # Code-sign the binaries, if the local bob config provides a script 60 # Code-sign the binaries, if the local bob config provides a script
62 # to do so. We assume here that the script accepts an -i option to 61 # to do so. We assume here that the script accepts an -i option to
63 # provide a 'more info' URL, and an optional -n option to provide a 62 # provide a 'more info' URL, and an optional -n option to provide a
64 # program name, and that it can take multiple .exe filename 63 # program name, and that it can take multiple .exe filename
65 # arguments and sign them all in place. 64 # arguments and sign them all in place.
66 ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ *.exe 65 ifneq "$(cross_winsigncode)" "" in puzzles do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ *.exe
67 # Build installers. 66 # Build installers.
68 in puzzles with wix do/win candle puzzles.wxs && light -ext WixUIExtension -sval puzzles.wixobj 67 in puzzles with wixonlinux do candle -arch x64 puzzles.wxs && light -ext WixUIExtension -sval puzzles.wixobj
69 in puzzles with innosetup do/win iscc puzzles.iss 68 ifneq "$(cross_winsigncode)" "" in puzzles do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ -n "Simon Tatham's Portable Puzzle Collection Installer" puzzles.msi
70 ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ -n "Simon Tatham's Portable Puzzle Collection Installer" puzzles.msi Output/installer.exe 69else
71 return puzzles/*.exe 70 delegate windows
72 return puzzles/Output/installer.exe 71 in puzzles with visualstudio do/win nmake -f Makefile.vc clean
73 return puzzles/puzzles.msi 72 in puzzles with visualstudio do/win nmake -f Makefile.vc VER=-DVER=$(Version)
74enddelegate 73 ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ *.exe
74 # Build installers.
75 in puzzles with wix do/win candle puzzles.wxs && light -ext WixUIExtension -sval puzzles.wixobj
76 in puzzles with innosetup do/win iscc puzzles.iss
77 return puzzles/*.exe
78 return puzzles/puzzles.msi
79 enddelegate
80endif
75in puzzles do chmod +x *.exe 81in puzzles do chmod +x *.exe
76 82
77# Build the Pocket PC binaries and CAB. 83# Build the Pocket PC binaries and CAB.
@@ -152,13 +158,22 @@ delegate emscripten
152 return puzzles/js/*.js 158 return puzzles/js/*.js
153enddelegate 159enddelegate
154 160
161# Build a set of wrapping HTML pages for easy testing of the
162# Javascript puzzles. These aren't quite the same as the versions that
163# will go on my live website, because those ones will substitute in a
164# different footer, and not have to link to the .js files with the
165# ../js/ prefix. But these ones should be good enough to just open
166# using a file:// URL in a browser after running a build, and make
167# sure the main functionality works.
168in puzzles do mkdir jstest
169in puzzles/jstest do ../html/jspage.pl --jspath=../js/ /dev/null ../html/*.html
170
155# Set up .htaccess containing a redirect for the archive filename. 171# Set up .htaccess containing a redirect for the archive filename.
156in puzzles do echo "AddType application/octet-stream .chm" > .htaccess 172in puzzles do echo "AddType application/octet-stream .chm" > .htaccess
157in puzzles do echo "AddType application/octet-stream .hlp" >> .htaccess 173in puzzles do echo "AddType application/octet-stream .hlp" >> .htaccess
158in puzzles do echo "AddType application/octet-stream .cnt" >> .htaccess 174in puzzles do echo "AddType application/octet-stream .cnt" >> .htaccess
159in . do set -- puzzles*.tar.gz; echo RedirectMatch temp '(.*/)'puzzles.tar.gz '$$1'"$$1" >> puzzles/.htaccess 175in . do set -- puzzles*.tar.gz; echo RedirectMatch temp '(.*/)'puzzles.tar.gz '$$1'"$$1" >> puzzles/.htaccess
160in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.msi '$$1'puzzles-$(Version)-installer.msi >> .htaccess 176in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.msi '$$1'puzzles-$(Version)-installer.msi >> .htaccess
161in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.exe '$$1'puzzles-$(Version)-installer.exe >> .htaccess
162 177
163# Phew, we're done. Deliver everything! 178# Phew, we're done. Deliver everything!
164deliver puzzles/icons/*-web.png $@ 179deliver puzzles/icons/*-web.png $@
@@ -172,9 +187,9 @@ deliver puzzles/puzzles.hlp $@
172deliver puzzles/puzzles.cnt $@ 187deliver puzzles/puzzles.cnt $@
173deliver puzzles/puzzles.zip $@ 188deliver puzzles/puzzles.zip $@
174deliver puzzles/puzzles.msi puzzles-$(Version)-installer.msi 189deliver puzzles/puzzles.msi puzzles-$(Version)-installer.msi
175deliver puzzles/Output/installer.exe puzzles-$(Version)-installer.exe
176deliver puzzles/*.jar java/$@ 190deliver puzzles/*.jar java/$@
177deliver puzzles/js/*.js js/$@ 191deliver puzzles/js/*.js js/$@
192deliver puzzles/jstest/*.html jstest/$@
178deliver puzzles/html/*.html html/$@ 193deliver puzzles/html/*.html html/$@
179deliver puzzles/html/*.pl html/$@ 194deliver puzzles/html/*.pl html/$@
180deliver puzzles/wwwspans.html $@ 195deliver puzzles/wwwspans.html $@