diff options
Diffstat (limited to 'apps/plugins/puzzles/src/Buildscr')
-rw-r--r-- | apps/plugins/puzzles/src/Buildscr | 43 |
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 | |||
54 | in puzzles do make -f Makefile.doc # build help files for installer | 54 | in puzzles do make -f Makefile.doc # build help files for installer |
55 | in puzzles do mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt"}' winwix.mc > puzzles.wxs | 55 | in puzzles do mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt"}' winwix.mc > puzzles.wxs |
56 | in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss | 56 | in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss |
57 | delegate windows | 57 | ifneq "$(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 | 69 | else |
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) |
74 | enddelegate | 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 | ||
80 | endif | ||
75 | in puzzles do chmod +x *.exe | 81 | in 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 |
153 | enddelegate | 159 | enddelegate |
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. | ||
168 | in puzzles do mkdir jstest | ||
169 | in 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. |
156 | in puzzles do echo "AddType application/octet-stream .chm" > .htaccess | 172 | in puzzles do echo "AddType application/octet-stream .chm" > .htaccess |
157 | in puzzles do echo "AddType application/octet-stream .hlp" >> .htaccess | 173 | in puzzles do echo "AddType application/octet-stream .hlp" >> .htaccess |
158 | in puzzles do echo "AddType application/octet-stream .cnt" >> .htaccess | 174 | in puzzles do echo "AddType application/octet-stream .cnt" >> .htaccess |
159 | in . do set -- puzzles*.tar.gz; echo RedirectMatch temp '(.*/)'puzzles.tar.gz '$$1'"$$1" >> puzzles/.htaccess | 175 | in . do set -- puzzles*.tar.gz; echo RedirectMatch temp '(.*/)'puzzles.tar.gz '$$1'"$$1" >> puzzles/.htaccess |
160 | in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.msi '$$1'puzzles-$(Version)-installer.msi >> .htaccess | 176 | in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.msi '$$1'puzzles-$(Version)-installer.msi >> .htaccess |
161 | in 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! |
164 | deliver puzzles/icons/*-web.png $@ | 179 | deliver puzzles/icons/*-web.png $@ |
@@ -172,9 +187,9 @@ deliver puzzles/puzzles.hlp $@ | |||
172 | deliver puzzles/puzzles.cnt $@ | 187 | deliver puzzles/puzzles.cnt $@ |
173 | deliver puzzles/puzzles.zip $@ | 188 | deliver puzzles/puzzles.zip $@ |
174 | deliver puzzles/puzzles.msi puzzles-$(Version)-installer.msi | 189 | deliver puzzles/puzzles.msi puzzles-$(Version)-installer.msi |
175 | deliver puzzles/Output/installer.exe puzzles-$(Version)-installer.exe | ||
176 | deliver puzzles/*.jar java/$@ | 190 | deliver puzzles/*.jar java/$@ |
177 | deliver puzzles/js/*.js js/$@ | 191 | deliver puzzles/js/*.js js/$@ |
192 | deliver puzzles/jstest/*.html jstest/$@ | ||
178 | deliver puzzles/html/*.html html/$@ | 193 | deliver puzzles/html/*.html html/$@ |
179 | deliver puzzles/html/*.pl html/$@ | 194 | deliver puzzles/html/*.pl html/$@ |
180 | deliver puzzles/wwwspans.html $@ | 195 | deliver puzzles/wwwspans.html $@ |