fix(ci): add native NSIS installer compilation and libpython3 dev dependencies for Linux runner
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m45s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 1m10s

This commit is contained in:
2026-09-26 13:33:19 +02:00
parent 911014fae7
commit 17c1791b7d
4 changed files with 120 additions and 20 deletions
+33 -1
View File
@@ -136,6 +136,33 @@ def create_windows_exe_zipapp(script_name, exe_name):
print(f"[+] Successfully cross-compiled Windows PE executable: {exe_name}.exe (PE Stub attached: {bool(stub_bytes)})")
def compile_nsis_installers():
"""Compiles NSIS installers if makensis is available (native Linux/Windows)."""
makensis_cmd = None
if shutil.which("makensis"):
makensis_cmd = ["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:
return False
success = True
for nsi in ["installer_client.nsi", "installer_server.nsi"]:
nsi_path = os.path.join(ROOT_DIR, "compilation", 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}")
except Exception as e:
print(f"[!] Warning: Failed to compile {nsi} with {makensis_cmd}: {e}")
success = False
return success
def compile_inno_setup_installers():
"""Compiles Inno Setup installers if iscc or innosetup wrapper is available."""
iscc_cmd = None
@@ -173,6 +200,11 @@ def compile_inno_setup_installers():
return True
def compile_windows_installers():
if not compile_nsis_installers():
compile_inno_setup_installers()
def build_windows():
print("[*] Compiling Windows standalone executables...")
is_windows_host = platform.system() == "Windows"
@@ -192,7 +224,7 @@ def build_windows():
create_windows_exe_zipapp("Win_Client.py", "Win_Client")
create_windows_exe_zipapp("Server.py", "Server")
compile_inno_setup_installers()
compile_windows_installers()
client_bin = os.path.join(DIST_DIR, "Win_Client.exe")
server_bin = os.path.join(DIST_DIR, "Server.exe")