shithub: puzzles

Download patch

ref: eb60f001b7053022539c2737b5c2106c8798bde5
parent: cc2e94ab2bbbcfcbb2eee58c5878917fadb721ab
author: Ben Harris <bjh21@bjh21.me.uk>
date: Sun Dec 11 09:10:16 EST 2022

Buildscr bits for making KaiOS builds

These are currently treated as just another JavaScript build, so they
don't have their own variable to turn them off.

--- a/Buildscr
+++ b/Buildscr
@@ -24,6 +24,9 @@
 # them!)
 in puzzles do perl -i -pe 's/Unidentified build/$(Version)/' osx/Info.plist
 
+# And in the KaiOS metadata generator.
+in puzzles do perl -i -pe 's/Unidentified build/$(Version)/' kaios/manifest.pl
+
 ifneq "$(NOICONS)" yes then
   # Run enough of a native Unix build to produce the various icons.
   # This also checks that the build completes in 'strict' mode (with
@@ -137,6 +140,10 @@
     return puzzles/build-emscripten/*.wasm
     return puzzles/build-emscripten/unfinished/group.js
     return puzzles/build-emscripten/unfinished/group.wasm
+    in puzzles do emcmake cmake -B build-kaios -DWASM=NO -DICON_DIR=$$PWD/../build-icons/icons -DCMAKE_BUILD_TYPE=Release .
+    in puzzles/build-kaios do make -j$(nproc) VERBOSE=1 install
+    in puzzles/build-kaios/kaios do for p in *; do (cd $$p && zip -rDn .png ../$$p.zip *); done
+    return puzzles/build-kaios/kaios/*.zip
   enddelegate
 
   # Build a set of wrapping HTML pages for easy testing of the
@@ -199,6 +206,7 @@
   deliver puzzles/jstest/*.html jstest/$@
   deliver puzzles/html/*.html html/$@
   deliver puzzles/html/*.pl html/$@
+  deliver puzzles/build-kaios/kaios/*.zip kaios/$@
 endif
 deliver puzzles/wwwspans.html $@
 deliver puzzles/wwwlinks.html $@