From 02078282bc97e7a667a6d24ca2ee85979a19f28d Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 15 Feb 2026 22:42:39 +0300 Subject: [PATCH] fix(ci-installer): remove dynamic path defines for ISCC - use static relative paths in .iss for source/output - pass only version and /O override to ISCC - add explicit source/script path diagnostics in build.py --- build.py | 20 ++++++++++++++++---- installer/AnabasisManager.iss | 10 ++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/build.py b/build.py index 25c6349..1a20b81 100644 --- a/build.py +++ b/build.py @@ -200,18 +200,30 @@ def build_installer(): print("[ERROR] Install Inno Setup 6 or set ISCC_PATH environment variable.") sys.exit(1) - icon_abs_path = os.path.abspath(ICON_PATH) + project_root = os.path.abspath(".") + source_dir = os.path.abspath(DIST_DIR) + output_dir = os.path.abspath("dist") + iss_path = os.path.abspath(INSTALLER_SCRIPT) + print(f"[INFO] ISCC source dir: {source_dir}") + print(f"[INFO] ISCC output dir: {output_dir}") + print(f"[INFO] ISCC script: {iss_path}") + if not os.path.exists(source_dir): + print(f"[ERROR] Source dir does not exist: {source_dir}") + sys.exit(1) + if not os.path.exists(iss_path): + print(f"[ERROR] Installer script does not exist: {iss_path}") + sys.exit(1) command = [ iscc_path, f"/DMyAppVersion={VERSION}", - f"/DMySourceDir={os.path.abspath(DIST_DIR)}", - f"/DMyOutputDir={os.path.abspath('dist')}", - os.path.abspath(INSTALLER_SCRIPT), + f"/O{output_dir}", + iss_path, ] try: completed = subprocess.run( command, capture_output=True, + cwd=project_root, check=False, ) stdout_text = _decode_process_output(completed.stdout) diff --git a/installer/AnabasisManager.iss b/installer/AnabasisManager.iss index 082cfdf..991e1bb 100644 --- a/installer/AnabasisManager.iss +++ b/installer/AnabasisManager.iss @@ -2,12 +2,6 @@ #ifndef MyAppVersion #define MyAppVersion "0.0.0" #endif -#ifndef MySourceDir - #define MySourceDir "..\\dist\\AnabasisManager" -#endif -#ifndef MyOutputDir - #define MyOutputDir "..\\dist" -#endif [Setup] AppId={{6CD9D6F2-4B95-4E9C-A8D8-2A9C8F6AA741} @@ -18,7 +12,7 @@ DefaultDirName={localappdata}\Programs\Anabasis Manager DefaultGroupName=Anabasis Manager DisableProgramGroupPage=yes PrivilegesRequired=lowest -OutputDir={#MyOutputDir} +OutputDir=..\dist OutputBaseFilename=AnabasisManager-setup-{#MyAppVersion} Compression=lzma2 SolidCompression=yes @@ -34,7 +28,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" Name: "desktopicon"; Description: "Create a desktop shortcut"; GroupDescription: "Additional tasks:" [Files] -Source: "{#MySourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "..\dist\AnabasisManager\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] Name: "{group}\Anabasis Manager"; Filename: "{app}\AnabasisManager.exe"