From a2e89f4a5a65ceee39b642f7f8c75d3b9ffdf11e Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Tue, 13 Oct 2026 10:31:02 +0800 Subject: [PATCH] build: make inno setup version a cmake cache variable --- .github/workflows/windows.yml | 5 ++++- CMakeLists.txt | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 237ebfd..99ad495 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -92,7 +92,10 @@ jobs: echo ::endgroup:: :: ------ app ------ echo ::group::===== App Build ===== - cmake -Bbuild . || goto :error + :: YYC MARK: The GitHub runner preinstalls Inno Setup 6.7.1; align the metaglot + :: inno rendering with it via the Inno Setup version cache variable. + :: May remove or change it once GitHub updates its preinstalls to Inno Setup 7 series. + cmake -Bbuild . -DINNO_SETUP_VERSION=6 || goto :error cmake --build build --config Release || goto :error cmake --install build --config Release --prefix "%PWD%\build" || goto :error echo ::endgroup:: diff --git a/CMakeLists.txt b/CMakeLists.txt index 0813fd2..3168667 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,10 +238,12 @@ if (WIN32) ) # Setup Inno Setup script file + set (INNO_SETUP_VERSION "7" CACHE STRING "Major version of Inno Setup that packages the installer; decides which language files count as official in the metaglot inno rendering.") + set_property (CACHE INNO_SETUP_VERSION PROPERTY STRINGS 6 7) set (SCWPIC_INNO_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/inno-metadata) execute_process ( COMMAND ${METAGLOT_EXECUTABLE} render inno - --inno-version 6 + --inno-version ${INNO_SETUP_VERSION} --manifest ${CMAKE_SOURCE_DIR}/dist/scwpic.iss.in.toml --po ${CMAKE_SOURCE_DIR}/locales/inno/*.po --iss-template ${CMAKE_SOURCE_DIR}/dist/scwpic.iss.in.liquid