Compare commits

...
Author SHA1 Message Date
waozi d36def3e8e Keep standalone Wurm downloads in its own releases 2026-11-21 04:04:20 -03:00
waozi fc3eb2b65f Make Arcade producer bundles compatible with Breeze 2026-11-20 01:50:28 -03:00
waozi 3f1b939993 Take Apfelwurm 0.2.34 from its published release
Wurm v0.2.34 was released from 962baf55 on Kryon 6816ed78, whose Android
editions keep their reminder receivers; Arcade's catalog fetches that
release's portable export, which must come from the pinned commit.
2026-11-18 12:43:34 -03:00
waozi a699f0d41d Release Arcade catalog 0.7.126 on Ziran 0.6.0
Build the catalog on the released graph (Ziran 0.6.0 d17c7aa1, Kryon
1b290f19, Apps 7854da88) with Shovey 0.6.171, Apfelwurm 0.2.34 and Choano
as one-format ZX 28 games, so the current Inner Breeze can open them.
Trust the standalone Apps 7854 controller, name liboqs directly because
Inner Breeze's graph now carries two revisions, and read game bundle
indexes through build/zx-metadata in the collection test. Record the
raylib-free lane's newer pins and the Android seed catalog's ZX 28 reader
as open work.
2026-11-17 02:53:34 -03:00
waozi 712e99ed57 Build with Kryon b45cc524
Pin Kryon b45cc524, Apps 352901eb, Entity b30dd4a4 and Shovey 19b7937d, the set Breeze shares, and trust the controller built from them.

Known: make test still stops at check-games (the ledger records Shovey 0.6.169 and editor 0.2.149) and needs ZX 28 exports from wurm and choano.
2026-11-16 13:09:14 -03:00
waozi c797ea22c2 Build with Kryon cc731751 and take Entity's Profile artifact
Pin Kryon cc731751, Apps d48be1a9, Entity 81a4a900 and Shovey 371acbaf, and trust the controller built from them. build-entity.py asks Entity for its native-profile artifact instead of naming Kryon's old flat module folders.

Known: make test still stops at check-games (the ledger records Shovey 0.6.169 and editor 0.2.149) and needs ZX 28 exports from wurm and choano.
2026-11-16 07:20:16 -03:00
waozi 7417c15912 Read one-format ZX game exports and build on Kryon 245605c3
Ziran's one-format ZX has no bundle libraries, so add-ons carry their
game's code: collections no longer mark shared_code and apps.json no longer
accepts shared_code or library_entries. Game exports are ZX 28; the new
build/zx-metadata tool (scripts/zx_metadata.zi) verifies one with the Ziran
runtime without running it and reports its entry and assets, and the
artifact tests compile real ZX 28 fixtures.

The desktop, collection and Entity screens use Kryon's namespaced widgets.
Pin Ziran 0.5.0, Kryon 245605c3, Apps 1c84ea0b, Entity c1d88034 and Shovey
59a47447, and trust the controller built from them. The unused game
module-path helper is removed.

Known: the full make test needs ZX 28 exports from wurm and choano, and
the Android build still names kryon_android_raylib, which Kryon 245605c3
removed.
2026-11-16 05:27:55 -03:00
waozi 8af5a37b04 Check that Arcade opens the collection beside it
Arcade closed right after opening from Harmony's Apps: its build folder held
a binary from Nov 8 and a collection rebuilt on Nov 11 with a newer Ziran,
and the shared Apps host refused it ("unsupported ZIR version").

arcade --check opens that collection without a window. make, make test and
the install run it, so a binary is never left beside a collection it refuses.
2026-11-15 21:51:26 -03:00
waozi 35ae14131c Fix Arcade profile dismissal, icon and backup reminders 2026-11-08 11:58:09 -03:00
waozi 91819cf7b2 Sample each named game cover in website smoke test 2026-11-07 20:10:03 -03:00
waozi 148b6f7d84 Synchronize website smoke test with console install and launch flow 2026-11-07 19:39:21 -03:00
waozi 24fc03b7c8 Pin Choano AVIF with CSS theming 2026-11-07 18:36:31 -03:00
waozi 02912c2ac3 Release Arcade catalog 0.7.125 with the latest game releases 2026-11-07 20:45:00 +00:00
waozi 91f79bdda7 Release Arcade catalog 0.7.124 with the latest game releases 2026-11-07 20:09:49 +00:00
waozi 4192ea74c9 Build the website from the published Arcade's tagged source
The site serves the latest published arcade.zx but compiled its host from
master, so a master that already locks a newer Ziran (program format 62)
could not load the published 0.7.122 bundle (format 59): unsupported ZIR
version. Check out the release tag before reading the toolchain lock.
2026-11-07 16:37:36 -03:00
waozi 720f352f8e Release Arcade catalog 0.7.123 for host 43
Arcade and its games now build on Ziran 0e91eb43 (program format 62) for
Inner Breeze host API 43: Shovey 0.6.169, Apfelwurm 0.2.33, Choano 0.1.9
and Chess 1.2.2. Apps, Kryon and Entity move to the versions the new
host uses.
2026-11-07 16:03:46 -03:00
waozi 068f3312ff Release Arcade catalog 0.7.122 with the latest game releases 2026-11-04 04:27:45 +00:00
waozi cb84f07471 Release Arcade catalog 0.7.121 with the latest game releases 2026-11-04 03:06:09 +00:00
waozi 8d8d909913 Keep release discovery tests independent of build dependencies 2026-11-03 23:50:12 -03:00
waozi 83a75f938f Import Wurm's portable release when following game updates 2026-11-03 23:21:24 -03:00
waozi 178791301f Restore painted Arcade covers and refresh game packages 2026-11-03 18:03:29 -03:00
waozi 5268b9513b Export Shovey's games before following its release
Arcade imports only the games' own exports, which the follower never built,
so every Shovey release since the console redesign failed to import. The
pinned Shovey checkout now builds them with its locked compiler.
2026-11-03 17:06:48 -03:00
waozi 7b65b8a0ea Follow game releases with library art crops
library-art.py yields each copy's crop with its source; the release
follower unpacked three values and failed before writing the release.
A changed source or crop now rewrites the library copies.
2026-11-03 16:12:40 -03:00
65 changed files with 1589 additions and 845 deletions

No files matched your search

+9 -3
View File
@@ -1,5 +1,5 @@
name: Export locked games
description: Build portable exports in their owning repositories before Arcade imports them.
description: Prepare game-owned exports, downloading Wurm's compiled release unchanged.
runs:
using: composite
steps:
@@ -34,10 +34,16 @@ runs:
run: |
python3 - <<'PY'
from pathlib import Path
for name in ('shovey', 'wurm', 'choano'):
for name in ('shovey', 'choano'):
(Path('..') / name / 'ziran.local.toml').write_text('[overrides]\nziran = "../../ziranlang/ziran"\n')
Path('ziran.local.toml').write_text('[overrides]\nziran = "../../ziranlang/ziran"\nshovey = "../shovey"\nwurm = "../wurm"\nchoano = "../choano"\n')
PY
(cd ../shovey && make levels landscape && python3 scripts/player.py collection --web)
(cd ../wurm && python3 tools/build_portable.py)
(cd ../choano && make portable)
- name: Download the pinned Wurm portable release
shell: bash
working-directory: waozixyz/arcade
env:
GH_TOKEN: ${{ github.token }}
WURM_COMMIT: ${{ steps.games.outputs.wurm }}
run: python3 scripts/fetch-wurm-export.py --source ../wurm --commit "$WURM_COMMIT"
+6 -3
View File
@@ -36,6 +36,7 @@ jobs:
run: |
python3 tests/game_updates_test.py
python3 tests/catalog_versions_test.py
python3 tests/wurm_export_test.py
- name: Find newer game releases
id: updates
env:
@@ -62,7 +63,7 @@ jobs:
- name: Install build dependencies
if: steps.updates.outputs.changed == 'true'
working-directory: .
run: sh ziranlang/ziran/scripts/ci_packages.sh build-essential python3-pil python3-cryptography
run: sh ziranlang/ziran/scripts/ci_packages.sh build-essential python3-pil python3-numpy python3-cryptography
- name: Build the locked toolchain and pin game dependencies
id: pin
if: steps.updates.outputs.changed == 'true'
@@ -99,10 +100,12 @@ jobs:
python3 scripts/follow-game-releases.py art
echo "version=$(cat catalog/VERSION)" >> "$GITHUB_OUTPUT"
head -12 catalog/CHANGELOG.md
- name: Prepare game-owned exports
if: steps.updates.outputs.changed == 'true'
uses: ./waozixyz/arcade/.github/actions/game-exports
- name: Build and check the collection
if: steps.updates.outputs.changed == 'true'
run: |
make -C ../shovey levels landscape
make collection
python3 tests/collection_test.py
python3 tests/publisher_test.py
@@ -126,7 +129,7 @@ jobs:
SHA: ${{ steps.commit.outputs.sha }}
run: |
set -eu
gh release create "node-arcade-$VERSION" build/node-apps/arcade.zx build/node-apps/arcade.games.tar build/games/wurm.zx \
gh release create "node-arcade-$VERSION" build/node-apps/arcade.zx build/node-apps/arcade.games.tar \
--target "$SHA" --title "Arcade $VERSION" \
--notes 'Arcade downloads the selected game separately and preserves earned progress.'
echo "Arcade $VERSION is ready for the node: sha256 $(sha256sum build/node-apps/arcade.zx | cut -d' ' -f1)"
+2 -4
View File
@@ -87,7 +87,6 @@ jobs:
waozixyz/arcade/build/node-apps/arcade.zx
waozixyz/arcade/build/node-apps/arcade.json
waozixyz/arcade/build/node-apps/arcade.games.tar
waozixyz/arcade/build/games/wurm.zx
waozixyz/arcade/build/apps-ui/apps.zx
if-no-files-found: ignore
retention-days: 1
@@ -100,12 +99,11 @@ jobs:
tag="node-arcade-$version"
if gh release view "$tag" >/dev/null 2>&1; then
mkdir -p build/prior-node-release
gh release download "$tag" --pattern arcade.zx --pattern arcade.games.tar --pattern wurm.zx --dir build/prior-node-release
gh release download "$tag" --pattern arcade.zx --pattern arcade.games.tar --dir build/prior-node-release
cmp build/prior-node-release/arcade.zx build/node-apps/arcade.zx
cmp build/prior-node-release/arcade.games.tar build/node-apps/arcade.games.tar
cmp build/prior-node-release/wurm.zx build/games/wurm.zx
else
gh release create "$tag" build/node-apps/arcade.zx build/node-apps/arcade.games.tar build/games/wurm.zx \
gh release create "$tag" build/node-apps/arcade.zx build/node-apps/arcade.games.tar \
--target "$GITHUB_SHA" --title "Arcade $version" \
--notes 'Arcade downloads the selected game separately and preserves earned progress.'
fi
+22 -8
View File
@@ -3,7 +3,9 @@ name: Website
# https://arcade.waozi.xyz runs Arcade in the browser: the latest published
# arcade.zx, the same one Inner Breeze downloads, with Arcade's own host
# compiled to WebAssembly. Every push to master and every Arcade release,
# manual or automatic, rebuilds and publishes it.
# manual or automatic, rebuilds and publishes it. The host builds from the
# source and toolchain that release was tagged at: master may already lock a
# newer program format the published arcade.zx does not carry yet.
on:
push:
branches: [master]
@@ -34,6 +36,23 @@ jobs:
path: waozixyz/arcade
ref: master
fetch-depth: 0
- name: Check out the published Arcade's source
id: published
env:
GH_TOKEN: ${{ github.token }}
run: |
tag=$(gh release list --repo waozixyz/arcade --limit 50 --json tagName,isDraft \
-q '[.[] | select(.isDraft | not) | .tagName | select(startswith("node-arcade-"))][0]')
test -n "$tag"
git fetch --force origin "refs/tags/$tag:refs/tags/$tag"
# Keep the current smoke gate while building the release's exact host.
smoke_test=$(mktemp)
cp tests/web_site_test.mjs "$smoke_test"
git checkout --detach "refs/tags/$tag"
cp "$smoke_test" tests/web_site_test.mjs
rm "$smoke_test"
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "version=${tag#node-arcade-}" >> "$GITHUB_OUTPUT"
- name: Read the locked toolchain
id: toolchain
run: |
@@ -60,18 +79,13 @@ jobs:
printf '[overrides]\nziran = "../../ziranlang/ziran"\n' > ziran.local.toml
../../ziranlang/ziran/build/bin/ziran fetch
- name: Download the published Arcade
id: published
env:
GH_TOKEN: ${{ github.token }}
run: |
tag=$(gh release list --repo waozixyz/arcade --limit 50 --json tagName,isDraft \
-q '[.[] | select(.isDraft | not) | .tagName | select(startswith("node-arcade-"))][0]')
test -n "$tag"
mkdir -p build/published
# Its game archive holds the library art the site serves itself.
gh release download "$tag" --repo waozixyz/arcade --pattern arcade.zx \
--pattern arcade.games.tar --dir build/published
echo "version=${tag#node-arcade-}" >> "$GITHUB_OUTPUT"
gh release download '${{ steps.published.outputs.tag }}' --repo waozixyz/arcade \
--pattern arcade.zx --pattern arcade.games.tar --dir build/published
- name: Build the browser edition
run: |
python3 tests/web_library_art_test.py
+34
View File
@@ -1,5 +1,39 @@
# Arcade changelog
## [Unreleased]
- Download standalone Wurm from its own releases; Arcade keeps its catalog and game archive.
- Open the full Arcade catalog in Breeze and keep Choano progress available in the hosted game.
- Build on Ziran 0.5.0 and Kryon b45cc524 with its namespaced widgets. Game
exports are read as one-format ZX 28 through `build/zx-metadata`, which
verifies a bundle without running it. Add-ons carry their game's code, so
collections no longer mark `shared_code` and `apps.json` no longer accepts
`shared_code` or `library_entries`. The unused game module-path helper is
removed, and the Profile bundle comes from Entity's own `native-profile`
artifact.
- `arcade --check` opens the collection beside the binary without a window.
`make`, `make test` and the install run it, so a binary is never left next
to a collection it refuses; Arcade had closed right after opening from
Harmony's Apps when its build folder held a binary and a collection from
two different toolchains.
- Close Profile directly from its X button while keeping Back navigation through account pages.
- Use a neutral profile icon instead of the Shovey portrait.
- Remember completed account backups when reopening Arcade or using the same desktop account in another app.
- Runs games built for the latest Inner Breeze.
## 0.7.120
- Library covers show their original painted artwork again.
- Landscape uses the same cover carousel as portrait, on a scenic background.
- Clicking or tapping a cover beside the centre selects it; the centre cover starts the game.
- Missing games download on their cover with a progress bar while you keep browsing.
- Updating Arcade no longer brings back an older saved library with the wrong artwork.
- Shovey opens its proper title with the daily chest, profile and swipeable covers.
## 0.7.119
- Browse an artwork-led console shelf in portrait or landscape, with painted profile and Dew controls.
+22 -5
View File
@@ -19,9 +19,9 @@ LIB_DIR ?= $(HOME)/.local/lib/arcade
DATA_DIR ?= $(if $(XDG_DATA_HOME),$(XDG_DATA_HOME),$(HOME)/.local/share)
.PHONY: all build/arcade build/shovey standalone-ui-test collection-ui-test scroll-ui-test navigation-ui-test games collection collection-test run test chess-engine-test chess-app-test ui-test inbe-ui-test compatibility-test install
all: collection build/entity.zx build/arcade build/shovey
all: collection build/entity.zx build/arcade build/shovey collection-check
games:
games: build/zx-metadata
python3 scripts/check-games.py --ziran '$(ZIRAN)' $(LOCK_FLAGS)
python3 scripts/build-games.py --ziran '$(ZIRAN)' $(LOCK_FLAGS) $(if $(GAME_ARTIFACT_MANIFEST),--artifact-manifest '$(GAME_ARTIFACT_MANIFEST)')
@@ -35,9 +35,18 @@ collection: games $(APPS_BUNDLE)
python3 scripts/build-collection.py --ziran '$(ZIRAN)' $(LOCK_FLAGS) \
--apps-bundle '$(APPS_BUNDLE)' --apps-sha256 '$(APPS_SHA256)'
# Reads a game export's entry and assets for build-games.py; nothing runs.
build/zx-metadata: scripts/zx_metadata.zi ziran.lock build/ziran/libziran.a
rm -rf build/zx-metadata-c
$(ZIRAN) build $(PROJECT) --target=c --root scripts --entry zx_metadata:main \
-o build/zx-metadata-c scripts/zx_metadata.zi
$(CC) -std=c11 -O1 -Wno-main -I'$(ZIRAN_ROOT)/include' -Ibuild/zx-metadata-c \
build/zx-metadata-c/*.c build/ziran/libziran.a -lm -lpthread -o $@
.PHONY: game-artifacts-test
game-artifacts-test:
game-artifacts-test: build/zx-metadata
python3 tests/game_artifacts_test.py
python3 tests/wurm_export_test.py
collection-test:
python3 tests/collection_test.py
@@ -47,6 +56,13 @@ collection-notifications-test:
python3 tests/game_host_compatibility_test.py
python3 tests/collection_notifications_test.py
# The desktop binary opens the collection beside it and refuses one that a
# newer toolchain built (owner, 2026-11-15: Arcade closed right after opening
# from Harmony's Apps). Build and check the pair together, with private data.
.PHONY: collection-check
collection-check: collection build/arcade
ARCADE_DATA='$(CURDIR)/build/collection-check' ./build/arcade --check
src/catalog.zi: games
build/entity.zx: ziran.lock $(wildcard $(ENTITY_DIR)/src/*.zi)
@@ -67,9 +83,9 @@ run: all
test: all
python3 tests/catalog_versions_test.py
python3 tests/game_artifacts_test.py
python3 tests/wurm_export_test.py
python3 tests/game_host_compatibility_test.py
python3 tests/collection_notifications_test.py
python3 tests/game_module_paths_test.py
python3 tests/game_resource_packing_test.py
python3 tests/game_translation_keys_test.py
python3 tests/android_catalog_test.py
@@ -128,7 +144,7 @@ navigation-ui-test: all
--binary '$(CURDIR)/build/arcade' --binary '$(CURDIR)/build/shovey' --inbe-source '$(INBE_SOURCE)'
.PHONY: install-arcade
install-arcade: collection build/entity.zx build/arcade
install-arcade: collection build/entity.zx build/arcade collection-check
mkdir -p '$(BIN_DIR)' '$(LIB_DIR)' '$(DATA_DIR)/applications'
install -m 0755 build/arcade '$(LIB_DIR)/arcade.new'
mv -f '$(LIB_DIR)/arcade.new' '$(LIB_DIR)/arcade'
@@ -138,6 +154,7 @@ install-arcade: collection build/entity.zx build/arcade
install -m 0644 build/assets/hud/profile.webp build/assets/hud/dew.webp '$(LIB_DIR)/assets/hud/'
ln -sfn '$(LIB_DIR)/arcade' '$(BIN_DIR)/arcade'
install -m 0644 packaging/xyz.waozi.arcade.desktop '$(DATA_DIR)/applications/'
ARCADE_DATA='$(CURDIR)/build/collection-check' '$(LIB_DIR)/arcade' --check
install: all install-arcade
mkdir -p '$(BIN_DIR)' '$(LIB_DIR)/games' '$(DATA_DIR)/applications'
+2 -2
View File
@@ -23,7 +23,7 @@ their whole board; locked puzzles keep their lock until earned.
The published Arcade carries only its catalog, well under one megabyte. Its host supplies the shared Apps controller (Inner Breeze its own, standalone Arcade the `apps.zx` installed beside it), and the covers and previews download once as one separate art bundle. Library previews stay at 256 pixels. Real gameplay screenshots supply landscape heroes up to 1600 pixels and portrait covers up to 1080 pixels on the longest side, encoded as quality-80 WebP. The complete separate art bundle has a 2 MiB budget for the current games. Full-size originals stay in their game repositories. The verified art bundle stays cached across restarts and is replaced when its content changes. The art lives in `assets/arcade/library/` (`python3 scripts/library-art.py` refreshes it when a game's art changes; the build stops until it does). Inner Breeze needs host interface 35 for it. Each game
downloads when opened, with its existing identity and saved progress. This
catalog requires Inner Breeze host API 41. Downloaded games work offline;
catalog requires Inner Breeze host API 43. Downloaded games work offline;
standalone Shovey keeps its complete offline collection. Apfelwurm comes from
its own package, with the same game identity and private editor records.
@@ -34,7 +34,7 @@ add-on. Its named install dialog lists Shovey when needed and shows the total
download size. The Island editor stays private. Once Shovey is installed, only
the editor’s additions download. The editor reuses the original game’s art
and sounds, and both remain available offline. The top-right HUD uses the shared
painted Dew jewel and profile medallion in one frame. Its two icons ship with the
painted Dew jewel and a neutral profile icon in one frame. Its two icons ship with the
host independently of the remote library, so they also work offline.
Chess’s retained implementation can choose a side and one of four computer
+1 -1
View File
@@ -1 +1 @@
0.7.119
0.7.120
+1 -1
View File
@@ -1 +1 @@
73a743af3f79fd5fc07df0ffd494c7d9bedf03f271401e2a0fe695cdc3c74eb7
0dc9b6f9ae8a11731d51fa4e118f9a545cee0575d742517f209413fdfa93df95
+4
View File
@@ -1,5 +1,9 @@
# Chess changelog
## [1.2.2] - 2026-11-07
- Runs in the latest Inner Breeze and Arcade.
## [1.2.1] - 2026-10-29
- Runs in Inner Breeze 2.1.61's smaller app format.
+1 -1
View File
@@ -5,7 +5,7 @@
"kind": "game",
"contract_version": 1,
"module_api": 2,
"host_api": 41,
"host_api": 43,
"save_schema": 1,
"harnesses": ["arcade", "inbe"],
"entry": "chess:Main",
+23 -23
View File
@@ -1,56 +1,56 @@
{
"host_api": 42,
"oldest_host_api": 41,
"host_api": 43,
"oldest_host_api": 43,
"module_api": 2,
"node_apps": {
"chess": {
"id": "inbe.chess",
"title": "Chess",
"version": "1.2.1",
"sequence": 6,
"host_api": 41
"version": "1.2.2",
"sequence": 7,
"host_api": 43
},
"choano": {
"id": "xyz.waozi.choano",
"title": "Choano",
"version": "0.1.8",
"sequence": 3,
"host_api": 41
"version": "0.1.9",
"sequence": 4,
"host_api": 43
},
"shovey": {
"id": "arcade.shovey",
"title": "Shovey",
"version": "0.6.164",
"sequence": 171,
"host_api": 42
"version": "0.6.171",
"sequence": 176,
"host_api": 43
},
"shovey-editor": {
"id": "arcade.shovey-editor",
"title": "Shovey Editor",
"version": "0.2.147",
"sequence": 149,
"host_api": 41
"version": "0.2.150",
"sequence": 152,
"host_api": 43
},
"arcade": {
"id": "inbe.arcade",
"title": "Arcade",
"version": "0.7.119",
"sequence": 198,
"host_api": 41
"version": "0.7.126",
"sequence": 205,
"host_api": 43
},
"wurm": {
"id": "xyz.waozi.wurm",
"title": "Apfelwurm",
"version": "0.2.29",
"sequence": 24,
"host_api": 42
"version": "0.2.34",
"sequence": 28,
"host_api": 43
},
"wurm-editor": {
"id": "xyz.waozi.wurm-editor",
"title": "Apfelwurm Editor",
"version": "0.1.1",
"sequence": 2,
"host_api": 41
"version": "0.1.2",
"sequence": 3,
"host_api": 43
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 78 KiB

+17 -13
View File
@@ -1,14 +1,14 @@
{
"choano-landscape": {
"source_sha256": "ffe548ab4b32d1eb45c539cca77c211fdf38edb19c7e3adafb8e6791d3d57a2a",
"crop_top": 76
"source_sha256": "dfea1e328a0f386d0b5e323a59bbbc3cfa926f1dbdceaa09a9858a43b0949091",
"crop_top": 0
},
"choano-portrait": {
"source_sha256": "225b44f3de4f201220a581850c87ed402e9659d5d56a70fcbdd5bf7d24a65329",
"crop_top": 76
"source_sha256": "10be8a3d9251deeede9080c715a7a5dadc1b1641db16aa3a04b874a266302ea9",
"crop_top": 0
},
"choano-preview": {
"source_sha256": "1ca6e31c1062a7cca41bace4cf1bb221291988aea4a1dd61271899c2f5f28307",
"source_sha256": "dfea1e328a0f386d0b5e323a59bbbc3cfa926f1dbdceaa09a9858a43b0949091",
"crop_top": 0
},
"hud-dew": {
@@ -36,12 +36,16 @@
"crop_top": 0
},
"shovey-landscape": {
"source_sha256": "50ff90599ea10dda9f85f4f6b3a6b6bf10a37bc8ef77c2533fa2a476e0ce2e06",
"crop_top": 52
"source_sha256": "40c01eb8300e4c5db52b2d75373e17cdaf7f68140c33c0a225613fc174660747",
"crop_top": 0
},
"shovey-logo": {
"source_sha256": "e47781aa3328f68077589f95d813e9c2e6fff10ebd62a9d003773bb2c2f7a092",
"crop_top": 0
},
"shovey-portrait": {
"source_sha256": "c34a5b87b23471abe9d7cd472b8b353a88d7c50adc840da988cfd1af49a0446a",
"crop_top": 52
"source_sha256": "ddcbf989eab5971157d8cdc73494ed03660bb4c7a7679543248f45be260777e3",
"crop_top": 0
},
"shovey-preview": {
"source_sha256": "96db251f36835c76cd03cd0104a6e1b5096e4c442d410960457edcd8e2377a38",
@@ -60,12 +64,12 @@
"crop_top": 0
},
"wurm-landscape": {
"source_sha256": "7bcfd9b73064886560bf2e72fb310fe6c69c345aa400f50b8f5b533384c33085",
"crop_top": 72
"source_sha256": "472773b7c106325e12777a81a29209496e22e0853782ca76955b6587824b1b30",
"crop_top": 0
},
"wurm-portrait": {
"source_sha256": "e6f814fca6d53ab8c4112a3b98809815c7a019d66bb793a55d5725ebdeecf0cf",
"crop_top": 72
"source_sha256": "e8962c969f554567d598eb0b54db5836f7f1ed7462619463040c6cc2887a5a47",
"crop_top": 0
},
"wurm-preview": {
"source_sha256": "472773b7c106325e12777a81a29209496e22e0853782ca76955b6587824b1b30",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 217 KiB

+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+1
View File
@@ -0,0 +1 @@
Profile uses MingCute user_2 (Apache-2.0), recolored to the HUD text color. profile.webp is a lossless 128px rendering of profile.svg. Dew continues to come from the shared Apps assets.
+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 14C18.7614 14 21 16.2386 21 19V20C21 21.1046 20.1046 22 19 22H5C3.89543 22 3 21.1046 3 20V19C3 16.2386 5.23858 14 8 14H16ZM12 2C14.7614 2 17 4.23858 17 7C17 9.76142 14.7614 12 12 12C9.23858 12 7 9.76142 7 7C7 4.23858 9.23858 2 12 2Z" fill="#ffeec1"/>
</svg>

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

+46
View File
@@ -1,5 +1,51 @@
# Arcade catalog changelog
## 0.7.126
- Shovey 0.6.171: Runs in the latest Inner Breeze and Arcade.
- Apfelwurm 0.2.34: Replace campaign levels 1–50 with authored gardens that teach route planning, growth, portals, keys, switches and readable patrols in a paced progression.
- Choano, Shovey and Apfelwurm run as one-format ZX 28 on Ziran 0.6.0 in the current Inner Breeze.
## 0.7.125
- Shovey 0.6.169: Runs in the latest Inner Breeze and Arcade.
## 0.7.124
- Apfelwurm 0.2.33: Runs in the latest Inner Breeze and Arcade.
- Choano 0.1.9: Runs in the latest Inner Breeze and Arcade.
- Choano 0.1.9: Supply genuine gameplay screenshots and a self-identifying portable bundle for Arcade’s console library.
- Choano 0.1.9: Keep the Profile title bar clear of the camera and status bar on Android.
- Choano 0.1.9: Let the Android app reach the network, so online sign-in, backups and Friends work.
- Choano 0.1.9: Keep the account key out of Android system backups, which have no passphrase.
- Choano 0.1.9: Use Entity's reviewed account authorization and the shared game navigation modules.
- Choano 0.1.9: On Android, Continue as can use the account from another signed-in Waozi app, once you approve it there.
- Choano 0.1.9: Continue as no longer crashes the other app when it was closed.
## 0.7.123
- Arcade and its games run in the latest Inner Breeze: Shovey 0.6.169, Apfelwurm 0.2.33 and Choano 0.1.9.
## 0.7.122
- Shovey 0.6.168: Play the first 30 Island levels with working downloads and a working Play button.
- Shovey 0.6.168: Start Classic or Island levels of your own from the Editor.
- Shovey 0.6.168: Follow Shovey in his map circle, with more water along the landscape coast and a secret on the beach.
## 0.7.121
- Keep Apfelwurm and its editor available when the game library updates.
- Shovey 0.6.167: The level result, book, shop and item texts show again in every language.
- Shovey 0.6.167: Your account's progress arrives quietly and quickly; the map no longer says it is loading.
- Apfelwurm 0.2.32: Include Apfelwurm and its editor in Arcade's automatic game updates.
## 0.7.120
- Show the original painted covers for Shovey, Apfelwurm and Choano.
- Browse covers on a scenic background in portrait and landscape; a side cover selects, the centre cover plays.
- Download missing games on their cover with a progress bar while browsing.
- Shovey opens its proper title with the daily chest, profile and swipeable covers.
## 0.7.119
- Browse the new console shelf, open games from their artwork and return Home with progress saved.
+1 -1
View File
@@ -1 +1 @@
0.7.119
0.7.126
-32
View File
@@ -6,37 +6,5 @@
],
"artwork": {
"wurm": "wurm_art"
},
"screenshots": {
"shovey": {
"portrait": {
"path": "packaging/library/portrait.png",
"crop_top": 52
},
"landscape": {
"path": "packaging/library/landscape.png",
"crop_top": 52
}
},
"wurm": {
"portrait": {
"path": "packaging/library/portrait.png",
"crop_top": 72
},
"landscape": {
"path": "packaging/library/landscape.png",
"crop_top": 72
}
},
"choano": {
"portrait": {
"path": "packaging/library/portrait.png",
"crop_top": 76
},
"landscape": {
"path": "packaging/library/landscape.png",
"crop_top": 76
}
}
}
}
+1 -1
View File
@@ -1 +1 @@
197
198
+13
View File
@@ -0,0 +1,13 @@
# Arcade on the released graph — open work
- The raylib-free lane left uncommitted native work in this checkout: Ziran
515449986e40, Kryon 028d42cb157a, and changes to the Android, packaging,
app, main, sound and Windows sources, the game-updates workflow, the
README, `mk/` and the game-update commit script and test. It builds on
newer Ziran and Kryon than the graph the catalog now uses (Ziran 0.6.0
d17c7aa1, Kryon 1b290f19, Apps 7854da88). Move those pins onto that graph,
or onto a new Ziran release, before committing that work.
- `scripts/android_catalog.py` reads only the ZX 26 and 27 bundle layout, so
`tests/android_catalog_test.py` rejects the ZX 28 catalog. Read the seed
catalog's assets through the Ziran runtime, as `build/zx-metadata` reads
their index, before the next Android host release.
+5 -5
View File
@@ -148,9 +148,6 @@ def stage(root, controller, expected_controller_digest, output):
bytes=len(bundle_bytes),
preview=f"assets/arcade/previews/{name}{preview_suffix}",
icon=f"assets/arcade/previews/{name}{preview_suffix}")
# A thin add-on links its required games' verified code as libraries.
if app.get('shared_code'):
child['shared_code'] = True
if app.get('shared_records'):
child['shared_records'] = app['shared_records']
if app.get('requires'):
@@ -168,7 +165,7 @@ def stage(root, controller, expected_controller_digest, output):
if key not in cover:
continue
relative = Path(cover[key])
if relative.is_absolute() or ".." in relative.parts or relative.suffix not in {".png", ".jpg"}:
if relative.is_absolute() or ".." in relative.parts or relative.suffix not in {".png", ".jpg", ".avif"}:
raise ValueError("Invalid cover asset path")
contents, suffix = library_art(root, name, key, (app["art_source"] / relative).read_bytes(), app.get("cover_crops", {}).get(key, 0))
destination = Path("arcade/covers") / f"{name}-{key}{suffix}"
@@ -336,7 +333,10 @@ def main():
bundle(command, ROOT, "art.zi", "art:Main", art_assets / "assets", node_apps / "arcade-art.zx", env)
art = add_art(catalog_assets, game_downloads, node_apps / "arcade-art.zx")
archive_downloads(game_downloads, node_apps / "arcade.games.tar")
bundle(command, ROOT, "collection.zi", "collection:Main", catalog_assets / "assets", node_apps / "arcade.zx", env)
# The node catalog is hosted by the consumer's trusted Apps controller.
# Compile its bootstrap without Kryon's standalone UI implementation.
bundle([*command, "--define", "KRYON_HOSTED_UI"], ROOT, "collection.zi", "collection:Main",
catalog_assets / "assets", node_apps / "arcade.zx", env)
shutil.copyfile(node_apps / "arcade.zx", ROOT / "build/arcade.zx")
# The desktop host supplies its controller from beside the collection.
shutil.copyfile(args.apps_bundle, ROOT / "build/apps.zx")
+16 -23
View File
@@ -1,32 +1,25 @@
#!/usr/bin/env python3
"""Build Entity once for the outer native host; never pack it into a game."""
"""Build Entity once for the outer native host; never pack it into a game.
Entity owns its Profile bundle and the assets embedded in it: the locked
toolchain's artifact helper asks Entity's project tool for
entity:native-profile, as Shovey's player does.
"""
from pathlib import Path
import argparse
import importlib.util
import shutil
import subprocess
ROOT = Path(__file__).resolve().parents[1]
ZIRAN = str(ROOT / 'scripts/ziran.sh')
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--locked', action='store_true')
args = parser.parse_args()
flags = ['--locked'] if args.locked or not (ROOT / 'ziran.local.toml').exists() else []
def package(name):
return Path(subprocess.check_output([ZIRAN, 'pkg', 'path', name, *flags], cwd=ROOT, text=True).strip())
entity, kryon, toolchain, qrcode = map(package, ('entity', 'kryon', 'ziran', 'qrcode'))
staged = ROOT / 'build/entity-profile-source'
subprocess.run(['python3', str(entity / 'scripts/stage-assets.py'), '--group', 'profile',
'--output', str(staged)], cwd=ROOT, check=True)
subprocess.run([ZIRAN, 'bundle', '--root', str(entity),
'--module-path', str(entity / 'src'),
'--module-path', str(kryon / 'src/ui'),
'--module-path', 'kryon=' + str(kryon / 'src/ui'),
'--module-path', 'kryon=' + str(kryon / 'src/backend'),
'--module-path', 'qrcode=' + str(qrcode / 'src'),
'--module-path', str(toolchain / 'std'),
'--define', 'KRYON_HOSTED_UI', '--asset-dir', 'assets=' + str(staged / 'assets'),
'--entry', 'entity:Main', '-o', str(ROOT / 'build/entity.zx'), str(entity / 'src/entity.zi')],
cwd=entity, check=True)
ZIRAN = ROOT / 'scripts/ziran.sh'
flags = [] if (ROOT / 'ziran.local.toml').exists() else ['--locked']
toolchain = Path(subprocess.check_output([str(ZIRAN), 'pkg', 'path', 'ziran', *flags],
cwd=ROOT, text=True).strip().splitlines()[-1])
spec = importlib.util.spec_from_file_location('ziran_artifacts', toolchain / 'scripts/ziran_artifacts.py')
artifacts = importlib.util.module_from_spec(spec)
spec.loader.exec_module(artifacts)
profile = artifacts.request('entity:native-profile', 'linux-x86_64-gnu', project=ROOT, ziran=ZIRAN)
shutil.copyfile(profile.output('entity.zx'), ROOT / 'build/entity.zx')
assets = ROOT / 'build/entity-assets'
assets.mkdir(parents=True, exist_ok=True)
+33 -64
View File
@@ -6,7 +6,7 @@ import json
import os
import re
import shutil
import struct
import subprocess
import tempfile
from pathlib import Path
from game_packages import declared_apps, portable_artifacts
@@ -16,6 +16,8 @@ ROOT = Path(__file__).resolve().parents[1]
MAX_PAYLOAD_BYTES = 64 * 1024 * 1024
MAX_ASSET_BYTES = 16 * 1024 * 1024
METADATA_LIMIT = 1024 * 1024
# Built by `make build/zx-metadata` from scripts/zx_metadata.zi.
METADATA_TOOL = Path(__file__).resolve().parents[1] / 'build/zx-metadata'
def digest(path):
@@ -27,72 +29,39 @@ def digest(path):
def bundle_metadata(path, name):
"""Read bounded metadata and the asset index of ZX 26/27; execute nothing."""
"""Read a ZX 28 export's entry, asset index and bounded metadata.
build/zx-metadata opens and verifies the bundle with the Ziran runtime;
none of its code runs.
"""
size = path.stat().st_size
if not 0 < size <= MAX_PAYLOAD_BYTES:
raise ValueError(f'{path}: exceeds the host payload limit')
with path.open('rb') as source:
def skip(count):
if count > size - source.tell():
raise ValueError(f'{path}: truncated bundle')
source.seek(count, 1)
def take(count):
if count > size - source.tell():
raise ValueError(f'{path}: truncated bundle')
data = source.read(count)
if len(data) != count:
raise ValueError(f'{path}: truncated bundle')
return data
def number():
return struct.unpack('<I', take(4))[0]
def text():
length = number()
if length > METADATA_LIMIT:
raise ValueError(f'{path}: oversized metadata')
return take(length).decode('utf-8')
def count():
value = number()
if value > 100000:
raise ValueError(f'{path}: oversized bundle index')
return value
if take(8) not in (b'ZX\0\0\x1a\0\0\0', b'ZX\0\0\x1b\0\0\0'):
raise ValueError(f'{path}: unsupported bundle')
entry = text() + ':' + text()
for _ in range(count()):
text(); text()
for _ in range(count()):
for _ in range(7):
text()
skip(8); text(); skip(4)
for _ in range(count()):
text(); text(); text()
skip(number())
metadata, paths = {}, set()
wanted = {f'assets/{name}/catalog.json', f'assets/{name}/requirements.json'}
asset_count = count()
if not 1 <= asset_count <= 2048:
raise ValueError(f'{path}: invalid game asset count')
for _ in range(asset_count):
asset, length = text(), number()
if length > MAX_ASSET_BYTES:
raise ValueError(f'{path}: asset exceeds the host asset limit')
if asset in paths or asset.startswith('/') or '..' in Path(asset).parts:
raise ValueError(f'{path}: invalid or duplicate bundle asset {asset}')
paths.add(asset)
if asset in wanted:
if length > METADATA_LIMIT:
raise ValueError(f'{path}: oversized metadata')
metadata[asset.rsplit('/', 1)[1]] = json.loads(take(length))
else:
skip(length)
if source.tell() != size:
raise ValueError(f'{path}: trailing bundle bytes')
return entry, metadata, paths
if not METADATA_TOOL.is_file():
raise ValueError(f'{METADATA_TOOL} is missing; run make build/zx-metadata')
result = subprocess.run([str(METADATA_TOOL), str(path), name], capture_output=True, text=True)
if result.returncode:
raise ValueError(f'{path}: truncated or invalid bundle')
report = json.loads(result.stdout)
assets = report['assets']
if not 1 <= len(assets) <= 2048:
raise ValueError(f'{path}: invalid game asset count')
paths = set()
for asset, length in assets:
if length > MAX_ASSET_BYTES:
raise ValueError(f'{path}: asset exceeds the host asset limit')
if asset in paths or asset.startswith('/') or '..' in Path(asset).parts:
raise ValueError(f'{path}: invalid or duplicate bundle asset {asset}')
paths.add(asset)
metadata = {}
for key in ('catalog.json', 'requirements.json'):
length = next((size for asset, size in assets if asset == f'assets/{name}/{key}'), None)
if length is None:
continue
if length > METADATA_LIMIT or key not in report['metadata']:
raise ValueError(f'{path}: oversized metadata')
metadata[key] = json.loads(report['metadata'][key])
return report['entry'], metadata, paths
def validate_artifact(app, bundle, resources, imported):
+61
View File
@@ -0,0 +1,61 @@
#!/usr/bin/env python3
"""Download Wurm's portable exports from its exact pinned release; compile nothing."""
import argparse
import json
from pathlib import Path
import re
import shutil
import subprocess
import tarfile
import tempfile
EXPORT_FILES = {name + suffix for name in ('wurm', 'wurm-editor')
for suffix in ('.zx', '-resources.json', '-catalog.json', '-preview.png')}
MAX_FILE_BYTES = 64 * 1024 * 1024
def unpack(archive, source):
build = source / 'build'
build.mkdir(parents=True, exist_ok=True)
with tarfile.open(archive, 'r:gz') as bundle:
members = bundle.getmembers()
if len(members) != len(EXPORT_FILES) or {m.name for m in members} != EXPORT_FILES:
raise ValueError('Wurm release must contain exactly its eight portable exports')
if any(not m.isfile() or not 0 < m.size <= MAX_FILE_BYTES for m in members):
raise ValueError('Wurm release contains an invalid portable export')
# Validate the complete member list before any output is replaced.
with tempfile.TemporaryDirectory(prefix='portable-export-', dir=build) as directory:
stage = Path(directory)
for member in members:
with bundle.extractfile(member) as incoming, (stage / member.name).open('wb') as output:
shutil.copyfileobj(incoming, output)
exports = build / 'games'
exports.mkdir(exist_ok=True)
for name in EXPORT_FILES:
(stage / name).replace(exports / name)
def fetch(source, commit):
version = json.loads((source / 'version.json').read_text())['version']
if not re.fullmatch(r'\d+\.\d+\.\d+', version) or not re.fullmatch(r'[0-9a-f]{40}', commit):
raise ValueError('Invalid Wurm release identity')
tag = 'v' + version
released = subprocess.check_output(['gh', 'api', f'repos/waozixyz/wurm/commits/{tag}',
'--jq', '.sha'], text=True).strip()
if released != commit:
raise ValueError('Wurm release does not match Arcade\'s pinned commit')
downloads = source / 'build/downloads'
downloads.mkdir(parents=True, exist_ok=True)
name = f'wurm-portable-{tag}.tar.gz'
subprocess.run(['gh', 'release', 'download', tag, '--repo', 'waozixyz/wurm',
'--pattern', name, '--dir', str(downloads), '--clobber'], check=True)
unpack(downloads / name, source)
print(f'Imported Wurm {version} portable release at {commit}')
if __name__ == '__main__':
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--source', type=Path, required=True)
parser.add_argument('--commit', required=True)
args = parser.parse_args()
fetch(args.source.resolve(), args.commit)
+4 -2
View File
@@ -150,8 +150,10 @@ def art():
library = importlib.util.module_from_spec(spec)
spec.loader.exec_module(library)
recorded = json.loads((library.LIBRARY / 'sources.json').read_text())
current = {f'{name}-{key}': hashlib.sha256(data).hexdigest() for name, key, data in library.art()}
if {copy: item['source_sha256'] for copy, item in recorded.items()} != current:
# A changed source or cover crop rewrites the library copies.
current = {f'{name}-{key}': (hashlib.sha256(data).hexdigest(), crop_top)
for name, key, data, crop_top in library.art()}
if {copy: (item['source_sha256'], item.get('crop_top', 0)) for copy, item in recorded.items()} != current:
library.main()
-41
View File
@@ -1,41 +0,0 @@
"""Select Kryon namespaces from a game's own source imports."""
import re
from pathlib import Path
_TOKENS = re.compile(r'//[^\n]*|/\*.*?\*/|"(?:\\.|[^"\\])*"|#import\b|\S', re.DOTALL)
def _imports(text):
previous = None
for match in _TOKENS.finditer(text):
token = match.group()
if token.startswith(('//', '/*')):
continue
if previous == '#import' and token.startswith('"'):
yield token[1:-1]
previous = token
def _module_names(root):
return ({path.stem for path in root.glob('*.zi')} |
{path.parent.name for path in root.glob('*/module.zi')})
def kryon_module_paths(source: Path, descriptor: dict, kryon: Path) -> list[str]:
"""Keep qualified UI imports scoped unless game code needs short imports.
Registering the UI directory both plain and named makes Ziran load Kryon
into the application's flat namespace. Only direct imports of UI modules
the application does not own justify that legacy mode.
"""
ui = kryon / 'src/ui'
roots = {source / 'src' if (source / 'src').is_dir() else source,
(source / descriptor['source']).parent}
owned = set().union(*(_module_names(root) for root in roots))
shared = _module_names(ui) - owned
needs_plain = any(name in shared for root in roots for path in root.rglob('*.zi')
for name in _imports(path.read_text()))
paths = [str(ui)] if needs_plain else []
paths += ['kryon=' + str(ui), 'kryon=' + str(kryon / 'src/backend')]
return [flag for path in paths for flag in ('--module-path', path)]
+3 -30
View File
@@ -9,7 +9,7 @@ import re
from pathlib import Path
import subprocess
APP_KEYS = {'manifest', 'cover', 'enabled', 'requires', 'shared_code', 'library_entries', 'shared_records', 'external', 'standalone_bundle'}
APP_KEYS = {'manifest', 'cover', 'enabled', 'requires', 'shared_records', 'external', 'standalone_bundle'}
COVER_KEYS = {'portrait', 'landscape', 'logo', 'caption', 'action'}
@@ -39,9 +39,6 @@ def declared_packages(root, ziran=None, lock_flags=()):
not isinstance(alias, str) or not re.fullmatch(r'[A-Za-z_][A-Za-z0-9_]*', alias)
for name, alias in artwork.items()):
raise ValueError('Invalid artwork package')
screenshots = registration.get('screenshots', {})
if not isinstance(screenshots, dict) or any(name not in names[1:] for name in screenshots):
raise ValueError('Invalid gameplay screenshot package')
packages = []
for name in names:
source = package_root(root, name, ziran, lock_flags)
@@ -62,20 +59,11 @@ def declared_packages(root, ziran=None, lock_flags=()):
any(not isinstance(item, str) or not item for item in requires) or \
len(set(requires)) != len(requires):
raise ValueError(f'{name}: invalid app dependencies')
shared_code = app.get('shared_code', False)
if type(shared_code) is not bool or (shared_code and not requires):
raise ValueError(f'{name}: shared code needs declared dependencies')
shared_records = app.get('shared_records', [])
if not isinstance(shared_records, list) or len(shared_records) > 8 or any(
not isinstance(item, str) or not re.fullmatch(r'[A-Za-z0-9_.-]{1,63}', item) or
item in ('.', '..') for item in shared_records) or len(set(shared_records)) != len(shared_records):
raise ValueError(f'{name}: invalid shared records')
library_entries = app.get('library_entries', [])
if not isinstance(library_entries, list) or len(library_entries) > 64 or \
any(not isinstance(item, str) or len(item) > 253 or
not re.fullmatch(r'[A-Za-z_][A-Za-z0-9_]*:[A-Za-z_][A-Za-z0-9_]*', item)
for item in library_entries) or len(set(library_entries)) != len(library_entries):
raise ValueError(f'{name}: invalid portable library entries')
app_art_source = art_source
descriptor = json.loads(manifest.read_text())
cover_crops = {}
@@ -85,25 +73,10 @@ def declared_packages(root, ziran=None, lock_flags=()):
cover = dict(cover)
if internal:
cover['action'] = 'internal'
elif name in screenshots:
views = screenshots[name]
if not isinstance(views, dict) or set(views) != {'portrait', 'landscape'}:
raise ValueError('Gameplay screenshots need portrait and landscape')
cover = {}
for key, value in views.items():
if isinstance(value, dict):
if set(value) != {'path', 'crop_top'} or type(value['crop_top']) is not int or not 0 <= value['crop_top'] <= 256:
raise ValueError('Invalid gameplay screenshot crop')
cover_crops[key] = value['crop_top']
value = value['path']
cover[key] = str(relative_path(value))
cover['action'] = 'open'
app_art_source = source
apps.append(dict(package=name, source=source, art_source=app_art_source, manifest=manifest,
descriptor=descriptor,
cover=cover, cover_crops=cover_crops, internal=internal, requires=requires, shared_code=shared_code,
shared_records=shared_records,
library_entries=library_entries, enabled=app.get('enabled', True)))
cover=cover, cover_crops=cover_crops, internal=internal, requires=requires,
shared_records=shared_records, enabled=app.get('enabled', True)))
packages.append(dict(name=name, source=source, id=declaration['id'],
title=declaration['title'], apps=apps))
return packages
+9 -3
View File
@@ -1,4 +1,4 @@
"""The two shared painted HUD icons shipped with the host, independent of catalogs."""
"""Host HUD icons, independent of downloaded catalogs."""
import hashlib
from pathlib import Path
import shutil
@@ -6,12 +6,18 @@ import shutil
HUD_PATHS = ('assets/hud/profile.webp', 'assets/hud/dew.webp')
def hud_source(apps, name):
if name == "assets/hud/profile.webp":
return Path(__file__).resolve().parents[1] / name
return Path(apps) / name
def hud_asset_hashes(apps):
return {name: hashlib.sha256((Path(apps) / name).read_bytes()).hexdigest() for name in HUD_PATHS}
return {name: hashlib.sha256(hud_source(apps, name).read_bytes()).hexdigest() for name in HUD_PATHS}
def stage_hud_assets(apps, output):
for name in HUD_PATHS:
target = Path(output) / name
target.parent.mkdir(parents=True, exist_ok=True)
shutil.copyfile(Path(apps) / name, target)
shutil.copyfile(hud_source(apps, name), target)
+10 -7
View File
@@ -16,12 +16,12 @@ import io
import json
import subprocess
from pathlib import Path
from PIL import Image
from PIL import Image, ImageOps
from game_packages import declared_packages
ROOT = Path(__file__).resolve().parents[1]
LIBRARY = ROOT / 'assets/arcade/library'
# Previews stay at 256 px. Separately fetched gameplay heroes are sized for
# Previews stay at 256 px. Separately fetched painted covers are sized for
# full-screen landscape and focused portrait art, with a total 2 MiB budget.
PREVIEW_LONGEST = 256
LANDSCAPE_LONGEST = 1600
@@ -51,11 +51,14 @@ def small_copy(data, key, crop_top=0):
raise ValueError('Gameplay crop exceeds screenshot')
if crop_top:
image = image.crop((0, crop_top, image.width, image.height))
# The shared library cards are 2:3. Keep the top of taller paintings,
# where their title lives, rather than letting the card centre-crop it.
# Originals remain untouched; this framing belongs to the thumbnail.
if key == 'portrait' and image.height > image.width * 1.5:
image = image.crop((0, 0, image.width, round(image.width * 1.5)))
# Frame the original painted artwork for the shelf, never gameplay captures.
# Portrait paintings keep their title near the top; landscape art is centred.
if key in ('portrait', 'landscape'):
ratio = 2 / 3 if key == 'portrait' else 16 / 9
width = min(image.width, round(image.height * ratio))
height = min(image.height, round(image.width / ratio))
image = ImageOps.fit(image, (width, height), Image.Resampling.LANCZOS,
centering=(0.5, 0.0 if key == 'portrait' else 0.5))
longest = {'preview': PREVIEW_LONGEST, 'logo': LOGO_LONGEST, 'landscape': LANDSCAPE_LONGEST, 'portrait': PORTRAIT_LONGEST}.get(key, COVER_LONGEST)
scale = min(1.0, longest / max(image.size))
alpha = ('A' in image.getbands() or 'transparency' in image.info) and key not in ('landscape', 'portrait')
+60
View File
@@ -0,0 +1,60 @@
// Prints a game export's entry and asset index as JSON for
// scripts/build-games.py:
// zx-metadata BUNDLE NAME
// Opening verifies the whole bundle; none of its code runs. The texts of
// assets/NAME/catalog.json and assets/NAME/requirements.json are included.
#import "std/bundle_host"
#import "std/byte_text_linux"
#import "std/c_string"
#import "std/json_quote"
#import "std/stdio_linux"
#import "std/text_buffer"
#import "std/vec"
METADATA_LIMIT :: 1048576
AssetText :: (bundle: *void, index: u64) -> string {
return TextFromBytes(BytesFromPointer(BundleAssetBytes(bundle, index), BundleAssetLength(bundle, index)))
}
#program_export
main :: (argc: s32, argv: **u8) -> s32 {
if argc != 3 {
unused PrintError("usage: zx-metadata BUNDLE NAME\n")
return 2
}
bundle := OpenBundle(argv[1])
if bundle == null {
unused PrintError("zx-metadata: not a valid bundle\n")
return 1
}
defer { CloseBundle(bundle) }
name := TextFromCString(argv[2])
catalog: Vec(u8)
BuilderPrint(*catalog, "assets/%/catalog.json", name)
catalog_path := BuilderFinish(catalog)
requirements: Vec(u8)
BuilderPrint(*requirements, "assets/%/requirements.json", name)
requirements_path := BuilderFinish(requirements)
entry: Vec(u8)
BuilderPrint(*entry, "%:%", TextFromCString(BundleEntryModule(bundle)),
TextFromCString(BundleEntryFunction(bundle)))
output: Vec(u8)
BuilderPrint(*output, "{\"entry\":%,\"assets\":[", JsonQuote(BuilderFinish(entry)))
metadata: Vec(u8)
count := BundleAssets(bundle)
index: u64 = 0
while index < count {
path := TextFromCString(BundleAssetPath(bundle, index))
length := BundleAssetLength(bundle, index)
if index > 0 { BuilderPrint(*output, ",") }
BuilderPrint(*output, "[%,%]", JsonQuote(path), length)
if (path == catalog_path || path == requirements_path) && length <= cast(u64)METADATA_LIMIT {
if metadata.count > 0 { BuilderPrint(*metadata, ",") }
BuilderPrint(*metadata, "%:%", JsonQuote(path[name.count + 8:]), JsonQuote(AssetText(bundle, index)))
}
index += 1
}
BuilderPrint(*output, "],\"metadata\":{%}}\n", BuilderFinish(metadata))
return ifx WriteOutput(BuilderFinish(output)) then 0 else 1
}
+85 -32
View File
@@ -14,12 +14,9 @@
#import "kryon/geometry"
#import "kryon/drawing_props"
#import "kryon/control_props"
#import "kryon/box_widget"
#import "kryon/box_props"
#import "kryon/text_widget"
#import "kryon/text_props"
#import "kryon/button_widget"
#import "kryon/button_props"
Box :: #import "kryon/box";
Text :: #import "kryon/text";
Button :: #import "kryon/button";
#import "kryon/hosted_values"
#import "kryon/hosted_app"
#import "kryon/widget_host"
@@ -58,12 +55,11 @@ Codec :: #import "apps/node_codec";
#if #defined(ANDROID_BUILD) {
#import "kryon/app_asset"
}
#import "kryon/loading_indicator"
LoadingIndicator :: #import "kryon/loading_indicator";
#import, file "collection_loading.zi";
#import "apps/connection"
#import "apps/remote_catalog"
Labels :: #import "apps/words";
HostBarTheme :: #import "shovey/shovey_theme";
#import "profile_palette"
#import "apps/game_hud"
collection_dew_text: [32]u8;
@@ -203,6 +199,19 @@ CollectionAllows :: (context: *void, node: *AppNode, name: string) -> bool {
(name == COLLECTION_INPUT_DESKTOP && CollectionInputDesktop())
}
// The old Choano document shares this game's record directory. Only the
// current linked account may read its original 64-hex key for migration.
CollectionChoanoLegacyRecord :: (node: *AppNode, record: string, owner: string) -> bool {
if node == null || node.collection || TextUntilNul(node.identity.id[:]) != "xyz.waozi.choano" ||
record.count != 81 || record[:14] != "choano.earned." || record[78:] != ".v1" ||
owner.count != 64 || record[14:78] != owner { return false }
for byte: owner {
if !((byte >= #char "a" && byte <= #char "f") ||
(byte >= #char "0" && byte <= #char "9")) { return false }
}
return true
}
CollectionCall :: (context: *void, node: *AppNode, module: *u8, function: *u8,
arguments: *HostValue, count: s32, result: *HostValue) -> s32 {
name := TextFromCString(function)
@@ -236,8 +245,10 @@ CollectionCall :: (context: *void, node: *AppNode, module: *u8, function: *u8,
if name == "AppRecordHost" && count == 1 &&
HostScalarValid(arguments[0], "string", cast(s32)HostString) {
record := AppArgumentText(arguments[0])
if record.count >= 64 && !CollectionChoanoLegacyRecord(node, record, RecordsOwnerNow()) { return 0 }
if !AppFileNameValid(record) { return 0 }
saved := CollectionRecordsFor(TextUntilNul(node.identity.id[:]))
if saved == null || !AppFileNameValid(record) || record.count >= 64 { return 0 }
if saved == null { return 0 }
AppFileFree(saved.text)
saved.text = AppFileRead(*saved.files, record)
if saved.files.status == -1 || saved.text.count >= 65536 { return 0 }
@@ -642,7 +653,7 @@ CollectionOpenBytes :: (bytes: string, metadata: string, data: string) -> bool {
selected_digest := TextUntilNul(digest[:])
if !packed {
if !CollectionNodeOpen(metadata, data, bytes, selected_digest, TextUntilNul(harness[:]), language) { return false }
if collection_node.ready {
if collection_node_remote {
selected = collection_node.bytes
selected_digest = TextUntilNul(collection_node.release.artifacts[0].sha256[:])
}
@@ -766,7 +777,8 @@ CollectionOpenGame :: (id: string) -> bool {
if root == null || !root.collection { Report("Arcade: no collection is open to start "); Report(id); Report("\n"); return false }
entry := AppCatalogAt(*root.catalog, AppCatalogFind(*root.catalog, id))
plan: AppInstallPlan
if entry != null && AppHostInstallPlan(*collection_host, root, entry, *plan) && plan.count > 0 {
if entry != null && (TextUntilNul(entry.cover.action[:]) == "title" ||
(AppHostInstallPlan(*collection_host, root, entry, *plan) && plan.count > 0)) {
unused CopyCString(id, collection_host.platform.presentation.download_id[:])
collection_host.platform.presentation.download_request += 1
return true
@@ -835,26 +847,26 @@ CollectionUpdatesSet :: (on: bool) -> bool {
// input until it is answered.
CollectionUpdatesQuestion :: (session: Session, viewport: Rectangle) {
question := "Download new levels when they come out?"
Box(session, BoxProps.{.key = cast(u64)49300, .bounds = viewport, .fill = Color.{0, 0, 0, 160}})
unused Button(session, ButtonProps.{.key = cast(u64)49301, .id = 49301, .label = question,
unused Box.Draw(session, Box.Props.{.key = cast(u64)49300, .bounds = viewport, .fill = Color.{0, 0, 0, 160}})
unused Button.Draw(session, Button.Props.{.key = cast(u64)49301, .id = 49301, .label = question,
.bounds = viewport, .invisible = true})
width := ifx viewport.width - 24.0 < 480.0 then viewport.width - 24.0 else 480.0
height: float32 = 200.0
x := viewport.x + (viewport.width - width) / 2.0
y := viewport.y + (viewport.height - height) / 2.0
Box(session, BoxProps.{.key = cast(u64)49302, .bounds = Rectangle.{x, y, width, height},
unused Box.Draw(session, Box.Props.{.key = cast(u64)49302, .bounds = Rectangle.{x, y, width, height},
.fill = Color.{59, 64, 63, 255}, .border = Color.{93, 98, 97, 255}, .radius = 18.0})
Text(session, TextProps.{.key = cast(u64)49303, .text = question, .font = 20, .wrap = TextWrap.TextWrapAuto,
Text.Draw(session, Text.Props.{.key = cast(u64)49303, .text = question, .size = 20, .wrap = Text.Wrap.TextWrapAuto,
.bounds = Rectangle.{x + 16.0, y + 16.0, width - 32.0, 60.0}})
Text(session, TextProps.{.key = cast(u64)49304, .text = "You can change this anytime in a game's Help.", .font = 14,
.wrap = TextWrap.TextWrapAuto, .bounds = Rectangle.{x + 16.0, y + 80.0, width - 32.0, 44.0}})
Text.Draw(session, Text.Props.{.key = cast(u64)49304, .text = "You can change this anytime in a game's Help.", .size = 14,
.wrap = Text.Wrap.TextWrapAuto, .bounds = Rectangle.{x + 16.0, y + 80.0, width - 32.0, 44.0}})
button_width := (width - 48.0 - 12.0) / 2.0
if Button(session, ButtonProps.{.key = cast(u64)49305, .id = 49305, .label = "Not now",
if Button.Draw(session, Button.Props.{.key = cast(u64)49305, .id = 49305, .label = "Not now",
.bounds = Rectangle.{x + 24.0, y + 136.0, button_width, 44.0},
.tone = ButtonTone.ButtonToneNeutral, .emphasis = ButtonEmphasis.ButtonEmphasisSoft}) != 0 {
unused CollectionUpdatesSet(false)
}
if Button(session, ButtonProps.{.key = cast(u64)49306, .id = 49306, .label = "Download",
if Button.Draw(session, Button.Props.{.key = cast(u64)49306, .id = 49306, .label = "Download",
.bounds = Rectangle.{x + 36.0 + button_width, y + 136.0, button_width, 44.0},
.tone = ButtonTone.ButtonToneAccent}) != 0 {
unused CollectionUpdatesSet(true)
@@ -893,9 +905,9 @@ CollectionFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers:
// The guest paints only its bounds below this host-owned bar. Paint an
// opaque base before its controls and any translucent navigation surface.
if top > 0 {
Box(session, BoxProps.{.key = cast(u64)49190,
unused Box.Draw(session, Box.Props.{.key = cast(u64)49190,
.bounds = Rectangle.{viewport.x, viewport.y, viewport.width, cast(float32)top},
.fill = ColorFromPacked(ifx entity_shovey then HostBarTheme.ShoveyPalette().background else AppCoversPalette().background)})
.fill = ColorFromPacked(ifx entity_shovey then ShoveyHostPalette().background else AppCoversPalette().background)})
}
now := cast(float64)MonotonicMilliseconds() / 1000.0
runtime.app.session = session
@@ -959,11 +971,11 @@ CollectionFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers:
if CollectionNeedsCover(*collection_loading, collection_host.tree.active.slot,
collection_host.tree.active.generation, pictures_ready) {
collection_toolbar_visible = false
Box(session, BoxProps.{.key = cast(u64)49400, .bounds = viewport,
unused Box.Draw(session, Box.Props.{.key = cast(u64)49400, .bounds = viewport,
.fill = ColorFromPacked(ifx entity_shovey then ShoveyHostPalette().background else AppCoversPalette().background)})
unused Button(session, ButtonProps.{.key = cast(u64)49401, .id = 49401,
unused Button.Draw(session, Button.Props.{.key = cast(u64)49401, .id = 49401,
.bounds = viewport, .invisible = true})
LoadingIndicator(session, LoadingIndicatorProps.{.key = cast(u64)49402,
LoadingIndicator.Draw(session, LoadingIndicator.Props.{.key = cast(u64)49402,
.bounds = viewport, .now = now, .scale = 1.5})
return true
}
@@ -981,10 +993,10 @@ CollectionFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers:
BuilderPrint(*title_bytes, "%", TextUntilNul(runtime.node.entry.title[:]))
title := BuilderFinish(title_bytes)
if !VecPush(collection_frame_paths, title) { AppFileFree(title); return false }
Box(session, BoxProps.{.key = cast(u64)6, .bounds = Rectangle.{viewport.x, viewport.y, viewport.width, 56.0},
unused Box.Draw(session, Box.Props.{.key = cast(u64)6, .bounds = Rectangle.{viewport.x, viewport.y, viewport.width, 56.0},
.fill = Color.{128, 140, 136, 40}})
Text(session, TextProps.{.key = cast(u64)8,
.text = title, .font = 20,
Text.Draw(session, Text.Props.{.key = cast(u64)8,
.text = title, .size = 20,
.bounds = Rectangle.{viewport.x + 150.0, viewport.y + 12.0, viewport.width - 166.0, 36.0}})
}
return true
@@ -1045,6 +1057,35 @@ collection_seed: string;
collection_seed_digest: [65]u8;
collection_harness_digest: [65]u8;
collection_node_locale: [16]u8;
// The version of the catalog this build carries; "" when its receipt has none.
collection_seed_version: [32]u8;
CollectionVersionPart :: (text: string, at: *s64) -> s64 {
value: s64
while at.* < text.count && text[at.*] >= cast(u8)48 && text[at.*] <= cast(u8)57 {
value = value * 10 + cast(s64)(text[at.*] - cast(u8)48)
at.* += 1
}
if at.* < text.count && text[at.*] == cast(u8)46 { at.* += 1 }
return value
}
// A saved or fetched signed release replaces the catalog this build carries
// only when it is newer. An older or equal cached release never hides the
// build's own library, artwork or games.
CollectionNodeNewer :: () -> bool {
current := TextUntilNul(collection_seed_version[:])
if current == "" { return true }
candidate := TextUntilNul(collection_node.release.version[:])
left: s64
right: s64
for part: cast(s32)0..2 {
a := CollectionVersionPart(candidate, *left)
b := CollectionVersionPart(current, *right)
if a != b { return a > b }
}
return false
}
collection_signature :: #system_library "c";
CollectionCheckSignature :: (signature: *u8, public_key: *u8, message: *u8,
@@ -1073,13 +1114,15 @@ CollectionNodeOpen :: (metadata: string, data: string, seed: string,
unused CopyCString(digest, collection_seed_digest[:])
unused CopyCString(harness, collection_harness_digest[:])
unused CopyCString(locale, collection_node_locale[:])
collection_seed_version[0] = 0
unused AppsReadText(metadata, 0, "version", collection_seed_version[:])
collection_package_origin = AppRemoteCopy(TextUntilNul(collection_node.source.origin[:]))
collection_node_choice = AppConnectionRead(*collection_node_files, collection_package_origin)
collection_node_notice = collection_node_choice == APP_CONNECTION_UNDECIDED
allowed := collection_node_choice == APP_CONNECTION_ALLOWED
CollectionDownloadsAllow(allowed)
AppRemoteCatalogAllow(*collection_node, allowed)
collection_node_remote = collection_node.ready
collection_node_remote = collection_node.ready && CollectionNodeNewer()
if allowed { unused AppRemoteCatalogRefresh(*collection_node) }
return true
}
@@ -1138,6 +1181,16 @@ CollectionNodePump :: () {
AppRemoteCatalogPump(*collection_node)
// A newer library applies on its own once the background fetch finishes.
if (collection_node_apply || collection_node_choice == APP_CONNECTION_ALLOWED) && collection_node.stage == 0 {
// The build's own newer catalog stays; the fetched release stays cached.
if collection_node.changed && !collection_node_remote && !CollectionNodeNewer() {
AppRemoteCatalogCollect(*collection_node)
}
// A newer signed release can reuse cached verified bytes without a
// download, so the catalog does not report it as changed.
if !collection_node.changed && !collection_node_remote && collection_node.ready &&
!collection_node.failed && CollectionNodeNewer() {
collection_node.changed = true
}
if collection_node.changed && !CollectionNodeActivate() { return }
collection_node_apply = false
collection_node_initial = false
@@ -1154,10 +1207,10 @@ CollectionNodeScreen :: (session: Session, viewport: Rectangle) -> bool {
return true
}
if collection_node_initial && collection_node.stage != 0 {
Box(session, BoxProps.{.key = cast(u64)49510, .bounds = viewport, .fill = Color.{17, 18, 35, 255}})
Text(session, TextProps.{.key = cast(u64)49511, .text = Labels.AppsLabel(TextUntilNul(collection_node_locale[:]), "loading_library"),
.font = 20, .bounds = Rectangle.{viewport.x + 24.0, viewport.y + viewport.height / 2.0, viewport.width - 48.0, 64.0}})
if Button(session, ButtonProps.{.key = cast(u64)49512, .id = 49512,
unused Box.Draw(session, Box.Props.{.key = cast(u64)49510, .bounds = viewport, .fill = Color.{17, 18, 35, 255}})
Text.Draw(session, Text.Props.{.key = cast(u64)49511, .text = Labels.AppsLabel(TextUntilNul(collection_node_locale[:]), "loading_library"),
.size = 20, .bounds = Rectangle.{viewport.x + 24.0, viewport.y + viewport.height / 2.0, viewport.width - 48.0, 64.0}})
if Button.Draw(session, Button.Props.{.key = cast(u64)49512, .id = 49512,
.label = Labels.AppsLabel(TextUntilNul(collection_node_locale[:]), "stay_offline"),
.bounds = Rectangle.{viewport.x + 24.0, viewport.y + viewport.height / 2.0 + 72.0, viewport.width - 48.0, 44.0},
.tone = ButtonTone.ButtonToneNeutral, .emphasis = ButtonEmphasis.ButtonEmphasisSoft}) != 0 {
+29 -21
View File
@@ -1,8 +1,13 @@
#import "std/c_string"
#import "std/byte_text_linux"
#import "std/timer_linux"
#import "kryon/Desktop"
#import "kryon/Widgets"
#import "kryon/desktop_runtime"
#import "kryon/Cairo"
#import "kryon/session"
#import "kryon/geometry"
#import "kryon/drawing_props"
#import "kryon/tree"
#import "kryon/tree_input"
#import "kryon/Frame"
#import "kryon/test_driver"
#import "kryon/ScrollDevice"
@@ -11,10 +16,11 @@
#import "collection_host"
#import "entity_host"
#import "entity/model"
#import "kryon/carousel"
Carousel :: #import "kryon/carousel";
#import "apps/appearance"
#import "kryon/widget_palette"
#import "kryon/loading_indicator"
Box :: #import "kryon/box";
LoadingIndicator :: #import "kryon/loading_indicator";
sdl :: #system_library "SDL2";
SetTitle :: (window: *void, title: *u8) #foreign sdl "SDL_SetWindowTitle";
@@ -31,11 +37,11 @@ DrawStartup :: (session: Session, directory: string, standalone: bool = true) ->
defer { EntityFree(art); EntityFree(logo) }
if BeginFrame(session, cast(u64)1, viewport) != FrameStatus.FrameOk { return false }
if standalone {
unused CarouselArtwork(session, viewport, cast(u64)48000, art, logo, "Shovey")
unused Carousel.CarouselArtwork(session, viewport, cast(u64)48000, art, logo, "Shovey")
} else {
unused WidgetPaletteUse(session, AppCoversPalette())
Box(session, BoxProps.{.key = cast(u64)48000, .bounds = viewport, .fill = Color.{17, 18, 35, 255}})
LoadingIndicator(session, LoadingIndicatorProps.{.key = cast(u64)48001,
unused Box.Draw(session, Box.Props.{.key = cast(u64)48000, .bounds = viewport, .fill = Color.{17, 18, 35, 255}})
LoadingIndicator.Draw(session, LoadingIndicator.Props.{.key = cast(u64)48001,
.bounds = viewport, .now = cast(float64)MonotonicMilliseconds() / 1000.0})
unused WidgetPaletteRestore(session)
}
@@ -47,19 +53,10 @@ DrawStartup :: (session: Session, directory: string, standalone: bool = true) ->
Draw :: (session: Session) -> bool {
BeginDesktopFrame()
KeyboardModifiersSend(session, DesktopModifiers())
key := DesktopPressedKey()
for candidate: cast(s32)0..511 {
if TestDriverKeyPressed(candidate) { key = candidate; break }
}
key, modifiers := DesktopInputTake(session)
KeyboardModifiersSend(session, modifiers)
if key == 256 && CollectionBack() { key = 0 }
KeyboardSend(session, key)
// Text typed on the keyboard reaches the game's focused field.
codepoint := DesktopTypedCodepoint()
while codepoint != 0 {
unused TypedCodepointSend(session, codepoint)
codepoint = DesktopTypedCodepoint()
}
if key != 0 { KeyboardSend(session, key) }
viewport := DesktopViewport()
pointer := TestDriverPointer(session, PollPointer())
TreePointerUpdate(session, pointer)
@@ -70,7 +67,7 @@ Draw :: (session: Session) -> bool {
pointer.down, pointer.released, wheel,
cast(float64)MonotonicMilliseconds() / 1000.0)
if BeginFrame(session, cast(u64)1, viewport) != FrameStatus.FrameOk { return false }
collection := CollectionFrame(session, viewport, key, DesktopModifiers())
collection := CollectionFrame(session, viewport, key, modifiers)
if !collection {
TreeCancel(session)
Report("collection frame returned false\n")
@@ -115,10 +112,21 @@ main :: (argc: s32, argv: **u8) -> s32 {
}
return 0
}
// --check opens the collection beside this binary without a window, so a
// build or install proves the two match: a binary cannot read a
// collection that a newer toolchain built.
if argc == 2 && TextFromCString(argv[1]) == "--check" {
data := DataDirectory()
opened := data != "" && (ifx standalone then CollectionOpenShovey(ExecutableDirectory(), data) else CollectionOpenFiles(ExecutableDirectory(), data))
unused CollectionClose()
Report(product)
Report(ifx opened then ": the collection opens with this binary\n" else ": this binary cannot open the collection beside it\n")
return ifx opened then 0 else 1
}
first: s32 = -1
if argc != 1 {
if argc != 3 || TextFromCString(argv[1]) != "--app" {
Report(ifx standalone then "Usage: shovey [--list | --app GAME]\n" else "Usage: arcade [--list | --app GAME]\n")
Report(ifx standalone then "Usage: shovey [--list | --check | --app GAME]\n" else "Usage: arcade [--list | --check | --app GAME]\n")
return 1
}
for index: cast(s32)0..GameCount - 1 {
+21 -13
View File
@@ -9,19 +9,15 @@
#import "kryon/session"
#import "kryon/geometry"
#import "kryon/key_input"
#import "kryon/button_props"
#import "kryon/button_widget"
Button :: #import "kryon/button";
#import "platform"
#import "profile_palette"
#import "kryon/widget_palette"
#import "apps/appearance"
#import "kryon/drawing_props"
#import "kryon/box_widget"
#import "kryon/box_props"
#import "kryon/text_widget"
#import "kryon/text_props"
#import "kryon/modal_props"
#import "kryon/modal_frame_widget"
Box :: #import "kryon/box";
Text :: #import "kryon/text";
Modal :: #import "kryon/modal";
#import "kryon/tree"
entity_bundle: string;
@@ -84,25 +80,37 @@ EntityBack :: () -> bool {
return true
}
EntityDismiss :: () -> bool {
if !EntityHostSave() { return false }
// Clear secure fields and cancel any pending device-link/import route as
// ordinary Back would, after preserving the profile edits.
for depth: cast(s32)0..15 { if !EntityHostBack() { break } }
entity_visible = false
return true
}
EntityFrame :: (session: Session, viewport: Rectangle, key: s32, modifiers: s32,
connection_label: string = "", connection: *bool = null) -> bool {
unused WidgetPaletteUse(session, ifx entity_shovey then ShoveyHostPalette() else AppCoversPalette())
defer { unused WidgetPaletteRestore(session) }
Box(session, BoxProps.{.key = cast(u64)49010, .bounds = viewport,
unused Box.Draw(session, Box.Props.{.key = cast(u64)49010, .bounds = viewport,
.fill = StyleTokenColorOr("canvas", Color.{239, 246, 244, 255})})
width := viewport.width - 32.0
height := viewport.height - 32.0
if width > 560.0 { width = 560.0 }
if height > 720.0 { height = 720.0 }
modal := ModalFrame(session, ModalFrameProps.{.key = cast(u64)49000, .id = 49000,
modal := Modal.Draw(session, Modal.Props.{.key = cast(u64)49000, .id = 49000,
.title = "Profile", .width = cast(s32)width, .height = cast(s32)height, .scale = 1.0,
.has_left_action = connection != null, .left_label = connection_label,
.has_right_action = true, .right_label = "Back"})
if modal.left_clicked && connection != null && EntityHostSave() {
entity_visible = false
if modal.left_clicked && connection != null && EntityDismiss() {
connection.* = true
}
if modal.dismissed || modal.right_clicked { unused EntityBack() }
// The frame's X/outside dismissal closes the whole profile. System Back
// still walks Entity's pages through EntityBack before leaving.
if modal.dismissed || modal.right_clicked {
unused EntityDismiss()
}
if !modal.opened { return true }
input := TextFieldInputFor(key, modifiers, TypedTextTake(session, entity_typed[:]))
ok := EntityHostFrame(session, modal.layout.content, key, modifiers, input, true)
+2 -2
View File
@@ -3,8 +3,8 @@
// that declares a newer one is refused. scripts/check-games.py fails while it
// differs from the standard and the ledger.
GAME_CONTRACT_VERSION :: 1
GAME_OLDEST_HOST_API :: 41
GAME_HOST_API :: 42
GAME_OLDEST_HOST_API :: 43
GAME_HOST_API :: 43
// The older direct loader has no verified reminder dispatch. Products use
// CollectionHost; do not advertise its API42 authority from the direct loader.
GAME_DIRECT_HOST_API :: 41
+2 -2
View File
@@ -2,8 +2,8 @@
"name": "kryon-node-app",
"contract_version": 1,
"module_api": 2,
"host_api": 42,
"oldest_host_api": 41,
"host_api": 43,
"oldest_host_api": 43,
"identity": "Stable signed package ID; moving source must not rename installed games",
"frames": {
"matching": "Fields match by name",
+1 -1
View File
@@ -25,7 +25,7 @@ assert chess["kind"] == "game"
assert (ROOT / "apps/chess/engine.zi").is_file(), "Arcade must own the game"
assert not (inbe / "apps/chess").exists(), "Inbe must consume Chess, not own another copy"
assert chess["contract_version"] == 1 and chess["module_api"] == 2
assert chess["host_api"] == 41 and chess["save_schema"] == 1
assert chess["host_api"] == 43 and chess["save_schema"] == 1
assert (ROOT / chess["preview"]).is_file()
env = {key: value for key, value in os.environ.items()
if key not in {"DISPLAY", "WAYLAND_DISPLAY", "XAUTHORITY", "DBUS_SESSION_BUS_ADDRESS"}}
+1 -1
View File
@@ -167,7 +167,7 @@ Check :: () -> s32 {
if protocol == APPS_NODE_PROTOCOL {
if Open(key, protocol, true) { return 120 }
AppHostStop(*collection_host); AppHostCollect(*collection_host)
if Open(key, protocol, false, 41) { return 121 }
if Open(key, protocol, false, 42) { return 121 }
AppHostStop(*collection_host); AppHostCollect(*collection_host)
}
}
+2 -2
View File
@@ -49,7 +49,7 @@ def main():
assets = WORK / game / 'assets/notification'
assets.mkdir(parents=True, exist_ok=True)
(assets / 'catalog.json').write_text(json.dumps(dict(id=identifier, name='notification',
contract_version=1, module_api=2, host_api=42, save_schema=1)))
contract_version=1, module_api=2, host_api=43, save_schema=1)))
for protocol in (1, 2):
defines = ['--define', 'KRYON_HOSTED_UI']
if protocol == 2:
@@ -65,7 +65,7 @@ def main():
ir = WORK / f'ir-{game}-{protocol}'
run(ZIRAN, 'ir', *common, '-o', ir, source)
saved = WORK / f'{game}-{protocol}-saved.zx'
run(zx, 'bundle', '--root', ir, '--module-path', ir,
run(zx, '--root', ir, '--module-path', ir,
'--entry', 'collection_notifications_guest:Main', '--asset-dir', 'assets=' + str(assets.parent),
'-o', saved, ir / 'collection_notifications_guest.zir')
if path.read_bytes() != saved.read_bytes():
@@ -1,4 +1,5 @@
#import, file "../src/collection_host.zi";
#import "apps/tree"
#import "entity/publications"
#import "entity/publications_read"
#import "std/bundle_host"
@@ -23,8 +24,24 @@ BorrowedText :: (value: HostValue) -> string {
return TextFromBytes(BytesFromPointer(value.data, cast(u64)value.length))
}
CheckChoanoLegacyRecord :: () -> bool {
owner := "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
record := "choano.earned.0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.v1"
traversal := "choano.earned./123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.v1"
node: AppNode
if !CopyText("xyz.waozi.choano", node.identity.id[:]) || !CollectionChoanoLegacyRecord(*node, record, owner) { return false }
if CollectionChoanoLegacyRecord(*node, record, "") || CollectionChoanoLegacyRecord(*node, traversal, traversal[14:78]) ||
CollectionChoanoLegacyRecord(*node, record, "1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef") { return false }
node.collection = true
if CollectionChoanoLegacyRecord(*node, record, owner) { return false }
node.collection = false
if !CopyText("arcade.shovey", node.identity.id[:]) { return false }
return !CollectionChoanoLegacyRecord(*node, record, owner)
}
#program_export
Check :: () -> s32 {
if !CheckChoanoLegacyRecord() { return 7 }
if !CollectionAllows(null, null, PUBLICATIONS_SERVICE) { return 1 }
if !CollectionAllows(null, null, PUBLICATIONS_READ_SERVICE) { return 2 }
function: [32]u8
+5 -2
View File
@@ -1,4 +1,4 @@
"""Check that Arcade routes writable publications through Entity's account gate."""
"""Check Arcade’s account-scoped publication and legacy record guards."""
import fcntl
import os
from pathlib import Path
@@ -37,7 +37,10 @@ def main():
"collection_publications_host_behavior:Check", "-o", str(generated),
"tests/collection_publications_host_behavior.zi")
main_c = generated / "main.c"
# The account checks link the collection dispatcher without a UI backend.
main_c.write_text('#include "collection_publications_host_behavior.h"\n'
'int32_t ImageWidth(String path) { (void)path; return 0; }\n'
'int32_t ImageHeight(String path) { (void)path; return 0; }\n'
'int main(void) { return Check(); }\n')
toolchain = Path(subprocess.check_output(
[ziran, "pkg", "path", "ziran", *lock], cwd=ROOT, text=True,
@@ -83,7 +86,7 @@ def main():
if result.returncode != 42:
raise SystemExit(
f"collection publications host check returned {result.returncode}")
print("Arcade publications host: writable service dispatches through Entity's account gate")
print("Arcade collection host: publication and Choano legacy record account guards passed")
if __name__ == "__main__":
+31 -50
View File
@@ -23,39 +23,21 @@ spec.loader.exec_module(builder)
art_spec = importlib.util.spec_from_file_location("library_art", ROOT / "scripts/library-art.py")
artist = importlib.util.module_from_spec(art_spec)
art_spec.loader.exec_module(artist)
spec = importlib.util.spec_from_file_location("published_games", ROOT / "scripts/wait-published-games.py")
published_games = importlib.util.module_from_spec(spec)
spec.loader.exec_module(published_games)
def bundle_asset_paths(path):
"""Read the actual bundle index without loading its images or executing it."""
with published_games.Reader(path) as reader:
if reader.take(8) not in (b"ZX\0\0\x1a\0\0\0", b"ZX\0\0\x1b\0\0\0"):
raise ValueError("Unsupported game bundle")
reader.text()
reader.text()
for _ in range(reader.number()):
reader.text()
reader.text()
for _ in range(reader.number()):
for _ in range(7):
reader.text()
reader.take(8)
reader.text()
reader.take(4)
for _ in range(reader.number()):
for _ in range(3):
reader.text()
reader.skip(reader.number())
paths = set()
for _ in range(reader.number()):
name = reader.text().decode()
if name in paths:
raise ValueError("Duplicate game asset: " + name)
paths.add(name)
reader.skip(reader.number())
reader.finish()
"""Read the actual bundle index without loading its images or executing it.
build/zx-metadata opens and verifies the ZX 28 bundle with the Ziran
runtime; none of its code runs.
"""
result = subprocess.run([str(ROOT / "build/zx-metadata"), str(path), path.stem],
capture_output=True, text=True, check=True)
paths = set()
for name, _ in json.loads(result.stdout)["assets"]:
if name in paths:
raise ValueError("Duplicate game asset: " + name)
paths.add(name)
return paths
@@ -64,8 +46,8 @@ class CollectionTests(unittest.TestCase):
# Fixed runtime references catch a doubled namespace in the real
# compiled payload, independently of the packaging declaration.
assets = bundle_asset_paths(ROOT / "build/games/choano.zx")
for path in ("assets/choano/background-inside.png", "assets/choano/organisms-hd.png",
"assets/choano/title-landscape.jpg", "assets/choano/fish/sea.png"):
for path in ("assets/choano/background-inside.avif", "assets/choano/organisms-hd.avif",
"assets/choano/title-landscape.avif", "assets/choano/fish/sea.avif"):
self.assertTrue(path in assets, "Choano runtime image missing from its bundle: " + path)
def setUp(self):
@@ -261,12 +243,12 @@ class CollectionTests(unittest.TestCase):
expected_children.append((
descriptor["id"], descriptor["title"], descriptor["name"],
ledger[descriptor["name"]]["version"], cover.get("caption", ""),
cover.get("action"), tuple(app["requires"]), app["shared_code"],
cover.get("action"), tuple(app["requires"]),
))
self.assertEqual([(
child["id"], child["title"], child["expected_id"], child["version"],
child.get("cover", {}).get("caption", ""), child.get("cover", {}).get("action"),
tuple(child.get("dependencies", [])), child.get("shared_code", False),
tuple(child.get("dependencies", [])),
) for child in catalog["children"]], expected_children)
self.assertEqual([(p["name"], p["id"], p["children"]) for p in packages],
[(package["name"], package["id"],
@@ -328,7 +310,7 @@ class CollectionTests(unittest.TestCase):
}))
(source / "editor/catalog.json").write_text(json.dumps({
"id": "xyz.waozi.wurm-editor", "name": "wurm-editor", "title": "Apfelwurm Editor",
"kind": "game", "contract_version": 1, "module_api": 2, "host_api": 41,
"kind": "game", "contract_version": 1, "module_api": 2, "host_api": 43,
"harnesses": ["arcade"], "preview": "assets/wurm-editor-preview.png",
}))
images = {
@@ -362,7 +344,7 @@ class CollectionTests(unittest.TestCase):
self.add_library_copy(name, key, images[f"{name}-{key}"])
ledger["node_apps"]["wurm-editor"] = {
"id": "xyz.waozi.wurm-editor", "title": "Apfelwurm Editor", "version": "0.1.0",
"sequence": 1, "host_api": 41,
"sequence": 1, "host_api": 43,
}
ledger_path.write_text(json.dumps(ledger))
resolver = self.root / "scripts/ziran.sh"
@@ -404,7 +386,7 @@ class CollectionTests(unittest.TestCase):
self.assertEqual(children["xyz.waozi.wurm"]["cover"]["caption"], "Classic")
self.assertEqual(children["xyz.waozi.wurm-editor"]["cover"]["caption"], "Editor")
self.assertEqual(children["xyz.waozi.wurm-editor"]["dependencies"], ["xyz.waozi.wurm"])
self.assertFalse(children["xyz.waozi.wurm-editor"].get("shared_code", False))
self.assertNotIn("shared_code", children["xyz.waozi.wurm-editor"])
self.assertEqual(children["xyz.waozi.wurm-editor"]["resources"], [{
"dependency": "xyz.waozi.wurm", "path": "assets/wurm/classic/",
"source": "assets/wurm-preview.png"}])
@@ -469,13 +451,14 @@ class CollectionTests(unittest.TestCase):
with self.assertRaisesRegex(ValueError, 'Invalid artwork package'):
self.stage()
def test_changed_gameplay_crop_requires_regenerating_art(self):
registration = self.root / 'games.json'
value = json.loads(registration.read_text())
value['screenshots']['shovey']['landscape']['crop_top'] += 1
registration.write_text(json.dumps(value))
with self.assertRaisesRegex(ValueError, 'crop changed'):
self.stage()
def test_library_covers_use_original_painted_art(self):
approved = json.loads((ROOT / 'tests/library_art_sources.json').read_text())
sources = json.loads((self.root / 'assets/arcade/library/sources.json').read_text())
for game in ('shovey', 'wurm', 'choano'):
for view in ('portrait', 'landscape'):
name = game + '-' + view
self.assertEqual(sources[name]['source_sha256'], approved[name])
self.assertNotIn('screenshots', json.loads((self.root / 'games.json').read_text()))
def test_library_heroes_are_bounded_and_editor_art_stays_small(self):
catalog, packages = builder.stage(self.root, self.controller, self.controller_digest, self.output)
@@ -496,10 +479,8 @@ class CollectionTests(unittest.TestCase):
self.assertLessEqual(max(thumbnail.size), limit)
self.assertLessEqual(thumbnail.width, source.width)
self.assertLessEqual(thumbnail.height, source.height)
crop_top = app.get("cover_crops", {}).get(key, 0)
expected_ratio = source.width / (source.height - crop_top)
if key == 'portrait' and not app['internal']:
expected_ratio = max(2 / 3, expected_ratio)
expected_ratio = 2 / 3 if key == 'portrait' else 16 / 9 if key == 'landscape' else source.width / source.height
if app['internal']: expected_ratio = source.width / source.height
self.assertAlmostEqual(thumbnail.width / thumbnail.height,
expected_ratio, delta=(1 + expected_ratio) / thumbnail.height)
self.assertIn(thumbnail.mode, ('RGB', 'RGBA'))
@@ -675,7 +656,7 @@ class LibraryThumbnailTests(unittest.TestCase):
self.assertEqual(suffix, '.webp')
with Image.open(io.BytesIO(contents)) as thumbnail:
self.assertEqual(thumbnail.format, 'WEBP')
self.assertEqual(thumbnail.size, (810, 1080))
self.assertEqual(thumbnail.size, (720, 1080))
self.assertEqual(thumbnail.mode, 'RGB')
self.assertIsNone(thumbnail.getcolors(256))
@@ -686,7 +667,7 @@ class LibraryThumbnailTests(unittest.TestCase):
source.save(encoded, 'PNG')
contents, _ = artist.small_copy(encoded.getvalue(), 'landscape', crop_top=52)
with Image.open(io.BytesIO(contents)) as cover:
self.assertEqual(cover.size, (1440, 848))
self.assertEqual(cover.size, (1440, 810))
red, green, blue = cover.getpixel((720, 0))
self.assertLess(red, 40)
self.assertGreater(blue, 150)
+36 -39
View File
@@ -229,15 +229,20 @@ def main():
assert len(set(pixels)) > 20, "Focused art must color the background"
def open_game(label):
# Position marks select an offscreen cover; the artwork itself opens it.
nodes = driver.find(label=label, role='button', visible=True)
covers = [node for node in nodes if node['height'] > 100]
if not covers:
driver.press(label=label, role='button')
order = ['Shovey', 'Apfelwurm', 'Choano']
current = next(n for n in driver.tree() if n['kind']=='button' and n['selected'] and n['height']>100)
while current['label'] != label:
driver.key('right' if order.index(current['label']) < order.index(label) else 'left')
driver.wait_idle(frames=20)
covers = [node for node in driver.find(label=label, role='button', visible=True) if node['height'] > 100]
assert covers, f'{label} must become reachable on the shelf'
driver.press(key=covers[0]['key'], role='button')
current = next(n for n in driver.tree() if n['kind']=='button' and n['selected'] and n['height']>100)
driver.press(key=current['key'],role='button')
def finish_download(label):
entry = next(e for e in by_name.values() if e['title']==label)
wait(lambda: (profile/'resources/downloads'/(entry['sha256']+'.zx')).exists() and
not driver.find(label='Downloading',role='text'), 'Download did not finish on shelf')
assert driver.find(label=label,role='button'), 'Download left the shelf'
open_game(label)
def primary_download(label='Download'):
driver.wait(label=label, role='button')
@@ -265,11 +270,6 @@ def main():
driver.wait_idle(frames=20)
editor = [n for n in driver.find(label='Apfelwurm', role='button') if n['height'] > 100]
assert editor and editor[0]['selected'], 'Right selects the next game'
driver.key('enter')
driver.wait(label='Cancel', role='button')
driver.wait(label='Apfelwurm', role='text')
assert not driver.find(role='modal'), 'Game launch must stay in the page'
driver.press(label='Cancel', role='button')
driver.key('left')
driver.wait_idle(frames=20)
subprocess.run(['xdotool', 'windowsize', window, '1120', '700'], check=True)
@@ -300,21 +300,15 @@ def main():
driver.press(label='Back', role='button')
driver.wait(label='Shovey', role='button')
assert not [path for path in (profile / 'resources/downloads').glob('*.zx') if path.stem in games]
open_game('Shovey')
driver.wait(label='Cancel', role='button')
driver.press(label='Cancel', role='button')
assert not games & set(server['requests']), 'Cancel must download nothing'
open_game('Shovey')
server['game_delay'] = 3
primary_download()
driver.wait(label='Hide', role='button')
assert not driver.find(role='modal'), 'Transfer progress must not capture modal focus'
driver.press(key=50033, role='button')
driver.wait(label='Shovey', role='button')
assert any(n['selected'] and n['height'] > 100 for n in driver.find(label='Shovey', role='button')), 'Returning keeps the selected cover'
open_game('Shovey')
driver.wait(label='Downloading',role='text')
assert driver.find(label='Apfelwurm',role='button'), 'Download must keep the carousel available'
assert not driver.find(role='modal'), 'Transfer progress must not capture modal focus'
assert any(n['selected'] and n['height']>100 for n in driver.find(label='Shovey',role='button'))
finish_download('Shovey')
server['game_delay'] = 0
driver.wait(key=20510, label="Play", role="button")
driver.wait(label='Play',role='button',timeout=60)
assert not driver.find(label="Restart", role="button"), "A game opens its own title"
capture(child, "shovey-title")
enter_shovey_play(driver)
@@ -337,13 +331,15 @@ def main():
driver.wait_idle(frames=5)
driver.press(label="Back", role="button")
driver.wait(label="Play", role="button")
driver.key("escape")
driver.wait(label="Shovey", role="button")
driver.key(290)
driver.wait(key=50400,visible=True)
saved = wait(lambda: record.read_bytes() if record.exists() else None, "Classic did not save")
assert not driver.find(label=sizes["shovey"], role="text"), "Installed games must omit their download size"
open_game('Shovey')
driver.wait(label='Editor', role='button')
driver.press(label='Editor', role='button')
driver.wait(label='Next',role='button')
driver.press(label='Next',role='button')
driver.wait_idle(frames=20)
driver.press(label='Open',role='button')
driver.wait(label='Download size: ' + sizes['shovey-editor'], role='text')
primary_download()
assert server['requests'].count(by_name['shovey']['sha256']) == 1, 'Installed dependencies must not download again'
@@ -357,21 +353,22 @@ def main():
driver.wait(label="New level", role="text")
capture(child, "editor-open")
driver.key("escape")
driver.wait(label="Play", role="button")
driver.wait(label='Editor', role='button')
assert not driver.find(label='Shovey', role='button'), 'Editor Back returns to the same game title'
driver.key("escape")
driver.wait(label="Shovey", role="button")
driver.wait(label='Open',role='button')
driver.press(label='Previous',role='button')
driver.wait(label='Play',role='button')
assert not driver.find(key=50400,visible=True), 'Editor Back returns to the game title'
driver.key(290)
driver.wait(key=50400,visible=True)
window = subprocess.check_output(["xdotool", "search", "--onlyvisible", "--pid", str(child.pid)], text=True).splitlines()[0]
subprocess.run(["xdotool", "windowsize", window, "900", "540"], check=True)
grid(child, "apps-landscape")
server['corrupt_wurm'] = True
open_game('Apfelwurm')
primary_download()
driver.wait(label='Try again', role='button', timeout=60)
driver.wait(label='Download failed',role='text',timeout=60)
assert not driver.find(label='Pause', role='button'), 'Unverified bytes must never run'
server['corrupt_wurm'] = False
primary_download('Try again')
open_game('Apfelwurm')
finish_download('Apfelwurm')
# Both the built-in editor and retained add-on open inside Wurm.
driver.wait(label='Play', role='button', timeout=60)
driver.press(label='Level editor', role='button')
@@ -396,7 +393,7 @@ def main():
driver.key(290)
driver.wait(label='Shovey', role='button')
open_game('Choano')
primary_download()
finish_download('Choano')
driver.wait(label='Play', role='button', timeout=60)
assert not driver.find(label='Pause', role='button'), 'Choano keeps its own title screen'
driver.press(label='Play', role='button')
@@ -433,7 +430,7 @@ def main():
assert not (profile / "inbe.db").exists()
refused = subprocess.run([str(args.binary.resolve()), "--app", "chess"], env=os.environ | {"ARCADE_DATA": str(profile)}, capture_output=True, timeout=10)
assert refused.returncode == 1 and b"unknown game" in refused.stderr
print("Arcade: console covers, consent/cancel, digest failure/retry, all three game titles/play, in-game editors, Back, rotation, offline reopen and retained saves passed")
print("Arcade: console covers, selection and in-place downloads, digest failure/retry, all three game titles/play, in-game editors, Back, rotation, offline reopen and retained saves passed")
if __name__ == "__main__":
+121 -35
View File
@@ -1,7 +1,7 @@
"""Real console home, artwork pixels, rotation, input and profile roundtrip privately."""
import argparse, contextlib, json, os, subprocess, sys, tempfile, time
from pathlib import Path
from PIL import Image
from PIL import Image, ImageOps, ImageChops, ImageStat
root = Path(__file__).resolve().parents[1]
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--binary', type=Path, default=root / 'build/arcade')
@@ -13,9 +13,44 @@ sys.path.insert(0, str(root / 'tests'))
sys.path.insert(0, str(args.inbe_source / 'tests'))
from collection_ui_test import package_server, answer_library_question
from ui_driver import UiDriver
out = root / 'work/console-redesign/results'
out = root / 'backup/console-fixes/results'
out.mkdir(parents=True, exist_ok=True)
driver = UiDriver(out / 'driver')
metadata = json.loads((root / 'build/arcade.json').read_text())
approved = json.loads((root / 'tests/library_art_sources.json').read_text())
sources = json.loads((root / 'assets/arcade/library/sources.json').read_text())
for name, digest in approved.items():
assert sources[name]['source_sha256'] == digest, 'Cover replaced the original painted artwork: ' + name
assert metadata['art']['bytes'] <= 2 * 1024 * 1024
def selected_cover():
return next(n for n in driver.tree() if n['kind'] == 'button' and n['selected'] and n['height'] > 100)
def viewport_width():
# Scenery shapes may extend past the window; the window-sized background starts at its origin.
return max(n['width'] for n in driver.tree() if n['x'] == 0 and n['y'] == 0)
def tap_cover(label, mouse):
cover = next(n for n in driver.find(label=label, role='button') if n['height'] > 100 and n['visible'])
width = viewport_width()
x = max(4, min(width - 4, cover['x'] + cover['width'] / 2))
y = cover['y'] + cover['height'] / 2
if mouse:
# A real X11 click held like a person's: SDL sees the move, press and release.
subprocess.run(['xdotool', 'mousemove', '--window', window, str(int(x)), str(int(y))], check=True)
time.sleep(.25)
subprocess.run(['xdotool', 'mousedown', '1'], check=True)
time.sleep(.15)
subprocess.run(['xdotool', 'mouseup', '1'], check=True)
time.sleep(.3)
else:
driver.pointer(x, y)
driver.pointer(x, y, down=True)
driver.wait_idle(frames=2)
driver.pointer(x, y, down=False)
driver.release_pointer()
driver.wait_idle(frames=20)
with package_server(root) as (origin, server), tempfile.TemporaryDirectory(dir=out) as temporary, (out / 'capture.log').open('w') as log:
profile = Path(temporary)
child = subprocess.Popen([str(args.binary.resolve())], cwd=root, env=os.environ | driver.environment() | {
@@ -34,8 +69,10 @@ with package_server(root) as (origin, server), tempfile.TemporaryDirectory(dir=o
assert int(subprocess.check_output(['xdotool', 'getwindowpid', window], text=True)) == child.pid
for name, width, height in [('home-landscape', 1200, 720), ('home-portrait', 480, 820)]:
subprocess.run(['xdotool', 'windowsize', window, str(width), str(height)], check=True)
# Keep the whole window on the private screen so captures are never clipped.
subprocess.run(['xdotool', 'windowmove', window, '0', '0'], check=True)
deadline = time.monotonic() + 10
while max(n['width'] for n in driver.tree()) != width:
while viewport_width() != width:
assert time.monotonic() < deadline
time.sleep(.05)
driver.wait_idle(frames=30)
@@ -45,9 +82,11 @@ with package_server(root) as (origin, server), tempfile.TemporaryDirectory(dir=o
for title in ('Shovey', 'Apfelwurm', 'Choano'):
assert driver.find(label=title, role='button'), 'Accessible game name missing'
assert not driver.find(label=title, role='text'), 'No captions under artwork'
background = next(n for n in nodes if n['key'] == 50021)
assert (background['x'], background['y'], background['width'], background['height']) == (0, 0, width, height)
assert background['detail'].endswith(('landscape.webp' if width > height else 'portrait.webp'))
# Both orientations draw the same scenic pattern, never game art behind the covers.
scenery = next(n for n in nodes if n['key'] == 50400)
assert (scenery['x'], scenery['y'], scenery['width'], scenery['height']) == (0, 0, width, height)
assert not any(n['key'] == 50021 for n in nodes), 'No full-screen game artwork behind the covers'
assert not [n for n in nodes if n['role'] == 'image' and n['width'] >= width * .9 and n['height'] >= height * .9], 'No hero image'
selected = [n for n in nodes if n['kind'] == 'button' and n['selected'] and n['height'] > 100]
(out / 'latest-debug-tree.json').write_text(json.dumps(nodes,indent=2))
assert len(selected) == 1, [(n['label'],n['selected'],n['width'],n['height']) for n in nodes if n['kind']=='button']
@@ -55,50 +94,66 @@ with package_server(root) as (origin, server), tempfile.TemporaryDirectory(dir=o
assert abs(selected['width'] / selected['height'] - (16/9 if width > height else 2/3)) < .02
covers = [n for n in nodes if n['role'] == 'image' and n['label'] in ('Shovey','Apfelwurm','Choano') and n['visible']]
assert len(covers) >= 2, 'Real neighbouring covers must be visible'
if width > height:
assert len(covers) == 3 and max(n['y'] for n in covers) - min(n['y'] for n in covers) < 1
assert selected['y'] > height * .65, 'Single shelf belongs at bottom'
else:
assert selected['width'] >= width * .65 and selected['height'] > height * .55
assert len([n for n in nodes if 50300 <= n['key'] <= 50302 and n['role'] == 'image']) == 3
# The portrait carousel layout in landscape too: one large centred cover,
# neighbours cut by the screen edges and the small cover markers below.
assert abs(selected['x'] + selected['width'] / 2 - width / 2) < 2, 'Selected cover is centred'
assert selected['width'] >= width * (.55 if width > height else .65)
assert height * .15 < selected['y'] and selected['y'] + selected['height'] < height * .9
neighbours = [n for n in covers if n['label'] != selected['label']]
assert neighbours and all(n['x'] <= 0 or n['x'] + n['width'] >= width for n in neighbours), 'Neighbours peek in from the sides'
assert all(abs(n['y'] + n['height'] / 2 - (selected['y'] + selected['height'] / 2)) < 2 for n in neighbours)
markers = [n for n in nodes if 50300 <= n['key'] <= 50302 and n['role'] == 'image']
assert len(markers) == 3 and all(n['y'] > selected['y'] + selected['height'] for n in markers)
assert all(n['detail'].endswith(('landscape.webp' if width > height else 'portrait.webp')) for n in markers)
for icon in ('profile', 'dew'):
assert any(n['role'] == 'image' and n['detail'].endswith('/assets/hud/' + icon + '.webp') for n in nodes), 'Painted startup icon missing'
subprocess.run(['import', '-window', window, str(out / (name + '.png'))], check=True)
(out / (name + '-tree.json')).write_text(json.dumps(driver.tree(), indent=2))
with Image.open(out / (name + '.png')) as im:
rgb = im.convert('RGB')
top = list(rgb.crop((0,0,width//2,88)).resize((30,10)).getdata())
clear = sum(all(abs(a-b) <= 3 for a,b in zip(pixel,(248,250,252))) for pixel in top)
assert clear < len(top)//2 and len(set(top)) > 20, 'Former white band must paint full game artwork'
# The sky above the covers is the dusk scenic pattern, not a white band or game art.
sky = ImageStat.Stat(rgb.crop((0, 0, width - 260, 80))).mean
assert sky[2] > sky[0] + 15 and max(sky) < 170 and min(sky) > 12, ('Scenic sky must fill the top', sky)
hills = ImageStat.Stat(rgb.crop((0, int(height * .93), width, height))).mean
assert hills[1] > hills[0] and max(hills) < 140, ('Scenic hills must fill the bottom', hills)
for cover in covers:
x,y,w,h = (cover[k] for k in ('x','y','width','height'))
crop = rgb.crop((max(0,x),max(0,y),min(width,x+w),min(height,y+h)))
assert len(crop.getcolors(1000000) or []) > 100, 'A neighbour became a blank grey block'
# Compare the rendered focused cover to the approved painted asset.
view = 'landscape' if width > height else 'portrait'
game = {'Shovey':'shovey', 'Apfelwurm':'wurm', 'Choano':'choano'}[selected['label']]
asset = root / 'assets/arcade/library' / (game + '-' + view + '.webp')
with Image.open(asset) as painting:
expected = ImageOps.fit(painting.convert('RGB'), (round(selected['width']), round(selected['height'])))
actual = rgb.crop(tuple(round(v) for v in (selected['x'],selected['y'],selected['x']+selected['width'],selected['y']+selected['height'])))
# Ignore the rounded corners and lower action icon.
region = (20,20,expected.width-20,expected.height-50)
error = ImageStat.Stat(ImageChops.difference(actual.crop(region),expected.crop(region))).mean
assert sum(error)/3 < 12, ('Rendered cover must show the original painting',game,error)
mint = rgb.getpixel((int(selected['x'])-2,int(selected['y']+selected['height']/2)))
assert mint[0] > 160 and mint[1] > 200 and mint[2] > 180, ('Missing focus glow',mint)
before = background['detail']
before = selected['label']
driver.key('right')
driver.wait_idle(frames=20)
changed = next(n for n in driver.tree() if n['key'] == 50021)
assert changed['detail'] != before, 'Selection changes the full-screen game background'
driver.key('enter')
driver.wait(label='Cancel', role='button')
dialog_nodes = driver.tree()
(out / 'install-dialog-tree.json').write_text(json.dumps(dialog_nodes,indent=2))
subprocess.run(['import','-window',window,str(out/'install-dialog.png')],check=True)
assert not any(n['kind'] == 'modal' for n in dialog_nodes), 'Launch progress must not create a modal'
assert any(n['label'] == 'Apfelwurm' and n['kind'] == 'text' for n in dialog_nodes), 'Launch screen must name the game'
driver.press(label='Cancel', role='button')
driver.key('left')
changed = selected_cover()['label']
assert changed != before, 'Keyboard selection moves to the next cover'
assert not any(n['key'] == 50021 for n in driver.tree()), 'Selection never adds a game background'
# Physical mouse and the held pointer/touch path both select only.
requests = list(server['requests'])
for mouse in (True, False):
tap_cover('Shovey', mouse)
assert selected_cover()['label'] == 'Shovey'
tap_cover('Apfelwurm', mouse)
assert selected_cover()['label'] == 'Apfelwurm'
assert any(n['key'] == 50400 for n in driver.tree()), 'A side-cover tap stays on the carousel'
assert server['requests'] == requests, 'Side-cover tap launched/downloaded a game'
assert not driver.find(label='Cancel',role='button')
tap_cover('Shovey', False)
driver.wait_idle(frames=20)
driver.press(label='Profile', role='button')
driver.wait(label='Account', role='text')
if width < height:
driver.press(label='Library connection', role='button')
driver.wait(label='Allow fetching content and automatic app updates?', role='text')
driver.press(label='Stay offline', role='button')
else:
driver.press(label='Back', role='button')
driver.press(label='Back', role='button')
driver.wait(label='Shovey', role='button')
driver.wait_idle(frames=20)
@@ -118,8 +173,39 @@ with package_server(root) as (origin, server), tempfile.TemporaryDirectory(dir=o
with Image.open(out / 'home-landscape.png') as im:
im.crop((im.width - 240, 0, im.width, 90)).resize((960, 360), Image.Resampling.LANCZOS).save(out / 'dew-profile-closeup.png')
assert not any(entry['sha256'] in server['requests'] for entry in json.loads((root / 'build/arcade.json').read_text())['children']), 'Browsing does not predownload games'
print('PASS console home: real art/background pixels, no white band/title/captions/editors, orientation, focus glow, keyboard, named install consent, Profile roundtrip')
assert not any(entry['sha256'] in server['requests'] for entry in metadata['children']), 'Browsing does not predownload games'
# Each orientation starts a missing game on the same shelf, immediately.
for label, width, height in [('Apfelwurm',1200,720),('Shovey',480,820)]:
subprocess.run(['xdotool','windowsize',window,str(width),str(height)],check=True)
driver.wait_idle(frames=30)
if selected_cover()['label'] != label: tap_cover(label, False)
entry = next(e for e in metadata['children'] if e['title'] == label)
server['game_delay'] = 3
tap_cover(label, width > height)
driver.wait(label='Downloading',role='text',timeout=10)
nodes = driver.tree()
assert any(n['key']==50400 for n in nodes), 'Download left the carousel'
assert selected_cover()['label'] == label, 'Download moved selection'
assert not driver.find(role='modal') and not driver.find(label='Cancel',role='button')
cover = selected_cover()
track = next(n for n in nodes if n['key']==cover['key']+14)
assert track['width'] > 40 and cover['y'] < track['y'] < cover['y']+cover['height'], 'Progress bar must be on the downloading cover'
other = 'Shovey' if label=='Apfelwurm' else 'Apfelwurm'
tap_cover(other,False)
assert selected_cover()['label']==other, 'Download blocked browsing'
deadline = time.monotonic()+60
while driver.find(label='Downloading',role='text') or not (profile/'resources/downloads'/(entry['sha256']+'.zx')).exists():
assert time.monotonic()<deadline,'Background installation did not finish'
time.sleep(.1)
assert any(n['key']==50400 for n in driver.tree()), 'Finishing download interrupted browsing'
assert server['requests'].count(entry['sha256'])==1,'Repeated activation queued duplicate transfers'
server['game_delay']=0
# A fresh activation now opens the installed game through its real title.
tap_cover('Shovey',False)
tap_cover('Shovey',False)
driver.wait(label='Play',role='button',timeout=60)
assert not any(n['key']==50400 for n in driver.tree()), 'Centred installed cover did not launch'
print('PASS console home: original painted cover pixels, scenic pattern with no game-art backdrop, same centred carousel in landscape and portrait, no title/captions/editors, focus glow, keyboard, side-cover mouse/touch selection only, immediate inline download and browsing, installed title, Profile roundtrip')
print('Captured only owned private-Xvfb window:', child.pid)
for name in ('home-landscape.png', 'home-portrait.png', 'dew-profile-closeup.png'):
print(out / name)
+18 -6
View File
@@ -13,7 +13,7 @@ def arcade_profile(binary, inbe_source, root):
"""Exercise the production Arcade entry without accounts or public services."""
sys.path.insert(0, str(inbe_source / 'tests'))
from ui_driver import UiDriver
out = root / 'work/entity-ui-test'
out = root / 'backup/entity-ui-test'
out.mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory(dir=out) as temporary:
data = Path(temporary)
@@ -84,8 +84,14 @@ def arcade_profile(binary, inbe_source, root):
keyboard('ctrl+a')
# Arcade forwards the physical SDL text/modifier path;
# its entry does not consume UiDriver's typed-text queue.
subprocess.run(['xdotool', 'type', '--clearmodifiers', '--delay', '20', text],
env=env, check=True)
if text.isascii():
subprocess.run(['xdotool', 'type', '--clearmodifiers', '--delay', '20', text],
env=env, check=True)
else:
# Xvfb has no Unicode keyboard layout. Exercise native
# clipboard paste rather than synthesizing unmapped keys.
subprocess.run(['xclip', '-selection', 'clipboard'], input=text.encode(), env=env, check=True)
keyboard('ctrl+v')
image = field_image(name)
groups = star_count(image)
assert groups == len(text), (name, groups, len(text))
@@ -101,14 +107,20 @@ def arcade_profile(binary, inbe_source, root):
driver.press(label='Password', role='text_field')
subprocess.run(['xdotool', 'type', '--clearmodifiers', 'Ab3-not-retained'], env=env, check=True)
driver.press(label='Back', role='button')
driver.press(label='Back', role='button')
driver.wait(label='Profile', role='button')
driver.press(label='Profile', role='button')
driver.press(label='Sign in', role='button')
assert driver.wait(label='Password', role='text_field')['cursor'] == 0
assert star_count(field_image('reopened')) == 0, 'Returning must not prefill the old password'
driver.press(label='Back', role='button')
driver.press(label='Back', role='button')
driver.wait(label='Profile', role='button')
# Escape goes back one page, then exits from the profile root.
driver.press(label='Profile', role='button')
driver.press(label='Sign in', role='button')
driver.key('escape')
driver.wait_gone(label='Password', role='text_field')
assert not driver.find(label='Profile', role='button'), 'Back must stay inside Profile first'
driver.key('escape')
driver.wait(label='Profile', role='button')
(out / 'result.json').write_text(json.dumps({'rendered_stars': counts,
'empty_initially': True, 'empty_after_clear': True,
@@ -117,7 +129,7 @@ def arcade_profile(binary, inbe_source, root):
if child.poll() is None:
child.terminate()
child.wait(timeout=10)
print('Arcade native Profile: empty password, 12/32/Unicode stars, editing and return navigation passed')
print('Arcade native Profile: empty password, 12/32/Unicode stars, editing and direct close from sign-in passed')
parser = argparse.ArgumentParser()
parser.add_argument('--binary', type=Path, required=True)
+40 -24
View File
@@ -3,7 +3,8 @@ import hashlib
import importlib.util
import json
from pathlib import Path
import struct
import shutil
import subprocess
import sys
import tempfile
import unittest
@@ -17,22 +18,32 @@ importer = importlib.util.module_from_spec(spec)
spec.loader.exec_module(importer)
def zx(descriptor, requirements=None, extra=(), version=27):
def number(value):
return struct.pack('<I', value)
TOOLCHAIN = Path(subprocess.check_output([str(ROOT / 'scripts/ziran.sh'), 'pkg', 'path', 'ziran', '--locked'],
cwd=ROOT, text=True).strip().splitlines()[-1])
EXPORTS = {}
def text(value):
value = value.encode() if isinstance(value, str) else value
return number(len(value)) + value
def zx(descriptor, requirements=None, extra=(), catalog='catalog.json'):
"""A real ZX 28 export, entry portable:Main, of the game's packed assets."""
public = {k: v for k, v in descriptor.items() if k not in ('build_defines', 'prepare_assets')}
name = descriptor['name']
assets = [(f'assets/{name}/catalog.json', json.dumps(public).encode()),
assets = [(f'assets/{name}/{catalog}', json.dumps(public).encode()),
(f'assets/{name}/picture.png', b'unchanged resource'), *extra]
if requirements is not None:
assets.append((f'assets/{name}/requirements.json', json.dumps(requirements).encode()))
return (b'ZX\0\0' + number(version) + text('portable') + text('Main') + number(0) * 4
+ number(len(assets)) + b''.join(text(k) + text(v) for k, v in assets))
key = hashlib.sha256(json.dumps([[path, data.hex()] for path, data in assets]).encode()).hexdigest()
if key not in EXPORTS:
work = ROOT / 'work/game-artifacts-test' / key
shutil.rmtree(work, ignore_errors=True)
for path, data in assets:
(work / path).parent.mkdir(parents=True, exist_ok=True)
(work / path).write_bytes(data)
(work / 'portable.zi').write_text('#program_export\nMain :: () -> s32 { return 0 }\n')
subprocess.run([str(TOOLCHAIN / 'build/bin/zi2zx'), '--root', str(work), '--asset-dir',
'assets=' + str(work / 'assets'), '--entry', 'portable:Main',
'-o', str(work / 'export.zx'), str(work / 'portable.zi')], check=True)
EXPORTS[key] = (work / 'export.zx').read_bytes()
return EXPORTS[key]
class ArtifactTests(unittest.TestCase):
@@ -47,7 +58,7 @@ class ArtifactTests(unittest.TestCase):
self.apps = []
for name, requires in [('base', []), ('base-editor', ['test.base'])]:
descriptor = dict(id='test.' + name, name=name, title=name, kind='game',
harnesses=['arcade'], entry='portable:Main', host_api=42,
harnesses=['arcade'], entry='portable:Main', host_api=43,
contract_version=1, module_api=2, save_schema=1,
preview='preview.png', build_defines=['OWNER_ONLY'])
self.apps.append(dict(descriptor=descriptor, requires=requires, enabled=True,
@@ -81,8 +92,15 @@ class ArtifactTests(unittest.TestCase):
for folder in ('src', 'build') for p in (self.root / folder).rglob('*') if p.is_file()}
def run_import(self):
run = subprocess.run
def metadata_only(arguments, *rest, **options):
# Only the bundle verifier runs; no game is compiled or executed.
if Path(arguments[0]) != importer.METADATA_TOOL:
raise AssertionError('No game subprocess')
return run(arguments, *rest, **options)
with patch.object(importer, 'ROOT', self.root), patch.object(importer, 'declared_apps', return_value=self.apps), \
patch('subprocess.run', side_effect=AssertionError('No game subprocess')), \
patch('subprocess.run', side_effect=metadata_only), \
patch('subprocess.check_output', side_effect=AssertionError('No compiler/resolver needed with fixtures')):
importer.build('must-not-run', [], self.manifest)
@@ -130,8 +148,7 @@ class ArtifactTests(unittest.TestCase):
self.reject('embedded catalog/entry mismatch')
def test_missing_catalog(self):
data = zx(self.apps[1]['descriptor']).replace(b'catalog.json', b'ignored.json')
(self.source / 'base-editor.zx').write_bytes(data)
(self.source / 'base-editor.zx').write_bytes(zx(self.apps[1]['descriptor'], catalog='ignored.json'))
self.reject('embedded catalog/entry mismatch')
def test_wrong_dependency_id(self):
@@ -157,12 +174,9 @@ class ArtifactTests(unittest.TestCase):
with patch.object(importer, 'MAX_PAYLOAD_BYTES', 32):
self.reject('payload limit')
def test_truncated_and_duplicate_zx(self):
for data in (zx(self.apps[0]['descriptor'])[:-1],
zx(self.apps[0]['descriptor'], extra=[('assets/base/picture.png', b'duplicate')])):
with self.subTest(length=len(data)):
(self.source / 'base.zx').write_bytes(data)
self.reject('truncated|duplicate')
def test_truncated_zx(self):
(self.source / 'base.zx').write_bytes(zx(self.apps[0]['descriptor'])[:-1])
self.reject('truncated or invalid bundle')
def test_manifest_rejects_external_private_id(self):
manifest = json.loads(self.manifest.read_text())
@@ -206,10 +220,12 @@ class ArtifactTests(unittest.TestCase):
self.assertEqual(locations['bundle'], self.source / path)
self.assertIn('build-queue --', guidance)
def test_zx26_supported_without_running_payload(self):
bundle = self.source / 'v26.zx'
bundle.write_bytes(zx(self.apps[0]['descriptor'], version=26))
self.assertEqual(importer.bundle_metadata(bundle, 'base')[0], 'portable:Main')
def test_zx28_read_and_older_formats_refused(self):
self.assertEqual(importer.bundle_metadata(self.source / 'base.zx', 'base')[0], 'portable:Main')
older = self.source / 'older.zx'
older.write_bytes(b'ZX\0\0\x1b\0\0\0' + bytes(64))
with self.assertRaisesRegex(ValueError, 'truncated or invalid bundle'):
importer.bundle_metadata(older, 'base')
def test_base_app_can_omit_resource_sidecar(self):
manifest = json.loads(self.manifest.read_text())
+3 -3
View File
@@ -15,12 +15,12 @@ spec.loader.exec_module(checker)
class HostCompatibility(unittest.TestCase):
def test_supported_and_unsupported_interfaces(self):
standard = json.loads((ROOT / 'standards/game-v1.json').read_text())
for host_api in (41, 42):
for host_api in (43,):
checker.compatible(dict(name='fixture', contract_version=1, module_api=2,
host_api=host_api), standard)
for field, value in [('host_api', 40), ('host_api', 43), ('host_api', True),
for field, value in [('host_api', 42), ('host_api', 44), ('host_api', True),
('module_api', 1), ('contract_version', 2)]:
game = dict(name='fixture', contract_version=1, module_api=2, host_api=42)
game = dict(name='fixture', contract_version=1, module_api=2, host_api=43)
game[field] = value
with self.subTest(field=field, value=value), self.assertRaises(AssertionError):
checker.compatible(game, standard)
-152
View File
@@ -1,152 +0,0 @@
#!/usr/bin/env python3
"""Game imports select scoped Kryon paths; real bundles cover theme collisions."""
import os
from pathlib import Path
import subprocess
import sys
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / 'scripts'))
from game_module_paths import kryon_module_paths
class SourceFixture(unittest.TestCase):
def setUp(self):
scratch = ROOT / 'work/game-module-path-tests'
subprocess.run(['git', 'check-ignore', '-q', str(scratch)], cwd=ROOT, check=True)
scratch.mkdir(parents=True, exist_ok=True)
self.folder = tempfile.TemporaryDirectory(dir=scratch)
self.addCleanup(self.folder.cleanup)
self.root = Path(self.folder.name)
self.source = self.root / 'game'
self.ui = self.root / 'kryon/src/ui'
self.ui.mkdir(parents=True)
for name in ('scroll', 'theme', 'geometry'):
(self.ui / (name + '.zi')).touch()
def write(self, path, text=''):
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(text)
def paths(self, entry='src/app.zi'):
return kryon_module_paths(self.source, {'source': entry}, self.root / 'kryon')
class ModulePathsTest(SourceFixture):
def test_qualified_imports_and_owned_theme_stay_scoped(self):
self.write(self.source / 'src/app.zi', '#import "theme"\n#import "kryon/scroll"')
self.write(self.source / 'src/theme.zi')
self.assertEqual(self.paths(), ['--module-path', 'kryon=' + str(self.ui),
'--module-path', 'kryon=' + str(self.ui.parent / 'backend')])
def test_short_import_in_nested_source_needs_plain_path(self):
self.write(self.source / 'src/app.zi', '#import "theme"')
self.write(self.source / 'src/theme.zi')
self.write(self.source / 'src/views/game.zi', 'Geometry :: #import /* reason */ "geometry";')
self.assertEqual(self.paths()[:2], ['--module-path', str(self.ui)])
def test_entry_outside_src_and_package_without_src(self):
self.write(self.source / 'src/host.zi')
self.write(self.source / 'apps/chess/view.zi', '#import "geometry"')
self.assertEqual(self.paths('apps/chess/view.zi')[:2], ['--module-path', str(self.ui)])
self.write(self.source / 'view.zi', '#import "scroll"')
(self.source / 'src/host.zi').unlink()
(self.source / 'src').rmdir()
self.assertEqual(self.paths('view.zi')[:2], ['--module-path', str(self.ui)])
def test_only_owned_root_names_shadow_shared_modules(self):
self.write(self.source / 'src/app.zi', '#import "geometry"')
self.write(self.source / 'src/nested/geometry.zi')
self.assertIn(str(self.ui), self.paths())
self.write(self.source / 'src/geometry/module.zi')
self.assertNotIn(str(self.ui), self.paths())
def test_comments_strings_file_imports_and_other_packages_do_not_flatten(self):
self.write(self.source / 'src/app.zi', '''
// #import "scroll"
/* #import "geometry" */
Text :: "#import \\"scroll\\""
#import, file "scroll.zi";
#import "other/geometry"
#import "not_a_ui_module"
''')
self.assertNotIn(str(self.ui), self.paths())
class BundleTest(SourceFixture):
@classmethod
def setUpClass(cls):
wrapper = str(ROOT / 'scripts/ziran.sh')
flags = [] if (ROOT / 'ziran.local.toml').exists() else ['--locked']
def package(name):
return Path(subprocess.check_output([wrapper, 'pkg', 'path', name, *flags], cwd=ROOT, text=True).strip())
cls.toolchain = Path(os.environ['ZIRAN_SOURCE']) if 'ZIRAN_SOURCE' in os.environ else package('ziran')
cls.kryon = Path(os.environ['KRYON_SOURCE']) if 'KRYON_SOURCE' in os.environ else package('kryon')
cls.compiler = os.environ.get('ZIRAN', str(cls.toolchain / 'build/bin/ziran'))
def compiler_run(self, *args):
env = os.environ.copy()
for key in ('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY', 'DBUS_SESSION_BUS_ADDRESS'):
env.pop(key, None)
return subprocess.run([self.compiler, *map(str, args)],
cwd=ROOT, env=env, text=True, capture_output=True, timeout=180)
def bundle(self, imports, local_theme=False, old_paths=False):
entry = self.source / 'src/guest.zi'
self.write(entry, imports + '''
using ButtonState;
#program_export
Answer :: () -> s32 {
thumb := ScrollFace(StyleKindScrollThumb(), 0, false,
cast(s32)ButtonStateNormal, 10.0)
''' + (' if AppTheme.LocalTheme() != cast(u32)0xaabbccdd { return 1 }\n' if local_theme else '') + '''
if thumb.value.background != cast(u32)0x889faaff { return 2 }
return 42
}
''')
if local_theme:
self.write(entry.with_name('theme.zi'), '''
#program_export
LocalTheme :: () -> u32 { return cast(u32)0xaabbccdd }
''')
paths = kryon_module_paths(self.source, {'source': 'src/guest.zi'}, self.kryon)
if old_paths:
paths = ['--module-path', str(self.kryon / 'src/ui'), *paths]
output = self.root / 'guest.zx'
result = self.compiler_run('bundle', '--root', entry.parent, *paths,
'--module-path', self.toolchain / 'std',
'--entry', 'guest:Answer', '-o', output, entry)
return result, output
def test_scoped_bundle_preserves_app_theme_and_kryon_palette(self):
imports = '''AppTheme :: #import "theme";
#import "kryon/scroll"
#import "kryon/style_sheet"
#import "kryon/control_props"
'''
old, _ = self.bundle(imports, local_theme=True, old_paths=True)
self.assertNotEqual(old.returncode, 0, old.stdout)
self.assertIn('LightBorderStrong', old.stderr + old.stdout)
result, output = self.bundle(imports, local_theme=True)
self.assertEqual(result.returncode, 0, (result.stderr + result.stdout)[-8000:])
run = self.compiler_run('run', output)
self.assertEqual(run.returncode, 0, run.stderr)
self.assertEqual(run.stdout.strip(), '42')
def test_legacy_short_import_bundle_keeps_shared_path(self):
result, output = self.bundle('''#import "scroll"
#import "style_sheet"
#import "control_props"
''')
self.assertEqual(result.returncode, 0, (result.stderr + result.stdout)[-8000:])
run = self.compiler_run('run', output)
self.assertEqual(run.returncode, 0, run.stderr)
self.assertEqual(run.stdout.strip(), '42')
if __name__ == '__main__':
unittest.main()
+6 -8
View File
@@ -12,13 +12,12 @@ from game_packages import declared_apps
class GameResourcesTest(unittest.TestCase):
def test_shared_code_requires_explicit_dependencies_and_valid_library_entries(self):
def test_dependencies_and_shared_records_are_validated(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
(root / 'games.json').write_text(json.dumps({'packages': []}))
(root / 'catalog.json').write_text(json.dumps({'id': 'editor', 'name': 'editor'}))
app = {'manifest': 'catalog.json', 'requires': ['game'], 'shared_code': True,
'library_entries': ['engine:Step'], 'shared_records': ['local.campaign']}
app = {'manifest': 'catalog.json', 'requires': ['game'], 'shared_records': ['local.campaign']}
def declare(value):
(root / 'apps.json').write_text(json.dumps(
@@ -26,12 +25,11 @@ class GameResourcesTest(unittest.TestCase):
return declared_apps(root)[0]
parsed = declare(app)
self.assertTrue(parsed['shared_code'])
self.assertEqual(parsed['library_entries'], ['engine:Step'])
self.assertEqual(parsed['requires'], ['game'])
self.assertEqual(parsed['shared_records'], ['local.campaign'])
for invalid in [app | {'requires': []}, app | {'shared_code': 1},
app | {'library_entries': ['engine:../Step']},
app | {'library_entries': ['engine:Step', 'engine:Step']},
# Code is built into each add-on; the retired library fields are refused.
for invalid in [app | {'shared_code': True}, app | {'library_entries': ['engine:Step']},
app | {'requires': ['game', 'game']},
app | {'shared_records': ['../campaign']},
app | {'shared_records': ['local.campaign', 'local.campaign']},
app | {'shared_records': ['..']}, app | {'shared_records': 'campaign'}]:
+9
View File
@@ -79,6 +79,15 @@ class GameUpdates(unittest.TestCase):
calls = run.call_count
return json.loads((root / 'ziran.lock').read_text()), json.loads(updates.read_text()), old, new, calls
def test_catalog_releases_keep_game_downloads_with_their_owner(self):
for name in ('game-updates.yml', 'node-release.yml'):
workflow = (ROOT / '.github/workflows' / name).read_text()
self.assertNotIn('wurm.zx', workflow)
self.assertIn('build/node-apps/arcade.zx build/node-apps/arcade.games.tar', workflow)
# Wurm remains a library game: only its extra release attachment goes.
exports = (ROOT / '.github/actions/game-exports/action.yml').read_text()
self.assertIn('fetch-wurm-export.py', exports)
def test_new_release_refreshes_transitive_graph(self):
lock, updates, old, new, calls = self.follow('ahead')
self.assertEqual(lock['packages'][0]['commit'], new)
+8
View File
@@ -0,0 +1,8 @@
{
"choano-landscape": "dfea1e328a0f386d0b5e323a59bbbc3cfa926f1dbdceaa09a9858a43b0949091",
"choano-portrait": "10be8a3d9251deeede9080c715a7a5dadc1b1641db16aa3a04b874a266302ea9",
"shovey-landscape": "40c01eb8300e4c5db52b2d75373e17cdaf7f68140c33c0a225613fc174660747",
"shovey-portrait": "ddcbf989eab5971157d8cdc73494ed03660bb4c7a7679543248f45be260777e3",
"wurm-landscape": "472773b7c106325e12777a81a29209496e22e0853782ca76955b6587824b1b30",
"wurm-portrait": "e8962c969f554567d598eb0b54db5836f7f1ed7462619463040c6cc2887a5a47"
}
+36 -4
View File
@@ -49,10 +49,15 @@ def live_library(binary, driver, work):
driver.wait(label='Choano', role='button', timeout=60)
metadata = json.loads((profile / 'node/current.json').read_text())
assert metadata['app_id'] == 'inbe.arcade'
source = json.loads((ROOT / 'build/arcade.json').read_text())['node']
bundled = json.loads((ROOT / 'build/arcade.json').read_text())
source = bundled['node']
assert metadata['sequence'] >= source['minimum_sequence']
digest = next(item['sha256'] for item in metadata['artifacts'] if item['variant'] == 'module')
catalog = catalog_assets((profile / 'node' / (digest + '.zx')).read_bytes())
# Equal or older signed releases stay cached; the newer build's
# own art remains authoritative, as it does in installed Arcade.
if tuple(map(int, metadata['version'].split('.'))) <= tuple(map(int, bundled['version'].split('.'))):
catalog = bundled
art = profile / 'resources/downloads' / (catalog['art']['sha256'] + '.zx')
deadline = time.monotonic() + 60
while (not art.exists() or art.stat().st_size != catalog['art']['bytes']) and time.monotonic() < deadline:
@@ -143,7 +148,11 @@ def main():
relative = self.path.removeprefix('/api/v2/packages/inbe.arcade/')
if relative.startswith('latest?'):
index = state['revision']
data = json.dumps(descriptor(key, payloads[index], 196 + index, module_api=2)).encode()
if state.get('older'):
# Signed, valid and newer in sequence, but an older app version.
data = json.dumps(descriptor(key, payloads[0], 195, module_api=2, version='0.0.1')).encode()
else:
data = json.dumps(descriptor(key, payloads[index], 196 + index, module_api=2)).encode()
elif relative.removesuffix('.zx') in digests:
data = payloads[digests.index(relative.removesuffix('.zx'))]
else:
@@ -169,6 +178,8 @@ def main():
shutil.copy2(args.binary, app / 'arcade')
for name in ('arcade.zx', 'apps.zx', 'entity.zx'):
shutil.copyfile(ROOT / 'build' / name, app / name)
# The installed HUD icons sit beside the binary, as in a release.
shutil.copytree(ROOT / 'build/assets/hud', app / 'assets/hud')
receipt = json.loads((ROOT / 'build/arcade.json').read_text())
receipt['node'] = dict(origin=origin, app_id='inbe.arcade', key_id='fixture-2026', minimum_sequence=195,
public_key=key.public_key().public_bytes(serialization.Encoding.Raw, serialization.PublicFormat.Raw).hex())
@@ -205,7 +216,7 @@ def main():
# event is still queued. Wait for the accepted viewport first.
import time
deadline = time.monotonic() + 10
while max(node['width'] for node in driver.tree()) != width:
while max(node['width'] for node in driver.tree() if node['x'] == 0 and node['y'] == 0) != width:
assert time.monotonic() < deadline, 'The host did not accept the new viewport'
time.sleep(0.05)
driver.wait_idle(frames=20)
@@ -234,6 +245,27 @@ def main():
assert not state['requests'], 'Offline choice must prevent preview downloads'
assert_plain_library()
consent.unlink()
# A signed release older than the catalog this build carries is kept
# cached but never replaces the bundled library, then or after restart.
state['older'] = True
with application('older-release'):
import time
driver.wait(label='Allow', role='button')
driver.press(label='Allow', role='button')
cached = profile / 'node/current.json'
deadline = time.monotonic() + 60
while not (cached.is_file() and json.loads(cached.read_text() or '{}').get('version') == '0.0.1'):
assert time.monotonic() < deadline, 'The older signed release was not fetched'
time.sleep(0.1)
driver.wait_idle(frames=60)
assert driver.find(label='Choano', role='button'), 'An older release replaced the bundled library'
assert not driver.find(label='Node Shovey', role='button')
with application('older-cached'):
driver.wait(label='Choano', role='button', timeout=60)
driver.wait_idle(frames=40)
assert not driver.find(label='Node Shovey', role='button'), 'A cached older release replaced the bundled library'
state['older'] = False
consent.unlink()
with application('consent-refresh') as child:
driver.wait(label='Allow', role='button')
driver.press(label='Allow', role='button')
@@ -286,7 +318,7 @@ def main():
server.shutdown()
server.server_close()
thread.join()
print('Arcade node consent, automatic signed membership refresh, preview rendering, game download consent and offline restart passed')
print('Arcade node consent, older releases never replacing the bundled library, automatic signed membership refresh, preview rendering, game download consent and offline restart passed')
if __name__ == '__main__':
+53 -26
View File
@@ -189,22 +189,37 @@ try {
const position = { x: node.visible_x + node.visible_width / 2, y: node.visible_y + node.visible_height / 2 };
await command('Input.dispatchMouseEvent', { type: 'mouseMoved', ...position });
await command('Input.dispatchMouseEvent', { type: 'mousePressed', ...position, button: 'left', buttons: 1, clickCount: 1 });
await delay(80);
// Keep a canvas press down until the game has processed a frame.
if (node.kind === 'button') await tree();
else await delay(80);
await command('Input.dispatchMouseEvent', { type: 'mouseReleased', ...position, button: 'left', buttons: 0, clickCount: 1 });
await delay(250);
};
const button = (nodes, label) => nodes.find(node => node.kind === 'button' && node.label === label && node.visible);
const waitButton = async label => {
const waitButton = async (label, settled = false, selected = false) => {
const labels = Array.isArray(label) ? label : [label];
let nodes;
let nodes, previous;
for (const end = Date.now() + 60000; Date.now() < end;) {
nodes = await tree();
const found = nodes.find(node => node.kind === 'button' && labels.includes(node.label) && node.visible);
if (found) return found;
const found = nodes.find(node => node.kind === 'button' && labels.includes(node.label) && node.visible && (!selected || (node.selected && node.height > 100)));
if (found && (!settled || (found.enabled &&
found.visible_width >= found.width - .5 && found.visible_height >= found.height - .5))) {
if (!settled || (previous?.key === found.key &&
Math.abs(previous.visible_x - found.visible_x) < .5 &&
Math.abs(previous.visible_y - found.visible_y) < .5)) return found;
previous = found;
} else previous = undefined;
await delay(150);
}
throw new Error('Game did not show ' + labels.join(' or ') + ': ' + nodes.filter(node => node.kind === 'button').map(node => node.label).join(', '));
};
const openInstalled = async () => {
const cover = button(await tree(), game);
if (!cover) throw new Error('Installed cover missing');
// A neighbouring cover's first activation selects it; the focused cover opens it.
if (!cover.selected || cover.height <= 100) await click(cover);
await click(await waitButton(game, true, true));
};
const pageReady = async () => {
for (const end = Date.now() + 60000; Date.now() < end;) {
if (await evaluate('!!(window.Module && Module.profileReady)')) return;
@@ -212,28 +227,36 @@ try {
}
throw new Error('The library did not reopen');
};
// The covers' own pixels: art has far more colours than an empty tile.
// Sample only named game covers. The shelf also exposes a large unnamed
// input button whose bounds include decorations and all of the covers.
// Counting that whole shelf can mistake empty covers for painted art.
const coverColours = async () => {
const covers = (await tree()).filter(node => node.kind === 'button' && node.visible &&
node.visible_width >= 100 && node.visible_height >= 100);
return evaluate(`(() => {
const canvas = document.getElementById('canvas'), context = canvas.getContext('2d');
const scale = canvas.width / canvas.clientWidth;
return ${JSON.stringify(covers)}.map(node => {
const colours = [];
// Neighbouring covers can be clipped or off screen. Select each title
// and sample its settled main cover so every game is checked.
for (const title of requiredTitles) {
const cover = button(await tree(), title);
if (!cover) throw new Error('Game cover missing: ' + title);
if (!cover.selected || cover.height <= 100) await click(cover);
const node = await waitButton(title, true, true);
colours.push(await evaluate(`(() => {
const canvas = document.getElementById('canvas'), context = canvas.getContext('2d');
const scale = canvas.width / canvas.clientWidth, node = ${JSON.stringify(node)};
const pixels = context.getImageData(Math.round(node.visible_x * scale), Math.round(node.visible_y * scale),
Math.round(node.visible_width * scale), Math.round(node.visible_height * scale)).data;
const colours = new Set();
for (let at = 0; at < pixels.length; at += 8) colours.add(pixels[at] << 16 | pixels[at + 1] << 8 | pixels[at + 2]);
return colours.size;
});
})()`);
})()`));
}
return colours;
};
const DRAWN = 1500;
const coversDrawn = async () => {
let colours = [];
for (const end = Date.now() + 15000; Date.now() < end;) {
colours = await coverColours();
if (colours.length && colours.every(count => count >= DRAWN)) return colours;
if (colours.length === requiredTitles.length && colours.every(count => count >= DRAWN)) return colours;
await delay(250);
}
throw new Error('The library covers did not draw: ' + JSON.stringify(colours));
@@ -282,14 +305,18 @@ try {
await delay(700);
await click(button(await tree(), game));
}
const download = (await tree()).findLast(node => node.kind === 'button' && node.label === 'Download');
if (!download) throw new Error('The cover did not offer its download');
// Selecting a neighbouring cover animates its action into view. Sample
// stable geometry before sending real pointer events to that action.
const download = await waitButton('Download', true);
await click(download);
await waitButton(game === 'Apfelwurm' ? 'Play' : ['Play', 'Back']);
// Downloads install in the background; opening requires a fresh cover activation.
await waitButton('App options', true);
await click(button(await tree(), game));
await waitButton(game === 'Apfelwurm' ? 'Play' : ['Play', 'Back'], true);
const play = button(await tree(), 'Play');
if (play) await click(play);
const swipe = button(await tree(), 'Swipe');
if (swipe) await click(swipe);
const swipe = play && game === 'Apfelwurm' ? await waitButton(['Swipe', 'Pause'], true) : button(await tree(), 'Swipe');
if (swipe?.label === 'Swipe') await click(swipe);
if (play || game === 'Apfelwurm') await waitButton('Pause');
// Flush the actual control record before a cold restart.
await evaluate(`new Promise((resolve,reject) => FS.syncfs(false,error => error ? reject(error) : resolve(true)))`);
@@ -298,8 +325,8 @@ try {
const reloaded = await tree();
const installed = button(reloaded, game);
if (!installed) throw new Error('Installed cover missing after reload');
await click(installed);
await waitButton(game === 'Apfelwurm' ? 'Play' : ['Play', 'Back']);
await openInstalled();
await waitButton(game === 'Apfelwurm' ? 'Play' : ['Play', 'Back'], true);
console.log(game + ' downloaded, opened its game and reopened from its installed cover');
if (game === 'Apfelwurm') {
await command('Page.reload');
@@ -324,7 +351,7 @@ try {
return original.call(this,path,...args);
};
})()`);
await click(installed);
await openInstalled();
// Depending on the game version it first reads records on its title
// or on Play. Either path must expose a usable recovery control.
if (!await evaluate('!!Module.arcadeFailed')) {
@@ -358,8 +385,8 @@ try {
await pageReady();
if (await evaluate(`FS.readFile(${JSON.stringify(saved.path)},{encoding:'utf8'})`) !== saved.text)
throw new Error('Recovering from a failed game changed its saved record');
await click(button(await tree(),game));
await waitButton('Play');
await openInstalled();
await waitButton('Play', true);
console.log('The reported ReadLevel failure showed recovery; returning reopened the installed game and retained its saved record');
}
if (library) {
@@ -377,7 +404,7 @@ try {
await pageReady();
await delay(3000);
const empty = await coverColours();
if (!refusedArt.length || !empty.length || empty.some(count => count >= DRAWN))
if (!refusedArt.length || empty.length !== requiredTitles.length || empty.some(count => count >= DRAWN))
throw new Error('The cover check did not tell empty covers apart: ' + JSON.stringify({ empty, refusedArt }));
console.log(`Without the site's art the covers stayed empty (colours ${empty}) and the API art request was refused`);
libraryMode = 'site';
+98
View File
@@ -0,0 +1,98 @@
"""Wurm releases are imported unchanged, with the exact source/release identity."""
import importlib.util
import io
import json
import os
from pathlib import Path
import sys
import tarfile
import tempfile
import unittest
from unittest.mock import patch
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / 'scripts'))
def load(name, path):
spec = importlib.util.spec_from_file_location(name, ROOT / path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
exports = load('wurm_exports', 'scripts/fetch-wurm-export.py')
class WurmExports(unittest.TestCase):
def setUp(self):
scratch = ROOT / 'work/console-redesign'
scratch.mkdir(parents=True, exist_ok=True)
self.temporary = tempfile.TemporaryDirectory(dir=scratch)
self.addCleanup(self.temporary.cleanup)
self.root = Path(self.temporary.name)
def archive(self, bad=None):
archive = self.root / 'exports.tar.gz'
with tarfile.open(archive, 'w:gz') as output:
for name in sorted(exports.EXPORT_FILES):
member = tarfile.TarInfo(name)
data = name.encode()
member.size = len(data)
if name == 'wurm.zx' and bad:
if bad == 'link':
member.type, member.linkname = tarfile.SYMTYPE, 'private'
else:
member.name = '../wurm.zx'
output.addfile(member, io.BytesIO(data))
return archive
def test_complete_archive_is_copied_unchanged(self):
exports.unpack(self.archive(), self.root)
for name in exports.EXPORT_FILES:
self.assertEqual((self.root / 'build/games' / name).read_bytes(), name.encode())
def test_invalid_members_preserve_previous_export(self):
target = self.root / 'build/games/wurm.zx'
target.parent.mkdir(parents=True)
target.write_bytes(b'previous export')
for bad in ('link', 'traversal'):
with self.assertRaises(ValueError):
exports.unpack(self.archive(bad), self.root)
self.assertEqual(target.read_bytes(), b'previous export')
def test_wrong_release_commit_is_rejected_before_download(self):
(self.root / 'version.json').write_text('{"version":"0.2.32"}')
with patch.object(exports.subprocess, 'check_output', return_value='1' * 40), \
patch.object(exports.subprocess, 'run') as download:
with self.assertRaisesRegex(ValueError, 'pinned commit'):
exports.fetch(self.root, '2' * 40)
download.assert_not_called()
@unittest.skipUnless(os.environ.get('WURM_EXPORT_ARCHIVE'), 'set WURM_EXPORT_ARCHIVE and WURM_SOURCE for real bundle test')
def test_real_release_passes_arcade_import_contract(self):
importer = load('game_importer', 'scripts/build-games.py')
source = Path(os.environ['WURM_SOURCE'])
archive = Path(os.environ['WURM_EXPORT_ARCHIVE'])
exports.unpack(archive, self.root)
apps, records = [], {}
for declaration in json.loads((source / 'apps.json').read_text())['apps']:
descriptor = json.loads((source / declaration['manifest']).read_text())
name = descriptor['name']
apps.append(dict(descriptor=descriptor, requires=declaration.get('requires', []),
enabled=True, source=source, package='wurm'))
records[descriptor['id']] = {
kind: str(self.root / 'build/games' / (name + suffix))
for kind, suffix in [('bundle', '.zx'), ('resources', '-resources.json'), ('preview', '-preview.png')]}
manifest = self.root / 'exports.json'
manifest.write_text(json.dumps({'apps': records}))
before = {path.name: importer.digest(path) for path in (self.root / 'build/games').iterdir()}
with patch.object(importer, 'ROOT', self.root), patch.object(importer, 'declared_apps', return_value=apps):
importer.build('unused', [], manifest)
for name, digest in before.items():
if '-catalog.json' not in name:
self.assertEqual(importer.digest(self.root / 'build/games' / name), digest)
if __name__ == '__main__':
unittest.main()
+333 -136
View File
@@ -19,6 +19,24 @@
"source": true,
"url": "https://github.com/waozixyz/wurm.git"
},
{
"commit": "8d5d2e752a219674f993473c8410847ba42fad48",
"dependencies": {"audio": "p59deb49c7f103127", "avif": "pb203529d803e73a4", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "sdl3": "p16cd0434af3dff7b", "webp": "p2af20e0c835b1c63"},
"dependency_refs": {"audio": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2", "avif": "2611e727e226a2af22dfb7f10bf224bd2f1a3d30", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "ec6ed304767e10c125ab2820f3b01d6fd773e147"},
"id": "p09ea4e5550e9f459",
"name": "kryon",
"ref": "8d5d2e752a219674f993473c8410847ba42fad48",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7",
"dependencies": {},
"id": "p0dd67588478f9a3e",
"name": "libsamplerate",
"ref": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7",
"source": true,
"url": "https://github.com/libsndfile/libsamplerate.git"
},
{
"commit": "2944b2e668e735438d8ce24e47a39be3f5c36af5",
"dependencies": {},
@@ -28,13 +46,22 @@
"url": "https://github.com/ziranlang/qrcode.git"
},
{
"commit": "8b5a989dea686250078da2d209fde1cd2946fc77",
"dependencies": {"kryon": "pe42819128210d99c"},
"dependency_refs": {"kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c"},
"id": "p0e63706817d43aba",
"name": "Game2D",
"ref": "8b5a989dea686250078da2d209fde1cd2946fc77",
"url": "https://github.com/kryonlabs/game2d.git"
"commit": "106be8ab7e915f618fa3fd3a6df296dc0a319beb",
"dependencies": {"apps": "p333db0ddd841f1ec", "crypto": "pc23fbf455e97614d", "css": "p6269d7141b731fe4", "entity": "pb3958804740a96f2", "game2d": "pcad095808686987d", "kryon": "p09ea4e5550e9f459", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "b95d19334ab4338d3611ec9d44db62b50694e464", "crypto": "master", "css": "9ee24b3f70b9c7d776dc391cba15ba97533db227", "entity": "fc8f3d899dfc3d3e0b535006526485c6d8c8c279", "game2d": "fcacb49c1e128e9eb100884e6029b24b4e608d38", "kryon": "8d5d2e752a219674f993473c8410847ba42fad48", "mingcute": "master"},
"id": "p1081a753e68847db",
"name": "Choano",
"ref": "106be8ab7e915f618fa3fd3a6df296dc0a319beb",
"url": "https://git.waozi.xyz/waozi/choano.git"
},
{
"commit": "b1e9b025121adba80b931b9ec30754917815584b",
"dependencies": {"kryon": "p8f647d8005d4c2a7"},
"dependency_refs": {"kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658"},
"id": "p137c96bd0c9223a3",
"name": "plot",
"ref": "b1e9b025121adba80b931b9ec30754917815584b",
"url": "https://github.com/kryonlabs/plot.git"
},
{
"commit": "829a65d769d935c4852f8159e964312c0957260a",
@@ -46,30 +73,48 @@
"url": "https://github.com/libsdl-org/SDL.git"
},
{
"commit": "d74348c2e288ac55740461f7e106cda365b4db4a",
"dependencies": {"apps": "p2bf10414e9201651", "crypto": "pc23fbf455e97614d", "curl": "p8da229d15597ab5c", "daochi_client": "p89503086b39ba0fb", "entity": "peb3fb337c2b79068", "game2d": "pf2f54c7603f6e861", "kryon": "pe4419a225f95e507", "kss": "p1b13dda539ed2a39", "liboqs": "p60ff905f3a963886", "mingcute": "pe1027b9d16704793", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "practices": "p71f489a3ce887de0", "qrcode": "p0dfa70137405b096", "rini": "p8ea355e8cb04093e", "sqlite": "p810dc0509cd1b75d"},
"dependency_refs": {"apps": "master", "crypto": "master", "curl": "master", "daochi_client": "master", "entity": "master", "game2d": "master", "kryon": "master", "kss": "master", "liboqs": "main", "mingcute": "master", "monocypher": "master", "oqs": "master", "plot": "master", "practices": "master", "qrcode": "master", "rini": "main", "sqlite": "master"},
"id": "p183b01bccc6424e7",
"name": "Inbe",
"ref": "master",
"url": "https://github.com/waozixyz/inbe.git"
"commit": "f26a552247e2cd367fd33def6860d903cac6ab8a",
"dependencies": {"av1": "p5d7d12505a42f7b3", "dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db"},
"dependency_refs": {"av1": "bd278217e2bac754d868b3d6502eac4257658d4b", "dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199"},
"id": "p274c2dd6d03a7c0c",
"name": "avif",
"ref": "f26a552247e2cd367fd33def6860d903cac6ab8a",
"url": "https://github.com/ziranlang/avif.git"
},
{
"commit": "1cb9df183089a77c8a16448a556186f30b261a98",
"dependencies": {"kryon": "pe4419a225f95e507"},
"dependency_refs": {"kryon": "master"},
"id": "p1b13dda539ed2a39",
"name": "Kss",
"ref": "master",
"url": "https://github.com/kryonlabs/kss.git"
},
{
"commit": "7364520deacb9ead8b46771a24a066220dedf144",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pe4419a225f95e507"},
"dependency_refs": {"crypto": "master", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "7865957626e67e6c291e3db3b474c6082691d6c6"},
"id": "p2bf10414e9201651",
"commit": "7b826f4928cda2bc96c72fd75d710b516f06ebdf",
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "pd19aad4bd0cc7753", "mesh_client": "p8204ae87a845c1c3"},
"dependency_refs": {"crypto": "master", "kryon": "6816ed78665e10525a3a0a7a43e182f2fa51a0ac", "mesh_client": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449"},
"id": "p29c0b4b857b055e5",
"name": "Apps",
"ref": "master",
"ref": "7b826f4928cda2bc96c72fd75d710b516f06ebdf",
"url": "https://github.com/waozixyz/apps.git"
},
{
"commit": "ec6ed304767e10c125ab2820f3b01d6fd773e147",
"dependencies": {"image_codec": "p69c0e968ae5735d9", "libwebp": "p3b3c785a0e17e605"},
"dependency_refs": {"image_codec": "360553150917f352e49e1beb78917370792ccaef", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339"},
"id": "p2af20e0c835b1c63",
"name": "webp",
"ref": "ec6ed304767e10c125ab2820f3b01d6fd773e147",
"url": "https://github.com/ziranlang/webp.git"
},
{
"commit": "d9c0c38bf041e97959170c48d1fc408524445a34",
"dependencies": {"curl": "p8da229d15597ab5c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "p8f647d8005d4c2a7", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"id": "p2d4cf957ef890a17",
"name": "Entity",
"ref": "d9c0c38bf041e97959170c48d1fc408524445a34",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "b95d19334ab4338d3611ec9d44db62b50694e464",
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p09ea4e5550e9f459", "mesh_client": "p8204ae87a845c1c3"},
"dependency_refs": {"crypto": "master", "kryon": "8d5d2e752a219674f993473c8410847ba42fad48", "mesh_client": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449"},
"id": "p333db0ddd841f1ec",
"name": "Apps",
"ref": "b95d19334ab4338d3611ec9d44db62b50694e464",
"url": "https://github.com/waozixyz/apps.git"
},
{
@@ -82,35 +127,124 @@
"url": "https://github.com/webmproject/libwebp.git"
},
{
"commit": "075784438af94fe4a0aba48ed4d8c7208c161bf1",
"dependencies": {"curl": "p8da229d15597ab5c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pe42819128210d99c", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"id": "p507e86a4cf18dc9c",
"name": "Entity",
"ref": "075784438af94fe4a0aba48ed4d8c7208c161bf1",
"url": "https://github.com/waozixyz/entity.git"
"commit": "712e99ed57a0b1f03ddb21dcd02d9ecd8b7d82e7",
"dependencies": {},
"id": "p3bbb7ef5867e6b62",
"name": "arcade",
"ref": "712e99ed57a0b1f03ddb21dcd02d9ecd8b7d82e7",
"source": true,
"url": "https://github.com/waozixyz/arcade.git"
},
{
"commit": "619888d404e7d7e441921702c41a5838a8981408",
"commit": "5b8007aefac5518564c61aec7409d87d87e5c0ac",
"dependencies": {"kryon": "p8f647d8005d4c2a7"},
"dependency_refs": {"kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658"},
"id": "p449499e1e80e72a7",
"name": "Game2D",
"ref": "5b8007aefac5518564c61aec7409d87d87e5c0ac",
"url": "https://github.com/kryonlabs/game2d.git"
},
{
"commit": "56d19eca78b304630961c2ab180ba880b304f741",
"dependencies": {"kryon": "pd19aad4bd0cc7753"},
"dependency_refs": {"kryon": "6816ed78665e10525a3a0a7a43e182f2fa51a0ac"},
"id": "p4f2415439a56f364",
"name": "Game2D",
"ref": "56d19eca78b304630961c2ab180ba880b304f741",
"url": "https://github.com/kryonlabs/game2d.git"
},
{
"commit": "395d2aa8c7a0cf578b8086c6853baca9df56be5b",
"dependencies": {},
"id": "p60ff905f3a963886",
"id": "p52c1ebf1bba9ea88",
"name": "liboqs",
"ref": "main",
"source": true,
"url": "https://github.com/open-quantum-safe/liboqs.git"
},
{
"commit": "1aadfad932c98c069a1204261b1856f81f3bc199",
"dependencies": {},
"id": "p57c0272208aae8db",
"name": "libavif",
"ref": "1aadfad932c98c069a1204261b1856f81f3bc199",
"source": true,
"url": "https://github.com/AOMediaCodec/libavif.git"
},
{
"commit": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2",
"dependencies": {"libopus": "pe1fe9bbe80bf1d6d", "libsamplerate": "p0dd67588478f9a3e"},
"dependency_refs": {"libopus": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6", "libsamplerate": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7"},
"id": "p59deb49c7f103127",
"name": "audio",
"ref": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2",
"url": "https://github.com/ziranlang/audio.git"
},
{
"commit": "7bf154f197696f5bf04be2ea4c576db86bb6a238",
"dependencies": {},
"id": "p5c52c96443a2bf32",
"name": "liboqs",
"ref": "7bf154f197696f5bf04be2ea4c576db86bb6a238",
"source": true,
"url": "https://github.com/open-quantum-safe/liboqs.git"
},
{
"commit": "e743dedc40b6f39b7b6d093d06e870d6c43920ef",
"dependencies": {"curl": "p8da229d15597ab5c", "kryon": "pd19aad4bd0cc7753", "mesh_client": "p8204ae87a845c1c3", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "kryon": "6816ed78665e10525a3a0a7a43e182f2fa51a0ac", "mesh_client": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"id": "p5c5e82eaccd6199e",
"name": "Entity",
"ref": "e743dedc40b6f39b7b6d093d06e870d6c43920ef",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "bd278217e2bac754d868b3d6502eac4257658d4b",
"dependencies": {"dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa"},
"dependency_refs": {"dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937"},
"id": "p5d7d12505a42f7b3",
"name": "av1",
"ref": "bd278217e2bac754d868b3d6502eac4257658d4b",
"url": "https://github.com/ziranlang/av1.git"
},
{
"commit": "9ee24b3f70b9c7d776dc391cba15ba97533db227",
"dependencies": {"kryon": "p09ea4e5550e9f459"},
"dependency_refs": {"kryon": "8d5d2e752a219674f993473c8410847ba42fad48"},
"id": "p6269d7141b731fe4",
"name": "Css",
"ref": "9ee24b3f70b9c7d776dc391cba15ba97533db227",
"url": "https://github.com/kryonlabs/css.git"
},
{
"commit": "360553150917f352e49e1beb78917370792ccaef",
"dependencies": {},
"id": "p69c0e968ae5735d9",
"name": "image-codec",
"ref": "360553150917f352e49e1beb78917370792ccaef",
"url": "https://github.com/ziranlang/image-codec.git"
},
{
"commit": "970d5e44b1702158cb16469892da6ff50f142427",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"dependency_refs": {"crypto": "master", "oqs": "master"},
"id": "p6af0b5bd9fd0cd31",
"name": "DaochiClient",
"ref": "970d5e44b1702158cb16469892da6ff50f142427",
"ref": "master",
"url": "https://github.com/ziranlang/daochi-client.git"
},
{
"commit": "3d0c703e3d18b05099d90163189bca51e6820526",
"dependencies": {},
"id": "p6f2473c21fd36924",
"name": "sqlite",
"ref": "master",
"source": true,
"url": "https://github.com/sqlite/sqlite.git"
},
{
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
"dependencies": {"liboqs": "p60ff905f3a963886"},
"dependencies": {"liboqs": "p52c1ebf1bba9ea88"},
"dependency_refs": {"liboqs": "main"},
"id": "p7098ac9cd92f7e5f",
"name": "Oqs",
@@ -118,31 +252,31 @@
"url": "https://github.com/ziranlang/oqs.git"
},
{
"commit": "8b81994303400255ddb0ee2da49044dbaef4397f",
"commit": "b141d9c45db236335351c8a4b2a14b3ade27c937",
"dependencies": {},
"id": "p71f489a3ce887de0",
"name": "practices",
"ref": "master",
"id": "p74ab3cb6eb3b86fa",
"name": "libaom",
"ref": "b141d9c45db236335351c8a4b2a14b3ade27c937",
"source": true,
"url": "https://github.com/waozixyz/practices.git"
"url": "https://aomedia.googlesource.com/aom"
},
{
"commit": "5e609079d1e91699a627b5d938d1fffa4a31ac07",
"dependencies": {"apps": "pf7f4c26f3cf01fbe", "crypto": "pc23fbf455e97614d", "entity": "p507e86a4cf18dc9c", "game2d": "p0e63706817d43aba", "kryon": "pe42819128210d99c", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "3515cdf3af20e79001f7774eed224e94180540ed", "crypto": "master", "entity": "075784438af94fe4a0aba48ed4d8c7208c161bf1", "game2d": "8b5a989dea686250078da2d209fde1cd2946fc77", "kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c", "mingcute": "master"},
"id": "p76764de56f198b2c",
"name": "Apfelwurm",
"ref": "5e609079d1e91699a627b5d938d1fffa4a31ac07",
"url": "https://github.com/waozixyz/wurm.git"
"commit": "71a1b9f397a0941fc1bac58545f7fdb287c15c56",
"dependencies": {"kryon": "p8f647d8005d4c2a7"},
"dependency_refs": {"kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658"},
"id": "p778e65a802124e34",
"name": "Css",
"ref": "71a1b9f397a0941fc1bac58545f7fdb287c15c56",
"url": "https://github.com/kryonlabs/css.git"
},
{
"commit": "5d1ee888094efc63d1fb25a58af93478b103d441",
"dependencies": {},
"id": "p810dc0509cd1b75d",
"name": "sqlite",
"ref": "master",
"source": true,
"url": "https://github.com/sqlite/sqlite.git"
"commit": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"dependency_refs": {"crypto": "master", "oqs": "master"},
"id": "p8204ae87a845c1c3",
"name": "mesh_client",
"ref": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449",
"url": "https://github.com/ziranlang/mesh-client.git"
},
{
"commit": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf",
@@ -153,21 +287,12 @@
"source": true,
"url": "https://github.com/madler/zlib.git"
},
{
"commit": "256fe6ff049d48a25dfe2a8b0db7ad84477fd282",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"dependency_refs": {"crypto": "master", "oqs": "master"},
"id": "p89503086b39ba0fb",
"name": "DaochiClient",
"ref": "master",
"url": "https://github.com/ziranlang/daochi-client.git"
},
{
"commit": "19b299005fbe2d895f4ad525cfdae62a2220c3ea",
"dependencies": {},
"id": "p8da229d15597ab5c",
"name": "curl",
"ref": "master",
"ref": "19b299005fbe2d895f4ad525cfdae62a2220c3ea",
"source": true,
"url": "https://github.com/curl/curl.git"
},
@@ -181,40 +306,85 @@
"url": "https://github.com/raysan5/rini.git"
},
{
"commit": "d167ae4ebd78b91f06fa52da53043807bceff889",
"dependencies": {"apps": "pf7f4c26f3cf01fbe", "crypto": "pc23fbf455e97614d", "entity": "p507e86a4cf18dc9c", "kryon": "pe42819128210d99c", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "3515cdf3af20e79001f7774eed224e94180540ed", "crypto": "944826f70779a6b6cd53f6b06a75b36f4d8a2558", "entity": "075784438af94fe4a0aba48ed4d8c7208c161bf1", "kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c", "mingcute": "master"},
"id": "pa2625f766af74a1b",
"name": "Shovey",
"ref": "d167ae4ebd78b91f06fa52da53043807bceff889",
"url": "https://github.com/waozixyz/shovey.git"
"commit": "1b290f19aa1a4069c908a4687f04458c58a2b658",
"dependencies": {"audio": "pb46a53117b2530ce", "avif": "p274c2dd6d03a7c0c", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f", "sdl3": "p16cd0434af3dff7b", "webp": "pa068bd09450b2a80"},
"dependency_refs": {"audio": "ce5837f80e8ce6cb8d2d9f77915095d764da3485", "avif": "f26a552247e2cd367fd33def6860d903cac6ab8a", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "02145a00a1f0df2a111da04a75f3fef260883897"},
"id": "p8f647d8005d4c2a7",
"name": "kryon",
"ref": "1b290f19aa1a4069c908a4687f04458c58a2b658",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "e3536e6d056961d2ba7fa5f18af81f75c80e8f62",
"dependencies": {"kryon": "pe42819128210d99c"},
"dependency_refs": {"kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c"},
"id": "pa3347b028712cc32",
"name": "Kss",
"ref": "e3536e6d056961d2ba7fa5f18af81f75c80e8f62",
"url": "https://github.com/kryonlabs/kss.git"
"commit": "02145a00a1f0df2a111da04a75f3fef260883897",
"dependencies": {"image_codec": "p69c0e968ae5735d9", "libwebp": "p3b3c785a0e17e605"},
"dependency_refs": {"image_codec": "360553150917f352e49e1beb78917370792ccaef", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339"},
"id": "pa068bd09450b2a80",
"name": "webp",
"ref": "02145a00a1f0df2a111da04a75f3fef260883897",
"url": "https://github.com/ziranlang/webp.git"
},
{
"commit": "3f888653b6b97010163d824c4cc72476be3214f3",
"dependencies": {"kryon": "pe4419a225f95e507"},
"dependency_refs": {"kryon": "master"},
"id": "pab5377a2950368a2",
"name": "plot",
"ref": "master",
"url": "https://github.com/kryonlabs/plot.git"
"commit": "7854da88e219f98264dc41f1e614e4c9d292dded",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "p8f647d8005d4c2a7"},
"dependency_refs": {"crypto": "master", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658"},
"id": "pa25b96ccf3b8fa6f",
"name": "Apps",
"ref": "7854da88e219f98264dc41f1e614e4c9d292dded",
"url": "https://github.com/waozixyz/apps.git"
},
{
"commit": "b6808bea2d4180c43d44173007a3d0cfcbd3c811",
"dependencies": {"apps": "pf7f4c26f3cf01fbe", "entity": "p507e86a4cf18dc9c", "game2d": "p0e63706817d43aba", "kryon": "pe42819128210d99c", "kss": "pa3347b028712cc32", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "3515cdf3af20e79001f7774eed224e94180540ed", "entity": "075784438af94fe4a0aba48ed4d8c7208c161bf1", "game2d": "8b5a989dea686250078da2d209fde1cd2946fc77", "kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c", "kss": "e3536e6d056961d2ba7fa5f18af81f75c80e8f62", "mingcute": "master"},
"id": "pb7041edd93bdf889",
"name": "Choano",
"ref": "b6808bea2d4180c43d44173007a3d0cfcbd3c811",
"url": "https://github.com/waozixyz/choano.git"
"commit": "64aa16fcbba720dac3b1ad65f608a5f2bf02c5b9",
"dependencies": {"apps": "p29c0b4b857b055e5", "crypto": "pc23fbf455e97614d", "entity": "p5c5e82eaccd6199e", "game2d": "p4f2415439a56f364", "kryon": "pd19aad4bd0cc7753", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "7b826f4928cda2bc96c72fd75d710b516f06ebdf", "crypto": "master", "entity": "e743dedc40b6f39b7b6d093d06e870d6c43920ef", "game2d": "56d19eca78b304630961c2ab180ba880b304f741", "kryon": "6816ed78665e10525a3a0a7a43e182f2fa51a0ac", "mingcute": "master"},
"id": "paa7bd5492e81d3ac",
"name": "Apfelwurm",
"ref": "64aa16fcbba720dac3b1ad65f608a5f2bf02c5b9",
"url": "https://git.waozi.xyz/waozi/wurm.git"
},
{
"commit": "2611e727e226a2af22dfb7f10bf224bd2f1a3d30",
"dependencies": {"av1": "p5d7d12505a42f7b3", "dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db"},
"dependency_refs": {"av1": "bd278217e2bac754d868b3d6502eac4257658d4b", "dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199"},
"id": "pb203529d803e73a4",
"name": "avif",
"ref": "2611e727e226a2af22dfb7f10bf224bd2f1a3d30",
"url": "https://github.com/ziranlang/avif.git"
},
{
"commit": "54706fc6bc0cdecab7e9593974a4039cc038fca7",
"dependencies": {},
"id": "pb24767b9eb34d961",
"name": "dav1d",
"ref": "54706fc6bc0cdecab7e9593974a4039cc038fca7",
"source": true,
"url": "https://github.com/videolan/dav1d.git"
},
{
"commit": "fc8f3d899dfc3d3e0b535006526485c6d8c8c279",
"dependencies": {"curl": "p8da229d15597ab5c", "kryon": "p09ea4e5550e9f459", "mesh_client": "p8204ae87a845c1c3", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "kryon": "8d5d2e752a219674f993473c8410847ba42fad48", "mesh_client": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"id": "pb3958804740a96f2",
"name": "Entity",
"ref": "fc8f3d899dfc3d3e0b535006526485c6d8c8c279",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "ce5837f80e8ce6cb8d2d9f77915095d764da3485",
"dependencies": {"dr_libs": "pb7c2dd1c09da0c1c", "libopus": "pe1fe9bbe80bf1d6d", "libsamplerate": "p0dd67588478f9a3e", "stb": "pe4a63e2d6e0424e7"},
"dependency_refs": {"dr_libs": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c", "libopus": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6", "libsamplerate": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7", "stb": "9600522de53973336fa033a289858a4354cbb04c"},
"id": "pb46a53117b2530ce",
"name": "audio",
"ref": "ce5837f80e8ce6cb8d2d9f77915095d764da3485",
"url": "https://github.com/ziranlang/audio.git"
},
{
"commit": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c",
"dependencies": {},
"id": "pb7c2dd1c09da0c1c",
"name": "dr_libs",
"ref": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c",
"source": true,
"url": "https://github.com/mackron/dr_libs.git"
},
{
"commit": "944826f70779a6b6cd53f6b06a75b36f4d8a2558",
@@ -224,6 +394,24 @@
"ref": "master",
"url": "https://github.com/ziranlang/crypto.git"
},
{
"commit": "fb6f021d9a5744aa800da17bb9c0ec5b6238c088",
"dependencies": {},
"id": "pc2505b60ef1baedd",
"name": "curl",
"ref": "master",
"source": true,
"url": "https://github.com/curl/curl.git"
},
{
"commit": "fcacb49c1e128e9eb100884e6029b24b4e608d38",
"dependencies": {"kryon": "p09ea4e5550e9f459"},
"dependency_refs": {"kryon": "8d5d2e752a219674f993473c8410847ba42fad48"},
"id": "pcad095808686987d",
"name": "Game2D",
"ref": "fcacb49c1e128e9eb100884e6029b24b4e608d38",
"url": "https://github.com/kryonlabs/game2d.git"
},
{
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"dependencies": {},
@@ -233,6 +421,15 @@
"source": true,
"url": "https://github.com/raysan5/raylib.git"
},
{
"commit": "6816ed78665e10525a3a0a7a43e182f2fa51a0ac",
"dependencies": {"audio": "p59deb49c7f103127", "avif": "pb203529d803e73a4", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "sdl3": "p16cd0434af3dff7b", "webp": "p2af20e0c835b1c63"},
"dependency_refs": {"audio": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2", "avif": "2611e727e226a2af22dfb7f10bf224bd2f1a3d30", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "ec6ed304767e10c125ab2820f3b01d6fd773e147"},
"id": "pd19aad4bd0cc7753",
"name": "kryon",
"ref": "6816ed78665e10525a3a0a7a43e182f2fa51a0ac",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
"dependencies": {},
@@ -242,59 +439,59 @@
"url": "https://github.com/kryonlabs/mingcute.git"
},
{
"commit": "1cd873fda5d12cd4dd562956da94cee33c3e364c",
"dependencies": {"libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f", "sdl3": "p16cd0434af3dff7b"},
"dependency_refs": {"libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e", "sdl3": "829a65d769d935c4852f8159e964312c0957260a"},
"id": "pe42819128210d99c",
"name": "kryon",
"ref": "1cd873fda5d12cd4dd562956da94cee33c3e364c",
"url": "https://github.com/kryonlabs/kryon.git"
"commit": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6",
"dependencies": {},
"id": "pe1fe9bbe80bf1d6d",
"name": "libopus",
"ref": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6",
"source": true,
"url": "https://github.com/xiph/opus.git"
},
{
"commit": "7865957626e67e6c291e3db3b474c6082691d6c6",
"dependencies": {"libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f", "sdl3": "p16cd0434af3dff7b"},
"dependency_refs": {"libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e", "sdl3": "829a65d769d935c4852f8159e964312c0957260a"},
"id": "pe4419a225f95e507",
"name": "kryon",
"commit": "9600522de53973336fa033a289858a4354cbb04c",
"dependencies": {},
"id": "pe4a63e2d6e0424e7",
"name": "stb",
"ref": "9600522de53973336fa033a289858a4354cbb04c",
"source": true,
"url": "https://github.com/nothings/stb.git"
},
{
"commit": "1a18c5976aec4c9bbe873ecd98048820c3881a60",
"dependencies": {"apps": "pa25b96ccf3b8fa6f", "arcade": "p3bbb7ef5867e6b62", "crypto": "pc23fbf455e97614d", "css": "p778e65a802124e34", "curl": "pc2505b60ef1baedd", "daochi_client": "p6af0b5bd9fd0cd31", "entity": "p2d4cf957ef890a17", "game2d": "p449499e1e80e72a7", "kryon": "p8f647d8005d4c2a7", "liboqs": "p5c52c96443a2bf32", "mingcute": "pe1027b9d16704793", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "plot": "p137c96bd0c9223a3", "practices": "pf6b6695162f3781e", "qrcode": "p0dfa70137405b096", "rini": "p8ea355e8cb04093e", "sqlite": "p6f2473c21fd36924"},
"dependency_refs": {"apps": "7854da88e219f98264dc41f1e614e4c9d292dded", "arcade": "712e99ed57a0b1f03ddb21dcd02d9ecd8b7d82e7", "crypto": "master", "css": "71a1b9f397a0941fc1bac58545f7fdb287c15c56", "curl": "master", "daochi_client": "master", "entity": "d9c0c38bf041e97959170c48d1fc408524445a34", "game2d": "5b8007aefac5518564c61aec7409d87d87e5c0ac", "kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658", "liboqs": "7bf154f197696f5bf04be2ea4c576db86bb6a238", "mingcute": "master", "monocypher": "master", "oqs": "master", "plot": "b1e9b025121adba80b931b9ec30754917815584b", "practices": "893e5b6f58aae7450a5f68ec153cfe1ee3f84c8d", "qrcode": "master", "rini": "main", "sqlite": "master"},
"id": "pe8884574da361bff",
"name": "Inbe",
"ref": "master",
"url": "https://github.com/kryonlabs/kryon.git"
"url": "https://github.com/waozixyz/inbe.git"
},
{
"commit": "7e39f9fa43e0bde4bcc2426c79579e4f16c3749a",
"dependencies": {"curl": "p8da229d15597ab5c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pe4419a225f95e507", "monocypher": "p002f6ed23e3a3576", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"},
"dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "7865957626e67e6c291e3db3b474c6082691d6c6", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"},
"id": "peb3fb337c2b79068",
"name": "Entity",
"ref": "master",
"url": "https://github.com/waozixyz/entity.git"
"commit": "5d93a77a67b5f1cb799ffb59684fdb143af50264",
"dependencies": {"apps": "pa25b96ccf3b8fa6f", "crypto": "pc23fbf455e97614d", "entity": "p2d4cf957ef890a17", "kryon": "p8f647d8005d4c2a7", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"apps": "7854da88e219f98264dc41f1e614e4c9d292dded", "crypto": "944826f70779a6b6cd53f6b06a75b36f4d8a2558", "entity": "d9c0c38bf041e97959170c48d1fc408524445a34", "kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658", "mingcute": "master"},
"id": "pf3361a46d93f0525",
"name": "Shovey",
"ref": "5d93a77a67b5f1cb799ffb59684fdb143af50264",
"url": "https://github.com/waozixyz/shovey.git"
},
{
"commit": "cee04692f3461dcb098833472f071c434980debb",
"dependencies": {"kryon": "pe4419a225f95e507"},
"dependency_refs": {"kryon": "master"},
"id": "pf2f54c7603f6e861",
"name": "Game2D",
"ref": "master",
"url": "https://github.com/kryonlabs/game2d.git"
},
{
"commit": "3515cdf3af20e79001f7774eed224e94180540ed",
"dependencies": {"crypto": "pc23fbf455e97614d", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "pe42819128210d99c"},
"dependency_refs": {"crypto": "master", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c"},
"id": "pf7f4c26f3cf01fbe",
"name": "Apps",
"ref": "3515cdf3af20e79001f7774eed224e94180540ed",
"url": "https://github.com/waozixyz/apps.git"
"commit": "893e5b6f58aae7450a5f68ec153cfe1ee3f84c8d",
"dependencies": {},
"id": "pf6b6695162f3781e",
"name": "practices",
"ref": "893e5b6f58aae7450a5f68ec153cfe1ee3f84c8d",
"source": true,
"url": "https://github.com/waozixyz/practices.git"
}
],
"root": {
"dependencies": {"apps": "pf7f4c26f3cf01fbe", "choano": "pb7041edd93bdf889", "daochi_client": "p6af0b5bd9fd0cd31", "entity": "p507e86a4cf18dc9c", "game2d": "p0e63706817d43aba", "inbe": "p183b01bccc6424e7", "kryon": "pe42819128210d99c", "kss": "pa3347b028712cc32", "mingcute": "pe1027b9d16704793", "shovey": "pa2625f766af74a1b", "wurm": "p76764de56f198b2c", "wurm_art": "p02e33d091b212961"},
"dependency_refs": {"apps": "3515cdf3af20e79001f7774eed224e94180540ed", "choano": "b6808bea2d4180c43d44173007a3d0cfcbd3c811", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "entity": "075784438af94fe4a0aba48ed4d8c7208c161bf1", "game2d": "8b5a989dea686250078da2d209fde1cd2946fc77", "inbe": "master", "kryon": "1cd873fda5d12cd4dd562956da94cee33c3e364c", "kss": "e3536e6d056961d2ba7fa5f18af81f75c80e8f62", "mingcute": "master", "shovey": "d167ae4ebd78b91f06fa52da53043807bceff889", "wurm": "5e609079d1e91699a627b5d938d1fffa4a31ac07", "wurm_art": "5e609079d1e91699a627b5d938d1fffa4a31ac07"},
"dependencies": {"apps": "pa25b96ccf3b8fa6f", "choano": "p1081a753e68847db", "css": "p778e65a802124e34", "daochi_client": "p6af0b5bd9fd0cd31", "entity": "p2d4cf957ef890a17", "game2d": "p449499e1e80e72a7", "inbe": "pe8884574da361bff", "kryon": "p8f647d8005d4c2a7", "liboqs": "p5c52c96443a2bf32", "mingcute": "pe1027b9d16704793", "shovey": "pf3361a46d93f0525", "wurm": "paa7bd5492e81d3ac", "wurm_art": "p02e33d091b212961"},
"dependency_refs": {"apps": "7854da88e219f98264dc41f1e614e4c9d292dded", "choano": "106be8ab7e915f618fa3fd3a6df296dc0a319beb", "css": "71a1b9f397a0941fc1bac58545f7fdb287c15c56", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "entity": "d9c0c38bf041e97959170c48d1fc408524445a34", "game2d": "5b8007aefac5518564c61aec7409d87d87e5c0ac", "inbe": "master", "kryon": "1b290f19aa1a4069c908a4687f04458c58a2b658", "liboqs": "7bf154f197696f5bf04be2ea4c576db86bb6a238", "mingcute": "master", "shovey": "5d93a77a67b5f1cb799ffb59684fdb143af50264", "wurm": "64aa16fcbba720dac3b1ad65f608a5f2bf02c5b9", "wurm_art": "5e609079d1e91699a627b5d938d1fffa4a31ac07"},
"name": "Arcade"
},
"toolchain": {
"commit": "e4e8efa4a92f36e2fb0cea1d56b11471afa68621",
"ref": "e4e8efa4a92f36e2fb0cea1d56b11471afa68621",
"commit": "d17c7aa1e093066ef03f307a45f6966dd9b29d4b",
"ref": "d17c7aa1e093066ef03f307a45f6966dd9b29d4b",
"url": "https://github.com/ziranlang/ziran.git"
}
}
+20 -13
View File
@@ -7,7 +7,7 @@ bridge_modules = ["app"]
[toolchain]
git = "https://github.com/ziranlang/ziran.git"
ref = "e4e8efa4a92f36e2fb0cea1d56b11471afa68621"
ref = "d17c7aa1e093066ef03f307a45f6966dd9b29d4b"
[install]
bin = "arcade"
@@ -29,17 +29,17 @@ abis = "arm64-v8a,x86_64"
[dependencies.kryon]
git = "https://github.com/kryonlabs/kryon.git"
ref = "1cd873fda5d12cd4dd562956da94cee33c3e364c"
ref = "1b290f19aa1a4069c908a4687f04458c58a2b658"
[dependencies.apps]
git = "https://github.com/waozixyz/apps.git"
# Use the shared controller reviewed with the supported collection host.
ref = "3515cdf3af20e79001f7774eed224e94180540ed"
ref = "7854da88e219f98264dc41f1e614e4c9d292dded"
# Shovey's editions and editor are available as separate downloads.
[dependencies.shovey]
git = "https://github.com/waozixyz/shovey.git"
ref = "d167ae4ebd78b91f06fa52da53043807bceff889"
ref = "5d93a77a67b5f1cb799ffb59684fdb143af50264"
# Compatibility tooling runs Inner Breeze's host checks; releases check its publisher pins.
[dependencies.inbe]
@@ -48,23 +48,23 @@ ref = "master"
[dependencies.entity]
git = "https://github.com/waozixyz/entity.git"
ref = "075784438af94fe4a0aba48ed4d8c7208c161bf1"
ref = "d9c0c38bf041e97959170c48d1fc408524445a34"
[dependencies.mingcute]
git = "https://github.com/kryonlabs/mingcute.git"
ref = "master"
[dependencies.wurm]
git = "https://github.com/waozixyz/wurm.git"
ref = "5e609079d1e91699a627b5d938d1fffa4a31ac07"
git = "https://git.waozi.xyz/waozi/wurm.git"
ref = "64aa16fcbba720dac3b1ad65f608a5f2bf02c5b9"
[dependencies.game2d]
git = "https://github.com/kryonlabs/game2d.git"
ref = "8b5a989dea686250078da2d209fde1cd2946fc77"
ref = "5b8007aefac5518564c61aec7409d87d87e5c0ac"
[dependencies.choano]
git = "https://github.com/waozixyz/choano.git"
ref = "b6808bea2d4180c43d44173007a3d0cfcbd3c811"
git = "https://git.waozi.xyz/waozi/choano.git"
ref = "106be8ab7e915f618fa3fd3a6df296dc0a319beb"
# Library art can advance independently of the tested game payload.
[dependencies.wurm_art]
@@ -76,6 +76,13 @@ source = true
git = "https://github.com/ziranlang/daochi-client.git"
ref = "970d5e44b1702158cb16469892da6ff50f142427"
[dependencies.kss]
git = "https://github.com/kryonlabs/kss.git"
ref = "e3536e6d056961d2ba7fa5f18af81f75c80e8f62"
[dependencies.css]
git = "https://github.com/kryonlabs/css.git"
ref = "71a1b9f397a0941fc1bac58545f7fdb287c15c56"
# Native hosts build with the liboqs Inner Breeze tests; its graph also
# carries an older liboqs pin, so name this one directly.
[dependencies.liboqs]
git = "https://github.com/open-quantum-safe/liboqs.git"
ref = "7bf154f197696f5bf04be2ea4c576db86bb6a238"
source = true