Files
breeze/tests/android_package_assets_behavior.zi
waozi 74c4a6d935 Build and run apps in the ZX format
Ziran 0.3.1 writes portable bundles as .zx with a ZX header and rejects
.zib. Pin Ziran 620c407, Kryon 935d5fc1, Apps 12e52c0 and Entity 86e72720,
and build, embed, download, verify and store every bundle as .zx: the root
and cell bundles, node apps (the node is asked for format=zx releases),
practice packs and the shared Apps controller, now the only trusted one.

Practice packs stored by older versions count as installed and update
themselves to ZX; a node app's unusable .zib payload is removed so its ZX
release installs. Bundle staging starts empty, so no stale bundle is
embedded, and Android reads asset names by their length.
The generated app codec matches the pinned generator again.
2026-10-23 22:05:05 -03:00

34 lines
838 B
Ziran

#import, file "../src/app/assets.zi";
#program_export
PackageSize :: () -> s64 {
view := AssetRead("inbe.zx")
if !view.found {
return 0
}
if view.mime != "application/octet-stream" || view.data.count < 8 ||
view.data[0] != 90 || view.data[1] != 88 || view.data[2] != 0 || view.data[3] != 0 {
return -1
}
return view.data.count
}
#program_export
AppsPackageSize :: () -> s64 {
view := AssetRead("apps.zx")
if !view.found {
return 0
}
if view.mime != "application/octet-stream" || view.data.count != 9 ||
view.data[0] != 90 || view.data[1] != 88 || view.data[2] != 0 || view.data[3] != 0 ||
view.data[8] != 65 {
return -1
}
return view.data.count
}
#program_export
MissingPackageAsset :: () -> bool {
return !AssetRead("missing.zx").found
}