Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45bbb923ca | ||
|
|
e41df5dcc6 | ||
|
|
67d63c9cb6 | ||
|
|
55e654508d | ||
|
|
20edc6db9c | ||
|
|
f8426f7c73 | ||
|
|
09f2aa86c9 | ||
|
|
e8594214a6 | ||
|
|
e3481ba30f | ||
|
|
5841794413 | ||
|
|
549872d581 | ||
|
|
89d356040d | ||
|
|
02601a6696 | ||
|
|
9216224da7 | ||
|
|
70b05d585e | ||
|
|
2760ba162a | ||
|
|
3d5661f1a4 | ||
|
|
10feef0941 | ||
|
|
4e2119ac22 | ||
|
|
2e2bae31f3 | ||
|
|
7ccefe55da | ||
|
|
a76516a5d3 | ||
|
|
1b12719e11 | ||
|
|
3a62cd55b6 | ||
|
|
a0f8946692 | ||
|
|
fb5d8d0af8 | ||
|
|
37f11bfe0b | ||
|
|
f687a500e7 | ||
|
|
7d5789d34d | ||
|
|
732f28e025 | ||
|
|
f4725cbf21 | ||
|
|
f52111be88 | ||
|
|
cd64689a93 | ||
|
|
d53446a2a6 | ||
|
|
e6aa902016 | ||
|
|
bfd38fca73 | ||
|
|
0788c12f40 | ||
|
|
3c405887b8 | ||
|
|
0c747f2c49 | ||
|
|
bc5606e32c | ||
|
|
37a0d8b0a7 | ||
|
|
8452563b03 | ||
|
|
96932541db | ||
|
|
a442fe0621 | ||
|
|
d6ebf18af2 | ||
|
|
84b3fd552a | ||
|
|
1239df4855 | ||
|
|
476e38ca41 | ||
|
|
0b07d0d374 | ||
|
|
48d2216394 | ||
|
|
bd5f4a4ccb | ||
|
|
9d050ff20b | ||
|
|
6e835a5dad | ||
|
|
4592ce5d95 | ||
|
|
1889eff0b7 | ||
|
|
e4c52c82fe | ||
|
|
3fa55eb32f | ||
|
|
11fce1e7db | ||
|
|
3616bce66d | ||
|
|
de3144d420 | ||
|
|
34768b446a | ||
|
|
465a962f58 |
No files matched your search
@@ -6,6 +6,8 @@ name: Game updates
|
||||
# commits the new Arcade version and attaches its catalog and game archive to
|
||||
# the node-arcade-VERSION release. Inner Breeze's node follower then signs
|
||||
# that release and publishes it to Waozi's node, where Arcade downloads games.
|
||||
# A game's release workflow starts this at once; the timer is the fallback,
|
||||
# since GitHub runs scheduled workflows hours late.
|
||||
on:
|
||||
schedule:
|
||||
- cron: '7,22,37,52 * * * *'
|
||||
@@ -29,13 +31,15 @@ jobs:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
path: waozixyz/arcade
|
||||
- name: Pin the latest game releases
|
||||
id: pin
|
||||
- name: Check release following
|
||||
run: python3 tests/game_updates_test.py
|
||||
- name: Find newer game releases
|
||||
id: updates
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
python3 scripts/follow-game-releases.py pin
|
||||
if git diff --quiet -- ziran.lock; then
|
||||
python3 scripts/follow-game-releases.py check
|
||||
if [ "$(python3 -c 'import json; print(len(json.load(open("build/game-updates.json"))))')" = 0 ]; then
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
echo "Arcade already pins every game's latest release."
|
||||
exit 0
|
||||
@@ -44,37 +48,48 @@ jobs:
|
||||
python3 - <<'PY' >> "$GITHUB_OUTPUT"
|
||||
import json
|
||||
lock = json.load(open('ziran.lock'))
|
||||
shovey = lock['root']['dependencies']['shovey']
|
||||
print('toolchain=' + lock['toolchain']['commit'])
|
||||
PY
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
with:
|
||||
repository: ziranlang/ziran
|
||||
ref: ${{ steps.updates.outputs.toolchain }}
|
||||
path: ziranlang/ziran
|
||||
- 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
|
||||
- name: Build the locked toolchain and pin game dependencies
|
||||
id: pin
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
make -j2 -C ../../ziranlang/ziran
|
||||
echo "$GITHUB_WORKSPACE/ziranlang/ziran/build/bin" >> "$GITHUB_PATH"
|
||||
python3 scripts/follow-game-releases.py pin --ziran ../../ziranlang/ziran/build/bin/ziran
|
||||
python3 - <<'PY' >> "$GITHUB_OUTPUT"
|
||||
import json
|
||||
lock = json.load(open('ziran.lock'))
|
||||
shovey = lock['root']['dependencies']['shovey']
|
||||
print('shovey=' + next(p['commit'] for p in lock['packages'] if p['id'] == shovey))
|
||||
PY
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
with:
|
||||
repository: ziranlang/ziran
|
||||
ref: ${{ steps.pin.outputs.toolchain }}
|
||||
path: ziranlang/ziran
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
with:
|
||||
repository: waozixyz/shovey
|
||||
ref: ${{ steps.pin.outputs.shovey }}
|
||||
path: waozixyz/shovey
|
||||
- name: Install build dependencies
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
working-directory: .
|
||||
run: sh ziranlang/ziran/scripts/ci_packages.sh build-essential python3-pil python3-cryptography
|
||||
- name: Build the locked toolchain and fetch packages
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
- name: Fetch the updated packages
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
run: |
|
||||
make -j2 -C ../../ziranlang/ziran
|
||||
echo "$GITHUB_WORKSPACE/ziranlang/ziran/build/bin" >> "$GITHUB_PATH"
|
||||
# The game is generated in its own checkout at the pinned release.
|
||||
printf '[overrides]\nshovey = "../shovey"\nziran = "../../ziranlang/ziran"\n' > ziran.local.toml
|
||||
../../ziranlang/ziran/build/bin/ziran fetch
|
||||
- name: Write the Arcade release
|
||||
id: release
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
run: |
|
||||
python3 scripts/follow-game-releases.py changelog --ziran ../../ziranlang/ziran/build/bin/ziran
|
||||
sh update_version.sh
|
||||
@@ -82,7 +97,7 @@ jobs:
|
||||
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
|
||||
head -12 CHANGELOG.md
|
||||
- name: Build and check the collection
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
run: |
|
||||
make -C ../shovey levels landscape
|
||||
make collection
|
||||
@@ -90,18 +105,18 @@ jobs:
|
||||
python3 tests/publisher_test.py
|
||||
- name: Commit the release
|
||||
id: commit
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
env:
|
||||
VERSION: ${{ steps.release.outputs.version }}
|
||||
run: |
|
||||
git config user.name Waozi
|
||||
git config user.email [email protected]
|
||||
git add ziran.lock CHANGELOG.md VERSION apps/versions.json assets/arcade/library
|
||||
git add ziran.toml ziran.lock CHANGELOG.md VERSION apps/versions.json assets/arcade/library
|
||||
git commit -q -m "Release Arcade $VERSION with the latest game releases"
|
||||
git push origin HEAD:master
|
||||
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||
- name: Attach the checked catalog and game archive
|
||||
if: steps.pin.outputs.changed == 'true'
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VERSION: ${{ steps.release.outputs.version }}
|
||||
@@ -112,3 +127,17 @@ jobs:
|
||||
--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)"
|
||||
# Breeze's node follower signs this release and publishes it to the
|
||||
# node now, not at its next timer. RELEASE_FOLLOW_TOKEN may only start
|
||||
# workflows in Arcade and Breeze; the follower takes no input and
|
||||
# checks Arcade's newest release itself. Without it the timer follows.
|
||||
- name: Start the node follower
|
||||
if: steps.updates.outputs.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.RELEASE_FOLLOW_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$GH_TOKEN" ]; then
|
||||
echo "No RELEASE_FOLLOW_TOKEN: Breeze's node follower picks this release up on its timer."
|
||||
exit 0
|
||||
fi
|
||||
gh workflow run node-app-follow.yml -R waozixyz/breeze --ref master
|
||||
@@ -1,5 +1,134 @@
|
||||
# Arcade changelog
|
||||
|
||||
## 0.7.105
|
||||
|
||||
- Apfelwurm 0.2.22: Keep the leaderboard visible when you or a friend uses a special Wurm skin.
|
||||
|
||||
## 0.7.104
|
||||
|
||||
- Apfelwurm 0.2.12: Download the Google Play edition as a separate `-gplay.apk`. The standard and F-Droid APKs exclude Google libraries and keep Monero top-ups.
|
||||
|
||||
## 0.7.103
|
||||
|
||||
- Apfelwurm 0.2.11: Buy a small 10 Dew pack in the Google Play edition and see each larger pack’s savings per Dew.
|
||||
|
||||
## 0.7.102
|
||||
|
||||
- Update Apfelwurm and Shovey with a small 10 Dew pack and visible larger-pack savings in their Google Play editions.
|
||||
|
||||
## 0.7.101
|
||||
|
||||
- Apfelwurm 0.2.10: Keep signed-in progress and unfinished runs after closing or updating Apfelwurm inside Arcade and Breeze.
|
||||
- Apfelwurm 0.2.10: Restore earned unlocks from older account saves without changing completed levels or the current run.
|
||||
- Apfelwurm 0.2.10: Give Apfelwurm its own Android launcher icon.
|
||||
|
||||
## 0.7.100
|
||||
|
||||
- Apfelwurm 0.2.9: More portal rooms in the mountains: five more boards have a walled corner room whose doorway closes, so a ring is the only way in, and boards there that bring portals use their room. Seven of the last twenty boards now have a portal room.
|
||||
|
||||
## 0.7.99
|
||||
|
||||
- Shovey 0.6.158: In the Google Play version, buy Dew in Profile through Google Play.
|
||||
- Shovey 0.6.158: Pip explains wooden doors when Shovey walks up to one, rather than when the level starts.
|
||||
- Apfelwurm 0.2.8: After the meadow, a new idea arrives every few dozen levels and keeps coming back: squirrels that dash and sit from level 45, hedgehogs that curl into a spiky ball as you come close from 85, keys that open a gate from 101, frogs that hop two tiles from 125, switch stones that open and close a gate from 141, rolling stones from 165 and portal rooms, reached only through a ring, from 181.
|
||||
- Apfelwurm 0.2.8: Each new idea takes every other board for ten levels. After that, the ideas you have met take turns, with no more than two plain boards in a row.
|
||||
- Apfelwurm 0.2.8: A gate closes a doorway up to four tiles wide. Its key opens it for good and is worth 2 points; a switch stone flips it each time you arrive on it. Boards with a gate or a portal room score more.
|
||||
- Apfelwurm 0.2.8: New pictures for the squirrel, hedgehog, frog, rolling stone, key, switch stone and gate.
|
||||
|
||||
## 0.7.98
|
||||
|
||||
- Shovey 0.6.158: In the Google Play version, buy Dew in Profile through Google Play.
|
||||
- Shovey 0.6.158: Pip explains wooden doors when Shovey walks up to one, rather than when the level starts.
|
||||
|
||||
## 0.7.97
|
||||
|
||||
- Apfelwurm 0.2.6: Glowing portals arrive from level 61: first on a few boards, then more often, with two pairs late in the mountains. Steer into one ring to come out of its partner, keeping your direction. Each ring stands in open ground, so you can always go around it.
|
||||
- Apfelwurm 0.2.6: See your best run on the Profile leaderboard: the furthest level you reached and your highest score, as separate Level and Score columns ranked against your friends.
|
||||
- Apfelwurm 0.2.6: Sign in once for every waozi.xyz site: a profile signed in on Arcade, Dew or here is used by the others in the same browser.
|
||||
- Apfelwurm 0.2.6: Buy Dew inside the Google Play version through Google Play, priced in your own currency. The direct download and F-Droid versions keep buying Dew with Monero.
|
||||
- Apfelwurm 0.2.6: The privacy page explains Google Play purchases and how to delete your account.
|
||||
|
||||
## 0.7.96
|
||||
|
||||
- Shovey 0.6.157: Pip's tips keep what he points at in view: his card moves under the top bar when it would cover it, such as the home in level 1.
|
||||
- Apfelwurm 0.2.4: Play on the whole page at wurm.waozi.xyz, without a title bar above the game.
|
||||
|
||||
## 0.7.95
|
||||
|
||||
- Shovey 0.6.157: Pip's tips keep what he points at in view: his card moves under the top bar when it would cover it, such as the home in level 1.
|
||||
|
||||
## 0.7.94
|
||||
|
||||
- The library's game covers download about four times faster.
|
||||
|
||||
## 0.7.93
|
||||
|
||||
- Shovey 0.6.156: Finishing all 175 levels opens a reward window: press Claim to get your Dew. The first 10 players to finish get 100 Dew, the next 20 get 50, players up to the 100th get 20, and everyone after gets 5.
|
||||
|
||||
## 0.7.92
|
||||
|
||||
- Shovey 0.6.156: Finishing all 175 levels opens a reward window: press Claim to get your Dew. The first 10 players to finish get 100 Dew, the next 20 get 50, players up to the 100th get 20, and everyone after gets 5.
|
||||
|
||||
## 0.7.91
|
||||
|
||||
- Shovey 0.6.155: Set an account alias with capitals, an @ or spaces; a taken alias now says so.
|
||||
- Apfelwurm 0.2.2: Set an account alias with capitals, an @ or spaces; a taken alias now says so.
|
||||
|
||||
## 0.7.90
|
||||
|
||||
- Set an account alias with capitals, an @ or spaces; a taken alias now says so.
|
||||
- Shovey 0.6.155: Set an account alias with capitals, an @ or spaces; a taken alias now says so.
|
||||
|
||||
## 0.7.89
|
||||
|
||||
- Apfelwurm 0.2.1: Use Arcade or Inner Breeze's Profile, Dew and navigation when playing inside them, without duplicate title controls or an extra Back button.
|
||||
- Apfelwurm 0.2.1: Open the shared Profile reliably from the skin shop's sign-in button.
|
||||
|
||||
## 0.7.88
|
||||
|
||||
- Apfelwurm 0.2.0: Play with softer Dusk, Forest and Sage themes, with saved sound and control settings.
|
||||
- Apfelwurm 0.2.0: See a continuous painted meadow instead of a repeating grass grid, and clear Profile and Dew icons on the title.
|
||||
- Apfelwurm 0.2.0: Sign in through the shared Profile to sync completed levels, playtime, settings and your chosen character across devices.
|
||||
- Apfelwurm 0.2.0: Browse the skin shop from the title beside Profile and your Dew balance. Mint, Berry and Rose cost 10, 20 and 30 Dew, with confirmation before buying.
|
||||
- Apfelwurm 0.2.0: Earn Night owl after five hours of active play, Golden apple by reaching level 40, and Explorer by visiting waozi.xyz. Purchased skins belong to your account.
|
||||
- Apfelwurm 0.2.0: Unlock all 200 levels by playing. The mobile selector shows large previews for unlocked levels and only a lock for later ones. Dew is used for optional cosmetics.
|
||||
|
||||
## 0.7.87
|
||||
|
||||
- Open the game library faster with smaller cached cover thumbnails for every game.
|
||||
- Keep covers sharp and logos transparent while downloading much less artwork.
|
||||
|
||||
## 0.7.86
|
||||
|
||||
- Shovey 0.6.154: Keep opened chests open across restarts and account sync; show the blue Dew diamond only while their reward is unclaimed.
|
||||
- Shovey 0.6.154: Show an empty open chest after its Dew is claimed.
|
||||
- Shovey 0.6.154: Use corrected campaign boards after an update, including level 29 when an older campaign was cached offline.
|
||||
|
||||
## 0.7.85
|
||||
|
||||
- Shovey keeps opened and claimed chests synchronized, with a blue diamond only for an unclaimed reward.
|
||||
- Shovey uses corrected boards after an update instead of an older cached campaign.
|
||||
- Apfelwurm shows level previews only after they are unlocked.
|
||||
|
||||
## 0.7.84
|
||||
|
||||
- Complete automatic reward recovery for older Shovey saves.
|
||||
|
||||
## 0.7.83
|
||||
|
||||
- Preserve earned Shovey reward eligibility when upgrading older synced saves.
|
||||
|
||||
## 0.7.82
|
||||
|
||||
- Apfelwurm 0.1.6: Try again after game over starts the furthest unlocked level with three lives and a fresh score.
|
||||
- Apfelwurm 0.1.6: Choose level from the title to browse all five landscapes, preview each board and replay any unlocked level. Future levels remain locked until you reach them.
|
||||
- Apfelwurm 0.1.6: Use Escape to pause or go back in the browser without stopping the game.
|
||||
|
||||
## 0.7.81
|
||||
|
||||
- Update Shovey to the approved campaign and solve puzzles using wooden crates as water bridges.
|
||||
- Shovey Editor recognizes device unlocks, returns to the title, accepts right-click movement and shows a clearer object palette.
|
||||
|
||||
## 0.7.80
|
||||
|
||||
- Keep games covered until their first board is ready and keep complete pictures visible while animation sprites load.
|
||||
|
||||
@@ -54,11 +54,13 @@ run: all
|
||||
./build/arcade
|
||||
|
||||
test: all
|
||||
python3 tests/game_updates_test.py
|
||||
$(ZIRAN) fmt --check src/*.zi apps/chess/*.zi tests/chess_engine_behavior.zi tests/chess_app_behavior.zi
|
||||
python3 tests/chess_locale_test.py
|
||||
INBE_SOURCE='$(INBE_SOURCE)' python3 tests/catalog_test.py
|
||||
python3 tests/publisher_test.py
|
||||
python3 tests/apps_controller_test.py
|
||||
python3 tests/startup_art_test.py
|
||||
./build/arcade --list
|
||||
sh tests/chess_engine_zi_test.sh '$(ZIRAN)'
|
||||
sh tests/chess_app_test.sh '$(ZIRAN)'
|
||||
|
||||
@@ -6,12 +6,14 @@ title-screen covers from the shared Apps controller. Click a cover to open
|
||||
an installed game or download it first. There are no separate launch buttons.
|
||||
Standalone Shovey opens on its own cover carousel;
|
||||
swipe, use the arrows or scroll the wheel to choose, then press Play/Open.
|
||||
Its desktop startup first draws a small full-colour title preview, then uses
|
||||
the original artwork when the collection is ready.
|
||||
Chess is temporarily disabled in Arcade; its code and
|
||||
existing saved games remain available for a later return.
|
||||
Each edition has a separate save and earned unlocks. Unlocked puzzles show
|
||||
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: small copies of each game's art in `assets/arcade/library/` (`python3 scripts/library-art.py` refreshes them when a game's art changes; the build stops until it does). Inner Breeze needs host interface 35 for it. Each game
|
||||
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 covers use thumbnails up to 640 pixels on their longest side, and logos up to 512 pixels, preserving full colours and transparency. Games keep their original artwork. 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 34. Downloaded games work offline;
|
||||
standalone Shovey keeps its complete offline collection. Apfelwurm comes from
|
||||
@@ -198,6 +200,12 @@ puzzle. Shovey also runs as its own desktop app.
|
||||
|
||||
## Shared Entity profile
|
||||
|
||||
Leaderboard is inside the shared Profile, including standalone Arcade and
|
||||
Shovey. Games report their own level totals under their verified identity;
|
||||
Profile shows only games that are installed, with friend rankings for a
|
||||
connected account. Removing a game hides its board while retaining its save
|
||||
and reported score. Account switches keep rankings separate.
|
||||
|
||||
Standalone Shovey's Profile control on its covers opens the shared `entity.zx`
|
||||
supplied by the Entity package. The host keeps account keys and native file
|
||||
access behind Entity's versioned management service. Returning from Profile
|
||||
|
||||
@@ -1 +1 @@
|
||||
a99851fc40d67a8ca820841722ce2ddde5ca51844e0778c4762681570c488289
|
||||
a1b56259e0b8581188459cc366736feacda3969b2db3055e8425a81065b065e1
|
||||
@@ -13,8 +13,8 @@
|
||||
"shovey": {
|
||||
"id": "arcade.shovey",
|
||||
"title": "Shovey",
|
||||
"version": "0.6.149",
|
||||
"sequence": 157,
|
||||
"version": "0.6.159",
|
||||
"sequence": 167,
|
||||
"host_api": 12
|
||||
},
|
||||
"shovey-island": {
|
||||
@@ -27,22 +27,22 @@
|
||||
"shovey-editor": {
|
||||
"id": "arcade.shovey-editor",
|
||||
"title": "Shovey Editor",
|
||||
"version": "0.2.141",
|
||||
"sequence": 143,
|
||||
"version": "0.2.144",
|
||||
"sequence": 146,
|
||||
"host_api": 12
|
||||
},
|
||||
"arcade": {
|
||||
"id": "inbe.arcade",
|
||||
"title": "Arcade",
|
||||
"version": "0.7.80",
|
||||
"sequence": 159,
|
||||
"host_api": 35
|
||||
"version": "0.7.105",
|
||||
"sequence": 184,
|
||||
"host_api": 36
|
||||
},
|
||||
"wurm": {
|
||||
"id": "xyz.waozi.wurm",
|
||||
"title": "Apfelwurm",
|
||||
"version": "0.1.4",
|
||||
"sequence": 3,
|
||||
"version": "0.2.22",
|
||||
"sequence": 17,
|
||||
"host_api": 12
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 376 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 345 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 332 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 561 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 497 KiB |
@@ -50,6 +50,9 @@ Unknown languages fall back to the game's English text.
|
||||
|
||||
Arcade and Inbe still provide separate local/account storage. Sharing one
|
||||
game implementation does not silently merge or migrate their saved games.
|
||||
Host API 36 adds read-only records explicitly exported to verified direct
|
||||
dependencies. Shovey exports its local campaign so Editor can display device
|
||||
unlocks alongside account progress without uploading device-only progress.
|
||||
|
||||
## Updates and publication gate
|
||||
|
||||
|
||||
@@ -22,6 +22,17 @@ def ledger = new groovy.json.JsonSlurper().parse(file('../../apps/versions.json'
|
||||
def appRelease = ledger.node_apps[standaloneShovey ? 'shovey' : 'arcade']
|
||||
|
||||
def appCodegen = envOrProp('KRYON_PROJECT_CODEGEN', 'app.codegen') ?: 'c99'
|
||||
// Kryon's three editions: -Papp.edition=direct (the default), fdroid or gplay.
|
||||
// The Google Play edition adds Kryon's Play Billing (kryon/play_billing), so
|
||||
// Entity sells Dew through Google Play; it needs Android 6 and AndroidX
|
||||
// (-Pandroid.useAndroidX=true). Native code sees GOOGLE_PLAY or FDROID.
|
||||
def appEdition = (project.findProperty('app.edition') ?:
|
||||
(project.findProperty('app.googlePlay') == 'true' ? 'gplay' : 'direct')).toString()
|
||||
if (!(appEdition in ['direct', 'fdroid', 'gplay'])) {
|
||||
throw new GradleException('app.edition must be direct, fdroid or gplay')
|
||||
}
|
||||
def googlePlay = appEdition == 'gplay'
|
||||
def requestedMinSdk = Integer.parseInt((project.findProperty('app.minSdk') ?: '21').toString())
|
||||
def verificationOutput = project.findProperty('app.outputDir')
|
||||
if (verificationOutput != null) { buildDir = file(verificationOutput) }
|
||||
|
||||
@@ -32,7 +43,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId project.findProperty('app.id') ?: (standaloneShovey ? 'xyz.waozi.shovey' : 'xyz.waozi.arcade')
|
||||
minSdk Integer.parseInt((project.findProperty('app.minSdk') ?: '21').toString())
|
||||
minSdk googlePlay ? Math.max(requestedMinSdk, 23) : requestedMinSdk
|
||||
targetSdk 36
|
||||
versionCode Integer.parseInt((project.findProperty('app.versionCode') ?: appRelease.sequence).toString())
|
||||
versionName project.findProperty('app.versionName') ?: appRelease.version
|
||||
@@ -47,7 +58,8 @@ android {
|
||||
'-DZIRAN_DIR=' + ziranDir,
|
||||
'-DRAYLIB_DIR=' + raylibDir,
|
||||
'-DAPP_CODEGEN=' + appCodegen,
|
||||
'-DSHOVEY_STANDALONE=' + (standaloneShovey ? 'ON' : 'OFF')
|
||||
'-DSHOVEY_STANDALONE=' + (standaloneShovey ? 'ON' : 'OFF'),
|
||||
'-DAPP_EDITION=' + appEdition
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,6 +85,11 @@ android {
|
||||
sourceSets.release.manifest.srcFile 'src/zx/AndroidManifest.xml'
|
||||
}
|
||||
|
||||
if (googlePlay) {
|
||||
// Kryon's Play Billing class, from the Kryon checkout this build uses.
|
||||
sourceSets.main.java.srcDir "${kryonDir}/templates/droid/droid/app/src/gplay/java"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
@@ -80,6 +97,15 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
if (googlePlay) {
|
||||
implementation 'com.android.billingclient:billing:9.1.0'
|
||||
// Billing's AndroidX libraries mix Kotlin 1.6 and 1.8 standard
|
||||
// libraries; one Kotlin version keeps their classes from colliding.
|
||||
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.22')
|
||||
}
|
||||
}
|
||||
|
||||
// The shared profile is a host asset, never a child of a game collection.
|
||||
tasks.register('prepareEntity', Exec) {
|
||||
workingDir file('../..')
|
||||
|
||||
@@ -26,6 +26,12 @@ set(APP_ZIRAN_DEFINES --define ANDROID_BUILD)
|
||||
if(SHOVEY_STANDALONE)
|
||||
list(APPEND APP_ZIRAN_DEFINES --define SHOVEY_STANDALONE)
|
||||
endif()
|
||||
# The app's edition (build.gradle app.edition): Google Play or F-Droid.
|
||||
if(APP_EDITION STREQUAL "gplay")
|
||||
list(APPEND APP_ZIRAN_DEFINES --define GOOGLE_PLAY)
|
||||
elseif(APP_EDITION STREQUAL "fdroid")
|
||||
list(APPEND APP_ZIRAN_DEFINES --define FDROID)
|
||||
endif()
|
||||
if(NOT DEFINED APP_CODEGEN)
|
||||
set(APP_CODEGEN c99)
|
||||
endif()
|
||||
|
||||
@@ -17,7 +17,8 @@ def package(name):
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--release', action='store_true', help='Build an unsigned release APK for the release signer')
|
||||
parser.add_argument('--bundle', action='store_true', help='Build an unsigned release Android App Bundle for Google Play')
|
||||
parser.add_argument('--bundle', action='store_true',
|
||||
help="Build the Google Play edition's unsigned release Android App Bundle")
|
||||
parser.add_argument('--application-id', help='Use an isolated package for device tests')
|
||||
parser.add_argument('--abis', default='arm64-v8a,armeabi-v7a', help='Native ABIs to build')
|
||||
parser.add_argument('--build-dir', type=Path, help='Separate Gradle and CMake output for verification')
|
||||
@@ -54,6 +55,9 @@ def main():
|
||||
'-Papp.versionName=' + metadata['version'], '-Papp.versionCode=' + str(release['sequence']),
|
||||
'-Pandroid.aapt2FromMavenOverride=' + str(sdk / 'build-tools/36.0.0/aapt2'),
|
||||
'bundleRelease' if args.bundle else 'assembleRelease' if args.release else 'assembleDebug']
|
||||
# Kryon's Google Play edition adds Play Billing, so Dew is bought through Play.
|
||||
if args.bundle:
|
||||
command[-1:-1] = ['-Papp.edition=gplay', '-Pandroid.useAndroidX=true']
|
||||
if args.application_id:
|
||||
command.insert(-1, '-Papp.id=' + args.application_id)
|
||||
if args.build_dir:
|
||||
|
||||
@@ -22,15 +22,18 @@ def digest(path):
|
||||
|
||||
|
||||
def library_art(root, name, key, source):
|
||||
"""Arcade's committed small copy of a game's art (scripts/library-art.py).
|
||||
The library shows art, the games download separately: never pack the
|
||||
packages' full-size images, and never pack a copy of outdated art."""
|
||||
"""Arcade's committed library thumbnail (scripts/library-art.py), as
|
||||
(bytes, suffix): a PNG, or a JPEG for opaque cover art. Never pack a copy
|
||||
of outdated art."""
|
||||
library = Path(root) / "assets/arcade/library"
|
||||
sources = json.loads((library / "sources.json").read_text())
|
||||
copy = f"{name}-{key}"
|
||||
if sources.get(copy, {}).get("source_sha256") != hashlib.sha256(source).hexdigest():
|
||||
raise ValueError(f"{copy} art changed; run scripts/library-art.py")
|
||||
return (library / f"{copy}.png").read_bytes()
|
||||
for suffix in (".png", ".jpg"):
|
||||
if (library / (copy + suffix)).is_file():
|
||||
return (library / (copy + suffix)).read_bytes(), suffix
|
||||
raise ValueError(f"{copy} has no library copy; run scripts/library-art.py")
|
||||
|
||||
|
||||
def stage(root, controller, expected_controller_digest, output):
|
||||
@@ -39,8 +42,9 @@ def stage(root, controller, expected_controller_digest, output):
|
||||
if not re.fullmatch(r"[0-9a-f]{64}", expected_controller_digest):
|
||||
raise ValueError("An exact trusted Apps controller SHA-256 is required")
|
||||
controller_bytes = controller.read_bytes()
|
||||
if hashlib.sha256(controller_bytes).hexdigest() != expected_controller_digest:
|
||||
raise ValueError("Apps controller differs from the trusted SHA-256")
|
||||
controller_digest = hashlib.sha256(controller_bytes).hexdigest()
|
||||
if controller_digest != expected_controller_digest:
|
||||
raise ValueError(f"Apps controller differs from the trusted SHA-256: {controller_digest} != {expected_controller_digest}")
|
||||
packages = declared_packages(root)
|
||||
arcade = packages[0]
|
||||
if not 1 <= sum(len(package["apps"]) for package in packages) <= MAX_GAMES:
|
||||
@@ -76,7 +80,7 @@ def stage(root, controller, expected_controller_digest, output):
|
||||
bundle_bytes, preview_bytes = bundle.read_bytes(), preview.read_bytes()
|
||||
if not bundle_bytes or not preview_bytes:
|
||||
raise ValueError("Game bundles and previews must be built first")
|
||||
preview_bytes = library_art(root, name, "preview", preview_bytes)
|
||||
preview_bytes, preview_suffix = library_art(root, name, "preview", preview_bytes)
|
||||
total += len(bundle_bytes) + len(preview_bytes)
|
||||
child = dict(
|
||||
id=identifier, title=game["title"],
|
||||
@@ -84,11 +88,13 @@ def stage(root, controller, expected_controller_digest, output):
|
||||
expected_id=name, version=component["version"],
|
||||
sha256=hashlib.sha256(bundle_bytes).hexdigest(),
|
||||
bytes=len(bundle_bytes),
|
||||
preview=f"assets/arcade/previews/{name}.png",
|
||||
icon=f"assets/arcade/previews/{name}.png")
|
||||
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'):
|
||||
shared = json.loads((root / 'build/games' / (name + '-resources.json')).read_text())
|
||||
if shared['dependencies'] != app['requires']:
|
||||
@@ -106,8 +112,8 @@ def stage(root, controller, expected_controller_digest, output):
|
||||
relative = Path(cover[key])
|
||||
if relative.is_absolute() or ".." in relative.parts or relative.suffix != ".png":
|
||||
raise ValueError("Invalid cover asset path")
|
||||
contents = library_art(root, name, key, (app["source"] / relative).read_bytes())
|
||||
destination = Path("arcade/covers") / f"{name}-{key}.png"
|
||||
contents, suffix = library_art(root, name, key, (app["source"] / relative).read_bytes())
|
||||
destination = Path("arcade/covers") / f"{name}-{key}{suffix}"
|
||||
packed_cover[key] = "assets/" + destination.as_posix()
|
||||
copies.append((contents, destination))
|
||||
total += len(contents)
|
||||
@@ -115,7 +121,7 @@ def stage(root, controller, expected_controller_digest, output):
|
||||
children.append(child)
|
||||
package["children"].append(identifier)
|
||||
copies += [(bundle_bytes, Path("arcade/games") / (name + ".zx")),
|
||||
(preview_bytes, Path("arcade/previews") / (name + ".png"))]
|
||||
(preview_bytes, Path("arcade/previews") / (name + preview_suffix))]
|
||||
if total > MAX_PAYLOAD_BYTES:
|
||||
raise ValueError("Arcade collection exceeds the host's payload limit")
|
||||
catalog = dict(schema=1, id=arcade["id"], title=arcade["title"],
|
||||
|
||||
@@ -11,6 +11,18 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
ZIRAN = str(ROOT / 'scripts/ziran.sh')
|
||||
|
||||
|
||||
def stage_startup_art(source, output):
|
||||
"""Draw small full-colour images before the collection's originals load."""
|
||||
from PIL import Image
|
||||
startup = output / 'startup/shovey'
|
||||
startup.mkdir(parents=True, exist_ok=True)
|
||||
for name, edge in [('title-portrait.png', 640), ('title-landscape.png', 640), ('logo.png', 512)]:
|
||||
with Image.open(source / 'assets/shovey' / name) as original:
|
||||
image = original.convert('RGBA' if 'A' in original.getbands() else 'RGB')
|
||||
image.thumbnail((edge, edge), Image.Resampling.LANCZOS)
|
||||
image.save(startup / name, optimize=True)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--output', type=Path)
|
||||
@@ -59,10 +71,7 @@ def main():
|
||||
if args.standalone_shovey:
|
||||
from PIL import Image
|
||||
source = Path(subprocess.check_output([ZIRAN, 'pkg', 'path', 'shovey', *lock], cwd=ROOT, text=True).strip())
|
||||
startup = output.parent / 'startup/shovey'
|
||||
startup.mkdir(parents=True, exist_ok=True)
|
||||
for name in ('title-portrait.png', 'title-landscape.png', 'logo.png'):
|
||||
shutil.copyfile(source / 'assets/shovey' / name, startup / name)
|
||||
stage_startup_art(source, output.parent)
|
||||
Image.open(source / 'assets/branding/shovey-icon.png').resize((256, 256), Image.Resampling.LANCZOS).save(output.parent / 'shovey-icon.png')
|
||||
print(('Shovey' if args.standalone_shovey else 'Arcade') + ' native build passed')
|
||||
|
||||
|
||||
@@ -6,8 +6,15 @@ the website passes the published one Inner Breeze downloads. Arcade's own host
|
||||
is compiled to WebAssembly with the account Profile. The receipt names the
|
||||
collection's digest and the Apps library it trusts. Arcade's own copy of that
|
||||
library goes beside it for collections that do not pack one.
|
||||
|
||||
With --shovey the page is shovey.waozi.xyz: the same host runs a released
|
||||
Shovey download's own shovey.zx, shovey.json and entity.zx, unchanged, on the
|
||||
page files --site names. Their programs, and the game and Apps controller
|
||||
packed in shovey.zx, are compiled into the page, so they run as fast as a
|
||||
native build of them; the page still opens those exact bytes.
|
||||
"""
|
||||
import argparse
|
||||
import gzip
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
@@ -25,6 +32,35 @@ def package(name):
|
||||
return Path(subprocess.check_output([ZIRAN, 'pkg', 'path', name, *flags], cwd=ROOT, text=True).strip())
|
||||
|
||||
|
||||
def compress(path):
|
||||
"""A gzip copy beside path, which the page fetches first: Cloudflare
|
||||
Pages does not compress binary files (apps.zx 1.9 MB -> 0.24 MB)."""
|
||||
with open(path.with_name(path.name + '.gz'), 'wb') as raw:
|
||||
with gzip.GzipFile(filename='', mode='wb', compresslevel=9, fileobj=raw, mtime=0) as packed:
|
||||
packed.write(path.read_bytes())
|
||||
|
||||
|
||||
def version_assets(output, receipt):
|
||||
"""Keep the runtime, its data and the verified collection on one cache key."""
|
||||
page = output / 'index.html'
|
||||
html = page.read_text()
|
||||
if '__ARCADE_ASSET_REVISION__' not in html:
|
||||
return
|
||||
digest = hashlib.sha256()
|
||||
for name in ('runtime.js', 'runtime.wasm', 'runtime.data', 'arcade.json', 'apps.zx'):
|
||||
path = output / name
|
||||
if path.is_file():
|
||||
digest.update(name.encode() + b'\0')
|
||||
digest.update(path.read_bytes())
|
||||
revision = digest.hexdigest()
|
||||
page.write_text(html.replace('__ARCADE_ASSET_REVISION__', revision))
|
||||
source = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=ROOT, text=True).strip()
|
||||
(output / 'build.json').write_text(json.dumps({
|
||||
'source_revision': source, 'version': receipt['version'],
|
||||
'assets_sha256': revision,
|
||||
}, indent=2) + '\n')
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--bundle', type=Path, default=ROOT / 'build/node-apps/arcade.zx')
|
||||
@@ -33,32 +69,53 @@ def main():
|
||||
parser.add_argument('--profile', type=Path, default=ROOT / 'build/entity.zx')
|
||||
parser.add_argument('--controller', type=Path, default=ROOT / 'build/apps-ui/apps.zx')
|
||||
parser.add_argument('--output', type=Path, default=ROOT / 'build/web-site')
|
||||
parser.add_argument('--shovey', type=Path, help='a released Shovey download folder')
|
||||
parser.add_argument('--site', type=Path, default=ROOT / 'site')
|
||||
args = parser.parse_args()
|
||||
bundle = args.bundle.resolve()
|
||||
receipt = dict(id='inbe.arcade', version=args.version,
|
||||
sha256=hashlib.sha256(bundle.read_bytes()).hexdigest(),
|
||||
apps_sha256=args.controller_sha256)
|
||||
if args.shovey:
|
||||
bundle = (args.shovey / 'shovey.zx').resolve()
|
||||
receipt = json.loads((args.shovey / 'shovey.json').read_text())
|
||||
if receipt.get('id') != 'arcade.shovey-player' or \
|
||||
hashlib.sha256(bundle.read_bytes()).hexdigest() != receipt.get('sha256'):
|
||||
raise SystemExit('The Shovey download does not match its shovey.json')
|
||||
args.profile = args.shovey / 'entity.zx'
|
||||
args.controller_sha256 = receipt['apps_sha256']
|
||||
args.version = receipt['version']
|
||||
else:
|
||||
bundle = args.bundle.resolve()
|
||||
receipt = dict(id='inbe.arcade', version=args.version,
|
||||
sha256=hashlib.sha256(bundle.read_bytes()).hexdigest(),
|
||||
apps_sha256=args.controller_sha256)
|
||||
# The host reads the receipt into a 4 KiB buffer.
|
||||
text = json.dumps(receipt, separators=(',', ':')) if args.shovey else json.dumps(receipt, indent=2) + '\n'
|
||||
if len(text.encode()) >= 4096:
|
||||
raise SystemExit('The receipt exceeds the host buffer')
|
||||
work = ROOT / 'build/web'
|
||||
work.mkdir(parents=True, exist_ok=True)
|
||||
env = {**os.environ, 'ZIRAN': str(package('ziran') / 'build/bin/ziran')}
|
||||
linked = [item for path in (bundle, args.profile.resolve()) for item in ('--linked', str(path))] \
|
||||
if args.shovey else []
|
||||
subprocess.run([sys.executable, str(package('entity') / 'scripts/build-web.py'),
|
||||
'--bundle', str(bundle), '--profile', str(args.profile.resolve()),
|
||||
'--output', str(work / 'runtime.html'),
|
||||
'--output', str(work / 'runtime.html'), *linked,
|
||||
'--entry', 'runtime:main', '--source', 'src/web/runtime.zi'], cwd=ROOT, env=env, check=True)
|
||||
output = args.output.resolve()
|
||||
if output.exists():
|
||||
shutil.rmtree(output)
|
||||
shutil.copytree(ROOT / 'site', output)
|
||||
shutil.copytree(args.site, output)
|
||||
for name in ('runtime.js', 'runtime.wasm', 'runtime.data'):
|
||||
shutil.copyfile(work / name, output / name)
|
||||
(output / 'arcade.json').write_text(json.dumps(receipt, indent=2) + '\n')
|
||||
compress(output / 'runtime.data')
|
||||
(output / 'arcade.json').write_text(text)
|
||||
# Only the library the receipt trusts; the host refuses any other.
|
||||
controller = args.controller.read_bytes() if args.controller.is_file() else b''
|
||||
if hashlib.sha256(controller).hexdigest() == args.controller_sha256:
|
||||
(output / 'apps.zx').write_bytes(controller)
|
||||
compress(output / 'apps.zx')
|
||||
else:
|
||||
print('No matching Apps controller beside the collection; it must pack its own')
|
||||
print(f'Arcade {args.version} for the browser in {output}')
|
||||
version_assets(output, receipt)
|
||||
print(f'{"Shovey" if args.shovey else "Arcade"} {args.version} for the browser in {output}')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Follow the published releases of Arcade's game packages.
|
||||
|
||||
`pin` moves each game package in ziran.lock to the commit of its repository's
|
||||
latest published GitHub release, when that commit is ahead of the current pin.
|
||||
Only the game's own entry changes: its dependencies keep Arcade's pins, so the
|
||||
games build against the same Kryon and Apps as Arcade. The ids and layout are
|
||||
the ones `ziran lock` writes. The updates are recorded in build/game-updates.json.
|
||||
`check` records newer published game releases without changing dependencies.
|
||||
`pin` selects their exact commits in ziran.toml and asks Ziran to update each
|
||||
game and its transitive dependencies. New game imports must reach the lock;
|
||||
unrelated packages and the compiler stay pinned. The updates are recorded in
|
||||
build/game-updates.json.
|
||||
|
||||
`changelog` adds an Arcade release entry naming each updated game with the
|
||||
notes of its newest release, for update_version.sh to synchronize.
|
||||
@@ -26,31 +26,6 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
UPDATES = ROOT / 'build/game-updates.json'
|
||||
|
||||
|
||||
def package_id(url, commit):
|
||||
"""The id `ziran lock` gives a source at a commit (PkgSourceId)."""
|
||||
return 'p' + hashlib.sha256((url + '\n' + commit).encode()).hexdigest()[:16]
|
||||
|
||||
|
||||
def write_lock(lock):
|
||||
"""The lock as Ziran writes it: sorted keys, one-line maps, packages kept
|
||||
in their order."""
|
||||
def value(item):
|
||||
if isinstance(item, dict):
|
||||
return '{' + ', '.join(json.dumps(k) + ': ' + json.dumps(item[k]) for k in sorted(item)) + '}'
|
||||
return json.dumps(item)
|
||||
|
||||
def block(item, indent):
|
||||
pad = ' ' * indent
|
||||
fields = [pad + ' ' + json.dumps(k) + ': ' + value(item[k]) for k in sorted(item)]
|
||||
return pad + '{\n' + ',\n'.join(fields) + '\n' + pad + '}'
|
||||
|
||||
text = '{\n "format": ' + json.dumps(lock['format']) + ',\n "packages": [\n'
|
||||
text += ',\n'.join(block(item, 4) for item in lock['packages']) + '\n ],\n'
|
||||
text += ' "root": ' + block(lock['root'], 2).lstrip() + ',\n'
|
||||
text += ' "toolchain": ' + block(lock['toolchain'], 2).lstrip() + '\n}\n'
|
||||
return text
|
||||
|
||||
|
||||
def gh(*args):
|
||||
return subprocess.check_output(['gh', *args], text=True).strip()
|
||||
|
||||
@@ -62,13 +37,9 @@ def repository(url):
|
||||
return match[1]
|
||||
|
||||
|
||||
def pin():
|
||||
lock_path = ROOT / 'ziran.lock'
|
||||
lock = json.loads(lock_path.read_text())
|
||||
if write_lock(lock) != lock_path.read_text():
|
||||
raise SystemExit('ziran.lock is not in the layout ziran lock writes')
|
||||
def released_updates():
|
||||
lock = json.loads((ROOT / 'ziran.lock').read_text())
|
||||
names = json.loads((ROOT / 'games.json').read_text())['packages']
|
||||
ledger = json.loads((ROOT / 'apps/versions.json').read_text())['node_apps']
|
||||
updates = []
|
||||
for name in names:
|
||||
old_id = lock['root']['dependencies'][name]
|
||||
@@ -76,30 +47,61 @@ def pin():
|
||||
repo = repository(entry['url'])
|
||||
tag = gh('release', 'view', '--repo', repo, '--json', 'tagName', '--jq', '.tagName')
|
||||
commit = gh('api', f'repos/{repo}/commits/{tag}', '--jq', '.sha')
|
||||
if not re.fullmatch(r'[0-9a-f]{40}', commit):
|
||||
raise SystemExit(f'{name}: invalid release commit')
|
||||
if commit == entry['commit']:
|
||||
continue
|
||||
# A later tag of the version Arcade already ships is not a new release.
|
||||
if name in ledger and ledger[name]['version'] == tag.removeprefix('v'):
|
||||
continue
|
||||
# Release metadata can be recorded before the game is published.
|
||||
# The pinned source must still advance to that release's commit.
|
||||
# Never move back: the release must contain the pinned commit.
|
||||
status = gh('api', f'repos/{repo}/compare/{entry["commit"]}...{commit}', '--jq', '.status')
|
||||
if status != 'ahead':
|
||||
print(f'{name}: release {tag} is {status} of the pinned {entry["commit"][:12]}; kept')
|
||||
continue
|
||||
new_id = package_id(entry['url'], commit)
|
||||
entry['commit'] = commit
|
||||
entry['id'] = new_id
|
||||
for owner in [lock['root'], *lock['packages']]:
|
||||
for alias, target in owner['dependencies'].items():
|
||||
if target == old_id:
|
||||
owner['dependencies'][alias] = new_id
|
||||
updates.append({'name': name, 'repository': repo, 'tag': tag, 'commit': commit})
|
||||
print(f'{name}: {repo} {tag} ({commit[:12]})')
|
||||
lock_path.write_text(write_lock(lock))
|
||||
return updates
|
||||
|
||||
|
||||
def record_updates(updates):
|
||||
UPDATES.parent.mkdir(parents=True, exist_ok=True)
|
||||
UPDATES.write_text(json.dumps(updates, indent=2) + '\n')
|
||||
|
||||
|
||||
def pin(ziran):
|
||||
updates = released_updates()
|
||||
manifest = ROOT / 'ziran.toml'
|
||||
lock_path = ROOT / 'ziran.lock'
|
||||
original_manifest = manifest.read_bytes()
|
||||
original_lock = lock_path.read_bytes()
|
||||
try:
|
||||
for update in updates:
|
||||
name, commit = update['name'], update['commit']
|
||||
# Edit the declaration; only the package manager writes the graph.
|
||||
section = re.compile(r'(^\[dependencies\.' + re.escape(name) +
|
||||
r'\]\s*\n)([^\[]*)', re.M)
|
||||
text = manifest.read_text()
|
||||
match = section.search(text)
|
||||
if match is None:
|
||||
raise ValueError(f'{name}: missing dependency declaration')
|
||||
body, count = re.subn(r'^ref[ \t]*=[ \t]*"[^"\n]*"[ \t]*$',
|
||||
f'ref = "{commit}"', match[2], flags=re.M)
|
||||
if count != 1:
|
||||
raise ValueError(f'{name}: expected one dependency ref')
|
||||
manifest.write_text(text[:match.start(2)] + body + text[match.end(2):])
|
||||
subprocess.run([str(ziran), 'update', name], cwd=ROOT, check=True)
|
||||
lock = json.loads(lock_path.read_text())
|
||||
target = lock['root']['dependencies'][name]
|
||||
entry = next(p for p in lock['packages'] if p['id'] == target)
|
||||
if entry['commit'] != commit:
|
||||
raise ValueError(f'{name}: Ziran did not select the released commit; remove its local override')
|
||||
except BaseException:
|
||||
manifest.write_bytes(original_manifest)
|
||||
lock_path.write_bytes(original_lock)
|
||||
raise
|
||||
record_updates(updates)
|
||||
|
||||
|
||||
def newest_notes(changelog):
|
||||
"""The bullets of a changelog's newest numeric release."""
|
||||
text = changelog.read_text()
|
||||
@@ -149,11 +151,13 @@ def art():
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('command', choices=['pin', 'changelog', 'art'])
|
||||
parser.add_argument('command', choices=['check', 'pin', 'changelog', 'art'])
|
||||
parser.add_argument('--ziran', default=str(ROOT / 'scripts/ziran.sh'))
|
||||
args = parser.parse_args()
|
||||
if args.command == 'pin':
|
||||
pin()
|
||||
if args.command == 'check':
|
||||
record_updates(released_updates())
|
||||
elif args.command == 'pin':
|
||||
pin(args.ziran)
|
||||
elif args.command == 'changelog':
|
||||
changelog(args.ziran)
|
||||
else:
|
||||
|
||||
@@ -9,7 +9,7 @@ import re
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
APP_KEYS = {'manifest', 'cover', 'enabled', 'requires', 'shared_code', 'library_entries'}
|
||||
APP_KEYS = {'manifest', 'cover', 'enabled', 'requires', 'shared_code', 'library_entries', 'shared_records'}
|
||||
COVER_KEYS = {'portrait', 'landscape', 'logo', 'caption', 'action'}
|
||||
|
||||
|
||||
@@ -50,6 +50,11 @@ def declared_packages(root, ziran=None, lock_flags=()):
|
||||
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
|
||||
@@ -59,6 +64,7 @@ def declared_packages(root, ziran=None, lock_flags=()):
|
||||
apps.append(dict(package=name, source=source, manifest=manifest,
|
||||
descriptor=json.loads(manifest.read_text()),
|
||||
cover=app.get('cover'), requires=requires, shared_code=shared_code,
|
||||
shared_records=shared_records,
|
||||
library_entries=library_entries, enabled=app.get('enabled', True)))
|
||||
packages.append(dict(name=name, source=source, id=declaration['id'],
|
||||
title=declaration['title'], apps=apps))
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Make Arcade's small copies of each game's cover and preview art.
|
||||
"""Stage bounded thumbnails for every game's library covers and previews.
|
||||
|
||||
Game packages keep their full-size art for their own players and stores.
|
||||
Arcade only shows that art in its library, so it packs copies sized for the
|
||||
screen with a 256-colour palette: about a fifth of the bytes, with no visible
|
||||
change. Arcade stays a small launcher; the games download separately.
|
||||
Library covers retain full colour and transparency at thumbnail resolution:
|
||||
opaque cover art is a JPEG, a sixth of its PNG size, while logos keep their
|
||||
transparency and previews their pixel art as PNG. Games keep their own
|
||||
original title artwork. Arcade downloads this small art
|
||||
bundle separately from its launcher and caches it by its content digest.
|
||||
|
||||
The copies and sources.json, which records the SHA-256 of the art each copy
|
||||
was made from, are committed. The collection build uses them as they are,
|
||||
@@ -20,25 +21,48 @@ from game_packages import declared_packages
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
LIBRARY = ROOT / 'assets/arcade/library'
|
||||
# Longest side: covers fill the library's screen, logos sit on them and
|
||||
# previews are small tiles and icons.
|
||||
LONGEST = {'portrait': 1280, 'landscape': 1280, 'logo': 800, 'preview': 480}
|
||||
PREVIEW_LONGEST = 480
|
||||
COVER_LONGEST = 640
|
||||
LOGO_LONGEST = 512
|
||||
|
||||
|
||||
COVER_QUALITY = 85
|
||||
SUFFIXES = ('.png', '.jpg')
|
||||
|
||||
|
||||
def copy_path(name):
|
||||
"""The committed copy for name, whichever format it was made in."""
|
||||
for suffix in SUFFIXES:
|
||||
if (LIBRARY / (name + suffix)).is_file():
|
||||
return LIBRARY / (name + suffix)
|
||||
raise FileNotFoundError(f'{name} has no library copy; run scripts/library-art.py')
|
||||
|
||||
|
||||
def small_copy(data, key):
|
||||
"""(bytes, suffix) of the library's copy of one picture."""
|
||||
image = Image.open(io.BytesIO(data))
|
||||
image.load()
|
||||
scale = min(1.0, LONGEST[key] / max(image.size))
|
||||
longest = PREVIEW_LONGEST if key == 'preview' else LOGO_LONGEST if key == 'logo' else COVER_LONGEST
|
||||
scale = min(1.0, longest / max(image.size))
|
||||
alpha = 'A' in image.getbands() or 'transparency' in image.info
|
||||
photo = key in ('portrait', 'landscape') and not alpha
|
||||
if scale == 1.0 and key != 'preview' and not photo:
|
||||
return data, '.png'
|
||||
image = image.convert('RGBA' if alpha else 'RGB')
|
||||
if scale < 1.0:
|
||||
size = (round(image.width * scale), round(image.height * scale))
|
||||
image = image.convert('RGBA' if 'A' in image.getbands() else 'RGB').resize(size, Image.Resampling.LANCZOS)
|
||||
if 'A' in image.getbands():
|
||||
image = image.convert('RGBA').quantize(256, method=Image.Quantize.FASTOCTREE, dither=Image.Dither.FLOYDSTEINBERG)
|
||||
else:
|
||||
image = image.convert('RGB').quantize(256, dither=Image.Dither.FLOYDSTEINBERG)
|
||||
size = (max(1, round(image.width * scale)), max(1, round(image.height * scale)))
|
||||
image = image.resize(size, Image.Resampling.LANCZOS)
|
||||
if key == 'preview':
|
||||
if alpha:
|
||||
image = image.quantize(256, method=Image.Quantize.FASTOCTREE, dither=Image.Dither.FLOYDSTEINBERG)
|
||||
else:
|
||||
image = image.quantize(256, dither=Image.Dither.FLOYDSTEINBERG)
|
||||
output = io.BytesIO()
|
||||
if photo:
|
||||
image.save(output, 'JPEG', quality=COVER_QUALITY, optimize=True, progressive=True)
|
||||
return output.getvalue(), '.jpg'
|
||||
image.save(output, 'PNG', optimize=True)
|
||||
return output.getvalue()
|
||||
return output.getvalue(), '.png'
|
||||
|
||||
|
||||
def art(root=ROOT):
|
||||
@@ -57,15 +81,19 @@ def art(root=ROOT):
|
||||
def main():
|
||||
LIBRARY.mkdir(parents=True, exist_ok=True)
|
||||
sources = {}
|
||||
written = set()
|
||||
for name, key, data in art():
|
||||
copy = f'{name}-{key}'
|
||||
(LIBRARY / f'{copy}.png').write_bytes(small_copy(data, key))
|
||||
contents, suffix = small_copy(data, key)
|
||||
(LIBRARY / (copy + suffix)).write_bytes(contents)
|
||||
written.add(copy + suffix)
|
||||
sources[copy] = {'source_sha256': hashlib.sha256(data).hexdigest()}
|
||||
for stale in LIBRARY.glob('*.png'):
|
||||
if stale.stem not in sources:
|
||||
stale.unlink()
|
||||
for suffix in SUFFIXES:
|
||||
for stale in LIBRARY.glob('*' + suffix):
|
||||
if stale.name not in written:
|
||||
stale.unlink()
|
||||
(LIBRARY / 'sources.json').write_text(json.dumps(dict(sorted(sources.items())), indent=2) + '\n')
|
||||
total = sum((LIBRARY / f'{copy}.png').stat().st_size for copy in sources)
|
||||
total = sum((LIBRARY / name).stat().st_size for name in written)
|
||||
print(f'{len(sources)} library images, {total / 1048576:.1f} MiB')
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
<link rel="icon" href="icon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
<!-- The runtime downloads while the page fetches the collection's files. -->
|
||||
<link rel="preload" href="runtime.js?v=__ARCADE_ASSET_REVISION__" as="script">
|
||||
<link rel="preload" href="runtime.wasm?v=__ARCADE_ASSET_REVISION__" as="fetch" type="application/wasm" crossorigin>
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://arcade.waozi.xyz/">
|
||||
<meta property="og:title" content="Arcade">
|
||||
@@ -27,6 +30,8 @@
|
||||
#loading .failed { display: none; color: #ffb4a8; text-align: center; padding: 0 24px; }
|
||||
#loading.error .failed { display: block; }
|
||||
#loading.error .track { display: none; }
|
||||
#loading.error { opacity: 1; pointer-events: auto; }
|
||||
#loading button { border: 0; border-radius: 12px; padding: 14px 24px; background: #ffd166; color: #111223; font: inherit; cursor: pointer; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -35,20 +40,30 @@
|
||||
<!-- MingCute game_2 gamepad, Apache-2.0 -->
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 9v3M13.5 10.5h3M7 5c1 0 3 1 5 1s4-1 5-1c3 0 7 14 3 14-3 0-4.5-4-8-4s-5 4-8 4C0 19 4 5 7 5Zm3 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"/></svg>
|
||||
<div class="track"><div class="bar"></div></div>
|
||||
<p class="failed">Arcade could not start. Reload the page to try again.</p>
|
||||
<p class="failed">Arcade stopped while opening an app. Your saved games are kept.</p>
|
||||
<button class="failed" id="retry" type="button">Return to library</button>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var loading = document.getElementById('loading');
|
||||
var bar = loading.querySelector('.bar');
|
||||
function failed() { loading.classList.add('error'); }
|
||||
// Arcade's Profile reports ready once the library is about to draw.
|
||||
var assetRevision = '__ARCADE_ASSET_REVISION__';
|
||||
function assetUrl(name) {
|
||||
var url = new URL(name, document.baseURI);
|
||||
url.searchParams.set('v', assetRevision);
|
||||
return url.href;
|
||||
}
|
||||
function failed() { loading.classList.remove('done'); loading.classList.add('error'); }
|
||||
document.getElementById('retry').addEventListener('click', function () { location.reload(); });
|
||||
// Keep watching after startup: a later game failure also needs recovery.
|
||||
function watch() {
|
||||
if (window.Module && Module.profileReady) { loading.classList.add('done'); return; }
|
||||
if (window.Module && Module.arcadeFailed) { failed(); return; }
|
||||
if (window.Module && Module.profileReady) loading.classList.add('done');
|
||||
requestAnimationFrame(watch);
|
||||
}
|
||||
window.Module = {
|
||||
canvas: document.getElementById('canvas'),
|
||||
locateFile: assetUrl,
|
||||
setStatus: function (text) {
|
||||
var match = /\((\d+(?:\.\d+)?)\/(\d+)\)/.exec(text || '');
|
||||
if (match) bar.style.width = Math.min(100, 100 * match[1] / match[2]) + '%';
|
||||
@@ -56,26 +71,62 @@
|
||||
onAbort: failed,
|
||||
onExit: function (code) { if (code !== 0) failed(); }
|
||||
};
|
||||
// Bundles travel gzip-compressed beside their plain copies: Cloudflare
|
||||
// does not compress binary files. Browsers without DecompressionStream,
|
||||
// or a missing .gz, take the plain file; null when neither exists.
|
||||
function plain(name) {
|
||||
return fetch(assetUrl(name)).then(function (response) {
|
||||
return response.ok ? response.arrayBuffer() : null;
|
||||
});
|
||||
}
|
||||
function bundle(name) {
|
||||
if (typeof DecompressionStream !== 'function') return plain(name);
|
||||
return fetch(assetUrl(name + '.gz')).then(function (response) {
|
||||
if (!response.ok) throw new Error(response.status);
|
||||
return response.arrayBuffer();
|
||||
}).then(function (packed) {
|
||||
var head = new Uint8Array(packed, 0, Math.min(2, packed.byteLength));
|
||||
// A server that already decoded it hands over the plain bytes.
|
||||
if (head[0] !== 0x1f || head[1] !== 0x8b) return packed;
|
||||
return new Response(new Blob([packed]).stream()
|
||||
.pipeThrough(new DecompressionStream('gzip'))).arrayBuffer();
|
||||
}).catch(function () { return plain(name); });
|
||||
}
|
||||
// The build receipt names the collection's digest and its trusted Apps
|
||||
// library; Arcade's own copy of that library goes in beside it.
|
||||
Promise.all([
|
||||
fetch('arcade.json', { cache: 'no-cache' }).then(function (response) {
|
||||
fetch(assetUrl('arcade.json'), { cache: 'no-cache' }).then(function (response) {
|
||||
if (!response.ok) throw new Error(response.status);
|
||||
return response.text();
|
||||
}),
|
||||
fetch('apps.zx').then(function (response) {
|
||||
return response.ok ? response.arrayBuffer() : null;
|
||||
})
|
||||
bundle('apps.zx'),
|
||||
bundle('runtime.data')
|
||||
]).then(function (loaded) {
|
||||
Module.arcadeReceipt = loaded[0];
|
||||
if (loaded[1]) {
|
||||
Module.preRun = [function () { FS.writeFile('/apps.zx', new Uint8Array(loaded[1])); }];
|
||||
}
|
||||
var script = document.createElement('script');
|
||||
script.src = 'runtime.js';
|
||||
script.onerror = failed;
|
||||
document.body.appendChild(script);
|
||||
watch();
|
||||
// The runtime's file package, already here, is not fetched again.
|
||||
if (loaded[2]) {
|
||||
Module.getPreloadedPackage = function () { return loaded[2]; };
|
||||
}
|
||||
function start() {
|
||||
var script = document.createElement('script');
|
||||
script.src = assetUrl('runtime.js');
|
||||
script.onerror = failed;
|
||||
document.body.appendChild(script);
|
||||
watch();
|
||||
}
|
||||
// One sign-in for every waozi.xyz site: account.waozi.xyz hands over
|
||||
// the shared profile before Arcade starts, or Arcade starts without it.
|
||||
var started = false;
|
||||
function go() { if (!started) { started = true; start(); } }
|
||||
var shared = document.createElement('script');
|
||||
shared.src = 'https://account.waozi.xyz/share.js';
|
||||
shared.onload = function () { WaoziAccount.attach(Module, 2500).then(go, go); };
|
||||
shared.onerror = go;
|
||||
setTimeout(go, 4000);
|
||||
document.head.appendChild(shared);
|
||||
}).catch(failed);
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -43,6 +43,7 @@ Codec :: #import "apps/node_codec";
|
||||
#import "entity/publications_read"
|
||||
#import "entity/entity_records"
|
||||
#import "entity/entity_dew"
|
||||
#import "entity/leaderboard_native"
|
||||
#import "kryon/widget_palette"
|
||||
#import "kryon/image_raster"
|
||||
#import "kryon/loading_indicator"
|
||||
@@ -133,7 +134,7 @@ CollectionAllows :: (context: *void, node: *AppNode, name: string) -> bool {
|
||||
name == "tile_map.sampling" || name == "arcade.controls" || name == "arcade.sound" || name == "arcade.navigation" ||
|
||||
name == "arcade.updates" ||
|
||||
name == PUBLICATIONS_READ_SERVICE || name == ENTITY_RECORDS_SERVICE || name == ENTITY_DEW_SERVICE ||
|
||||
name == "entity.profile"
|
||||
name == "entity.profile" || name == "leaderboard"
|
||||
}
|
||||
|
||||
CollectionCall :: (context: *void, node: *AppNode, module: *u8, function: *u8,
|
||||
@@ -176,6 +177,12 @@ CollectionCall :: (context: *void, node: *AppNode, module: *u8, function: *u8,
|
||||
HostScalarValid(arguments[1], "string", cast(s32)HostString) {
|
||||
service := AppArgumentText(arguments[0])
|
||||
request := AppArgumentText(arguments[1])
|
||||
if service == "leaderboard" {
|
||||
saved := EntityLeaderboardReport("arcade", "Arcade", TextUntilNul(node.identity.id[:]),
|
||||
TextUntilNul(node.entry.title[:]), request)
|
||||
result.* = AppHostText(ifx saved then "{\"status\":\"saved\"}" else "{\"status\":\"rejected\"}")
|
||||
return 1
|
||||
}
|
||||
// Public level collections, such as a game's live campaign.
|
||||
if service == PUBLICATIONS_READ_SERVICE {
|
||||
result.* = AppHostText(PublicationsReadAnswer(request))
|
||||
@@ -322,6 +329,27 @@ CollectionWidgets :: (context: *void, node: *AppNode, module: *u8, function: *u8
|
||||
return WidgetHostCall(context, module, function, arguments, count, result)
|
||||
}
|
||||
|
||||
// Check the same saved install state and verified download plan as Apps.
|
||||
// A cached payload or an old score alone is never installed membership.
|
||||
CollectionLeaderboardInstalled :: (game: string) -> bool {
|
||||
if !collection_ready { return false }
|
||||
for slot: cast(s64)0..collection_host.tree.nodes.count - 1 {
|
||||
parent := collection_host.tree.nodes[slot].node
|
||||
if parent == null || !parent.collection { continue }
|
||||
index := AppCatalogFind(*parent.catalog, game)
|
||||
if index < 0 { continue }
|
||||
entry := AppCatalogAt(*parent.catalog, index)
|
||||
identity := AppIdentity.{.authority = parent.identity.authority, .id = entry.id}
|
||||
state: AppState
|
||||
plan: AppInstallPlan
|
||||
if CollectionState(null, "local", *identity, *state) && state.installed &&
|
||||
AppHostInstallPlan(*collection_host, parent, entry, *plan) && plan.count == 0 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
CollectionSave :: (context: *void, node: *AppNode) -> bool {
|
||||
saved := collection_records
|
||||
while saved != null {
|
||||
@@ -400,6 +428,7 @@ CollectionController :: (context: *void) -> HostedAsset {
|
||||
CollectionOpen :: (bundle: string, digest: string, harness_digest: string,
|
||||
data: string, locale: string) -> bool {
|
||||
if collection_ready { return false }
|
||||
leaderboard_installed = CollectionLeaderboardInstalled
|
||||
collection_directory = data
|
||||
collection_resource_root = Join(data, "resources")
|
||||
opened := AppFilesOpen(*collection_resources, collection_resource_root)
|
||||
@@ -464,8 +493,16 @@ CollectionOpenShovey :: (directory: string, data: string) -> bool {
|
||||
return found && metadata_found && CollectionOpenShoveyBytes(bytes, metadata, data)
|
||||
}
|
||||
|
||||
// Metadata of the standalone Shovey player, as the downloads and
|
||||
// shovey.waozi.xyz carry it, rather than of Arcade's collection.
|
||||
CollectionShoveyReceipt :: (metadata: string) -> bool {
|
||||
id: [128]u8
|
||||
return AppsReadText(metadata, 0, "id", id[:]) && TextUntilNul(id[:]) == "arcade.shovey-player"
|
||||
}
|
||||
|
||||
CollectionOpenShoveyBytes :: (bytes: string, metadata: string, data: string) -> bool {
|
||||
if collection_ready { return false }
|
||||
leaderboard_installed = CollectionLeaderboardInstalled
|
||||
id: [128]u8
|
||||
digest: [65]u8
|
||||
harness: [65]u8
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
sdl :: #system_library "SDL2";
|
||||
SetTitle :: (window: *void, title: *u8) #foreign sdl "SDL_SetWindowTitle";
|
||||
|
||||
// First show small RGB/RGBA previews. The collection replaces them with its
|
||||
// original artwork when ready, using the same layout and coloured logo.
|
||||
DrawStartup :: (session: Session, directory: string, standalone: bool = true) -> bool {
|
||||
if !PollDesktop() || WindowTakeCloseRequestHost() { return false }
|
||||
BeginDesktopFrame()
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Arcade in the browser: the same arcade.zx Inner Breeze downloads, with its
|
||||
// shared Apps library, the account Profile and each game downloaded from the
|
||||
// node when someone opens it. Saves stay in the page's persistent storage.
|
||||
// Given the released Shovey player instead, the shovey.zx and shovey.json of
|
||||
// the downloads, it is shovey.waozi.xyz and opens on Shovey's covers.
|
||||
using Canvas :: #import "kryon/Canvas";
|
||||
#import "kryon/bundle_storage_web"
|
||||
#import "kryon/app_files"
|
||||
@@ -54,7 +56,8 @@ ArcadeFrame :: (session: Session) -> bool {
|
||||
TreeCancel(session)
|
||||
return false
|
||||
}
|
||||
if EndFrame(session) != FrameStatus.FrameOk { return false }
|
||||
// Only damaged pixels are cleared and repainted; the rest of the page stays.
|
||||
if EndCanvasUiFrame(session) != FrameStatus.FrameOk { return false }
|
||||
TestDriverFrame(session)
|
||||
CanvasCursor(session)
|
||||
ok := EndCanvasFrame()
|
||||
@@ -78,17 +81,27 @@ main :: () -> s32 {
|
||||
// The page writes Arcade's own Apps controller beside the collection.
|
||||
controller, controller_found := ReadEntireFile("/apps.zx")
|
||||
if controller_found { collection_controller = controller } else { AppFileFree(controller) }
|
||||
if !found || !profile_found || receipt == "" || !CollectionOpenBytes(bytes, receipt, data) { return 1 }
|
||||
if !EntityOpen(profile, data) { unused CollectionClose(); return 1 }
|
||||
if !found || !profile_found || receipt == "" { return 1 }
|
||||
shovey := CollectionShoveyReceipt(receipt)
|
||||
opened := ifx shovey then CollectionOpenShoveyBytes(bytes, receipt, data) else CollectionOpenBytes(bytes, receipt, data)
|
||||
if !opened { return 1 }
|
||||
if !EntityOpen(profile, data, shovey) { unused CollectionClose(); return 1 }
|
||||
session := SessionOpen()
|
||||
if !SessionValid(session) { unused CollectionClose(); return 1 }
|
||||
defer { SessionClose(session) }
|
||||
WebSet(WebGetObject(WebGlobal, WebName("Module")), WebName("profileReady"), WebBool(true))
|
||||
saved := PageNow()
|
||||
ok := true
|
||||
while ok && PollCanvas() {
|
||||
scope := WebScope()
|
||||
ok = ArcadeFrame(session)
|
||||
// main returning does not notify Emscripten's onExit unless its
|
||||
// runtime exits too. Tell the page explicitly, so a failed game can
|
||||
// never leave an apparently live library with no input loop.
|
||||
if !ok {
|
||||
WebSet(WebGetObject(WebGlobal, WebName("Module")), WebName("arcadeFailed"), WebBool(true))
|
||||
} else {
|
||||
WebSet(WebGetObject(WebGlobal, WebName("Module")), WebName("profileReady"), WebBool(true))
|
||||
}
|
||||
// Saves reach the browser's storage about once a second.
|
||||
if PageNow() - saved >= 1000.0 {
|
||||
unused BundleStorageSync(false)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Exercise packaging from the actual registered game builds, preserving bytes."""
|
||||
import hashlib
|
||||
import importlib.util
|
||||
import io
|
||||
import json
|
||||
from pathlib import Path
|
||||
import shlex
|
||||
@@ -9,12 +10,16 @@ import tempfile
|
||||
import unittest
|
||||
import sys
|
||||
import tarfile
|
||||
from PIL import Image
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "scripts"))
|
||||
spec = importlib.util.spec_from_file_location("build_collection", ROOT / "scripts/build-collection.py")
|
||||
builder = importlib.util.module_from_spec(spec)
|
||||
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)
|
||||
|
||||
|
||||
class CollectionTests(unittest.TestCase):
|
||||
@@ -73,11 +78,11 @@ class CollectionTests(unittest.TestCase):
|
||||
self.assertEqual(child["protocol"], "node/2")
|
||||
# The library packs its own small copy of each game's art.
|
||||
self.assertEqual((self.output / child["preview"]).read_bytes(),
|
||||
(ROOT / f"assets/arcade/library/{name}-preview.png").read_bytes())
|
||||
artist.copy_path(f"{name}-preview").read_bytes())
|
||||
for key, path in child["cover"].items():
|
||||
if key in ("portrait", "landscape", "logo"):
|
||||
self.assertEqual((self.output / path).read_bytes(),
|
||||
(ROOT / f"assets/arcade/library/{name}-{key}.png").read_bytes())
|
||||
artist.copy_path(f"{name}-{key}").read_bytes())
|
||||
self.assertEqual((self.output / catalog["harness"]).read_bytes(), self.controller.read_bytes())
|
||||
|
||||
def test_changed_game_art_needs_fresh_library_copies(self):
|
||||
@@ -88,6 +93,32 @@ class CollectionTests(unittest.TestCase):
|
||||
with self.assertRaisesRegex(ValueError, "wurm-portrait art changed"):
|
||||
self.stage()
|
||||
|
||||
def test_every_library_cover_uses_a_bounded_thumbnail(self):
|
||||
catalog, packages = builder.stage(self.root, self.controller, self.controller_digest, self.output)
|
||||
children = {child['id']: child for child in catalog['children']}
|
||||
for package in packages:
|
||||
for app in package['apps']:
|
||||
if not app['enabled'] or not app['cover']:
|
||||
continue
|
||||
child = children[app['descriptor']['id']]
|
||||
for key in ('portrait', 'landscape', 'logo'):
|
||||
if key not in app['cover']:
|
||||
continue
|
||||
original = (app['source'] / app['cover'][key]).read_bytes()
|
||||
with self.subTest(app=child['id'], image=key):
|
||||
with Image.open(io.BytesIO(original)) as source:
|
||||
with Image.open(self.output / child['cover'][key]) as thumbnail:
|
||||
limit = 512 if key == 'logo' else 640
|
||||
self.assertLessEqual(max(thumbnail.size), limit)
|
||||
self.assertLessEqual(thumbnail.width, source.width)
|
||||
self.assertLessEqual(thumbnail.height, source.height)
|
||||
self.assertAlmostEqual(thumbnail.width / thumbnail.height,
|
||||
source.width / source.height, delta=0.01)
|
||||
self.assertIn(thumbnail.mode, ('RGB', 'RGBA'))
|
||||
# Opaque cover art is a JPEG; transparency stays PNG.
|
||||
self.assertEqual(thumbnail.format, 'JPEG' if key != 'logo' and
|
||||
thumbnail.mode == 'RGB' else 'PNG')
|
||||
|
||||
def test_editor_download_reuses_verified_shovey_assets(self):
|
||||
catalog = self.stage()
|
||||
children = {child['id']: child for child in catalog['children']}
|
||||
@@ -221,7 +252,7 @@ class CollectionTests(unittest.TestCase):
|
||||
(self.root / "games.json").write_text(json.dumps({"packages": []}))
|
||||
self.assertEqual(self.stage()["children"], [])
|
||||
self.assertFalse((self.output / "assets/arcade/games/shovey.zx").exists())
|
||||
self.assertFalse((self.output / "assets/arcade/covers/shovey-portrait.png").exists())
|
||||
self.assertFalse((self.output / "assets/arcade/covers/shovey-portrait.jpg").exists())
|
||||
|
||||
def test_unknown_declaration_field_rejected(self):
|
||||
declaration = json.loads((self.root / "apps.json").read_text())
|
||||
@@ -232,5 +263,56 @@ class CollectionTests(unittest.TestCase):
|
||||
self.assertFalse(self.output.exists())
|
||||
|
||||
|
||||
class LibraryThumbnailTests(unittest.TestCase):
|
||||
def test_cover_keeps_full_colour_at_thumbnail_resolution(self):
|
||||
source = Image.new('RGB', (900, 1200))
|
||||
source.putdata([(x % 256, y % 256, (x + y) % 256)
|
||||
for y in range(1200) for x in range(900)])
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
contents, suffix = artist.small_copy(data.getvalue(), 'portrait')
|
||||
self.assertEqual(suffix, '.jpg')
|
||||
with Image.open(io.BytesIO(contents)) as thumbnail:
|
||||
self.assertEqual(thumbnail.format, 'JPEG')
|
||||
self.assertEqual(thumbnail.size, (480, 640))
|
||||
self.assertEqual(thumbnail.mode, 'RGB')
|
||||
self.assertIsNone(thumbnail.getcolors(256))
|
||||
|
||||
def test_logo_retains_transparency(self):
|
||||
source = Image.new('RGBA', (1200, 400), (45, 155, 90, 0))
|
||||
source.paste((200, 35, 100, 255), (100, 50, 1100, 350))
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
contents, suffix = artist.small_copy(data.getvalue(), 'logo')
|
||||
self.assertEqual(suffix, '.png')
|
||||
with Image.open(io.BytesIO(contents)) as thumbnail:
|
||||
self.assertEqual(thumbnail.size, (512, 171))
|
||||
self.assertEqual(thumbnail.mode, 'RGBA')
|
||||
self.assertEqual(thumbnail.getpixel((0, 0))[3], 0)
|
||||
self.assertEqual(thumbnail.getpixel((256, 85))[3], 255)
|
||||
|
||||
def test_small_covers_are_not_enlarged(self):
|
||||
source = Image.new('RGB', (120, 180), (25, 50, 75))
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
contents, suffix = artist.small_copy(data.getvalue(), 'portrait')
|
||||
self.assertEqual(suffix, '.jpg')
|
||||
with Image.open(io.BytesIO(contents)) as thumbnail:
|
||||
self.assertEqual(thumbnail.size, (120, 180))
|
||||
|
||||
def test_small_transparent_art_is_not_reencoded(self):
|
||||
source = Image.new('RGBA', (120, 60), (25, 50, 75, 128))
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
self.assertEqual(artist.small_copy(data.getvalue(), 'logo'), (data.getvalue(), '.png'))
|
||||
|
||||
def test_thin_logos_keep_at_least_one_pixel(self):
|
||||
source = Image.new('RGBA', (4096, 1), (25, 50, 75, 255))
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
with Image.open(io.BytesIO(artist.small_copy(data.getvalue(), 'logo')[0])) as thumbnail:
|
||||
self.assertEqual(thumbnail.size, (512, 1))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -224,6 +224,12 @@ def main():
|
||||
driver.press(label='Profile', role='button')
|
||||
driver.wait(label='Account', role='text')
|
||||
capture(child, 'arcade-profile')
|
||||
driver.press(label='Leaderboard', role='button')
|
||||
driver.wait(label='Leaderboard', role='text')
|
||||
driver.wait(label='No leaderboard data yet.', role='text')
|
||||
capture(child, 'leaderboard-empty')
|
||||
driver.press(label='Back', role='button')
|
||||
driver.wait(label='Account', role='text')
|
||||
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]
|
||||
@@ -261,6 +267,23 @@ def main():
|
||||
saved = wait(lambda: record.read_bytes() if record.exists() else None, "Classic did not save")
|
||||
driver.press(label="Back", role="button")
|
||||
driver.wait(label="Shovey Editor", role="button")
|
||||
driver.press(label='Profile', role='button')
|
||||
driver.press(label='Leaderboard', role='button')
|
||||
driver.wait(label='Shovey', role='button')
|
||||
assert not driver.find(label='Apfelwurm', role='button'), 'An undownloaded game has a board'
|
||||
assert not driver.find(label='Shovey Editor', role='button'), 'An unranked editor has a board'
|
||||
capture(child, 'leaderboard-installed')
|
||||
state = profile / 'resources/state/arcade.shovey.json'
|
||||
state.parent.mkdir(parents=True, exist_ok=True)
|
||||
state.write_text('{"v":1,"installed":0,"favorite":0}')
|
||||
driver.wait(label='No leaderboard data yet.', role='text')
|
||||
assert not driver.find(label='Shovey', role='button'), 'A retained score kept an uninstalled board visible'
|
||||
state.write_text('{"v":1,"installed":1,"favorite":0}')
|
||||
driver.wait(label='Shovey', role='button')
|
||||
driver.press(label='Back', role='button')
|
||||
driver.wait(label='Account', role='text')
|
||||
driver.press(label='Back', role='button')
|
||||
driver.wait(label='Shovey Editor', role='button')
|
||||
assert not driver.find(label=sizes["shovey"], role="text"), "Installed games must omit their download size"
|
||||
driver.press(label="Shovey Editor", role="button")
|
||||
driver.wait(label='Download size: ' + sizes['shovey-editor'], role='text')
|
||||
@@ -287,8 +310,10 @@ def main():
|
||||
assert not driver.find(label='Pause', role='button'), 'Unverified bytes must never run'
|
||||
server['corrupt_wurm'] = False
|
||||
primary_download('Try again')
|
||||
# The cover is its title: Apfelwurm asks once how to move, then plays.
|
||||
driver.wait(label='How do you want to move?', role='text', timeout=60)
|
||||
# The hosted player opens its title before its first steering choice.
|
||||
driver.wait(label='Play', role='button', timeout=60)
|
||||
driver.press(label='Play', role='button')
|
||||
driver.wait(label='How do you want to move?', role='text')
|
||||
driver.press(label='Swipe', role='button')
|
||||
driver.wait(label='Pause', role='button')
|
||||
capture(child, 'wurm-playing')
|
||||
@@ -297,7 +322,7 @@ def main():
|
||||
driver.press(label='Back to title', role='button')
|
||||
driver.wait(label='Play', role='button')
|
||||
capture(child, 'wurm-title')
|
||||
driver.press(label='Back', role='button')
|
||||
driver.key('escape')
|
||||
driver.wait(label='Shovey', role='button')
|
||||
for entry in json.loads((root / 'build/arcade.json').read_text())['children']:
|
||||
path = profile / 'resources/downloads' / (entry['sha256'] + '.zx')
|
||||
|
||||
@@ -18,7 +18,7 @@ class GameResourcesTest(unittest.TestCase):
|
||||
(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']}
|
||||
'library_entries': ['engine:Step'], 'shared_records': ['local.campaign']}
|
||||
|
||||
def declare(value):
|
||||
(root / 'apps.json').write_text(json.dumps(
|
||||
@@ -28,9 +28,13 @@ class GameResourcesTest(unittest.TestCase):
|
||||
parsed = declare(app)
|
||||
self.assertTrue(parsed['shared_code'])
|
||||
self.assertEqual(parsed['library_entries'], ['engine:Step'])
|
||||
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']}]:
|
||||
app | {'library_entries': ['engine:Step', 'engine:Step']},
|
||||
app | {'shared_records': ['../campaign']},
|
||||
app | {'shared_records': ['local.campaign', 'local.campaign']},
|
||||
app | {'shared_records': ['..']}, app | {'shared_records': 'campaign'}]:
|
||||
with self.subTest(invalid=invalid), self.assertRaises(ValueError):
|
||||
declare(invalid)
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
"""Released games must bring new dependency edges without moving backwards."""
|
||||
import importlib.util
|
||||
import json
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import tempfile
|
||||
import tomllib
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
spec = importlib.util.spec_from_file_location('follow_game_releases', ROOT / 'scripts/follow-game-releases.py')
|
||||
follower = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(follower)
|
||||
|
||||
|
||||
class GameUpdates(unittest.TestCase):
|
||||
def follow(self, comparison, same_commit=False, failure=False, wrong_commit=False):
|
||||
with tempfile.TemporaryDirectory(prefix='arcade-release-metadata-') as temporary:
|
||||
root = Path(temporary)
|
||||
(root / 'apps').mkdir()
|
||||
old = '1' * 40
|
||||
new = old if same_commit else '2' * 40
|
||||
lock = {'format': 1, 'toolchain': {'commit': 'compiler'},
|
||||
'root': {'dependencies': {'wurm': 'old', 'other': 'unrelated'}},
|
||||
'packages': [{'id': 'old', 'name': 'Apfelwurm',
|
||||
'url': 'https://github.com/waozixyz/wurm.git',
|
||||
'commit': old, 'ref': 'master', 'dependencies': {}},
|
||||
{'id': 'unrelated', 'commit': 'unchanged', 'dependencies': {}}]}
|
||||
original_lock = json.dumps(lock)
|
||||
(root / 'ziran.lock').write_text(original_lock)
|
||||
original_manifest = ('[package]\nname = "Arcade"\n\n[dependencies.wurm]\n'
|
||||
'git = "https://github.com/waozixyz/wurm.git"\nref = "master"\n\n'
|
||||
'[dependencies.other]\nref = "stable"\n')
|
||||
(root / 'ziran.toml').write_text(original_manifest)
|
||||
(root / 'games.json').write_text(json.dumps({'packages': ['wurm']}))
|
||||
# Release metadata may name a release before its source is pinned.
|
||||
(root / 'apps/versions.json').write_text(json.dumps({'node_apps': {'wurm': {'version': '0.2.0'}}}))
|
||||
|
||||
def gh(*arguments):
|
||||
if arguments[0] == 'release':
|
||||
return 'v0.2.0'
|
||||
return comparison if '/compare/' in arguments[1] else new
|
||||
|
||||
def resolve(command, **kwargs):
|
||||
self.assertEqual(command, ['verified-ziran', 'update', 'wurm'])
|
||||
self.assertEqual(kwargs, {'cwd': root, 'check': True})
|
||||
self.assertIn(f'ref = "{new}"', (root / 'ziran.toml').read_text())
|
||||
declaration = tomllib.loads((root / 'ziran.toml').read_text())
|
||||
self.assertEqual(declaration['dependencies']['wurm']['ref'], new)
|
||||
self.assertEqual(declaration['dependencies']['other']['ref'], 'stable')
|
||||
if failure:
|
||||
(root / 'ziran.lock').write_text('partial resolver output')
|
||||
raise subprocess.CalledProcessError(1, command)
|
||||
# A package-manager result with a newly introduced Entity import.
|
||||
# The follower must retain this graph verbatim, rather than
|
||||
# replacing the game id while preserving its old empty edges.
|
||||
lock['root']['dependencies']['wurm'] = 'released'
|
||||
lock['packages'][0].update(id='released', commit=old if wrong_commit else new,
|
||||
ref=new, dependencies={'entity': 'accounts'})
|
||||
lock['packages'].append({'id': 'accounts', 'commit': 'new-entity', 'dependencies': {}})
|
||||
(root / 'ziran.lock').write_text(json.dumps(lock))
|
||||
|
||||
updates = root / 'updates.json'
|
||||
with patch.object(follower, 'ROOT', root), patch.object(follower, 'UPDATES', updates), \
|
||||
patch.object(follower, 'gh', gh), patch.object(follower.subprocess, 'run', side_effect=resolve) as run:
|
||||
# Discovery must not require a compiler or modify either input.
|
||||
follower.record_updates(follower.released_updates())
|
||||
self.assertEqual((root / 'ziran.lock').read_text(), original_lock)
|
||||
self.assertEqual((root / 'ziran.toml').read_text(), original_manifest)
|
||||
run.assert_not_called()
|
||||
if failure or wrong_commit:
|
||||
with self.assertRaises((subprocess.CalledProcessError, ValueError)):
|
||||
follower.pin('verified-ziran')
|
||||
self.assertEqual((root / 'ziran.lock').read_text(), original_lock)
|
||||
self.assertEqual((root / 'ziran.toml').read_text(), original_manifest)
|
||||
else:
|
||||
follower.pin('verified-ziran')
|
||||
calls = run.call_count
|
||||
return json.loads((root / 'ziran.lock').read_text()), json.loads(updates.read_text()), old, new, calls
|
||||
|
||||
def test_new_release_refreshes_transitive_graph(self):
|
||||
lock, updates, old, new, calls = self.follow('ahead')
|
||||
self.assertEqual(lock['packages'][0]['commit'], new)
|
||||
self.assertEqual(lock['root']['dependencies']['wurm'], lock['packages'][0]['id'])
|
||||
self.assertEqual(lock['packages'][0]['dependencies'], {'entity': 'accounts'})
|
||||
self.assertEqual(lock['packages'][1]['commit'], 'unchanged')
|
||||
self.assertEqual(lock['toolchain']['commit'], 'compiler')
|
||||
self.assertEqual((len(updates), calls), (1, 1))
|
||||
|
||||
def test_same_source_is_unchanged(self):
|
||||
lock, updates, old, new, calls = self.follow('identical', same_commit=True)
|
||||
self.assertEqual(lock['packages'][0]['commit'], old)
|
||||
self.assertEqual((updates, calls), ([], 0))
|
||||
|
||||
def test_older_release_never_moves_the_pin_back(self):
|
||||
lock, updates, old, new, calls = self.follow('behind')
|
||||
self.assertEqual(lock['packages'][0]['commit'], old)
|
||||
self.assertEqual((updates, calls), ([], 0))
|
||||
|
||||
def test_failed_resolution_restores_manifest_and_lock(self):
|
||||
self.follow('ahead', failure=True)
|
||||
|
||||
def test_local_override_cannot_publish_wrong_game(self):
|
||||
self.follow('ahead', wrong_commit=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -230,6 +230,9 @@ def main():
|
||||
resize_owned_window(child, 480, 820)
|
||||
driver.press(label='Swipe and tap')
|
||||
driver.wait_gone(label='How do you want to move?', role='text')
|
||||
driver.wait(label='Got it', role='button')
|
||||
driver.press(label='Got it', role='button')
|
||||
driver.wait_gone(label='Got it', role='button')
|
||||
assert (profile / 'games/arcade.shovey-player/records/controls').read_text() == 'off'
|
||||
assert not driver.find(label='Continue', role='button'), 'Classic must open straight on a level'
|
||||
assert driver.find(label='Shovey', role='image', visible=True), 'Shovey must be drawn as a picture'
|
||||
|
||||
@@ -117,6 +117,9 @@ def main():
|
||||
answer_level_updates(driver)
|
||||
driver.press(label='Swipe and tap')
|
||||
driver.wait_gone(label='How do you want to move?', role='text')
|
||||
driver.wait(label='Got it', role='button')
|
||||
driver.press(label='Got it', role='button')
|
||||
driver.wait_gone(label='Got it', role='button')
|
||||
# Entering play may save the untouched campaign; a fresh profile may
|
||||
# have no record until the first move.
|
||||
deadline = time.monotonic() + 10
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
"""Startup previews keep full colour and alpha while the originals stay intact."""
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
from PIL import Image
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
spec = importlib.util.spec_from_file_location('build_desktop', ROOT / 'scripts/build-desktop.py')
|
||||
desktop = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(desktop)
|
||||
|
||||
|
||||
class StartupArtTests(unittest.TestCase):
|
||||
def test_previews_keep_colour_alpha_and_aspect_ratio(self):
|
||||
work = ROOT / 'build/scratch'
|
||||
work.mkdir(parents=True, exist_ok=True)
|
||||
with tempfile.TemporaryDirectory(prefix='startup-art-', dir=work) as temporary:
|
||||
root = Path(temporary)
|
||||
source = root / 'source/assets/shovey'
|
||||
source.mkdir(parents=True)
|
||||
# A continuous RGB gradient needs more than a 256-colour palette.
|
||||
gradient = Image.new('RGB', (900, 1200))
|
||||
gradient.putdata([(x % 256, y % 256, (x + y) % 256)
|
||||
for y in range(1200) for x in range(900)])
|
||||
gradient.save(source / 'title-portrait.png')
|
||||
gradient.transpose(Image.Transpose.ROTATE_90).save(source / 'title-landscape.png')
|
||||
logo = gradient.resize((1200, 400)).convert('RGBA')
|
||||
alpha = Image.new('L', logo.size, 0)
|
||||
alpha.paste(255, (100, 50, 1100, 350))
|
||||
logo.putalpha(alpha)
|
||||
logo.save(source / 'logo.png')
|
||||
originals = {path.name: path.read_bytes() for path in source.iterdir()}
|
||||
output = root / 'output'
|
||||
desktop.stage_startup_art(root / 'source', output)
|
||||
expected = {'title-portrait.png': (480, 640),
|
||||
'title-landscape.png': (640, 480), 'logo.png': (512, 171)}
|
||||
for name, size in expected.items():
|
||||
with self.subTest(image=name), Image.open(output / 'startup/shovey' / name) as preview:
|
||||
self.assertEqual(preview.size, size)
|
||||
self.assertEqual(preview.mode, 'RGBA' if name == 'logo.png' else 'RGB')
|
||||
self.assertIsNone(preview.getcolors(256), 'Title previews must not use a 256-colour palette')
|
||||
if name == 'logo.png':
|
||||
self.assertEqual(preview.getpixel((0, 0))[3], 0)
|
||||
self.assertEqual(preview.getpixel((256, 85))[3], 255)
|
||||
self.assertEqual((source / name).read_bytes(), originals[name])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,77 @@
|
||||
"""Verify coloured startup previews, original covers and title transitions privately."""
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from PIL import Image
|
||||
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--binary', type=Path, required=True)
|
||||
parser.add_argument('--driver-source', type=Path, required=True)
|
||||
args = parser.parse_args()
|
||||
assert int(os.environ['DISPLAY'].split(':')[-1].split('.')[0]) >= 400
|
||||
assert os.environ['YUE_DESKTOP_RECOVERY'] == '0'
|
||||
sys.path.insert(0, str(args.driver_source / 'tests'))
|
||||
from ui_driver import UiDriver
|
||||
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
output = root / 'build/scratch/title-progressive/ui'
|
||||
output.mkdir(parents=True, exist_ok=True)
|
||||
binary = args.binary.resolve()
|
||||
driver = UiDriver(output / 'driver')
|
||||
|
||||
with tempfile.TemporaryDirectory(prefix='profile-', dir=output) as temporary:
|
||||
profile = Path(temporary)
|
||||
records = profile / 'games/arcade.shovey-player/records'
|
||||
records.mkdir(parents=True)
|
||||
(records / 'level-updates').write_text('off')
|
||||
log_path = output / 'game.log'
|
||||
with log_path.open('w') as log:
|
||||
child = subprocess.Popen([str(binary)], cwd=binary.parent,
|
||||
env=os.environ | driver.environment() |
|
||||
{'ARCADE_DATA': str(profile), 'ENTITY_DATA': str(profile / 'entity'),
|
||||
'LANG': 'en_US.UTF-8', 'SDL_AUDIODRIVER': 'dummy'},
|
||||
stdout=log, stderr=subprocess.STDOUT)
|
||||
driver.attach(child, log_path)
|
||||
try:
|
||||
startup = driver.tree()
|
||||
assert driver.last['frame'] <= 3, 'Preview must precede collection loading'
|
||||
images = [node for node in startup if node['kind'] == 'image' and node['label'] == 'Shovey']
|
||||
assert len(images) == 2, 'Startup must show the artwork and coloured logo together'
|
||||
for node in images:
|
||||
assert 'startup/shovey/' in node['detail']
|
||||
with Image.open(node['detail']) as picture:
|
||||
assert picture.mode in ('RGB', 'RGBA'), 'Startup art must retain full colour'
|
||||
assert max(picture.size) <= 640, 'Startup must use a small preview'
|
||||
(output / 'startup-tree.json').write_text(json.dumps(driver.last, indent=2) + '\n')
|
||||
driver.wait(label='Play', role='button', timeout=60)
|
||||
full = [node for node in driver.tree() if node['kind'] == 'image' and
|
||||
'arcade/covers/shovey-' in node.get('detail', '')]
|
||||
assert len(full) >= 2
|
||||
assert any(max(Image.open(node['detail']).size) >= 1200 for node in full), \
|
||||
'Ready cover must replace the preview with the original artwork'
|
||||
windows = subprocess.check_output(['xdotool', 'search', '--onlyvisible', '--pid', str(child.pid)], text=True).split()
|
||||
assert len(windows) == 1
|
||||
window = windows[0]
|
||||
assert subprocess.check_output(['xdotool', 'getwindowpid', window], text=True).strip() == str(child.pid)
|
||||
subprocess.run(['xdotool', 'windowmove', window, '0', '0'], check=True)
|
||||
subprocess.run(['import', '-window', window, str(output / 'classic-ready.png')], check=True)
|
||||
driver.key('right')
|
||||
subprocess.run(['import', '-window', window, str(output / 'logo-fading.png')], check=True)
|
||||
driver.wait(label='Editor', role='text')
|
||||
driver.wait(label='Open', role='button')
|
||||
driver.wait_idle(frames=5)
|
||||
subprocess.run(['import', '-window', window, str(output / 'editor-ready.png')], check=True)
|
||||
driver.key('left')
|
||||
driver.wait(label='Classic', role='text')
|
||||
driver.wait(label='Play', role='button')
|
||||
assert child.poll() is None
|
||||
finally:
|
||||
if child.poll() is None:
|
||||
child.terminate()
|
||||
child.wait(timeout=10)
|
||||
print('Local title UI test: full-colour previews precede original covers; Classic/Editor transitions work')
|
||||
@@ -1,5 +1,6 @@
|
||||
// Open Arcade's browser edition in a private headless browser and require
|
||||
// its library to draw without a failed frame. Usage: node tests/web_site_test.mjs SITE_DIR
|
||||
// install, play, reopen and recover from a failed saved-record read.
|
||||
// Usage: node tests/web_site_test.mjs SITE_DIR
|
||||
import { spawn } from 'node:child_process';
|
||||
import { createServer } from 'node:http';
|
||||
import { access, mkdtemp, readFile, rm } from 'node:fs/promises';
|
||||
@@ -8,13 +9,32 @@ import { extname, join, normalize } from 'node:path';
|
||||
import { setTimeout as delay } from 'node:timers/promises';
|
||||
|
||||
const site = process.argv[2];
|
||||
const game = process.env.ARCADE_TEST_GAME || 'Apfelwurm';
|
||||
if (!site) throw new Error('Usage: node tests/web_site_test.mjs SITE_DIR');
|
||||
const types = { '.html': 'text/html', '.js': 'text/javascript', '.wasm': 'application/wasm', '.json': 'application/json',
|
||||
'.svg': 'image/svg+xml', '.png': 'image/png', '.jpg': 'image/jpeg', '.webmanifest': 'application/manifest+json' };
|
||||
const server = createServer(async (request, response) => {
|
||||
const path = normalize(decodeURIComponent(new URL(request.url, 'http://x').pathname)).replace(/^\/+/, '') || 'index.html';
|
||||
const url = new URL(request.url, 'http://x');
|
||||
const path = normalize(decodeURIComponent(url.pathname)).replace(/^\/+/, '') || 'index.html';
|
||||
try {
|
||||
const body = await readFile(join(site, path));
|
||||
// Model the previous runtime still cached under its unversioned URL.
|
||||
// A new deployment must request its coherent runtime revision instead.
|
||||
if (path === 'runtime.js' && !url.searchParams.has('v')) {
|
||||
response.writeHead(200, { 'Content-Type': 'text/javascript', 'Cache-Control': 'public, max-age=14400' });
|
||||
response.end('console.error("Stale cached Arcade runtime"); Module.onAbort();');
|
||||
return;
|
||||
}
|
||||
let body = await readFile(join(site, path));
|
||||
if (path === 'index.html') {
|
||||
// Enable only the existing widget-tree reader in this disposable page.
|
||||
// Input still travels through the browser's real pointer and key events.
|
||||
body = Buffer.from(body.toString().replace('document.body.appendChild(script);', `
|
||||
Module.preRun = (Module.preRun || []).concat(function () {
|
||||
FS.mkdir('/arcade-test');
|
||||
ENV.KRYON_TEST_DRIVER = '/arcade-test';
|
||||
});
|
||||
document.body.appendChild(script);`));
|
||||
}
|
||||
response.writeHead(200, { 'Content-Type': types[extname(path)] || 'application/octet-stream' });
|
||||
response.end(body);
|
||||
} catch { response.writeHead(404); response.end(); }
|
||||
@@ -23,15 +43,19 @@ await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));
|
||||
const profile = await mkdtemp(join(process.env.TMPDIR || tmpdir(), 'arcade-web-'));
|
||||
const env = { ...process.env };
|
||||
for (const key of ['DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY', 'DBUS_SESSION_BUS_ADDRESS']) delete env[key];
|
||||
env.YUE_DESKTOP_RECOVERY = '0';
|
||||
const browser = spawn(process.env.CHROMIUM || 'chromium', ['--headless=new', '--no-sandbox', '--use-gl=swiftshader',
|
||||
'--enable-unsafe-swiftshader', '--no-first-run', '--remote-debugging-port=0', `--user-data-dir=${profile}`, 'about:blank'],
|
||||
{ env, detached: true, stdio: 'ignore' });
|
||||
let socket, sequence = 0;
|
||||
const pending = new Map(), console_lines = [];
|
||||
const command = (method, params = {}) => new Promise((resolve, reject) => {
|
||||
const id = ++sequence; pending.set(id, { resolve, reject }); socket.send(JSON.stringify({ id, method, params }));
|
||||
const id = ++sequence;
|
||||
const timeout = setTimeout(() => { pending.delete(id); reject(new Error(method + ' timed out')); }, 15000);
|
||||
pending.set(id, { resolve, reject, timeout }); socket.send(JSON.stringify({ id, method, params }));
|
||||
});
|
||||
let failure = '';
|
||||
let expectedDiagnostics = 0;
|
||||
try {
|
||||
const started = Date.now();
|
||||
while (true) {
|
||||
@@ -47,9 +71,12 @@ try {
|
||||
const message = JSON.parse(event.data);
|
||||
if (message.method === 'Runtime.consoleAPICalled')
|
||||
console_lines.push(message.params.args.map(arg => arg.value ?? arg.description ?? '').join(' '));
|
||||
if (message.method === 'Runtime.exceptionThrown')
|
||||
console_lines.push(message.params.exceptionDetails.exception?.description || message.params.exceptionDetails.text);
|
||||
const request = pending.get(message.id);
|
||||
if (!request) return;
|
||||
pending.delete(message.id);
|
||||
clearTimeout(request.timeout);
|
||||
message.error ? request.reject(new Error(JSON.stringify(message.error))) : request.resolve(message.result);
|
||||
};
|
||||
await command('Runtime.enable'); await command('Page.enable');
|
||||
@@ -69,11 +96,158 @@ try {
|
||||
if (!ready) await delay(250);
|
||||
}
|
||||
if (!ready && !failure) failure = 'the library never became ready';
|
||||
if (ready) {
|
||||
const resources = await command('Runtime.evaluate', {
|
||||
expression: 'performance.getEntriesByType("resource").map(entry=>entry.name)', returnByValue: true });
|
||||
const runtime = resources.result.value.map(name=>new URL(name)).filter(url=>
|
||||
/\/(runtime\.(js|wasm|data)(\.gz)?|arcade\.json|apps\.zx(\.gz)?)$/.test(url.pathname));
|
||||
const revisions = new Set(runtime.map(url=>url.searchParams.get('v')));
|
||||
if (!runtime.some(url=>url.pathname.endsWith('/runtime.js')) ||
|
||||
!runtime.some(url=>url.pathname.endsWith('/runtime.wasm')) ||
|
||||
revisions.size !== 1 || !/^[a-f0-9]{64}$/.test([...revisions][0]))
|
||||
failure = 'the runtime and collection files did not use one coherent cache revision';
|
||||
}
|
||||
// Let the library draw several frames before judging them.
|
||||
await delay(3000);
|
||||
const failed = console_lines.find(line => /frame failed|portable execution failed/.test(line));
|
||||
if (ready && !failure) {
|
||||
const evaluate = async expression => {
|
||||
const value = await command('Runtime.evaluate', { expression, returnByValue: true, awaitPromise: true });
|
||||
if (value.exceptionDetails) throw new Error(value.exceptionDetails.exception?.description || value.exceptionDetails.text);
|
||||
return value.result?.value;
|
||||
};
|
||||
let serial = 0;
|
||||
const tree = async () => {
|
||||
await evaluate(`FS.writeFile('/arcade-test/command', ${JSON.stringify(++serial + '\ttree\n')})`);
|
||||
const end = Date.now() + 10000;
|
||||
while (Date.now() < end) {
|
||||
const failed = console_lines.slice(expectedDiagnostics).find(line => /frame failed|portable execution failed|RuntimeError/.test(line));
|
||||
if (failed) throw new Error(failed);
|
||||
const reply = await evaluate(`FS.analyzePath('/arcade-test/reply').exists ? FS.readFile('/arcade-test/reply', {encoding:'utf8'}) : ''`);
|
||||
if (reply) {
|
||||
await evaluate(`FS.unlink('/arcade-test/reply')`);
|
||||
return JSON.parse(reply).nodes;
|
||||
}
|
||||
await delay(100);
|
||||
}
|
||||
throw new Error('Arcade stopped drawing frames');
|
||||
};
|
||||
const click = async node => {
|
||||
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);
|
||||
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 => {
|
||||
let nodes;
|
||||
for (const end = Date.now() + 60000; Date.now() < end;) {
|
||||
nodes = await tree();
|
||||
const found = button(nodes, label);
|
||||
if (found) return found;
|
||||
await delay(150);
|
||||
}
|
||||
throw new Error('Game did not show ' + label + ': ' + nodes.filter(node => node.kind === 'button').map(node => node.label).join(', '));
|
||||
};
|
||||
const pageReady = async () => {
|
||||
for (const end = Date.now() + 60000; Date.now() < end;) {
|
||||
if (await evaluate('!!(window.Module && Module.profileReady)')) return;
|
||||
await delay(150);
|
||||
}
|
||||
throw new Error('The library did not reopen');
|
||||
};
|
||||
const cover = button(await tree(), game);
|
||||
if (!cover) throw new Error('Game cover missing');
|
||||
await click(cover);
|
||||
const download = (await tree()).findLast(node => node.kind === 'button' && node.label === 'Download');
|
||||
if (!download) throw new Error('The cover did not offer its download');
|
||||
await click(download);
|
||||
await waitButton(game === 'Apfelwurm' ? 'Play' : 'Back');
|
||||
const play = button(await tree(), 'Play');
|
||||
if (play) await click(play);
|
||||
const swipe = button(await tree(), 'Swipe');
|
||||
if (swipe) await click(swipe);
|
||||
if (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)))`);
|
||||
await command('Page.reload');
|
||||
await pageReady();
|
||||
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' : 'Back');
|
||||
console.log(game + ' downloaded, opened its game and reopened from its installed cover');
|
||||
if (game === 'Apfelwurm') {
|
||||
await command('Page.reload');
|
||||
await pageReady();
|
||||
const installed = button(await tree(), game);
|
||||
const saved = await evaluate(`(() => {
|
||||
const root='/kryon-apps/arcade/games';
|
||||
for (const name of FS.readdir(root)) {
|
||||
const path=root+'/'+name+'/records/controls.dat';
|
||||
if (FS.analyzePath(path).exists) return {path,text:FS.readFile(path,{encoding:'utf8'})};
|
||||
}
|
||||
return null;
|
||||
})()`);
|
||||
if (!saved) throw new Error('Playing did not retain the control choice');
|
||||
await evaluate(`(() => {
|
||||
const original=FS.open;
|
||||
FS.open=function(path,...args) {
|
||||
if (String(path).includes('/games/') && String(path).includes('/records/') && !String(path).endsWith('/.lock')) {
|
||||
FS.open=original;
|
||||
throw new FS.ErrnoError(29);
|
||||
}
|
||||
return original.call(this,path,...args);
|
||||
};
|
||||
})()`);
|
||||
await click(installed);
|
||||
// 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')) {
|
||||
try {
|
||||
const play=button(await tree(),'Play');
|
||||
if (play) await click(play);
|
||||
} catch (error) {
|
||||
// The first game frame can fail between sampling the flag and
|
||||
// asking for its tree. Require the runtime's failure signal.
|
||||
let failed=false;
|
||||
for (const end=Date.now()+1000; Date.now()<end;) {
|
||||
failed=await evaluate('!!Module.arcadeFailed');
|
||||
if (failed) break;
|
||||
await delay(50);
|
||||
}
|
||||
if (!failed) throw error;
|
||||
}
|
||||
}
|
||||
let recovered=false;
|
||||
for (const end=Date.now()+15000; Date.now()<end;) {
|
||||
recovered=await evaluate(`!!Module.arcadeFailed && document.getElementById('loading').classList.contains('error') && getComputedStyle(document.getElementById('loading')).opacity==='1'`);
|
||||
if (recovered) break;
|
||||
await delay(100);
|
||||
}
|
||||
if (!recovered) throw new Error('A failed game left the library frozen without recovery');
|
||||
if (!console_lines.some(line=>/portable execution failed in ReadLevel/.test(line)))
|
||||
throw new Error('The fixture did not reproduce the reported saved-record failure');
|
||||
expectedDiagnostics=console_lines.length;
|
||||
const retry=await evaluate(`(() => {const r=document.getElementById('retry').getBoundingClientRect();return {visible_x:r.x,visible_y:r.y,visible_width:r.width,visible_height:r.height};})()`);
|
||||
await click(retry);
|
||||
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');
|
||||
console.log('The reported ReadLevel failure showed recovery; returning reopened the installed game and retained its saved record');
|
||||
}
|
||||
}
|
||||
const failed = console_lines.slice(expectedDiagnostics).find(line => /frame failed|portable execution failed/.test(line));
|
||||
if (!failure && failed) failure = failed;
|
||||
} catch (error) {
|
||||
console.error(console_lines.slice(-20).join('\n'));
|
||||
throw error;
|
||||
} finally {
|
||||
socket?.close();
|
||||
try { process.kill(-browser.pid, 'SIGTERM'); } catch {}
|
||||
server.close();
|
||||
await rm(profile, { recursive: true, force: true }).catch(() => {});
|
||||
|
||||
@@ -18,72 +18,47 @@
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/qrcode.git"
|
||||
},
|
||||
{
|
||||
"commit": "d74348c2e288ac55740461f7e106cda365b4db4a",
|
||||
"dependencies": {"apps": "pb79af7eaf6037b09", "crypto": "pc23fbf455e97614d", "curl": "p1ca0e8d3c19dbe4c", "daochi_client": "pf7b24c15869d6839", "entity": "p193d41674d9daa1c", "game2d": "pf2f54c7603f6e861", "kryon": "p678dfe3877859170", "kss": "p1b13dda539ed2a39", "liboqs": "pecdb097af6ab16f7", "mingcute": "pe1027b9d16704793", "monocypher": "p809b4d31a48625a3", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "practices": "p9079dde0fcc11248", "qrcode": "p0dfa70137405b096", "rini": "p09fa77e94b0dfc6c", "sqlite": "p1d80baafaa5fa18a"},
|
||||
"id": "p183b01bccc6424e7",
|
||||
"name": "Inbe",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/inbe.git"
|
||||
},
|
||||
{
|
||||
"commit": "d8996893ddc6c2bdfa334f99a41b1db6db900491",
|
||||
"dependencies": {"daochi_client": "pf7b24c15869d6839", "kryon": "p678dfe3877859170", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "p193d41674d9daa1c",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
},
|
||||
{
|
||||
"commit": "1cb9df183089a77c8a16448a556186f30b261a98",
|
||||
"dependencies": {"kryon": "pc345e310c75f8d37"},
|
||||
"dependencies": {"kryon": "p678dfe3877859170"},
|
||||
"id": "p1b13dda539ed2a39",
|
||||
"name": "Kss",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kss.git"
|
||||
},
|
||||
{
|
||||
"commit": "bad2caaa84ef3eae61e40c99bf572d2b060d0ca2",
|
||||
"dependencies": {"kryon": "pc345e310c75f8d37"},
|
||||
"id": "p20eb23d3e6db3711",
|
||||
"name": "Game2D",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/game2d.git"
|
||||
},
|
||||
{
|
||||
"commit": "1f3e5e763dbee918ae8f8c44b84bb98f8d0fa2d6",
|
||||
"commit": "19b299005fbe2d895f4ad525cfdae62a2220c3ea",
|
||||
"dependencies": {},
|
||||
"id": "p219661bf4be659ed",
|
||||
"name": "sqlite",
|
||||
"ref": "master",
|
||||
"source": true,
|
||||
"url": "https://github.com/sqlite/sqlite.git"
|
||||
},
|
||||
{
|
||||
"commit": "be74b13fd9b991e63a96360e8f13d781cece964e",
|
||||
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "pc345e310c75f8d37", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "p2b0009b9bbaa09de",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
},
|
||||
{
|
||||
"commit": "eb2b201a2da3bfc6fefd7ff2d8e476e3cb9e5bcb",
|
||||
"dependencies": {},
|
||||
"id": "p2f75403ea4cb61e4",
|
||||
"id": "p1ca0e8d3c19dbe4c",
|
||||
"name": "curl",
|
||||
"ref": "master",
|
||||
"source": true,
|
||||
"url": "https://github.com/curl/curl.git"
|
||||
},
|
||||
{
|
||||
"commit": "2f6f1f57d7de742ef7ebc01159c2315acf793d5b",
|
||||
"dependencies": {"apps": "p7407a72c65eeeb2b", "crypto": "pc23fbf455e97614d", "curl": "p2f75403ea4cb61e4", "daochi_client": "p9972fcdd2d5ba999", "game2d": "p20eb23d3e6db3711", "kryon": "pc345e310c75f8d37", "kss": "p1b13dda539ed2a39", "liboqs": "p4b0a50b49959e674", "mingcute": "pe1027b9d16704793", "monocypher": "p809b4d31a48625a3", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "qrcode": "p0dfa70137405b096", "rini": "p09fa77e94b0dfc6c", "self": "pa4da0de6c3c44e61", "sqlite": "p219661bf4be659ed"},
|
||||
"id": "p48228a6b7e2920d3",
|
||||
"name": "Inbe",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/inbe.git"
|
||||
},
|
||||
{
|
||||
"commit": "e1f480f382d9443c4412133b55948374c77a5c21",
|
||||
"commit": "5d1ee888094efc63d1fb25a58af93478b103d441",
|
||||
"dependencies": {},
|
||||
"id": "p4b0a50b49959e674",
|
||||
"name": "liboqs",
|
||||
"ref": "main",
|
||||
"source": true,
|
||||
"url": "https://github.com/open-quantum-safe/liboqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "481ec2a6cdee05680bd809d3436134ef670db6ce",
|
||||
"dependencies": {"apps": "p7407a72c65eeeb2b", "kryon": "pc345e310c75f8d37", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "p4b52e2fb4081447c",
|
||||
"name": "Apfelwurm",
|
||||
"id": "p1d80baafaa5fa18a",
|
||||
"name": "sqlite",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/wurm.git"
|
||||
"source": true,
|
||||
"url": "https://github.com/sqlite/sqlite.git"
|
||||
},
|
||||
{
|
||||
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
|
||||
@@ -94,30 +69,30 @@
|
||||
"source": true,
|
||||
"url": "https://github.com/raysan5/raylib.git"
|
||||
},
|
||||
{
|
||||
"commit": "39f87865b174832c5f5879c1459ba95a19fc5318",
|
||||
"dependencies": {"apps": "pb79af7eaf6037b09", "entity": "p193d41674d9daa1c", "kryon": "p678dfe3877859170", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "p6161208dfb3fe0fb",
|
||||
"name": "Apfelwurm",
|
||||
"ref": "39f87865b174832c5f5879c1459ba95a19fc5318",
|
||||
"url": "https://github.com/waozixyz/wurm.git"
|
||||
},
|
||||
{
|
||||
"commit": "2839954d916c614e562d6c25c448928923d4190b",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "p678dfe3877859170",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
|
||||
"dependencies": {"liboqs": "p4b0a50b49959e674"},
|
||||
"dependencies": {"liboqs": "pecdb097af6ab16f7"},
|
||||
"id": "p7098ac9cd92f7e5f",
|
||||
"name": "Oqs",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/oqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "96e0ac55add63c65bea22dc2395a751e0b048fc1",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "pc345e310c75f8d37"},
|
||||
"id": "p7407a72c65eeeb2b",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "83c89a86b0047f1d539c2465ad87087597a8c156",
|
||||
"dependencies": {"apps": "p7407a72c65eeeb2b", "entity": "p2b0009b9bbaa09de", "kryon": "pc345e310c75f8d37", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "p7e870c2925a901aa",
|
||||
"name": "Shovey",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/shovey.git"
|
||||
},
|
||||
{
|
||||
"commit": "f5f0a19a5dc6c14a49adb3cd63ea79a60f6ba77b",
|
||||
"dependencies": {},
|
||||
@@ -128,29 +103,38 @@
|
||||
"url": "https://github.com/LoupVaillant/Monocypher.git"
|
||||
},
|
||||
{
|
||||
"commit": "25d9f649c43a8de44a5fea602d2835e33e6ca999",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
|
||||
"id": "p9972fcdd2d5ba999",
|
||||
"name": "DaochiClient",
|
||||
"commit": "8b81994303400255ddb0ee2da49044dbaef4397f",
|
||||
"dependencies": {},
|
||||
"id": "p9079dde0fcc11248",
|
||||
"name": "practices",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/daochi-client.git"
|
||||
},
|
||||
{
|
||||
"commit": "357a71d1ee2c7c9526c2af18793ea8628c505034",
|
||||
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "pc345e310c75f8d37", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "pa4da0de6c3c44e61",
|
||||
"name": "Self",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/self.git"
|
||||
"source": true,
|
||||
"url": "https://github.com/waozixyz/practices.git"
|
||||
},
|
||||
{
|
||||
"commit": "3f888653b6b97010163d824c4cc72476be3214f3",
|
||||
"dependencies": {"kryon": "pc345e310c75f8d37"},
|
||||
"dependencies": {"kryon": "p678dfe3877859170"},
|
||||
"id": "pab5377a2950368a2",
|
||||
"name": "plot",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/plot.git"
|
||||
},
|
||||
{
|
||||
"commit": "742d45c1ee04c5ef94d8c2b75605a2081ec94e03",
|
||||
"dependencies": {"apps": "pb79af7eaf6037b09", "entity": "p193d41674d9daa1c", "kryon": "p678dfe3877859170", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "pb78ec98f9af772eb",
|
||||
"name": "Shovey",
|
||||
"ref": "f6da6517c0886ead17d7fc8dd9471a07299f32b4",
|
||||
"url": "https://github.com/waozixyz/shovey.git"
|
||||
},
|
||||
{
|
||||
"commit": "b31f9528acc99ac13c7d396edaa42c293be1325f",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p678dfe3877859170"},
|
||||
"id": "pb79af7eaf6037b09",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "944826f70779a6b6cd53f6b06a75b36f4d8a2558",
|
||||
"dependencies": {},
|
||||
@@ -159,14 +143,6 @@
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/crypto.git"
|
||||
},
|
||||
{
|
||||
"commit": "919a18d7fca3b052c1a694aff105f5937d723e3f",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "pc345e310c75f8d37",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
|
||||
"dependencies": {},
|
||||
@@ -174,14 +150,39 @@
|
||||
"name": "mingcute",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/mingcute.git"
|
||||
},
|
||||
{
|
||||
"commit": "4778aa5044bf119c30df54219fa89357080af27f",
|
||||
"dependencies": {},
|
||||
"id": "pecdb097af6ab16f7",
|
||||
"name": "liboqs",
|
||||
"ref": "main",
|
||||
"source": true,
|
||||
"url": "https://github.com/open-quantum-safe/liboqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "cee04692f3461dcb098833472f071c434980debb",
|
||||
"dependencies": {"kryon": "p678dfe3877859170"},
|
||||
"id": "pf2f54c7603f6e861",
|
||||
"name": "Game2D",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/game2d.git"
|
||||
},
|
||||
{
|
||||
"commit": "e948c3f280e2e3fa3ef7317dfaca27bd36a4900b",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
|
||||
"id": "pf7b24c15869d6839",
|
||||
"name": "DaochiClient",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/daochi-client.git"
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"apps": "p7407a72c65eeeb2b", "entity": "p2b0009b9bbaa09de", "inbe": "p48228a6b7e2920d3", "kryon": "pc345e310c75f8d37", "mingcute": "pe1027b9d16704793", "shovey": "p7e870c2925a901aa", "wurm": "p4b52e2fb4081447c"},
|
||||
"dependencies": {"apps": "pb79af7eaf6037b09", "entity": "p193d41674d9daa1c", "inbe": "p183b01bccc6424e7", "kryon": "p678dfe3877859170", "mingcute": "pe1027b9d16704793", "shovey": "pb78ec98f9af772eb", "wurm": "p6161208dfb3fe0fb"},
|
||||
"name": "Arcade"
|
||||
},
|
||||
"toolchain": {
|
||||
"commit": "5efa24f818485cf265bdd5c066a4e2150175ac0e",
|
||||
"commit": "4c27b5a080a9596f5919ece1651e5a372be2142f",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/ziran.git"
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ ref = "master"
|
||||
# Shovey's editions and editor are available as separate downloads.
|
||||
[dependencies.shovey]
|
||||
git = "https://github.com/waozixyz/shovey.git"
|
||||
ref = "master"
|
||||
ref = "f6da6517c0886ead17d7fc8dd9471a07299f32b4"
|
||||
|
||||
# Compatibility tooling runs Inner Breeze's host checks; releases check its publisher pins.
|
||||
[dependencies.inbe]
|
||||
@@ -56,4 +56,4 @@ ref = "master"
|
||||
|
||||
[dependencies.wurm]
|
||||
git = "https://github.com/waozixyz/wurm.git"
|
||||
ref = "master"
|
||||
ref = "39f87865b174832c5f5879c1459ba95a19fc5318"
|
||||