Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b4b9f9e37 | ||
|
|
c49c9b66ad | ||
|
|
004f813255 | ||
|
|
53f6395939 | ||
|
|
80518a9e93 | ||
|
|
6d2c43eb11 | ||
|
|
b75ca75b70 | ||
|
|
b1c8213e3e | ||
|
|
e93839b45b | ||
|
|
904183956c | ||
|
|
d2a2799180 | ||
|
|
f5f1f7500d | ||
|
|
e5a952f221 | ||
|
|
c7be52fd7b | ||
|
|
a0d7e69509 | ||
|
|
97f6465d27 | ||
|
|
4903caf607 | ||
|
|
6cbb364c47 | ||
|
|
e140792243 | ||
|
|
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 | ||
|
|
96932541db |
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 * * * *'
|
||||
@@ -125,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,104 @@
|
||||
# Arcade changelog
|
||||
|
||||
## 0.7.109
|
||||
|
||||
- On a computer, games start without asking how to move, also inside Breeze.
|
||||
- Shovey 0.6.162: Coloured pits have new artwork.
|
||||
- Shovey 0.6.162: On a computer, play starts without asking how to move.
|
||||
|
||||
## 0.7.108
|
||||
|
||||
- Every game runs in Inner Breeze 2.1.61's smaller app format.
|
||||
- Shovey 0.6.160, Editor 0.2.145 and Island 0.4.8, and Apfelwurm 0.2.26 with newly painted skins that have calm, plain bodies.
|
||||
|
||||
## 0.7.107
|
||||
|
||||
- Apfelwurm 0.2.24: Keep the entrance area free of enemies: none start there or wander in, so nothing vanishes when you lose a life.
|
||||
- Apfelwurm 0.2.24: Restart Profile and Leaderboard by themselves if they stop, or say why instead of showing an empty page.
|
||||
|
||||
## 0.7.106
|
||||
|
||||
- Apfelwurm 0.2.23: Move a little faster throughout the campaign, with a consistent pace across Meadow.
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -192,14 +192,20 @@ in the person's private data directory.
|
||||
|
||||
## Shovey
|
||||
|
||||
[Shovey](https://github.com/waozixyz/shovey) has its own repository: Classic,
|
||||
Island and Editor, their artwork, puzzles and tests live there. Arcade builds
|
||||
[Shovey](https://github.com/waozixyz/shovey) has its own repository: Classic
|
||||
and the Editor, their artwork, puzzles and tests live there. Arcade builds
|
||||
Shovey from that package and offers it as a separate download. Opening Classic
|
||||
or Editor goes straight to its own screen; Levels lets you replay any unlocked
|
||||
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 @@
|
||||
a81eb5b14d2066925d19c3fd922865af40c90673cf54fb11bd7f9bf89a29cb98
|
||||
e41f568fade6b2fc1d622d42d57340ad4743c0cea281f410764b79fcefdf4ec0
|
||||
@@ -1,5 +1,9 @@
|
||||
# Chess changelog
|
||||
|
||||
## [1.2.1] - 2026-10-29
|
||||
|
||||
- Runs in Inner Breeze 2.1.61's smaller app format.
|
||||
|
||||
## [1.2.0] - 2026-10-18
|
||||
|
||||
- Paste one PGN game or a FEN position into the study board.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"kind": "game",
|
||||
"contract_version": 1,
|
||||
"module_api": 2,
|
||||
"host_api": 12,
|
||||
"host_api": 41,
|
||||
"save_schema": 1,
|
||||
"harnesses": ["arcade", "inbe"],
|
||||
"entry": "chess:Main",
|
||||
|
||||
@@ -1,49 +1,42 @@
|
||||
{
|
||||
"host_api": 12,
|
||||
"oldest_host_api": 12,
|
||||
"host_api": 41,
|
||||
"oldest_host_api": 41,
|
||||
"module_api": 2,
|
||||
"node_apps": {
|
||||
"chess": {
|
||||
"id": "inbe.chess",
|
||||
"title": "Chess",
|
||||
"version": "1.2.0",
|
||||
"sequence": 5,
|
||||
"host_api": 12
|
||||
"version": "1.2.1",
|
||||
"sequence": 6,
|
||||
"host_api": 41
|
||||
},
|
||||
"shovey": {
|
||||
"id": "arcade.shovey",
|
||||
"title": "Shovey",
|
||||
"version": "0.6.154",
|
||||
"sequence": 162,
|
||||
"host_api": 12
|
||||
},
|
||||
"shovey-island": {
|
||||
"id": "arcade.shovey-island",
|
||||
"title": "Shovey Island \u2014 Coming Soon",
|
||||
"version": "0.4.7",
|
||||
"sequence": 11,
|
||||
"host_api": 12
|
||||
"version": "0.6.162",
|
||||
"sequence": 169,
|
||||
"host_api": 41
|
||||
},
|
||||
"shovey-editor": {
|
||||
"id": "arcade.shovey-editor",
|
||||
"title": "Shovey Editor",
|
||||
"version": "0.2.144",
|
||||
"sequence": 146,
|
||||
"host_api": 12
|
||||
"version": "0.2.146",
|
||||
"sequence": 148,
|
||||
"host_api": 41
|
||||
},
|
||||
"arcade": {
|
||||
"id": "inbe.arcade",
|
||||
"title": "Arcade",
|
||||
"version": "0.7.89",
|
||||
"sequence": 168,
|
||||
"host_api": 36
|
||||
"version": "0.7.109",
|
||||
"sequence": 188,
|
||||
"host_api": 41
|
||||
},
|
||||
"wurm": {
|
||||
"id": "xyz.waozi.wurm",
|
||||
"title": "Apfelwurm",
|
||||
"version": "0.2.1",
|
||||
"sequence": 8,
|
||||
"host_api": 12
|
||||
"version": "0.2.26",
|
||||
"sequence": 21,
|
||||
"host_api": 41
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 458 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 444 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 422 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 429 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -9,7 +9,7 @@
|
||||
"source_sha256": "bf0bbeb15249f3d73c1b410e9737f7fd207310dcb5f28b7c3ce45401b77c8f9e"
|
||||
},
|
||||
"shovey-editor-preview": {
|
||||
"source_sha256": "1846b823110fffe82a3dbb319960ce768eefc16699d507d48b8608151eaff430"
|
||||
"source_sha256": "bcbf63563187f9dcdb6c7580f638e2fb2770b221240ee5699e54dc3c00be172c"
|
||||
},
|
||||
"shovey-landscape": {
|
||||
"source_sha256": "40c01eb8300e4c5db52b2d75373e17cdaf7f68140c33c0a225613fc174660747"
|
||||
@@ -21,7 +21,7 @@
|
||||
"source_sha256": "ddcbf989eab5971157d8cdc73494ed03660bb4c7a7679543248f45be260777e3"
|
||||
},
|
||||
"shovey-preview": {
|
||||
"source_sha256": "b1f2e5662cb96f2f5062cb0e5a8cd8ede153173ebc32ad17e26b404f3baf5924"
|
||||
"source_sha256": "96db251f36835c76cd03cd0104a6e1b5096e4c442d410960457edcd8e2377a38"
|
||||
},
|
||||
"wurm-landscape": {
|
||||
"source_sha256": "472773b7c106325e12777a81a29209496e22e0853782ca76955b6587824b1b30"
|
||||
|
||||
|
After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 559 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 461 KiB |
@@ -22,6 +22,18 @@ 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.
|
||||
// Only the Google Play edition carries a Google library: Kryon's
|
||||
// android-gplay.gradle adds 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 +44,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
|
||||
@@ -48,7 +60,7 @@ android {
|
||||
'-DRAYLIB_DIR=' + raylibDir,
|
||||
'-DAPP_CODEGEN=' + appCodegen,
|
||||
'-DSHOVEY_STANDALONE=' + (standaloneShovey ? 'ON' : 'OFF'),
|
||||
'-DGOOGLE_PLAY=' + (project.findProperty('app.googlePlay') == 'true' ? 'ON' : 'OFF')
|
||||
'-DAPP_EDITION=' + appEdition
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,6 +93,10 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
if (googlePlay) {
|
||||
apply from: new File(kryonDir, 'templates/android-gplay.gradle')
|
||||
}
|
||||
|
||||
// The shared profile is a host asset, never a child of a game collection.
|
||||
tasks.register('prepareEntity', Exec) {
|
||||
workingDir file('../..')
|
||||
|
||||
@@ -26,8 +26,11 @@ set(APP_ZIRAN_DEFINES --define ANDROID_BUILD)
|
||||
if(SHOVEY_STANDALONE)
|
||||
list(APPEND APP_ZIRAN_DEFINES --define SHOVEY_STANDALONE)
|
||||
endif()
|
||||
if(GOOGLE_PLAY)
|
||||
# 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)
|
||||
|
||||
@@ -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')
|
||||
@@ -49,12 +50,14 @@ def main():
|
||||
LIBOQS_DIR=str(package('liboqs')), MONOCYPHER_DIR=str(package('monocypher')))
|
||||
command = ['sh', str(ROOT / 'droid/gradlew'), '-p', str(ROOT / 'droid'), '--no-daemon', '--max-workers=2',
|
||||
'-Papp.product=shovey', '-Papp.abis=' + args.abis,
|
||||
'-Papp.googlePlay=' + ('true' if args.bundle else 'false'),
|
||||
'-Pkryon.dir=' + str(package('kryon')), '-Pziran.dir=' + str(package('ziran')),
|
||||
'-Praylib.dir=' + str(package('raylib') / 'src'),
|
||||
'-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,14 +22,18 @@ def digest(path):
|
||||
|
||||
|
||||
def library_art(root, name, key, source):
|
||||
"""Arcade's committed library thumbnails (scripts/library-art.py).
|
||||
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):
|
||||
@@ -38,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:
|
||||
@@ -75,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"],
|
||||
@@ -83,8 +88,8 @@ 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
|
||||
@@ -107,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)
|
||||
@@ -116,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"],
|
||||
|
||||
@@ -99,9 +99,18 @@ def build(ziran, lock_flags):
|
||||
generated.mkdir(parents=True, exist_ok=True)
|
||||
if descriptor.get('prepare_assets'):
|
||||
prepare = Path(descriptor['prepare_assets'])
|
||||
if prepare.is_absolute() or '..' in prepare.parts or prepare.suffix != '.py':
|
||||
if prepare.is_absolute() or '..' in prepare.parts or prepare.suffix not in ('.py', '.zi'):
|
||||
raise ValueError('Invalid game asset preparation script')
|
||||
subprocess.run(['python3', str(source / prepare), str(resources), str(generated)], check=True)
|
||||
if prepare.suffix == '.zi':
|
||||
# A Ziran preparation program builds with Arcade's compiler and
|
||||
# runs from the game's checkout, where its own files are.
|
||||
tool = ROOT / 'build/game-tools' / name
|
||||
subprocess.run([str(compiler), 'build', '--target=c', '--exe', '--root', str((source / prepare).parent),
|
||||
'--module-path', 'std=' + str(toolchain / 'std'), '--entry', prepare.stem + ':main',
|
||||
'-o', str(tool), str(source / prepare)], cwd=ROOT, check=True)
|
||||
subprocess.run([str(tool / prepare.stem), str(resources), str(generated)], cwd=source, check=True)
|
||||
else:
|
||||
subprocess.run(['python3', str(source / prepare), str(resources), str(generated)], check=True)
|
||||
shared = share_resources(app, apps, resources, ROOT / 'build/game-assets')
|
||||
metadata = ROOT / 'build/games' / (name + '-resources.json')
|
||||
metadata.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
@@ -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__':
|
||||
|
||||
@@ -11,6 +11,11 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
def check():
|
||||
standard = json.loads((ROOT / 'standards/game-v1.json').read_text())
|
||||
ledger = json.loads((ROOT / 'apps/versions.json').read_text())
|
||||
# Arcade's own players refuse games newer than GAME_HOST_API, so it moves
|
||||
# with the standard and the ledger whenever the host interface does.
|
||||
player = re.search(r'^GAME_HOST_API :: (\d+)$', (ROOT / 'src/game_contract.zi').read_text(), re.M)
|
||||
assert player and int(player[1]) == standard['host_api'] == ledger['host_api'], \
|
||||
'src/game_contract.zi GAME_HOST_API, standards/game-v1.json and apps/versions.json must name the same host interface'
|
||||
for app in declared_apps(ROOT):
|
||||
source, manifest, game = app['source'], app['manifest'], app['descriptor']
|
||||
for field in ['contract_version', 'module_api', 'host_api']:
|
||||
@@ -27,7 +32,9 @@ def check():
|
||||
assert component['sequence'] > 0
|
||||
required = set()
|
||||
for file in manifest.parent.glob('*.zi'):
|
||||
required.update(re.findall(r'"(' + re.escape(game['locale_prefix']) + r'[a-z0-9_]+)"', file.read_text()))
|
||||
# Module names in #import lines share the prefix but are not text keys.
|
||||
code = re.sub(r'^\s*#import\s+"[^"\n]*"', '', file.read_text(), flags=re.M)
|
||||
required.update(re.findall(r'"(' + re.escape(game['locale_prefix']) + r'[a-z0-9_]+)"', code))
|
||||
locales = {}
|
||||
for file in (source / game['locales']).glob('*.txt'):
|
||||
text = file.read_text()
|
||||
|
||||
@@ -132,6 +132,12 @@ def changelog(ziran):
|
||||
current = re.search(r'^## (\d+)\.(\d+)\.(\d+)\s*$', text, re.M)
|
||||
if current is None:
|
||||
raise SystemExit('CHANGELOG.md needs a numeric release entry')
|
||||
# Arcade's own changes wait under Unreleased; this release ships them.
|
||||
pending = re.search(r'^## \[Unreleased\]\s*$', text[:current.start()], re.M)
|
||||
if pending is not None:
|
||||
lines = [line for line in text[pending.end():current.start()].splitlines() if line.startswith('- ')] + lines
|
||||
text = text[:pending.start()] + text[current.start():]
|
||||
current = re.search(r'^## (\d+)\.(\d+)\.(\d+)\s*$', text, re.M)
|
||||
version = f'{current[1]}.{current[2]}.{int(current[3]) + 1}'
|
||||
entry = f'## {version}\n\n' + '\n'.join(lines) + '\n\n'
|
||||
path.write_text(text[:current.start()] + entry + text[current.start():])
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Stage bounded thumbnails for every game's library covers and previews.
|
||||
|
||||
Library covers retain full colour and transparency at thumbnail resolution.
|
||||
Games keep their own original title artwork. Arcade downloads this small art
|
||||
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
|
||||
@@ -24,14 +26,28 @@ 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()
|
||||
longest = PREVIEW_LONGEST if key == 'preview' else LOGO_LONGEST if key == 'logo' else COVER_LONGEST
|
||||
scale = min(1.0, longest / max(image.size))
|
||||
if scale == 1.0 and key != 'preview':
|
||||
return data
|
||||
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 = (max(1, round(image.width * scale)), max(1, round(image.height * scale)))
|
||||
@@ -42,8 +58,11 @@ def small_copy(data, key):
|
||||
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):
|
||||
@@ -62,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>
|
||||
|
||||
@@ -9,13 +9,12 @@ Game :: struct {
|
||||
enabled: bool
|
||||
}
|
||||
|
||||
GameCount :: 5
|
||||
GameCount :: 4
|
||||
|
||||
GameAt :: (index: s32) -> Game {
|
||||
if index == 0 { return Game.{.id = "inbe.chess", .name = "chess", .title = "Chess", .bundle = "chess.zx", .preview = "chess-preview.png", .package = "self", .enabled = false} }
|
||||
if index == 1 { return Game.{.id = "arcade.shovey", .name = "shovey", .title = "Shovey", .bundle = "shovey.zx", .preview = "shovey-preview.png", .package = "shovey", .enabled = true} }
|
||||
if index == 2 { return Game.{.id = "arcade.shovey-island", .name = "shovey-island", .title = "Shovey Island", .bundle = "shovey-island.zx", .preview = "shovey-island-preview.png", .package = "shovey", .enabled = false} }
|
||||
if index == 3 { return Game.{.id = "arcade.shovey-editor", .name = "shovey-editor", .title = "Shovey Editor", .bundle = "shovey-editor.zx", .preview = "shovey-editor-preview.png", .package = "shovey", .enabled = true} }
|
||||
if index == 4 { return Game.{.id = "xyz.waozi.wurm", .name = "wurm", .title = "Apfelwurm", .bundle = "wurm.zx", .preview = "wurm-preview.png", .package = "wurm", .enabled = true} }
|
||||
if index == 2 { return Game.{.id = "arcade.shovey-editor", .name = "shovey-editor", .title = "Shovey Editor", .bundle = "shovey-editor.zx", .preview = "shovey-editor-preview.png", .package = "shovey", .enabled = true} }
|
||||
if index == 3 { return Game.{.id = "xyz.waozi.wurm", .name = "wurm", .title = "Apfelwurm", .bundle = "wurm.zx", .preview = "wurm-preview.png", .package = "wurm", .enabled = true} }
|
||||
return Game.{}
|
||||
}
|
||||
@@ -26,6 +26,9 @@
|
||||
#import "kryon/app_files"
|
||||
#import "kryon/app_protocol"
|
||||
#import "kryon/app_context_host"
|
||||
#if !#defined(PLATFORM_DESKTOP) && !#defined(ANDROID_BUILD) && !#defined(PLATFORM_WEB) {
|
||||
CollectionHost :: #import "kryon/app_context";
|
||||
}
|
||||
#import "kryon/key_input"
|
||||
#import "kryon/system_clipboard"
|
||||
#import "apps/host"
|
||||
@@ -38,11 +41,13 @@ Node :: #import "apps/node_types";
|
||||
Codec :: #import "apps/node_codec";
|
||||
#import "platform"
|
||||
#import, file "collection_downloads.zi";
|
||||
#import, file "game_contract.zi";
|
||||
#import "sound"
|
||||
#import "entity_host"
|
||||
#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"
|
||||
@@ -90,12 +95,23 @@ collection_leave_to_library: bool;
|
||||
// 2 not answered yet.
|
||||
collection_updates: s32 = -1;
|
||||
|
||||
CollectionTouchFirst :: () -> bool {
|
||||
#if #defined(PLATFORM_DESKTOP) {
|
||||
return false
|
||||
// Whether the device's main input is a keyboard and mouse. A native build
|
||||
// knows its platform; the collection running as a bundle inside Breeze asks
|
||||
// Breeze (Kryon's kryon.input.desktop), and passes the answer to its games.
|
||||
CollectionInputDesktop :: () -> bool {
|
||||
#if #defined(PLATFORM_DESKTOP) && !#defined(ANDROID_BUILD) && !#defined(PLATFORM_WEB) {
|
||||
return true
|
||||
} else {
|
||||
#if #defined(ANDROID_BUILD) || #defined(PLATFORM_WEB) {
|
||||
return false
|
||||
} else {
|
||||
return CollectionHost.AppSupports(COLLECTION_INPUT_DESKTOP)
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
COLLECTION_INPUT_DESKTOP :: "kryon.input.desktop"
|
||||
|
||||
CollectionTouchFirst :: () -> bool { return !CollectionInputDesktop() }
|
||||
|
||||
CollectionRecordsFor :: (id: string) -> *CollectionRecords {
|
||||
saved := collection_records
|
||||
@@ -133,7 +149,8 @@ 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" ||
|
||||
(name == COLLECTION_INPUT_DESKTOP && CollectionInputDesktop())
|
||||
}
|
||||
|
||||
CollectionCall :: (context: *void, node: *AppNode, module: *u8, function: *u8,
|
||||
@@ -176,6 +193,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 +345,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 +444,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)
|
||||
@@ -408,7 +453,7 @@ CollectionOpen :: (bundle: string, digest: string, harness_digest: string,
|
||||
platform := AppPlatform.{.allows = CollectionAllows, .call = CollectionCall,
|
||||
.widgets = CollectionWidgets, .save = CollectionSave, .state = CollectionState,
|
||||
.effect = CollectionEffect,
|
||||
.bundle = CollectionBundle, .download = CollectionDownload, .fetch = CollectionFetch,
|
||||
.bundle = CollectionBundle, .download = CollectionDownload, .fetch = CollectionFetch, .host_api = GAME_HOST_API,
|
||||
// Covers show only the art; the download dialog names the size.
|
||||
.controller = CollectionController, .presentation = AppPresentation.{.cover_grid = true, .hide_sizes = true}}
|
||||
collection_ready = AppHostStart(*collection_host, bundle, "arcade.local", "inbe.arcade",
|
||||
@@ -464,8 +509,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
|
||||
@@ -480,7 +533,7 @@ CollectionOpenShoveyBytes :: (bytes: string, metadata: string, data: string) ->
|
||||
language := ifx locale.count >= 2 then locale[:2] else "en"
|
||||
platform := AppPlatform.{.allows = CollectionAllows, .call = CollectionCall,
|
||||
.widgets = CollectionWidgets, .save = CollectionSave, .state = CollectionState,
|
||||
.effect = CollectionEffect}
|
||||
.effect = CollectionEffect, .host_api = GAME_HOST_API}
|
||||
collection_ready = AppHostStart(*collection_host, bytes, "arcade.local", "arcade.shovey-player",
|
||||
"shovey", TextUntilNul(digest[:]), "local", platform, TextUntilNul(harness[:]), language)
|
||||
return collection_ready
|
||||
|
||||
@@ -43,9 +43,6 @@ EntityShoveyTokens :: () {
|
||||
|
||||
EntityOpen :: (bytes: string, data: string, shovey: bool = false) -> bool {
|
||||
entity_shovey = shovey
|
||||
#if #defined(GOOGLE_PLAY) {
|
||||
EntityHostAllowFunding(false)
|
||||
}
|
||||
if shovey { EntityShoveyTokens() }
|
||||
root := Join(data, "entity")
|
||||
defer { EntityFree(root) }
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// The game standard every Arcade game implements (standards/game-v1.json).
|
||||
// GAME_HOST_API is the newest host interface Arcade's players run; a game
|
||||
// that declares a newer one is refused. scripts/check-games.py fails while it
|
||||
// differs from the standard and the ledger.
|
||||
GAME_CONTRACT_VERSION :: 1
|
||||
GAME_HOST_API :: 41
|
||||
@@ -1,6 +1,7 @@
|
||||
// Runs the registered game bundles. The host owns files and input;
|
||||
// each game owns its rules and screens. Chess also runs in Inbe.
|
||||
#import "std/file"
|
||||
#import, file "game_contract.zi";
|
||||
#import "std/bundle_host"
|
||||
#import "std/byte_text_linux"
|
||||
#import "std/date_time_linux"
|
||||
@@ -19,8 +20,6 @@
|
||||
|
||||
using HostValueKind;
|
||||
|
||||
GAME_CONTRACT_VERSION :: 1
|
||||
GAME_HOST_API :: 12
|
||||
|
||||
GameHost :: struct {
|
||||
app: HostedApp
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Classic, Island and Editor keep independent verified identities.
|
||||
// Classic and the Editor keep independent verified identities.
|
||||
#import "kryon/app_context"
|
||||
#import "kryon/app_protocol"
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "kryon-node-app",
|
||||
"contract_version": 1,
|
||||
"module_api": 2,
|
||||
"host_api": 12,
|
||||
"host_api": 41,
|
||||
"identity": "Stable signed package ID; moving source must not rename installed games",
|
||||
"frames": {
|
||||
"matching": "Fields match by name",
|
||||
|
||||
@@ -20,7 +20,7 @@ assert chess["kind"] == "game"
|
||||
assert (ROOT / "apps/chess/engine.zi").is_file(), "Arcade must own the game"
|
||||
assert not (inbe / "apps/chess").exists(), "Inbe must consume Chess, not own another copy"
|
||||
assert chess["contract_version"] == 1 and chess["module_api"] == 2
|
||||
assert chess["host_api"] == 12 and chess["save_schema"] == 1
|
||||
assert chess["host_api"] == 41 and chess["save_schema"] == 1
|
||||
assert (ROOT / chess["preview"]).is_file()
|
||||
env = {key: value for key, value in os.environ.items()
|
||||
if key not in {"DISPLAY", "WAYLAND_DISPLAY", "XAUTHORITY", "DBUS_SESSION_BUS_ADDRESS"}}
|
||||
|
||||
@@ -78,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):
|
||||
@@ -115,6 +115,9 @@ class CollectionTests(unittest.TestCase):
|
||||
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()
|
||||
@@ -249,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())
|
||||
@@ -267,7 +270,10 @@ class LibraryThumbnailTests(unittest.TestCase):
|
||||
for y in range(1200) for x in range(900)])
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
with Image.open(io.BytesIO(artist.small_copy(data.getvalue(), 'portrait'))) as thumbnail:
|
||||
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))
|
||||
@@ -277,23 +283,34 @@ class LibraryThumbnailTests(unittest.TestCase):
|
||||
source.paste((200, 35, 100, 255), (100, 50, 1100, 350))
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
with Image.open(io.BytesIO(artist.small_copy(data.getvalue(), 'logo'))) as thumbnail:
|
||||
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_neither_enlarged_nor_reencoded(self):
|
||||
def test_small_covers_are_not_enlarged(self):
|
||||
source = Image.new('RGB', (120, 180), (25, 50, 75))
|
||||
data = io.BytesIO()
|
||||
source.save(data, 'PNG')
|
||||
self.assertEqual(artist.small_copy(data.getvalue(), 'portrait'), data.getvalue())
|
||||
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'))) as thumbnail:
|
||||
with Image.open(io.BytesIO(artist.small_copy(data.getvalue(), 'logo')[0])) as thumbnail:
|
||||
self.assertEqual(thumbnail.size, (512, 1))
|
||||
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -104,6 +104,24 @@ class GameUpdates(unittest.TestCase):
|
||||
def test_local_override_cannot_publish_wrong_game(self):
|
||||
self.follow('ahead', wrong_commit=True)
|
||||
|
||||
def test_release_ships_unreleased_notes(self):
|
||||
with tempfile.TemporaryDirectory(prefix='arcade-release-notes-') as temporary:
|
||||
root = Path(temporary)
|
||||
game = root / 'game'
|
||||
game.mkdir()
|
||||
(game / 'apps.json').write_text(json.dumps({'title': 'Apfelwurm', 'apps': [{'manifest': 'catalog.json'}]}))
|
||||
(game / 'CHANGELOG.md').write_text('## [Unreleased]\n\n- Later.\n\n## [0.2.1] - 2026-10-29\n\n- Faster.\n')
|
||||
(root / 'CHANGELOG.md').write_text('# Arcade changelog\n\n## [Unreleased]\n\n- Keyboard first.\n\n'
|
||||
'## 0.7.1\n\n- Older.\n')
|
||||
updates = root / 'updates.json'
|
||||
updates.write_text(json.dumps([{'name': 'wurm'}]))
|
||||
with patch.object(follower, 'ROOT', root), patch.object(follower, 'UPDATES', updates), \
|
||||
patch.object(follower.subprocess, 'check_output', return_value=str(game) + '\n'):
|
||||
follower.changelog('ziran')
|
||||
self.assertEqual((root / 'CHANGELOG.md').read_text(),
|
||||
'# Arcade changelog\n\n## 0.7.2\n\n- Keyboard first.\n'
|
||||
'- Apfelwurm 0.2.1: Faster.\n\n## 0.7.1\n\n- Older.\n')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -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(() => {});
|
||||
|
||||
@@ -1,22 +1,6 @@
|
||||
{
|
||||
"format": 1,
|
||||
"packages": [
|
||||
{
|
||||
"commit": "dc1cfe389905c63c0bb453727d06d72afc1fa0b0",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p78e3cb7d22b3e56c"},
|
||||
"id": "p00b93f1ddcd2802f",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "90a3e7d9b1b9ef6a7f5eab7aff55eba3353e604e",
|
||||
"dependencies": {"apps": "p00b93f1ddcd2802f", "entity": "p4d0db653f861a40d", "kryon": "p78e3cb7d22b3e56c", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "p08f35f0240dbbdff",
|
||||
"name": "Shovey",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/shovey.git"
|
||||
},
|
||||
{
|
||||
"commit": "b31299434c785d0f2bd82f36b5bfd2fd36ba1216",
|
||||
"dependencies": {},
|
||||
@@ -35,63 +19,47 @@
|
||||
"url": "https://github.com/ziranlang/qrcode.git"
|
||||
},
|
||||
{
|
||||
"commit": "1cb9df183089a77c8a16448a556186f30b261a98",
|
||||
"dependencies": {"kryon": "p78e3cb7d22b3e56c"},
|
||||
"id": "p1b13dda539ed2a39",
|
||||
"name": "Kss",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kss.git"
|
||||
},
|
||||
{
|
||||
"commit": "bad2caaa84ef3eae61e40c99bf572d2b060d0ca2",
|
||||
"dependencies": {"kryon": "p78e3cb7d22b3e56c"},
|
||||
"id": "p20eb23d3e6db3711",
|
||||
"name": "Game2D",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/game2d.git"
|
||||
},
|
||||
{
|
||||
"commit": "1f3e5e763dbee918ae8f8c44b84bb98f8d0fa2d6",
|
||||
"dependencies": {},
|
||||
"id": "p219661bf4be659ed",
|
||||
"name": "sqlite",
|
||||
"ref": "master",
|
||||
"source": true,
|
||||
"url": "https://github.com/sqlite/sqlite.git"
|
||||
},
|
||||
{
|
||||
"commit": "eb2b201a2da3bfc6fefd7ff2d8e476e3cb9e5bcb",
|
||||
"dependencies": {},
|
||||
"id": "p2f75403ea4cb61e4",
|
||||
"name": "curl",
|
||||
"ref": "master",
|
||||
"source": true,
|
||||
"url": "https://github.com/curl/curl.git"
|
||||
},
|
||||
{
|
||||
"commit": "2f6f1f57d7de742ef7ebc01159c2315acf793d5b",
|
||||
"dependencies": {"apps": "p00b93f1ddcd2802f", "crypto": "pc23fbf455e97614d", "curl": "p2f75403ea4cb61e4", "daochi_client": "p9972fcdd2d5ba999", "game2d": "p20eb23d3e6db3711", "kryon": "p78e3cb7d22b3e56c", "kss": "p1b13dda539ed2a39", "liboqs": "p4b0a50b49959e674", "mingcute": "pe1027b9d16704793", "monocypher": "p809b4d31a48625a3", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "qrcode": "p0dfa70137405b096", "rini": "p09fa77e94b0dfc6c", "self": "pa4da0de6c3c44e61", "sqlite": "p219661bf4be659ed"},
|
||||
"id": "p48228a6b7e2920d3",
|
||||
"commit": "d74348c2e288ac55740461f7e106cda365b4db4a",
|
||||
"dependencies": {"apps": "p9928fc15e7b93288", "crypto": "pc23fbf455e97614d", "curl": "p1ca0e8d3c19dbe4c", "daochi_client": "p7de54c8ad98fe034", "entity": "pfed93ebbf687d016", "game2d": "pf2f54c7603f6e861", "kryon": "pc051b826eca4a134", "kss": "p1b13dda539ed2a39", "liboqs": "p1aaef6f156781e69", "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": "e1f480f382d9443c4412133b55948374c77a5c21",
|
||||
"commit": "a9ad1876e14c2be093a538aca41fd3468fe3cf19",
|
||||
"dependencies": {},
|
||||
"id": "p4b0a50b49959e674",
|
||||
"id": "p1aaef6f156781e69",
|
||||
"name": "liboqs",
|
||||
"ref": "main",
|
||||
"source": true,
|
||||
"url": "https://github.com/open-quantum-safe/liboqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "91ef8713174a1d88106dd8ea2293ef8d46f8ee66",
|
||||
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "p78e3cb7d22b3e56c", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "p4d0db653f861a40d",
|
||||
"name": "Entity",
|
||||
"commit": "1cb9df183089a77c8a16448a556186f30b261a98",
|
||||
"dependencies": {"kryon": "pc051b826eca4a134"},
|
||||
"id": "p1b13dda539ed2a39",
|
||||
"name": "Kss",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
"url": "https://github.com/kryonlabs/kss.git"
|
||||
},
|
||||
{
|
||||
"commit": "19b299005fbe2d895f4ad525cfdae62a2220c3ea",
|
||||
"dependencies": {},
|
||||
"id": "p1ca0e8d3c19dbe4c",
|
||||
"name": "curl",
|
||||
"ref": "master",
|
||||
"source": true,
|
||||
"url": "https://github.com/curl/curl.git"
|
||||
},
|
||||
{
|
||||
"commit": "5d1ee888094efc63d1fb25a58af93478b103d441",
|
||||
"dependencies": {},
|
||||
"id": "p1d80baafaa5fa18a",
|
||||
"name": "sqlite",
|
||||
"ref": "master",
|
||||
"source": true,
|
||||
"url": "https://github.com/sqlite/sqlite.git"
|
||||
},
|
||||
{
|
||||
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
|
||||
@@ -104,19 +72,19 @@
|
||||
},
|
||||
{
|
||||
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
|
||||
"dependencies": {"liboqs": "p4b0a50b49959e674"},
|
||||
"dependencies": {"liboqs": "p1aaef6f156781e69"},
|
||||
"id": "p7098ac9cd92f7e5f",
|
||||
"name": "Oqs",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/oqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "1fd45c1fea2e76e69cac0e09f774e6f63ed75eff",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "p78e3cb7d22b3e56c",
|
||||
"name": "kryon",
|
||||
"commit": "8250ece58a03f4d9c07cd8434780d659b54f5d7f",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
|
||||
"id": "p7de54c8ad98fe034",
|
||||
"name": "DaochiClient",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
"url": "https://github.com/ziranlang/daochi-client.git"
|
||||
},
|
||||
{
|
||||
"commit": "f5f0a19a5dc6c14a49adb3cd63ea79a60f6ba77b",
|
||||
@@ -128,29 +96,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"
|
||||
"source": true,
|
||||
"url": "https://github.com/waozixyz/practices.git"
|
||||
},
|
||||
{
|
||||
"commit": "357a71d1ee2c7c9526c2af18793ea8628c505034",
|
||||
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "p78e3cb7d22b3e56c", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "pa4da0de6c3c44e61",
|
||||
"name": "Self",
|
||||
"commit": "5b67236a8e355e67ce4f8cc0389b9ce3805b874b",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "pc051b826eca4a134"},
|
||||
"id": "p9928fc15e7b93288",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/self.git"
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "3f888653b6b97010163d824c4cc72476be3214f3",
|
||||
"dependencies": {"kryon": "p78e3cb7d22b3e56c"},
|
||||
"dependencies": {"kryon": "pc051b826eca4a134"},
|
||||
"id": "pab5377a2950368a2",
|
||||
"name": "plot",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/plot.git"
|
||||
},
|
||||
{
|
||||
"commit": "ab77c24419ff33092193fd290ac8ea7291040d0c",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "pc051b826eca4a134",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "944826f70779a6b6cd53f6b06a75b36f4d8a2558",
|
||||
"dependencies": {},
|
||||
@@ -159,6 +136,22 @@
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/crypto.git"
|
||||
},
|
||||
{
|
||||
"commit": "5b561abf79d56fc5a25a6df2ff4f3c0e823546b4",
|
||||
"dependencies": {"apps": "p9928fc15e7b93288", "curl": "p1ca0e8d3c19dbe4c", "entity": "pfed93ebbf687d016", "kryon": "pc051b826eca4a134", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "pccfee5fb122e2a41",
|
||||
"name": "Shovey",
|
||||
"ref": "5b561abf79d56fc5a25a6df2ff4f3c0e823546b4",
|
||||
"url": "https://github.com/waozixyz/shovey.git"
|
||||
},
|
||||
{
|
||||
"commit": "af296359a1519b9451e1c4b634422da802f6748f",
|
||||
"dependencies": {"apps": "p9928fc15e7b93288", "entity": "pfed93ebbf687d016", "kryon": "pc051b826eca4a134", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "pcf25d4810f410073",
|
||||
"name": "Apfelwurm",
|
||||
"ref": "af296359a1519b9451e1c4b634422da802f6748f",
|
||||
"url": "https://github.com/waozixyz/wurm.git"
|
||||
},
|
||||
{
|
||||
"commit": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
|
||||
"dependencies": {},
|
||||
@@ -168,20 +161,28 @@
|
||||
"url": "https://github.com/kryonlabs/mingcute.git"
|
||||
},
|
||||
{
|
||||
"commit": "941c0c1b73ad14b1f03320d181c118057a0c3e0f",
|
||||
"dependencies": {"apps": "p00b93f1ddcd2802f", "entity": "p4d0db653f861a40d", "kryon": "p78e3cb7d22b3e56c", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "pf9d3669c06454dfb",
|
||||
"name": "Apfelwurm",
|
||||
"ref": "941c0c1b73ad14b1f03320d181c118057a0c3e0f",
|
||||
"url": "https://github.com/waozixyz/wurm.git"
|
||||
"commit": "cee04692f3461dcb098833472f071c434980debb",
|
||||
"dependencies": {"kryon": "pc051b826eca4a134"},
|
||||
"id": "pf2f54c7603f6e861",
|
||||
"name": "Game2D",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/game2d.git"
|
||||
},
|
||||
{
|
||||
"commit": "6d54b9a1e87052e947ef32db1712dfd302d66385",
|
||||
"dependencies": {"daochi_client": "p7de54c8ad98fe034", "kryon": "pc051b826eca4a134", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "pfed93ebbf687d016",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"apps": "p00b93f1ddcd2802f", "entity": "p4d0db653f861a40d", "inbe": "p48228a6b7e2920d3", "kryon": "p78e3cb7d22b3e56c", "mingcute": "pe1027b9d16704793", "shovey": "p08f35f0240dbbdff", "wurm": "pf9d3669c06454dfb"},
|
||||
"dependencies": {"apps": "p9928fc15e7b93288", "entity": "pfed93ebbf687d016", "inbe": "p183b01bccc6424e7", "kryon": "pc051b826eca4a134", "mingcute": "pe1027b9d16704793", "shovey": "pccfee5fb122e2a41", "wurm": "pcf25d4810f410073"},
|
||||
"name": "Arcade"
|
||||
},
|
||||
"toolchain": {
|
||||
"commit": "5efa24f818485cf265bdd5c066a4e2150175ac0e",
|
||||
"commit": "a97e88b5b0a956c9c9977cce593ea4ecdb7ad72b",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/ziran.git"
|
||||
}
|
||||
|
||||
@@ -34,12 +34,12 @@ ref = "master"
|
||||
[dependencies.apps]
|
||||
git = "https://github.com/waozixyz/apps.git"
|
||||
# Use the shared controller reviewed with the supported collection host.
|
||||
ref = "master"
|
||||
ref = "5b67236a8e355e67ce4f8cc0389b9ce3805b874b"
|
||||
|
||||
# Shovey's editions and editor are available as separate downloads.
|
||||
[dependencies.shovey]
|
||||
git = "https://github.com/waozixyz/shovey.git"
|
||||
ref = "master"
|
||||
ref = "5b561abf79d56fc5a25a6df2ff4f3c0e823546b4"
|
||||
|
||||
# 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 = "941c0c1b73ad14b1f03320d181c118057a0c3e0f"
|
||||
ref = "af296359a1519b9451e1c4b634422da802f6748f"
|
||||