Initial FrameAssistant baseline from the vrdashboard template

Template stripped to the overlay platform (examples, demo UI and Frame
test package removed), renamed to FrameAssistant, and working rules for
the project recorded in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 00:06:58 +02:00
co-authored by Claude Opus 5.5
commit 4a5b09053e
63 changed files with 5193 additions and 0 deletions
+95
View File
@@ -0,0 +1,95 @@
#!/usr/bin/env bash
# Builds the dashboard for the Steam Frame (aarch64) and packages it for release:
#
# dist/<executable>-<version>-linux-arm64/ uses SteamOS's Qt (default, ~3 MB)
# dist/<executable>-<version>-linux-arm64-bundled/ Qt bundled (--bundle-qt, ~46 MB)
# (each also as .tar.gz)
#
# The package contains only the dashboard itself plus install.sh,
# uninstall.sh and a README. Installing again over an existing installation updates it.
#
# scripts/package-release.sh [--bundle-qt] [--no-build]
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
build=1 bundle_qt=0
for arg in "$@"; do
case "$arg" in
--no-build) build=0 ;;
--bundle-qt) bundle_qt=1 ;;
*) echo "usage: $0 [--bundle-qt] [--no-build]" >&2; exit 2 ;;
esac
done
if [[ "$(uname -m)" == aarch64 ]]; then mode=native; else mode=cross; fi
if (( bundle_qt )); then
mode+=-bundle
[[ "$mode" == native-bundle ]] && preset=native-bundle || preset=cross-arm64-bundle
else
[[ "$mode" == native ]] && preset=native-systemqt || preset=cross-arm64
fi
(( build )) && "$root/scripts/container-build.sh" "$mode"
cache="$root/build/$preset/CMakeCache.txt"
setting() { sed -n "s/^$1:[A-Z]*=//p" "$cache"; }
exe="$(setting VRDASH_EXECUTABLE_NAME)"
name="$(setting VRDASH_DISPLAY_NAME)"
key="$(setting VRDASH_APP_KEY)"
version="$(setting CMAKE_PROJECT_VERSION)"
project="$(setting CMAKE_PROJECT_NAME)"
stage="$root/build/$preset/stage"
[[ "$(file -b "$stage/bin/$exe")" == *aarch64* ]] || { echo "$stage/bin/$exe is not an aarch64 build" >&2; exit 1; }
package="$exe-$version-linux-arm64"
(( bundle_qt )) && package+=-bundled
out="$root/dist/$package"
rm -rf "$out" "$out.tar.gz"
mkdir -p "$out"
cp -a "$stage/." "$out/"
# Only the dashboard: drop any other executables.
find "$out/bin" -maxdepth 1 -type f -perm -u+x ! -name "$exe" -delete
cp "$root/LICENSE" "$out/"
cat > "$out/install.sh" <<EOF
#!/bin/sh
# Installs or updates $name: registers it with SteamVR (starts automatically with
# SteamVR) and starts it now. SteamVR must be running. Works over SSH.
cd "\$(dirname "\$0")" || exit 1
mkdir -p logs
# An update replaces the files of a running instance: stop it, SteamVR restarts it below.
# (Match the command line: process names are cut to 15 characters.)
pkill -f "/bin/$exe( |\\$)" 2>/dev/null && sleep 1
exec ./bin/$exe --install-manifest --launch --log-file logs/install.log
EOF
cat > "$out/uninstall.sh" <<EOF
#!/bin/sh
# Unregisters $name from SteamVR and stops it. The folder can be deleted afterwards.
cd "\$(dirname "\$0")" || exit 1
pkill -f "/bin/$exe( |\\$)" 2>/dev/null
exec ./bin/$exe --uninstall-manifest --log-file logs/install.log
EOF
chmod +x "$out/install.sh" "$out/uninstall.sh"
{
echo "$name $version (SteamVR dashboard overlay, app key $key)"
echo
if (( bundle_qt )); then
echo "Self-contained build: Qt is included."
else
echo "Uses the system's Qt (SteamOS: Qt 6.8 or newer). If it fails to start after a"
echo "SteamOS update, use the -bundled package instead."
fi
echo
echo "Install / update: ./install.sh (SteamVR must be running)"
echo " SteamVR remembers this folder's location: after moving it,"
echo " run ./install.sh again."
echo "Uninstall: ./uninstall.sh"
echo "Logs: logs/install.log; run ./bin/$exe --help for options"
echo
echo "License: MIT (LICENSE). Third-party notices: share/doc/$project/."
} > "$out/README.txt"
tar -C "$root/dist" -czf "$out.tar.gz" "$package"
echo "Release folder: $out"
echo "Archive: $out.tar.gz ($(du -h "$out.tar.gz" | cut -f1))"