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:
Matthias Janetschek
2026-10-07 13:50:57 +02:00
co-authored by Claude Opus 5.5
parent b22c35ae29
commit bde675f1b8
15 changed files with 610 additions and 14 deletions
+25 -13
View File
@@ -211,27 +211,39 @@ existing code:
| File | Purpose |
|---|---|
| `cross-arm64.Dockerfile` | Debian container with Qt 6.8 (aarch64 multiarch), CMake, Vulkan headers, X11/Xtst, libpulse |
| `cross-arm64.Dockerfile` | Debian trixie (Qt 6.8) with arm64 multiarch libraries, cross compiler |
| `native.Dockerfile` | The same for the host's own architecture (on the Frame: native build); base of the test container |
| `test.Dockerfile` | Mesa (incl. lavapipe), Vulkan validation layers, Xvfb |
| `aarch64-linux-gnu.cmake` | Cross-compile toolchain |
| `container-build.sh` | Configures the build (`OVRAS_STEAM_FRAME=ON`) and builds it in the container |
| `package-release.sh` | Folder with the binary, `libopenvr_api.so`, `res/`, manifests, `install.sh` / `uninstall.sh` → `.tar.gz` |
| `deploy-to-frame.sh` | Copies the package to the Frame over SSH and runs `install.sh` |
| `install.sh` / `uninstall.sh` | `--force-install-manifest` / `--force-remove-manifest` (section 2) and start / stop |
| `container-build.sh cross\|native` | Builds with `OVRAS_STEAM_FRAME=ON` → `build/steamframe-<mode>/Release/` |
| `container-test.sh` | Render tests with both APIs, Vulkan with validation layers |
| `package-release.sh` | Build output + `install.sh` / `uninstall.sh` / `run.sh` / `README.txt` → `dist/AdvancedSettings-<version>-linux-arm64(.tar.gz)` |
| `deploy-to-frame.sh` | Copies the package to the Frame over SSH (`rsync`) and runs `install.sh` there |
- **Scripts in the package:**
- `install.sh` stops a running instance, registers it (`--force-install-manifest`, auto-start)
and starts it with `DISPLAY=:0`. Over SSH there is no display, and Qt needs one.
- `run.sh [opengl|vulkan]` restarts it with a given graphics API.
- The scripts start the program in the package folder, because OVRAS writes
`AdvancedSettings.log` into the working directory.
- Packages use the **system Qt**: no Qt is bundled, because of section 3 the binary uses no
private API.
- The template's Qt-bundling fallback is not adopted for now.
- RPATH is only `$ORIGIN` (`BUILD_WITH_INSTALL_RPATH`): the build tree gets packaged.
## Tests
- **x86_64 locally:** the build succeeds; `objdump` check (R1).
- **Vulkan:** `container-test.sh` with validation layers. It reports no messages, and the
render path is checked by a snapshot test (`tst_render` from the template, reduced to the
backends).
- **OVRAS:** the keyboard parser test `test/keyboard_input` is included in CMake if that is
easy; otherwise it is noted as not run.
- **On the Frame:** a checklist per acceptance criterion R1–R4, R6, R7, with both graphics
APIs. Results go to `docs/steamframe/PROGRESS.md`.
- **Render test `test/render/tst_render`** (`OVRAS_BUILD_TESTS=ON`):
- Drives the backends and `QQuickRenderControl` in the same order as `OverlayController`.
- Checks the texture description for SteamVR (type, Vulkan format) and the content and
orientation via readback.
- One CTest entry per API.
- `container-test.sh` runs it with the Vulkan validation layers. It fails on validation
messages and on skipped tests.
- **OVRAS's keyboard parser test** (`test/keyboard_input`, qmake) is not included in CMake
in iteration 1 (not run).
- **On the Frame:** the checklist in `PROGRESS.md` per acceptance criterion R1–R4, R6, R7,
with both graphics APIs.
## Implementation order
+52
View File
@@ -122,3 +122,55 @@
- The build tree contains the binary, `libopenvr_api.so`, both manifests,
`default_action_manifests/` and `res/`.
- Not tested yet: `Background` on the Frame (step 5).
### Step 5: Frame build, package, tests (2026-10-07)
**Changes:**
- **`build_scripts/steamframe/`** (new, see DESIGN.md section 9): containers, toolchain, build,
test, package and deploy scripts.
- **`test/render/`** (new): render test for both backends (`OVRAS_BUILD_TESTS=ON`).
- **`CMakeLists.txt`:**
- option `OVRAS_BUILD_TESTS`
- RPATH only `$ORIGIN` (`BUILD_WITH_INSTALL_RPATH`). Before, the cross binary also had the
host's absolute link directory in its RUNPATH.
- **`.gitignore`:** `dist/`.
**Results:**
- **Render tests:**
- locally (Arch, Qt 6.11, Intel Iris Xe): OpenGL and Vulkan, 4/4 passed each
- in the container (Debian trixie, Qt 6.8, same GPU via `/dev/dri`): 2/2 passed,
**no Vulkan validation messages**
- Proof that the layer was active: `VK_LOADER_DEBUG=layer` shows
"Inserted device layer VK_LAYER_KHRONOS_validation".
- **Cross build (aarch64, Qt 6.8 Debian):** succeeds once the container has `libxt-dev`
(`input_sender_X11.cpp` includes `X11/Intrinsic.h`).
- `Qt_6_PRIVATE_API` without `QVulkan*`: 0 → **R1 symbols met**.
- Qt version tag: `Qt_6.8` (fits the Frame's 6.8.0).
- GLIBC ≤ 2.38 (the Frame has 2.39); GLIBCXX ≤ 3.4.32 (not checked against the Frame).
- NEEDED: Qt6 Core/Gui/Qml/Quick/Widgets/Network/DBus/Multimedia/WebSockets, libX11,
libXtst, libpulse, libopenvr_api, libstdc++/libc.
- **Package** `dist/AdvancedSettings-5.7.4-linux-arm64.tar.gz`: 3.0 MB (9.1 MB unpacked).
The version 5.7.4 comes from `qt6`'s `project()` (master is at 5.8.17).
**Open (needs the Frame):**
- Are the QML modules OVRAS imports present in the Frame's system Qt? QtQuick.Controls
(Material), Layouts, Dialogs, Multimedia.
- Do libXt/libXtst exist on SteamOS? Is libstdc++ new enough?
### Test checklist on the Frame (step 5)
Deploy: `build_scripts/steamframe/deploy-to-frame.sh <user>@<frame>` (SteamVR running).
| # | Check | Criterion | Result |
|---|---|---|---|
| T1 | `install.sh`: registration works (log: "Manifest reinstalled", via Background) | R2 | open |
| T2 | Tab appears in the dashboard, UI correct (OpenGL) | R2, R3 | open |
| T3 | `./run.sh vulkan`: UI correct | R3 | open |
| T4 | Laser right way up, click, scrolling on several pages (both APIs) | R4 | open |
| T5 | Text field (e.g. new profile name): SteamVR keyboard opens, input arrives | R4 | open |
| T6 | An OVRAS action arrives (e.g. push-to-talk, log/notification) | R4 | open |
| T7 | Play area before/after start unchanged; log: "CommitWorkingCopy skipped" | R7 | open |
| T8 | Quit app (OVRAS "Exit" and Quit in the SteamVR dashboard): no crash (both APIs) | R2 | open |
| T9 | Auto-start after a SteamVR restart / reboot | R2 | open |
| T10 | `pidstat -p $(pgrep -f AdvancedSettings_app) 10 6`: dashboard closed / OVRAS visible / other tab visible | R6 | open |
| T11 | `uninstall.sh` unregisters it | R2 | open |