Files
saphidandClaude Opus 5.5 d4486a7681 Frame Control: Mac app, web UI, Android and Steam tooling
Package the Frame Control web UI as an installable Electron Mac app and
bring in the tooling built alongside it.

- app/: Electron wrapper that starts ui/server.py on a free loopback port,
  hardened window (sandbox, no navigation, runAsNode fuse off), login-shell
  PATH so Homebrew tools work from Finder, first-run offer to run
  connect.sh, ad-hoc signed DMG/zip via electron-builder.
- ui/: headset view (OpenVR screenshots), device status, library, Steam
  "Get games" (owned games, install, store search), Android apps as
  persistent Lepton instances with a rated F-Droid catalogue and a private
  compatibility database, Android display controls over ADB, file and
  clipboard transfer, Flatpaks, remote and power actions.
- apk-catalog/, compat-db/, frame/: catalogue build pipeline, Lakebed
  capsule for compatibility reports, Frame-side launchers.
- tests/ and CI: server guard and validation tests plus Steam helper tests,
  run on Python 3.9 with script and app syntax checks.
- Docs: README leads with the Mac app; new Android, panels, Steam games and
  field-notes docs; security notes on LAN-exposed ADB ports.

Screenshot values for the headset's IP and Wi-Fi name are placeholders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 22:21:20 +10:00

42 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# Frame-side: run T3 Code in its own Lepton (Android) instance whose data
# survives restarts. Lepton Development wipes its apps when it exits; a
# "steamlaunch" context (SteamAppId set) keeps them.
#
# Lives in ~/Applications/T3Code next to t3code.apk and the empty
# lepton-show-flatscreen marker (without it Lepton runs the app headless).
#
# App data (T3's pairing) lives in compatdata/<id>/internal and survives
# everything. Lepton rebuilds its Android system snapshot (compatdata/<id>/baked)
# when the APK changes or the app exits within 30 seconds of starting.
set -euo pipefail
DIR="$(cd "$(dirname "$0")" && pwd)"
LEPTON="$HOME/.local/share/Steam/steamapps/common/Lepton/lepton"
# Without the marker Lepton runs T3 headless: Steam says "running" but no panel
# appears. Fail loudly instead.
for need in "$DIR/t3code.apk" "$DIR/lepton-show-flatscreen"; do
[[ -f "$need" ]] || { echo "launch.sh: missing $need" >&2; exit 1; }
done
[[ -x "$LEPTON" ]] || { echo "launch.sh: Lepton not installed at $LEPTON" >&2; exit 1; }
# Any fixed number that isn't a real Steam app: it names the Lepton context.
export SteamAppId=2873873873
export STEAM_COMPAT_INSTALL_PATH="$DIR"
# Must sit under ~/.local/share/Steam: Lepton symlinks /data/data/<app> and
# /data/media/0 to host paths here, and only the Steam dir is mounted inside.
export STEAM_COMPAT_DATA_PATH="$HOME/.local/share/Steam/steamapps/compatdata/$SteamAppId"
# A Steam shortcut launch sets STEAM_FOSSILIZE_DUMP_PATH but not the shader
# path Lepton derives it from (unbound under `set -u`), so set both.
export STEAM_COMPAT_SHADER_PATH="$HOME/.local/share/Steam/steamapps/shadercache/$SteamAppId"
export STEAM_FOSSILIZE_DUMP_PATH="$STEAM_COMPAT_SHADER_PATH/fozpipelinesv6/steamapp_pipeline_cache"
mkdir -p "$STEAM_COMPAT_DATA_PATH" "$STEAM_FOSSILIZE_DUMP_PATH"
# Lepton re-execs itself through `setpgid --foreground`, which needs a
# controlling terminal that Steam shortcuts and systemd don't have. Skip that
# step and give Lepton its own session instead: its teardown kills its whole
# process group. --wait keeps this script alive so Steam sees the app running.
export IS_PARENT=true
exec setsid --wait "$LEPTON" waitforexitandrun -- "$DIR/t3code.apk"