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)
|
||||
|
||||
Reference in New Issue
Block a user