Files
DroidDeck/tools/release/check_session_assets.py
T
Kurt Himebauch db2e1d7da2 Fix runtime removal and first-run Steam setup (#185)
* Fix runtime removal races and show removal progress

* Bootstrap Steam from the selected client channel

* Show runtime progress below its Setup row

* Always stage current session helpers and verify APK assets

* Initialize Steam UI scale once using the handheld default
2026-10-03 22:03:26 -04:00

32 lines
1011 B
Python

"""Reject an APK with missing or stale session helpers, including cached local bundles."""
from pathlib import Path
import sys
from zipfile import ZipFile
OVERLAY = Path(__file__).resolve().parents[1] / 'linuxfs/overlay'
def check(apk, overlay=OVERLAY):
sources = list((overlay / 'usr/local/bin').glob('bannerlator-*'))
sources += [path for path in (overlay / 'usr/bin').rglob('*') if path.is_file()]
errors = []
with ZipFile(apk) as package:
for source in sources:
asset = 'assets/linuxfs/' + source.relative_to(overlay).as_posix()
try:
content = package.read(asset)
except KeyError:
errors.append('missing ' + asset)
continue
if content != source.read_bytes():
errors.append('stale ' + asset)
return errors
if __name__ == '__main__':
errors = check(sys.argv[1])
if errors:
sys.exit('\n'.join(errors))
print('APK session helpers match source')