diff options
author | j.spijker@ultimaker.com <jelle spijker> | 2022-07-15 13:03:51 +0300 |
---|---|---|
committer | Jelle Spijker <j.spijker@ultimaker.com> | 2022-07-15 13:03:51 +0300 |
commit | f1a6c54414cbb41ee8258fd37d59b52c1e420231 (patch) | |
tree | 00e31001421c0bc15bb145bc59f00f73d8d1cf38 | |
parent | c731ac7dfeb53fcab343a09206a179087e38780f (diff) |
Fixed nsis build script
Contributes to CURA-9365
-rw-r--r-- | packaging/NSIS/create_windows_installer.py | 8 | ||||
-rw-r--r-- | requirements-dev.txt | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/packaging/NSIS/create_windows_installer.py b/packaging/NSIS/create_windows_installer.py index 6bfc729bb0..a7c1904d02 100644 --- a/packaging/NSIS/create_windows_installer.py +++ b/packaging/NSIS/create_windows_installer.py @@ -14,8 +14,8 @@ from jinja2 import Template def generate_nsi(source_path: str, dist_path: str, filename: str): - dist_loc = Path(dist_path) - source_loc = Path(source_path) + dist_loc = Path(os.getcwd(), dist_path) + source_loc = Path(os.getcwd(), source_path) instdir = Path("$INSTDIR") dist_paths = [p.relative_to(dist_loc.joinpath("Ultimaker-Cura")) for p in sorted(dist_loc.joinpath("Ultimaker-Cura").rglob("*")) if p.is_file()] mapped_out_paths = {} @@ -35,7 +35,7 @@ def generate_nsi(source_path: str, dist_path: str, filename: str): rmdir_paths = sorted(list(rmdir_paths), reverse = True)[:-2] - jinja_template_path = Path(sys.argv[2]) + jinja_template_path = Path(source_loc.joinpath("packaging", "NSIS", "Ultimaker-Cura.nsi.jinja")) with open(jinja_template_path, "r") as f: template = Template(f.read()) @@ -65,7 +65,7 @@ def generate_nsi(source_path: str, dist_path: str, filename: str): def build(dist_path: str): - dist_loc = Path(dist_path) + dist_loc = Path(os.getcwd(), dist_path) command = ["makensis", "/V2", "/P4", str(dist_loc.joinpath("Ultimaker-Cura.nsi"))] subprocess.run(command) diff --git a/requirements-dev.txt b/requirements-dev.txt index e6f9471ec2..819943e8b7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,3 +2,4 @@ pytest pyinstaller pyinstaller-hooks-contrib sip==6.5.1 +jinja2 |