ci(release): enhance Debian package installation loop and makensis binary resolution
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user