mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
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
This commit is contained in:
1 parent
f5e204eb1d
commit
db2e1d7da2
27 files changed
+978
-90
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""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')
|
||||
Reference in new issue
Block a user