Read the version from build_scripts/compile_version_string.txt

The CMake build had the version hard-coded as 5.7.4, while the qmake build
read it from compile_version_string.txt (5.8.17-release). The stale number
also made the version check report an update. As in the qmake build, the
full string becomes APPLICATION_VERSION and its numeric part the project
version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Matthias Janetschek
2026-10-07 14:41:12 +02:00
co-authored by Claude Opus 5.5
parent bde675f1b8
commit 3ed686dec5
2 changed files with 23 additions and 3 deletions
+10 -2
View File
@@ -1,5 +1,13 @@
cmake_minimum_required(VERSION 3.20)
project(AdvancedSettings VERSION 5.7.4 LANGUAGES CXX)
# The version comes from build_scripts/compile_version_string.txt, as in the
# qmake build (e.g. "5.8.17-release"): the full string becomes
# APPLICATION_VERSION (shown in the UI, compared by the version check), the
# numeric part before "-" the project version.
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/build_scripts/compile_version_string.txt"
OVRAS_VERSION_STRING LIMIT_COUNT 1)
string(REGEX REPLACE "-.*$" "" OVRAS_VERSION_NUMBER "${OVRAS_VERSION_STRING}")
project(AdvancedSettings VERSION ${OVRAS_VERSION_NUMBER} LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -292,7 +300,7 @@ if(NOT WIN32 AND NOT APPLE)
endif()
target_compile_definitions(AdvancedSettings PRIVATE
APPLICATION_VERSION=\"${PROJECT_VERSION}\"
APPLICATION_VERSION=\"${OVRAS_VERSION_STRING}\"
)
# Vulkan render backend (src/render/VulkanRenderBackend.*), selected at run
+13 -1
View File
@@ -149,7 +149,7 @@
- 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).
- **Package** `dist/AdvancedSettings-5.7.4-linux-arm64.tar.gz`: 3.0 MB (9.1 MB unpacked); since the version fix below `…-5.8.17-…`.
The version 5.7.4 comes from `qt6`'s `project()` (master is at 5.8.17).
**Open (needs the Frame):**
@@ -157,6 +157,18 @@
(Material), Layouts, Dialogs, Multimedia.
- Do libXt/libXtst exist on SteamOS? Is libstdc++ new enough?
### Version from `compile_version_string.txt` (2026-10-07)
- **Problem:** `qt6`'s `CMakeLists.txt` had the version hard-coded as 5.7.4. The qmake build
read it from `build_scripts/compile_version_string.txt` (`5.8.17-release`). `master` is
fully merged into `qt6`, so only the number was stale. Consequence: the version check
(comparison with `ver/versioncheck.json`, 5.8.17) would have reported an update.
- **Fix:** CMake reads the file.
- `APPLICATION_VERSION` = full string, as in qmake.
- `project(VERSION)` = numeric part.
- **Result:** `APPLICATION_VERSION="5.8.17-release"`, `CMAKE_PROJECT_VERSION=5.8.17`, package
`dist/AdvancedSettings-5.8.17-linux-arm64.tar.gz` (3.0 MB).
### Test checklist on the Frame (step 5)
Deploy: `build_scripts/steamframe/deploy-to-frame.sh <user>@<frame>` (SteamVR running).