Steam Frame build, packaging and deployment scripts; render test
- build_scripts/steamframe/: Debian trixie (Qt 6.8) containers for the aarch64 cross build, native build and tests; toolchain; scripts to build, test (Vulkan validation layers), package (system Qt, ~3 MB) and deploy over SSH. Adapted from the vrdashboard template. - test/render/: render test for the OpenGL and Vulkan backends, driven like OverlayController (option OVRAS_BUILD_TESTS). - RPATH only $ORIGIN, without the build machine's link directories. - Ignore dist/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b22c35ae29
commit
bde675f1b8
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds OVRAS for the Steam Frame inside a Debian container (Qt 6.8, the
|
||||
# series of the Frame's system Qt). Result: build/steamframe-<mode>/Release/,
|
||||
# packaged by package-release.sh. Adapted from the vrdashboard template.
|
||||
#
|
||||
# build_scripts/steamframe/container-build.sh cross x86_64 host -> aarch64
|
||||
# build_scripts/steamframe/container-build.sh native for the host's own
|
||||
# architecture (on the Frame: native arm64)
|
||||
# build_scripts/steamframe/container-build.sh <mode> shell
|
||||
# interactive shell in that container
|
||||
#
|
||||
# Uses podman if available, else docker (override with CONTAINER_ENGINE).
|
||||
set -euo pipefail
|
||||
|
||||
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
root="$(cd "$here/../.." && pwd)"
|
||||
mode="${1:-}"
|
||||
case "$mode" in
|
||||
cross) dockerfile=cross-arm64.Dockerfile
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=build_scripts/steamframe/aarch64-linux-gnu.cmake" ;;
|
||||
native) dockerfile=native.Dockerfile; toolchain="" ;;
|
||||
*) echo "usage: $0 cross|native [shell]" >&2; exit 2 ;;
|
||||
esac
|
||||
image="ovras-steamframe-${dockerfile%.Dockerfile}"
|
||||
engine="${CONTAINER_ENGINE:-$(command -v podman || command -v docker)}"
|
||||
build="build/steamframe-$mode"
|
||||
|
||||
"$engine" build -q -t "$image" -f "$here/$dockerfile" "$here" >/dev/null
|
||||
|
||||
# Run as the calling user, so the build tree isn't owned by root.
|
||||
run=("$engine" run --rm -v "$root:$root:z" -w "$root")
|
||||
if [[ "$(basename "$engine")" == docker ]]; then
|
||||
run+=(--user "$(id -u):$(id -g)")
|
||||
else
|
||||
run+=(--userns=keep-id)
|
||||
fi
|
||||
[[ -t 0 ]] && run+=(-it)
|
||||
|
||||
if [[ "${2:-}" == shell ]]; then
|
||||
exec "${run[@]}" "$image" bash
|
||||
fi
|
||||
|
||||
# OVRAS_STEAM_FRAME: Frame capabilities and defaults
|
||||
# (src/utils/platform_capabilities.h).
|
||||
"${run[@]}" "$image" bash -c "
|
||||
set -e
|
||||
cmake -S . -B $build -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DOVRAS_STEAM_FRAME=ON $toolchain
|
||||
cmake --build $build
|
||||
"
|
||||
echo "Built: $root/$build/Release"
|
||||
Reference in New Issue
Block a user