aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Kokko <antti.kokko@qt.io>2022-11-11 11:56:21 +0200
committerAntti Kokko <antti.kokko@qt.io>2022-11-11 11:35:03 +0000
commit35f6c2c0a07856b3702b37489a14e3c1ddb868c5 (patch)
tree06197846c7edcc3d0e62ba486ffcc58e1675ece2
parent877040c5c2e5ff9f460eea29ac790b9df61bd5b5 (diff)
Add Python executable for archive action Python script callsv6.4.1-packaging
Archive action scripts are mostly Python scripts and in this case content_cleaner.py that gets called when creating Windows offline installer. Call fails on Windows without the path to Python executable. Change-Id: Ibb1cecb4f373ee14b80b0aabac91ec34ae628867 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r--packaging-tools/create_installer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/packaging-tools/create_installer.py b/packaging-tools/create_installer.py
index bbe0738b4..66aed684f 100644
--- a/packaging-tools/create_installer.py
+++ b/packaging-tools/create_installer.py
@@ -380,7 +380,10 @@ def get_component_data(
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), script_file)
if not os.path.exists(script_path):
raise CreateInstallerError(f"Custom archive action script missing: {script_path}")
- run_cmd(cmd=[script_path, "--input-dir=" + install_dir, script_args.strip()])
+ cmd = [script_path, "--input-dir=" + install_dir, script_args.strip()]
+ if script_path.endswith(".py"):
+ cmd.insert(0, sys.executable)
+ run_cmd(cmd)
# strip out unnecessary folder structure based on the configuration
count = 0