ci(release): enhance Debian package installation loop and makensis binary resolution
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m35s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 1m38s

This commit is contained in:
2026-09-26 13:49:58 +02:00
parent d025689193
commit b8069ee66b
2 changed files with 20 additions and 8 deletions
+10 -4
View File
@@ -140,23 +140,29 @@ def compile_nsis_installers():
"""Compiles NSIS installers if makensis is available (native Linux/Windows)."""
makensis_cmd = None
if shutil.which("makensis"):
makensis_cmd = ["makensis"]
makensis_cmd = [shutil.which("makensis")]
elif os.path.exists("/usr/bin/makensis"):
makensis_cmd = ["/usr/bin/makensis"]
elif os.path.exists("/usr/local/bin/makensis"):
makensis_cmd = ["/usr/local/bin/makensis"]
elif os.path.exists(r"C:\Program Files (x86)\NSIS\makensis.exe"):
makensis_cmd = [r"C:\Program Files (x86)\NSIS\makensis.exe"]
elif os.path.exists(r"C:\Program Files\NSIS\makensis.exe"):
makensis_cmd = [r"C:\Program Files\NSIS\makensis.exe"]
if not makensis_cmd:
print("[!] Note: NSIS compiler (makensis) not found in PATH or standard directories.")
return False
compilation_dir = os.path.join(ROOT_DIR, "compilation")
success = True
for nsi in ["installer_client.nsi", "installer_server.nsi"]:
nsi_path = os.path.join(ROOT_DIR, "compilation", nsi)
nsi_path = os.path.join(compilation_dir, nsi)
if os.path.exists(nsi_path):
print(f"[*] Compiling NSIS script: {nsi} via {makensis_cmd[0]}...")
try:
subprocess.run(makensis_cmd + [nsi_path], check=True)
print(f"[+] Successfully compiled {nsi}")
subprocess.run(makensis_cmd + [nsi_path], cwd=compilation_dir, check=True)
print(f"[+] Successfully compiled NSIS installer for {nsi}")
except Exception as e:
print(f"[!] Warning: Failed to compile {nsi} with {makensis_cmd}: {e}")
success = False