fix(build): protect NSIS and InnoSetup version header definitions with ifndef guards
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 2m4s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 4m52s
Build and Push LOGAR Runner / Build & Push Runner Image (push) Successful in 10m21s

This commit is contained in:
2026-10-03 23:46:59 +02:00
parent ea2ff1c4a9
commit cd6b9baa8e
+15 -2
View File
@@ -392,11 +392,24 @@ def write_version_headers(display_version, four_part_version):
nsh_file = os.path.join(compilation_dir, "version.nsh")
with open(nsh_file, "w", encoding="utf-8") as f:
f.write(f'; Auto-generated version header from build context\n!define APP_VERSION "{four_part_version}"\n!define DISPLAY_VERSION "{display_version}"\n')
f.write(
f"; Auto-generated version header from build context\n"
f"!ifndef APP_VERSION\n"
f' !define APP_VERSION "{four_part_version}"\n'
f"!endif\n"
f"!ifndef DISPLAY_VERSION\n"
f' !define DISPLAY_VERSION "{display_version}"\n'
f"!endif\n"
)
iss_file = os.path.join(compilation_dir, "version.iss")
with open(iss_file, "w", encoding="utf-8") as f:
f.write(f'; Auto-generated version header from build context\n#define AppVersion "{display_version}"\n')
f.write(
f"; Auto-generated version header from build context\n"
f"#ifndef AppVersion\n"
f' #define AppVersion "{display_version}"\n'
f"#endif\n"
)
print(f"[+] Dynamic context version resolved: {display_version} (NSIS VIProductVersion: {four_part_version})")