From b0f9c6bb286b376495dc4431ef4326b963706d05 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 14 Jul 2022 12:47:39 +0200 Subject: [PATCH 01/13] Use the full app name I believe this should ensure that specific folders and location will then have a unique path for this app in the registry, which should make the install path version specific Contributes to CURA-9365 --- packaging/NSIS/Ultimaker-Cura.nsi.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/NSIS/Ultimaker-Cura.nsi.jinja b/packaging/NSIS/Ultimaker-Cura.nsi.jinja index fc7db794d9..ecc5a52fe1 100644 --- a/packaging/NSIS/Ultimaker-Cura.nsi.jinja +++ b/packaging/NSIS/Ultimaker-Cura.nsi.jinja @@ -12,7 +12,7 @@ !define MAIN_APP_EXE "{{ main_app }}" !define INSTALL_TYPE "SetShellVarContext all" !define REG_ROOT "HKCU" -!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}" +!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}" !define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" !define REG_START_MENU "Start Menu Folder" From 409c079d8feb5de043270eec244934821a2b4b0c Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 14 Jul 2022 14:47:58 +0200 Subject: [PATCH 02/13] Simplified nsis script Contributes to CURA-9365 --- .github/workflows/cura-installer.yml | 3 +- packaging/NSIS/Ultimaker-Cura.nsi.jinja | 4 +- packaging/NSIS/create_windows_installer.py | 80 ++++++++++++++++++++++ packaging/NSIS/nsis-configurator.py | 78 --------------------- 4 files changed, 83 insertions(+), 82 deletions(-) create mode 100644 packaging/NSIS/create_windows_installer.py delete mode 100644 packaging/NSIS/nsis-configurator.py diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index a4adf07945..a95f6a60cc 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -183,8 +183,7 @@ jobs: - name: Create the Windows exe installer (Powershell) if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }} run: | - python ..\cura_inst\packaging\NSIS\nsis-configurator.py ".\Ultimaker-Cura" "..\cura_inst\packaging\NSIS\Ultimaker-Cura.nsi.jinja" "Ultimaker Cura" "Ultimaker-Cura.exe" "$Env:CURA_VERSION_MAJOR" "$Env:CURA_VERSION_MINOR" "$Env:CURA_VERSION_PATCH" "$Env:CURA_VERSION_BUILD" "Ultimaker B.V." "https://ultimaker.com" "..\cura_inst\packaging\cura_license.txt" "LZMA" "..\cura_inst\packaging\NSIS\cura_banner_nsis.bmp" "..\cura_inst\packaging\icons\Cura.ico" "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ matrix.os_id }}-${{ runner.arch }}.exe" - makensis /V2 /P4 Ultimaker-Cura.nsi + python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ matrix.os_id }}-${{ runner.arch }}.exe" working-directory: dist - name: Create the Linux AppImage (Bash) diff --git a/packaging/NSIS/Ultimaker-Cura.nsi.jinja b/packaging/NSIS/Ultimaker-Cura.nsi.jinja index ecc5a52fe1..b7a50674ed 100644 --- a/packaging/NSIS/Ultimaker-Cura.nsi.jinja +++ b/packaging/NSIS/Ultimaker-Cura.nsi.jinja @@ -25,7 +25,7 @@ var SM_Folder ###################################################################### VIProductVersion "${VERSION}" -VIAddVersionKey "ProductName" "${APP_NAME}" +VIAddVersionKey "ProductName" "{{ app_name }}" VIAddVersionKey "CompanyName" "${COMP_NAME}" VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" VIAddVersionKey "FileDescription" "${DESCRIPTION}" @@ -64,7 +64,7 @@ InstallDir "$PROGRAMFILES64\${APP_NAME}" !ifdef REG_START_MENU !define MUI_STARTMENUPAGE_NODISABLE -!define MUI_STARTMENUPAGE_DEFAULTFOLDER "{{ app_name }}" +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${APP_NAME}" !define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}" !define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}" diff --git a/packaging/NSIS/create_windows_installer.py b/packaging/NSIS/create_windows_installer.py new file mode 100644 index 0000000000..6bfc729bb0 --- /dev/null +++ b/packaging/NSIS/create_windows_installer.py @@ -0,0 +1,80 @@ +# Copyright (c) 2022 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. +import os +import argparse # Command line arguments parsing and help. +import subprocess + +import shutil +import sys +from datetime import datetime + +from pathlib import Path + +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) + 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 = {} + for dist_path in dist_paths: + if "__pycache__" not in dist_path.parts: + out_path = instdir.joinpath(dist_path).parent + if out_path not in mapped_out_paths: + mapped_out_paths[out_path] = [(dist_loc.joinpath("Ultimaker-Cura", dist_path), instdir.joinpath(dist_path))] + else: + mapped_out_paths[out_path].append((dist_loc.joinpath("Ultimaker-Cura", dist_path), instdir.joinpath(dist_path))) + + rmdir_paths = set() + for rmdir_f in mapped_out_paths.values(): + for _, rmdir_p in rmdir_f: + for rmdir in rmdir_p.parents: + rmdir_paths.add(rmdir) + + rmdir_paths = sorted(list(rmdir_paths), reverse = True)[:-2] + + jinja_template_path = Path(sys.argv[2]) + with open(jinja_template_path, "r") as f: + template = Template(f.read()) + + nsis_content = template.render( + app_name = "Ultimaker Cura", + main_app = "Ultimaker-Cura.exe", + version_major = os.environ.get("CURA_VERSION_MAJOR"), + version_minor = os.environ.get("CURA_VERSION_MINOR"), + version_patch = os.environ.get("CURA_VERSION_PATCH"), + version_build = os.environ.get("CURA_VERSION_BUILD"), + company = "Ultimaker B.V.", + web_site = "https://ultimaker.com", + year = datetime.now().year, + cura_license_file = str(source_loc.joinpath("packaging", "cura_license.txt")), + compression_method = "LZMA", # ZLIB, BZIP2 or LZMA + cura_banner_img = str(source_loc.joinpath("packaging", "NSIS", "cura_banner_nsis.bmp")), + cura_icon = str(source_loc.joinpath("packaging", "icons", "Cura.ico")), + mapped_out_paths = mapped_out_paths, + rmdir_paths = rmdir_paths, + destination = filename + ) + + with open(dist_loc.joinpath("Ultimaker-Cura.nsi"), "w") as f: + f.write(nsis_content) + + shutil.copy(source_loc.joinpath("packaging", "NSIS", "fileassoc.nsh"), dist_loc.joinpath("fileassoc.nsh")) + + +def build(dist_path: str): + dist_loc = Path(dist_path) + command = ["makensis", "/V2", "/P4", str(dist_loc.joinpath("Ultimaker-Cura.nsi"))] + subprocess.run(command) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description = "Create Windows exe installer of Cura.") + parser.add_argument("source_path", type=str, help="Path to Conan install Cura folder.") + parser.add_argument("dist_path", type=str, help="Path to Pyinstaller dist folder") + parser.add_argument("filename", type = str, help = "Filename of the exe (e.g. 'Ultimaker-Cura-5.1.0-beta-Windows-X64.exe')") + args = parser.parse_args() + generate_nsi(args.source_path, args.dist_path, args.filename) + build(args.dist_path) diff --git a/packaging/NSIS/nsis-configurator.py b/packaging/NSIS/nsis-configurator.py deleted file mode 100644 index c8986fb118..0000000000 --- a/packaging/NSIS/nsis-configurator.py +++ /dev/null @@ -1,78 +0,0 @@ -import shutil -import sys -from datetime import datetime - -from pathlib import Path - -from jinja2 import Template - -if __name__ == "__main__": - """ - - dist_loc: Location of distribution folder, as output by pyinstaller - - nsi_jinja_loc: Jinja2 template to use - - app_name: Should be "Ultimaker Cura". - - main_app: Name of executable, e.g. Ultimaker-Cura.exe? - - version_major: Major version number of Semver (e.g. 5). - - version_minor: Minor version number of Semver (e.g. 0). - - version_patch: Patch version number of Semver (e.g. 0). - - version_build: A version number that gets manually incremented at each build. - - company: Publisher of the application. Should be "Ultimaker B.V." - - web_site: Website to find more information. Should be "https://ultimaker.com". - - cura_license_file: Path to a license file in Cura. Should point to packaging/cura_license.txt in this repository. - - compression_method: Compression algorithm to use to compress the data inside the executable. Should be ZLIB, ZBIP2 or LZMA. - - cura_banner_img: Path to an image shown on the left in the installer. Should point to packaging/cura_banner_nsis.bmp in this repository. - - icon_path: Path to the icon to use on the installer - - destination: Where to put the installer after it's generated. -` """ - for i, v in enumerate(sys.argv): - print(f"{i} = {v}") - dist_loc = Path(sys.argv[1]) - instdir = Path("$INSTDIR") - dist_paths = [p.relative_to(dist_loc) for p in sorted(dist_loc.rglob("*")) if p.is_file()] - mapped_out_paths = {} - for dist_path in dist_paths: - if "__pycache__" not in dist_path.parts: - out_path = instdir.joinpath(dist_path).parent - if out_path not in mapped_out_paths: - mapped_out_paths[out_path] = [(dist_loc.joinpath(dist_path), instdir.joinpath(dist_path))] - else: - mapped_out_paths[out_path].append((dist_loc.joinpath(dist_path), instdir.joinpath(dist_path))) - - rmdir_paths = set() - for rmdir_f in mapped_out_paths.values(): - for _, rmdir_p in rmdir_f: - for rmdir in rmdir_p.parents: - rmdir_paths.add(rmdir) - - rmdir_paths = sorted(list(rmdir_paths), reverse = True)[:-2] - - jinja_template_path = Path(sys.argv[2]) - with open(jinja_template_path, "r") as f: - template = Template(f.read()) - - nsis_content = template.render( - app_name = sys.argv[3], - main_app = sys.argv[4], - version_major = sys.argv[5], - version_minor = sys.argv[6], - version_patch = sys.argv[7], - version_build = sys.argv[8], - company = sys.argv[9], - web_site = sys.argv[10], - year = datetime.now().year, - cura_license_file = Path(sys.argv[11]), - compression_method = sys.argv[12], # ZLIB, BZIP2 or LZMA - cura_banner_img = Path(sys.argv[13]), - cura_icon = Path(sys.argv[14]), - mapped_out_paths = mapped_out_paths, - rmdir_paths = rmdir_paths, - destination = Path(sys.argv[15]) - ) - - with open(dist_loc.parent.joinpath(jinja_template_path.stem), "w") as f: - f.write(nsis_content) - - shutil.copy(Path(__file__).absolute().parent.joinpath("fileassoc.nsh"), dist_loc.parent.joinpath("fileassoc.nsh")) - icon_path = Path(sys.argv[14]) - shutil.copy(icon_path, dist_loc.joinpath(icon_path.name)) - From b9b13b0d6957ccf837770d24b2b1fff8d3add835 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 15 Jul 2022 07:55:05 +0200 Subject: [PATCH 03/13] Use reqs for 5.1.0-beta Contributes to CURA-9365 (cherry picked from commit 12eb5f15d16ebc908938644d221a2cae5d3c39a2) --- conandata.yml | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/conandata.yml b/conandata.yml index 6e2a5f4f27..23ef1c4215 100644 --- a/conandata.yml +++ b/conandata.yml @@ -182,3 +182,95 @@ Windows: "./icons/Cura.ico" Macos: "./icons/cura.icns" Linux: "./icons/cura-128.png" +"5.1.0-beta": + requirements: + - "arcus/5.1.0@ultimaker/stable" + - "curaengine/5.1.0@ultimaker/stable" + - "savitar/5.1.0@ultimaker/stable" + - "pynest2d/5.1.0@ultimaker/stable" + - "uranium/5.1.0@ultimaker/stable" + - "fdm_materials/5.1.0@ultimaker/stable" + - "cura_binary_data/5.1.0@ultimaker/stable" + - "cpython/3.10.4" + runinfo: + entrypoint: "cura_app.py" + pyinstaller: + datas: + cura_plugins: + package: "cura" + src: "plugins" + dst: "share/cura/plugins" + cura_resources: + package: "cura" + src: "resources" + dst: "share/cura/resources" + uranium_plugins: + package: "uranium" + src: "plugins" + dst: "share/uranium/plugins" + uranium_resources: + package: "uranium" + src: "resources" + dst: "share/uranium/resources" + uranium_um_qt_qml_um: + package: "uranium" + src: "site-packages/UM/Qt/qml/UM" + dst: "PyQt6/Qt6/qml/UM" + cura_binary_data: + package: "cura_binary_data" + src: "resources/cura/resources" + dst: "share/cura/resources" + uranium_binary_data: + package: "cura_binary_data" + src: "resources/uranium/resources" + dst: "share/uranium/resources" + windows_binary_data: + package: "cura_binary_data" + src: "windows" + dst: "share/windows" + fdm_materials: + package: "fdm_materials" + src: "materials" + dst: "share/cura/resources/materials" + tcl: + package: "tcl" + src: "lib/tcl8.6" + dst: "tcl" + tk: + package: "tk" + src: "lib/tk8.6" + dst: "tk" + binaries: + curaengine: + package: "curaengine" + src: "bin" + dst: "." + binary: "CuraEngine" + hiddenimports: + - "pySavitar" + - "pyArcus" + - "pynest2d" + - "PyQt6" + - "PyQt6.QtNetwork" + - "PyQt6.sip" + - "logging.handlers" + - "zeroconf" + - "fcntl" + - "stl" + - "serial" + collect_all: + - "cura" + - "UM" + - "serial" + - "Charon" + - "sqlite3" + - "trimesh" + - "win32ctypes" + - "PyQt6" + - "PyQt6.QtNetwork" + - "PyQt6.sip" + - "stl" + icon: + Windows: "./icons/Cura.ico" + Macos: "./icons/cura.icns" + Linux: "./icons/cura-128.png" From 310fb48f876b49a694c90a8023c74e657f080806 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 15 Jul 2022 07:58:48 +0200 Subject: [PATCH 04/13] Add specific branch req Contributes to CURA-9365 --- conandata.yml | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/conandata.yml b/conandata.yml index 23ef1c4215..29f45ad9b9 100644 --- a/conandata.yml +++ b/conandata.yml @@ -274,3 +274,95 @@ Windows: "./icons/Cura.ico" Macos: "./icons/cura.icns" Linux: "./icons/cura-128.png" +"cura_9459": + requirements: + - "arcus/(latest)@ultimaker/stable" + - "curaengine/(latest)@ultimaker/stable" + - "savitar/(latest)@ultimaker/stable" + - "pynest2d/(latest)@ultimaker/stable" + - "uranium/(latest)@ultimaker/stable" + - "fdm_materials/(latest)@ultimaker/stable" + - "cura_binary_data/(latest)@ultimaker/stable" + - "cpython/3.10.4" + runinfo: + entrypoint: "cura_app.py" + pyinstaller: + datas: + cura_plugins: + package: "cura" + src: "plugins" + dst: "share/cura/plugins" + cura_resources: + package: "cura" + src: "resources" + dst: "share/cura/resources" + uranium_plugins: + package: "uranium" + src: "plugins" + dst: "share/uranium/plugins" + uranium_resources: + package: "uranium" + src: "resources" + dst: "share/uranium/resources" + uranium_um_qt_qml_um: + package: "uranium" + src: "site-packages/UM/Qt/qml/UM" + dst: "PyQt6/Qt6/qml/UM" + cura_binary_data: + package: "cura_binary_data" + src: "resources/cura/resources" + dst: "share/cura/resources" + uranium_binary_data: + package: "cura_binary_data" + src: "resources/uranium/resources" + dst: "share/uranium/resources" + windows_binary_data: + package: "cura_binary_data" + src: "windows" + dst: "share/windows" + fdm_materials: + package: "fdm_materials" + src: "materials" + dst: "share/cura/resources/materials" + tcl: + package: "tcl" + src: "lib/tcl8.6" + dst: "tcl" + tk: + package: "tk" + src: "lib/tk8.6" + dst: "tk" + binaries: + curaengine: + package: "curaengine" + src: "bin" + dst: "." + binary: "CuraEngine" + hiddenimports: + - "pySavitar" + - "pyArcus" + - "pynest2d" + - "PyQt6" + - "PyQt6.QtNetwork" + - "PyQt6.sip" + - "logging.handlers" + - "zeroconf" + - "fcntl" + - "stl" + - "serial" + collect_all: + - "cura" + - "UM" + - "serial" + - "Charon" + - "sqlite3" + - "trimesh" + - "win32ctypes" + - "PyQt6" + - "PyQt6.QtNetwork" + - "PyQt6.sip" + - "stl" + icon: + Windows: "./icons/Cura.ico" + Macos: "./icons/cura.icns" + Linux: "./icons/cura-128.png" From f1a6c54414cbb41ee8258fd37d59b52c1e420231 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 15 Jul 2022 12:03:51 +0200 Subject: [PATCH 05/13] Fixed nsis build script Contributes to CURA-9365 --- packaging/NSIS/create_windows_installer.py | 8 ++++---- 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 From 82c6035754e665de6fe2fefa8b412e7568e7eaf9 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 15 Jul 2022 13:07:21 +0200 Subject: [PATCH 06/13] Remove the InstallDirRegKey This should ensure that the default directory will always falls back to `"$PROGRAMFILES64\${APP_NAME}"` where `APP_NAME` is: `{{ app_name }} {{ version_major }}.{{ version_minor }}.{{ version_patch }}.{{ version_build }}` Contributes to CURA-9459 --- packaging/NSIS/Ultimaker-Cura.nsi.jinja | 8 ++++---- packaging/NSIS/create_windows_installer.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packaging/NSIS/Ultimaker-Cura.nsi.jinja b/packaging/NSIS/Ultimaker-Cura.nsi.jinja index b7a50674ed..3776f843db 100644 --- a/packaging/NSIS/Ultimaker-Cura.nsi.jinja +++ b/packaging/NSIS/Ultimaker-Cura.nsi.jinja @@ -1,10 +1,11 @@ # Copyright (c) 2022 Ultimaker B.V. # Cura's build system is released under the terms of the AGPLv3 or higher. -!define APP_NAME "{{ app_name }} {{ version_major }}.{{ version_minor }}.{{ version_patch }}" +!define APP_NAME "{{ app_name }} {{ version_major }}.{{ version_minor }}.{{ version_patch }}.{{ version_build }}" !define COMP_NAME "{{ company }}" !define WEB_SITE "{{ web_site }}" !define VERSION "{{ version_major }}.{{ version_minor }}.{{ version_patch }}.{{ version_build }}" +!define VIVERSION "{{ version_major }}.{{ version_minor }}.{{ version_patch }}.0" !define COPYRIGHT "Copyright (c) {{ year }} {{ company }}" !define DESCRIPTION "Application" !define LICENSE_TXT "{{ cura_license_file }}" @@ -24,12 +25,12 @@ var SM_Folder ###################################################################### -VIProductVersion "${VERSION}" +VIProductVersion "${VIVERSION}" VIAddVersionKey "ProductName" "{{ app_name }}" VIAddVersionKey "CompanyName" "${COMP_NAME}" VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" VIAddVersionKey "FileDescription" "${DESCRIPTION}" -VIAddVersionKey "FileVersion" "${VERSION}" +VIAddVersionKey "FileVersion" "${VIVERSION}" ###################################################################### @@ -38,7 +39,6 @@ Name "${APP_NAME}" Caption "${APP_NAME}" OutFile "${INSTALLER_NAME}" BrandingText "${APP_NAME}" -InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" "" InstallDir "$PROGRAMFILES64\${APP_NAME}" ###################################################################### diff --git a/packaging/NSIS/create_windows_installer.py b/packaging/NSIS/create_windows_installer.py index a7c1904d02..519c8f0a7f 100644 --- a/packaging/NSIS/create_windows_installer.py +++ b/packaging/NSIS/create_windows_installer.py @@ -5,7 +5,6 @@ import argparse # Command line arguments parsing and help. import subprocess import shutil -import sys from datetime import datetime from pathlib import Path From 49161aa4be8f8e19a556315c9674685067c46afe Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 15 Jul 2022 13:23:15 +0200 Subject: [PATCH 07/13] Add cura_8665 entry to conandata Contributes to CURA-9459 --- conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conandata.yml b/conandata.yml index 3ac6b274de..b9e9acce7d 100644 --- a/conandata.yml +++ b/conandata.yml @@ -286,7 +286,7 @@ Windows: "./icons/Cura.ico" Macos: "./icons/cura.icns" Linux: "./icons/cura-128.png" -"cura_9459": +"cura_8665": requirements: - "arcus/(latest)@ultimaker/stable" - "curaengine/(latest)@ultimaker/stable" From b7316f450383c9890ad15aadc9c6a77e144d3879 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 15 Jul 2022 13:25:03 +0200 Subject: [PATCH 08/13] Use full version in app_name This should ensure that each Cura version, either release, prerelease or development Will be installed completely separate from earlier versions Contributes to CURA-9459 --- packaging/NSIS/Ultimaker-Cura.nsi.jinja | 4 ++-- packaging/NSIS/create_windows_installer.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packaging/NSIS/Ultimaker-Cura.nsi.jinja b/packaging/NSIS/Ultimaker-Cura.nsi.jinja index 3776f843db..b692597a04 100644 --- a/packaging/NSIS/Ultimaker-Cura.nsi.jinja +++ b/packaging/NSIS/Ultimaker-Cura.nsi.jinja @@ -1,10 +1,10 @@ # Copyright (c) 2022 Ultimaker B.V. # Cura's build system is released under the terms of the AGPLv3 or higher. -!define APP_NAME "{{ app_name }} {{ version_major }}.{{ version_minor }}.{{ version_patch }}.{{ version_build }}" +!define APP_NAME "{{ app_name }}" !define COMP_NAME "{{ company }}" !define WEB_SITE "{{ web_site }}" -!define VERSION "{{ version_major }}.{{ version_minor }}.{{ version_patch }}.{{ version_build }}" +!define VERSION "{{ version }}" !define VIVERSION "{{ version_major }}.{{ version_minor }}.{{ version_patch }}.0" !define COPYRIGHT "Copyright (c) {{ year }} {{ company }}" !define DESCRIPTION "Application" diff --git a/packaging/NSIS/create_windows_installer.py b/packaging/NSIS/create_windows_installer.py index 519c8f0a7f..d0589ed817 100644 --- a/packaging/NSIS/create_windows_installer.py +++ b/packaging/NSIS/create_windows_installer.py @@ -38,13 +38,14 @@ def generate_nsi(source_path: str, dist_path: str, filename: str): with open(jinja_template_path, "r") as f: template = Template(f.read()) + nsis_content = template.render( - app_name = "Ultimaker Cura", + app_name = f"Ultimaker Cura {os.getenv('CURA_VERSION_FULL')}", main_app = "Ultimaker-Cura.exe", + version = os.getenv('CURA_VERSION_FULL'), version_major = os.environ.get("CURA_VERSION_MAJOR"), version_minor = os.environ.get("CURA_VERSION_MINOR"), version_patch = os.environ.get("CURA_VERSION_PATCH"), - version_build = os.environ.get("CURA_VERSION_BUILD"), company = "Ultimaker B.V.", web_site = "https://ultimaker.com", year = datetime.now().year, From b896f1124a1a8c9326cdc64c775b90265ca70b1e Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Fri, 15 Jul 2022 14:11:16 +0200 Subject: [PATCH 09/13] Use Ultimaker Cura as default start menu folder Contributes to CURA-9459 --- packaging/NSIS/Ultimaker-Cura.nsi.jinja | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packaging/NSIS/Ultimaker-Cura.nsi.jinja b/packaging/NSIS/Ultimaker-Cura.nsi.jinja index b692597a04..70fa93e608 100644 --- a/packaging/NSIS/Ultimaker-Cura.nsi.jinja +++ b/packaging/NSIS/Ultimaker-Cura.nsi.jinja @@ -64,7 +64,7 @@ InstallDir "$PROGRAMFILES64\${APP_NAME}" !ifdef REG_START_MENU !define MUI_STARTMENUPAGE_NODISABLE -!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${APP_NAME}" +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Ultimaker Cura" !define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}" !define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}" @@ -113,8 +113,8 @@ CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE CreateShortCut "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe" !ifdef WEB_SITE -WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}" -CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME} Website.lnk" "$INSTDIR\${APP_NAME} website.url" +WriteIniStr "$INSTDIR\Ultimaker Cura website.url" "InternetShortcut" "URL" "${WEB_SITE}" +CreateShortCut "$SMPROGRAMS\$SM_Folder\Ultimaker Cura website.lnk" "$INSTDIR\Ultimaker Cura website.url" !endif !insertmacro MUI_STARTMENU_WRITE_END !endif @@ -125,8 +125,8 @@ CreateShortCut "$SMPROGRAMS\{{ app_name }}\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP CreateShortCut "$SMPROGRAMS\{{ app_name }}\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe" !ifdef WEB_SITE -WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}" -CreateShortCut "$SMPROGRAMS\{{ app_name }}\${APP_NAME} Website.lnk" "$INSTDIR\${APP_NAME} website.url" +WriteIniStr "$INSTDIR\Ultimaker Cura website.url" "InternetShortcut" "URL" "${WEB_SITE}" +CreateShortCut "$SMPROGRAMS\{{ app_name }}\Ultimaker Cura website.lnk" "$INSTDIR\Ultimaker Cura website.url" !endif !endif @@ -170,7 +170,7 @@ RmDir "$INSTDIR" Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk" Delete "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk" !ifdef WEB_SITE -Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME} Website.lnk" +Delete "$SMPROGRAMS\$SM_Folder\Ultimaker Cura website.lnk" !endif RmDir "$SMPROGRAMS\$SM_Folder" !endif @@ -179,7 +179,7 @@ RmDir "$SMPROGRAMS\$SM_Folder" Delete "$SMPROGRAMS\{{ app_name }}\${APP_NAME}.lnk" Delete "$SMPROGRAMS\{{ app_name }}\Uninstall ${APP_NAME}.lnk" !ifdef WEB_SITE -Delete "$SMPROGRAMS\{{ app_name }}\${APP_NAME} Website.lnk" +Delete "$SMPROGRAMS\{{ app_name }}\Ultimaker Cura website.lnk" !endif RmDir "$SMPROGRAMS\{{ app_name }}" !endif From 0d3ca302281c29a594b1a2b20f536b3c224d9169 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 18 Jul 2022 10:35:06 +0200 Subject: [PATCH 10/13] Update change log for 5.1 stable There's still 2 more tickets in the works, that I didn't add yet. We'll see if they get merged in time. --- resources/texts/change_log.txt | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 731a517c36..09cf07362b 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -2,6 +2,9 @@ * Improved toolpath simplification algorithm The algorithm that reduces the resolution of the print has been rewritten, providing a more constant resolution to allow for greater precision without causing buffer underruns. +* Added option to alternate wall direction +A new setting causes the direction of printing walls to alternate between layers and adjacent walls, which reduces warping in the print. + * Adjusted combing boundaries to reduce scarring Travel moves through the inside of the models are adjusted so that they should keep more distance from the model where possible, yet allowing travels through narrow parts without retractions. @@ -12,6 +15,7 @@ We added the option to disable acceleration and jerk commands for travel moves. Newly created project files will now store which packages they require from the Ultimaker Marketplace. If a project needs a material from there, the user will be prompted to download it. * Other new features and improvements: +- The interface to select the printing profile in Recommended Mode has been redesigned. - Cura now links toolpaths to project files in the Digital Factory. - Improved performance of loading STL files on Linux. - Packages from the Marketplace can now contain intent profiles. @@ -21,11 +25,25 @@ Newly created project files will now store which packages they require from the * Bug fixes: - Fix resetting configuration if it gets corrupt. - Monotonic ordering now works again for top surfaces. -- Fixed a bug where Remove Raft Inside Corners didn't always remove all corners. -- Fixed the position of the toolbar if the toolbar is too tall to fit. +- Fix a bug where Remove Raft Inside Corners didn't always remove all corners. +- Fix the position of the toolbar if the toolbar is too tall to fit. - Intents in the Recommended Mode now show a description again. - Remove Inside Corners and Raft Base Wall Count can now be changed per extruder, though they will affect the entire print. -- Fixed opening STL files with special characters in their header. +- Fix opening STL files with special characters in their header. +- Fix crash at start-up on newer Linux distributions. +- Fix priming when printing a raft with a different extruder for some of its layers. +- Fix a case where the inner wall ends up protruding through the outside of the model. +- Improve some details on dark mode colouring. +- Fix an error sometimes occurring when uninstalling plug-ins. +- Fix a rendering issue with pop-up dialogues on MacOS. +- Fix Discard or Keep Changes dialog showing an outdated setting value. +- Horizontal Scaling Shrinkage Compensation no longer adjusts the size of the build volume, allowing the full size of the build plate to be used. +- Fixed overextrusion when using gradual infill with thin strips of infill. +- Fix opening STL files with special characters in their file header. +- Fix slicing failure when using Randomize Infill Start in some cases. +- Restore reminder to sync materials with your printer when using cloud printers with custom materials. +- The tool bar should no longer show up in the monitor stage. +- Exporting materials should now retain settings unknown to Cura as well. * Printer definitions, profiles and materials: - Improved profiles for PVA and support for Ultimaker printers. From 470bb7300cb1d7bc421c7492b417fe956ada52b6 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 18 Jul 2022 10:35:55 +0200 Subject: [PATCH 11/13] Update documentation Clarify why the last two items are removed from the list --- packaging/NSIS/create_windows_installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/NSIS/create_windows_installer.py b/packaging/NSIS/create_windows_installer.py index d0589ed817..c8d28c82a4 100644 --- a/packaging/NSIS/create_windows_installer.py +++ b/packaging/NSIS/create_windows_installer.py @@ -32,7 +32,7 @@ def generate_nsi(source_path: str, dist_path: str, filename: str): for rmdir in rmdir_p.parents: rmdir_paths.add(rmdir) - rmdir_paths = sorted(list(rmdir_paths), reverse = True)[:-2] + rmdir_paths = sorted(list(rmdir_paths), reverse = True)[:-2] # Removes the `.` and `..` from the list jinja_template_path = Path(source_loc.joinpath("packaging", "NSIS", "Ultimaker-Cura.nsi.jinja")) with open(jinja_template_path, "r") as f: From a0610245720d667ae2affef971af98427c0bd6ea Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 18 Jul 2022 10:55:56 +0200 Subject: [PATCH 12/13] Add 'known issues' section of change log I really hope this won't become a pattern... We've always had known issues and it wouldn't do anyone any good to list all of them in the stable release change logs. But it's not my decision here. --- resources/texts/change_log.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 09cf07362b..2ebfc388f0 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -21,6 +21,7 @@ Newly created project files will now store which packages they require from the - Packages from the Marketplace can now contain intent profiles. - The application now makes heavy use of Conan to make it easier and faster to build releases of Cura. - Start and end g-code can now refer to the currently active profile with replacement keys. +- To provide proper compatibility with both older and newer Linux distribution, this release contains two Linux builds. * Bug fixes: - Fix resetting configuration if it gets corrupt. @@ -55,6 +56,10 @@ Newly created project files will now store which packages they require from the - Add Trimarker Nebula Plus printer. - Various small profile improvements. +* Known critical issues: +- The placement of the seam has gotten more scattered than in previous releases. +- Support is sometimes missing in detailed parts, where previous releases supported them properly. + [5.0] Watch the launch event to learn more about Ultimaker Cura 5.0. From e40991fcc336223e3840d6136a85abdb9d5008b7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 18 Jul 2022 14:55:30 +0200 Subject: [PATCH 13/13] Add missing feature to change log This was actually completed quite a while ago (not in 5.0 yet, but in 5.1) but testing completed way later, making us miss this one. --- resources/texts/change_log.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 2ebfc388f0..79ba5b4d5a 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -16,6 +16,7 @@ Newly created project files will now store which packages they require from the * Other new features and improvements: - The interface to select the printing profile in Recommended Mode has been redesigned. +- Implemented multi-threaded slicing for MacOS, to bring it in line with other operating systems. - Cura now links toolpaths to project files in the Digital Factory. - Improved performance of loading STL files on Linux. - Packages from the Marketplace can now contain intent profiles.