build: make inno setup version a cmake cache variable

This commit is contained in:
yyc12345 committed 2026-10-13 10:31:02 +08:00
1 parent b65bb359a9
commit a2e89f4a5a
2 files changed
+7 -2

No files matched your search

+4 -1
View File
@@ -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::
+3 -1
View File
@@ -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