aboutsummaryrefslogtreecommitdiff
path: root/kaios/manifest.pl (follow)
Commit message (Collapse)AuthorAge
* Add a content security policy for the KaiOS appBen Harris2023-01-21
| | | | | | | This is for defence in depth against security holes either in Puzzles or in the KaiAds API. I haven't found any documentation of what KaiAds' CSP requirements are, but allowing scripts and frames from *.kaiads.com seems to be enough to let the test adverts work.
* Update comment in manifest.pl based on experienceBen Harris2023-01-21
| | | | | As far as I can tell, the KaiStore is quite happy with YY.MM.DD version numbers.
* kaios/manifest.pl: canonicalise the JSON output.Simon Tatham2023-01-21
| | | | | | | | | | | The default behaviour of JSON::PP's encode_json output is to write the keys of a hash in Perl's natural hash order, which isn't consistent between runs of the same script due to hash function randomisation. This causes my build system to complain when successive builds from the same source revision don't produce the same output. Easily fixed: JSON::PP already has a switch to ensure consistent ordering, it's just a matter of finding it and turning it on.
* kaios: Add hooks for the KaiAds APIBen Harris2023-01-19
| | | | | | | | | | | The Kai Store makes display of advertisements provided by the KaiAds API mandatory. I don't want such adverts to be inconvenient for the users, so I've just gone for adding a menu item that will display one. This is probably a little too crude, but it's good for testing things. The actual KaiAds API code is not free software, so it's not included here. My intention is to add it by hand to the Zip files for Kai Store uploads. Without it, the advertising code does nothing.
* Correct type of "locales" in KaiOS manifestBen Harris2023-01-19
| | | | It should be an object, not an array.
* kaios: Provide a populated "locales" field in the manifestBen Harris2023-01-19
| | | | | | The documentation says it's only needed to override values in the main manifest, but it's apparently required even if you only support one locale.
* kaios: Put version numbers in manifest filesBen Harris2023-01-19
| | | | | | | | | This only happens if something edits manifest.pl to provide a version number, but Buildscr can do that. KaiOS manifests are documented as requiring dotted-decimal version numbers. In fact, the restrictions are much stricter than that, and unacceptable version numbers can break the KaiStore developer portal. YY.MM.DD version numbers seem to be acceptable.
* kaios: Major parts of a build for KaiOSBen Harris2023-01-19
KaiOS (which is based on Firefox OS, formerly Boot to Gecko) runs its "native" apps in a Web browser, so this is essentially a rather specialised version of the JavaScript front-end. Indeed, the JavaScript and C parts are the same as the Web version. There are three major parts that are specific to the KaiOS build. First, there's manifest.pl, which generates a KaiOS-specific JSON manifest describing each puzzle. Second, there's a new HTML page generator, apppage.pl, that generates an HTML page that is much less like a Web page, and much more like an application, than the one generated by jspage.pl. It expects to build a single HTML page at a time and gets all its limited knowledge of the environment from its command line. This makes it gratuitously different from jspage.pl and javapage.pl, but makes it easier to run from the build system. And finally, there's the CMake glue that assembles the necessary parts for each application in a directory. This includes the manifest, the HTML, the JavaScript, the KaiOS-specific icons (generated as part of the GTK build) and a copy of the HTML documentation. The directory is assembled using CMake's install() function, and can be installed on a KaiOS device using the developer tools.