From 15ee82f59f092bc8b4222d11888edcaf572ba435 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 07:45:40 +0000 Subject: [PATCH] Install script and README: treat SteamOS as the read-only system it is SteamOS's system is read-only and replaced by every update, so the installer must never send anyone to pacman on the Frame, and everything it puts there has to live in the home folder. - On SteamOS, a missing podman/docker or qemu now gets its own message: nothing can be installed into the system (and should not be, with the read-only mode switched off), so build on a PC and install over SSH, or on the Frame itself where podman is present. - --frame local refuses to run on anything but an ARM64 machine, so it cannot install onto the PC it was meant to build on. - The disc folder is checked for being writable before a few GB are copied; a path in the read-only system gets a clear message instead of a failed copy. - Config.toml goes where the game reads it, honouring XDG_DATA_HOME. - Other image-based systems (Bazzite, Silverblue) get the rpm-ostree hint. - README: what the installer puts on the Frame (all in the home folder, surviving updates) and how to remove it; building on the Frame needs podman to come with SteamOS, without claiming it always does. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019HBRGKTE1GnN2ah8gcZKr3 --- Launcher/steam-frame-install.sh | 39 ++++++++++++++++++++++++++------- README.md | 25 ++++++++++++++++++--- 2 files changed, 53 insertions(+), 11 deletions(-) diff --git a/Launcher/steam-frame-install.sh b/Launcher/steam-frame-install.sh index d4feedc..fd33ace 100755 --- a/Launcher/steam-frame-install.sh +++ b/Launcher/steam-frame-install.sh @@ -13,6 +13,11 @@ # is built in a Debian ARM64 container, under qemu emulation on x86_64; the first build takes a few # hours there, mostly compiling Dawn, and later ones reuse it. # +# SteamOS's system is read-only and replaced by every update, so nothing here installs into it or +# needs root on the Frame: the game, the disc, its settings and the Steam shortcut all live in the +# home folder (~/devkit-game/WiiCompiled, ~/wiicompiled/disc, ~/.local/share/WiiCompiled), where +# they survive SteamOS updates. +# # Options: # --disc PATH your clean PAL RMCP01 disc: an ISO, WBFS or RVZ image (or WIA, CISO, GCZ, NFS, # TGC), a .zip or .7z holding one, or an extracted disc folder holding sys/ and @@ -27,9 +32,10 @@ # from inside one) # --jobs N parallel compiles (default: a quarter of the memory in GB; under emulation each # compile needs a lot of it) -# --frame-disc DIR where the extracted disc goes on the Frame: absolute, or relative to the -# Frame's home (default wiicompiled/disc; with --frame local, the disc folder -# the build used) +# --frame-disc DIR where the extracted disc goes on the Frame: relative to the Frame's home, or +# an absolute path somewhere writable (the home folder or a mounted card; the +# rest of SteamOS is read-only). Default wiicompiled/disc; with --frame local, +# the disc folder the build used. # -h, --help set -euo pipefail @@ -90,6 +96,13 @@ case "$host_arch" in *) fail "this machine is $host_arch; the build needs an x86_64 or ARM64 Linux machine" ;; esac [[ "$(uname -s)" == Linux ]] || fail "run this on Linux (the build uses a Linux container)" +# SteamOS (the Frame, or a Steam Deck used as the build machine): its system is read-only and +# replaced by updates, so a missing tool cannot be installed into it, and the advice differs. +os_id=$( (. /etc/os-release 2>/dev/null && printf '%s' "${ID:-}") || true) +if [[ "$frame" == local && "$host_arch" != aarch64 ]]; then + fail "--frame local installs on the machine the script runs on, which is $host_arch, not the Frame. + Run it on the Frame, or give --frame the Frame's SSH address (steamos@)." +fi # --------------------------------------------------------------------------------------------- say "Checking the container runtime" @@ -97,11 +110,17 @@ runtime="" for candidate in podman docker; do if command -v "$candidate" >/dev/null 2>&1; then runtime=$candidate; break; fi done +if [[ -z "$runtime" && "$os_id" == steamos ]]; then + fail "this SteamOS has neither podman nor docker. Its system is read-only and every update + replaces it, so don't install them with pacman. Build on a Linux PC instead and install from + there: run this script on the PC with --frame steamos@." +fi [[ -n "$runtime" ]] || fail "neither podman nor docker is installed. Arch, CachyOS: sudo pacman -S --needed podman qemu-user-static qemu-user-static-binfmt Debian, Ubuntu: sudo apt install podman qemu-user-static binfmt-support Fedora: sudo dnf install podman qemu-user-static - SteamOS (the Frame) already has podman." + Bazzite, Silverblue and other image-based systems have podman already; add qemu-user-static + the way the system layers packages (rpm-ostree install qemu-user-static)." note "using $runtime" for tool in curl tar; do command -v "$tool" >/dev/null 2>&1 || fail "'$tool' is not installed" @@ -119,6 +138,9 @@ if [[ "$host_arch" == x86_64 ]]; then program loses its first argument (uname -m printed 'Linux'). Register it again with flags POCF; the README's 'Other ways to build' shows how." ;; *) + [[ "$os_id" != steamos ]] || fail "ARM64 programs do not run in containers here ($seen), + and SteamOS's read-only system cannot add qemu. Build on the Frame itself (--frame local) or + on another Linux PC." fail "ARM64 programs do not run in containers here ($seen). Arch, CachyOS: sudo pacman -S --needed qemu-user-static qemu-user-static-binfmt sudo systemctl restart systemd-binfmt @@ -452,11 +474,12 @@ EOF ) if [[ "$has_disc" != yes ]]; then [[ -n "$disc_dir" ]] || fail "the Frame has no disc at $frame_disc yet: pass --disc" - note "copying the extracted disc to $frame_disc (a few GB)" - on_frame "$frame_disc_path" <<'EOF' + on_frame "$frame_disc_path" <<'EOF' || fail "cannot write $frame_disc on the Frame. SteamOS's system is read-only: + pick a folder in the home folder (the default, wiicompiled/disc) or on a mounted card." [[ "$1" = /* ]] && d=$1 || d="$HOME/$1" -mkdir -p "$(dirname "$d")" && rm -rf "$d.partial" +mkdir -p "$(dirname "$d")" 2>/dev/null && [[ -w "$(dirname "$d")" ]] && rm -rf "$d.partial" EOF + note "copying the extracted disc to $frame_disc (a few GB)" copy_to_frame "$disc_dir" "$frame_disc_path.partial" on_frame "$frame_disc_path" <<'EOF' [[ "$1" = /* ]] && d=$1 || d="$HOME/$1" @@ -467,7 +490,7 @@ fi note "pointing the game at the disc" on_frame "$frame_disc_path" <<'EOF' [[ "$1" = /* ]] && d=$1 || d="$HOME/$1" -config="$HOME/.local/share/WiiCompiled/Config.toml" +config="${XDG_DATA_HOME:-$HOME/.local/share}/WiiCompiled/Config.toml" mkdir -p "$(dirname "$config")" if [[ ! -f "$config" ]]; then printf '[paths]\ndvd_root = "%s"\n' "$d" > "$config" diff --git a/README.md b/README.md index 25fe8e1..bf4e309 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,20 @@ curl -fsSL https://raw.githubusercontent.com/mitch030504/Wiicompiled_VR_Frame/op - `--help` lists every option. From a downloaded release, run `Launcher/steam-frame-install.sh` with the same options: it then builds that release's source. +**What it changes on the Frame.** SteamOS's system is read-only and every update replaces it, so the +installer installs no packages there, needs no root, and never switches the read-only mode off. +Everything it puts on the Frame is in your home folder, where it survives SteamOS updates: + +| Where | What | +| --- | --- | +| `~/devkit-game/WiiCompiled/` | the game | +| `~/wiicompiled/disc/` | your extracted disc (`--frame-disc` puts it elsewhere in your home folder or on a mounted card) | +| `~/.local/share/WiiCompiled/` | `Config.toml`, saves and logs, written by the game itself | +| Steam's library | the **WiiCompiled** shortcut, made through Valve's devkit tools in `~/devkit-utils` | + +To remove it, delete the shortcut from the library and those three folders (the last holds your +saves). + ### 3. Play Start **WiiCompiled** from the library in the headset. Open the settings panel with the left @@ -298,8 +312,10 @@ is open. ## Other ways to build -**On the Frame itself.** SteamOS's root file system is read-only, but it ships podman, and the -install script runs there too. Over SSH (`ssh steamos@`), or in a Desktop Mode terminal: +**On the Frame itself.** This needs podman, which has to come with SteamOS: its system is read-only, +and anything installed into it with `pacman` (after switching the read-only mode off) is gone at the +next update, so don't. The script checks and says so if it is missing; then build on a PC as above. +If it is there, run the script over SSH (`ssh steamos@`) or in a Desktop Mode terminal: ```bash curl -fsSL https://raw.githubusercontent.com/mitch030504/Wiicompiled_VR_Frame/openxr-work/Launcher/steam-frame-install.sh \ @@ -307,7 +323,10 @@ curl -fsSL https://raw.githubusercontent.com/mitch030504/Wiicompiled_VR_Frame/op ``` It is native ARM64, so no emulation, but the Frame has less memory and cooling than a PC; keep it -on its charger. The game then reads the disc straight from `~/wiicompiled-frame/disc`. By hand, the +on its charger. Everything stays in your home folder: the container image and its packages in +podman's storage (`~/.local/share/containers`), the toolchain, Dawn and the build in +`~/wiicompiled-frame` (about 20 GB), and the game reads the disc straight from +`~/wiicompiled-frame/disc`. By hand, the steps under [Building by hand](#building-by-hand) work the same in a container started without `--platform linux/arm64`, with `nodtool-linux-aarch64` in place of `nodtool-linux-x86_64`.