Embed Arcade with low-resolution WebP library art

This commit is contained in:
waozi committed 2026-11-02 14:02:35 -03:00
1 parent 10de2aae33
commit 44ac49655c
9 files changed
+11 -10

No files matched your search

+1 -1
View File
@@ -10,4 +10,4 @@ assets/profile-pictures/flowers.png
design/tai-chi/narration-receipt.json
design/tai-chi/narration-male-receipt.json
# Exact digest-bound Arcade library artwork shipped for offline browsing.
apps/bundled/arcade.games/bd0a779ce62c2324812926f1579a64881db309430cff839565b28d1bc5b6420f.zx
apps/bundled/arcade.games/d7ab495066a69e7c09d490fdcc51f48e8e032dd2112372df800d8b2fe9c7df0b.zx
+1
View File
@@ -2,6 +2,7 @@
## [Unreleased]
- Shrink Arcade library artwork to 256-pixel WebP thumbnails while retaining every game and shipped app.
- Include Arcade and its library artwork offline, while games download separately.
- Keep every shipped app and also include complete apps below 1 MB without changing app selections.
+2 -2
View File
@@ -6,8 +6,8 @@
"key_id": "inbe-2026-10",
"bundled": true,
"path": "apps/bundled/arcade.zx",
"bytes": 7674,
"sha256": "e6b3bb38f75201a4c4722b8cd8411e0538a264104271c3dcddf4418f6fd4d665",
"bytes": 7695,
"sha256": "1f07d86328efd0a14a85ff69b58b9721b6d49e3e5e92849bc780fb8152f95560",
"source": "https://github.com/waozixyz/arcade"
}
}
Binary file not shown.
+4 -4
View File
@@ -36,7 +36,7 @@ EmbeddedTestAsset :: (path: string) -> AssetView {
data := ""
if path == "assets/apps/bundled/fixture.zx" { data = embedded_test_bytes }
if path == "assets/apps/bundled/arcade.zx" { data = embedded_test_arcade }
if path == "assets/apps/bundled/arcade/bd0a779ce62c2324812926f1579a64881db309430cff839565b28d1bc5b6420f.zx" {
if path == "assets/apps/bundled/arcade/d7ab495066a69e7c09d490fdcc51f48e8e032dd2112372df800d8b2fe9c7df0b.zx" {
data = embedded_test_art
}
if path == "apps.zx" { data = embedded_test_controller }
@@ -173,14 +173,14 @@ NodeAppEmbeddedCheck :: () -> s32 {
host := node_runners[slot].nested
if host == null { return 179 }
root := AppTreeNode(*host.tree, AppHandle.{0, 1})
if root == null || root.catalog.count != 5 || NodeAppPackageSize(slot) != 1519758 { return 180 }
path := "assets/arcade/covers/shovey-portrait.jpg"
if root == null || root.catalog.count != 5 || NodeAppPackageSize(slot) != 349082 { return 180 }
path := "assets/arcade/covers/shovey-portrait.webp"
deadline = EmbeddedNow() + 10.0
while !AppHostAsset(root, path).found && EmbeddedNow() < deadline {
NodeChildPump()
EmbeddedYield()
}
if !AppHostAsset(root, path).found || node_child_memory != 1512084 { return 181 }
if !AppHostAsset(root, path).found || node_child_memory != 341387 { return 181 }
child := root.catalog.children
while child != null {
if AppHostAsset(root, TextUntilNul(child.entry.bundle[:])).found { return 182 }
+1 -1
View File
@@ -152,7 +152,7 @@ Main :: () -> s32 {
'NODE_EMBEDDED_UPDATE': str(fixture / 'update.json'),
'NODE_EMBEDDED_REAL_METADATA': str(fixture / 'embedded-releases.json'),
'NODE_EMBEDDED_ARCADE': str(root / 'apps/bundled/arcade.zx'),
'NODE_EMBEDDED_ART': str(root / 'apps/bundled/arcade.games/bd0a779ce62c2324812926f1579a64881db309430cff839565b28d1bc5b6420f.zx'),
'NODE_EMBEDDED_ART': str(root / 'apps/bundled/arcade.games/d7ab495066a69e7c09d490fdcc51f48e8e032dd2112372df800d8b2fe9c7df0b.zx'),
'NODE_EMBEDDED_CONTROLLER': str(root / 'build/apps-ui/apps.zx'),
**{f'ICON_{name.upper()}_BUNDLE': str(fixture / f'{name}.zx')
for name in ('valid', 'invalid', 'empty', 'corrupt')},
+2 -2
View File
@@ -82,9 +82,9 @@ class BundlingTests(unittest.TestCase):
item = declarations['arcade']
path = ROOT / item['path']
info = inspect_bundle(path)
self.assertEqual(info['bundle_bytes'], 7674)
self.assertEqual(info['bundle_bytes'], 7695)
self.assertEqual(info['sha256'], item['sha256'])
self.assertEqual(info['complete_bytes'], 1_519_758)
self.assertEqual(info['complete_bytes'], 349_082)
info = stage({}, declarations, self.bundles, self.optional, self.mandatory)['optional']['arcade']
self.assertTrue(info['included'])
self.assertEqual(len(list((self.optional / 'arcade').glob('*.zx'))), 1)