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
This commit is contained in:
20
build.py
20
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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user