diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index edfd6e5687..b0e613493c 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -72,7 +72,7 @@ jobs: path: | $HOME/.conan/data $HOME/.conan/conan_download_cache - key: conan-${{ runner.os }}-${{ runner.arch }} + key: conan-${{ runner.os }}-${{ runner.arch }}-create-cache - name: Cache Conan local repository packages (Powershell) uses: actions/cache@v3 @@ -82,7 +82,7 @@ jobs: C:\Users\runneradmin\.conan\data C:\.conan C:\Users\runneradmin\.conan\conan_download_cache - key: conan-${{ runner.os }}-${{ runner.arch }} + key: conan-${{ runner.os }}-${{ runner.arch }}-create-cache - name: Install MacOS system requirements if: ${{ runner.os == 'Macos' }} @@ -90,7 +90,7 @@ jobs: - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} - run: sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev -y + run: sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y - name: Clean Conan local cache if: ${{ inputs.conan_clean_local_cache }} diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index a53059f52a..9adca8ebb3 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -68,7 +68,7 @@ jobs: uses: actions/cache@v3 with: path: $HOME/.conan/data - key: ${{ runner.os }}-conan + key: ${{ runner.os }}-conan-export-cache - name: Get Conan configuration from branch if: ${{ inputs.conan_config_branch != '' }} diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 70f4c000b8..b633d49474 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -98,7 +98,7 @@ jobs: path: | $HOME/.conan/data $HOME/.conan/conan_download_cache - key: conan-${{ runner.os }}-${{ runner.arch }} + key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache - name: Cache Conan local repository packages (Powershell) uses: actions/cache@v3 @@ -108,7 +108,7 @@ jobs: C:\Users\runneradmin\.conan\data C:\.conan C:\Users\runneradmin\.conan\conan_download_cache - key: conan-${{ runner.os }}-${{ runner.arch }} + key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache - name: Install MacOS system requirements if: ${{ runner.os == 'Macos' }} @@ -117,7 +117,7 @@ jobs: - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} run: | - sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev -y + sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y wget --no-check-certificate --quiet https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O $GITHUB_WORKSPACE/appimagetool chmod +x $GITHUB_WORKSPACE/appimagetool echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV @@ -167,6 +167,26 @@ jobs: env: TEMP_KEYCHAIN_PASSWORD: ${{ steps.macos-keychain.outputs.keychain-password }} + # FIXME: This is a workaround to ensure that we use and pack a shared library for OpenSSL 1.1.1l. We currently compile + # OpenSSL statically for CPython, but our Python Dependenies (such as PyQt6) require a shared library. + # Because Conan won't allow for building the same library with two different options (easily) we need to install it explicitly + # and do a manual copy to the VirtualEnv, such that Pyinstaller can find it. + + - name: Install OpenSSL shared + run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy + + - name: Copy OpenSSL shared (Bash) + if: ${{ runner.os != 'Windows' }} + run: | + cp ./openssl/lib/*.so* ./cura_inst/bin/ || true + cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true + + - name: Copy OpenSSL shared (Powershell) + if: ${{ runner.os == 'Windows' }} + run: | + cp openssl/bin/*.dll ./cura_inst/Scripts/ + cp openssl/lib/*.lib ./cura_inst/Lib/ + - name: Create the Cura dist run: pyinstaller ./cura_inst/Ultimaker-Cura.spec diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 276649cd87..20ea83bdb1 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -99,7 +99,7 @@ jobs: path: | $HOME/.conan/data $HOME/.conan/conan_download_cache - key: conan-${{ runner.os }}-${{ runner.arch }} + key: conan-${{ runner.os }}-${{ runner.arch }}-unit-cache - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} diff --git a/Ultimaker-Cura.spec.jinja b/Ultimaker-Cura.spec.jinja index 7609a64672..74e4fd098b 100644 --- a/Ultimaker-Cura.spec.jinja +++ b/Ultimaker-Cura.spec.jinja @@ -1,5 +1,6 @@ # -*- mode: python ; coding: utf-8 -*- import os +from pathlib import Path from PyInstaller.utils.hooks import collect_all @@ -12,6 +13,13 @@ hiddenimports = {{ hiddenimports }} datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2] {% endfor %} +# Add dynamic libs in the venv bin/Script Path. This is needed because we might copy some additional libs +# e.q.: OpenSSL 1.1.1l in that directory with a separate: +# `conan install openssl@1.1.1l -g deploy && cp openssl/bin/*.so cura_inst/bin` +binaries.extend([(str(bin), ".") for bin in Path("{{ venv_script_path }}").glob("*.so*")]) +binaries.extend([(str(bin), ".") for bin in Path("{{ venv_script_path }}").glob("*.dll")]) +binaries.extend([(str(bin), ".") for bin in Path("{{ venv_script_path }}").glob("*.dylib")]) + block_cipher = None a = Analysis( diff --git a/conandata.yml b/conandata.yml index b9e9acce7d..b4fe8f102b 100644 --- a/conandata.yml +++ b/conandata.yml @@ -12,10 +12,10 @@ # Subject to change in the future! "None": requirements: - - "arcus/(latest)@ultimaker/testing" + - "arcus/5.1.0" - "curaengine/(latest)@ultimaker/testing" - - "savitar/(latest)@ultimaker/testing" - - "pynest2d/(latest)@ultimaker/testing" + - "savitar/5.1.0" + - "pynest2d/5.1.0" - "uranium/(latest)@ultimaker/testing" - "fdm_materials/(latest)@ultimaker/testing" - "cura_binary_data/(latest)@ultimaker/testing" @@ -196,104 +196,104 @@ 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" -"cura_8665": - requirements: - - "arcus/(latest)@ultimaker/stable" + - "arcus/5.1.0" - "curaengine/(latest)@ultimaker/stable" - - "savitar/(latest)@ultimaker/stable" - - "pynest2d/(latest)@ultimaker/stable" + - "savitar/5.1.0" + - "pynest2d/5.1.0" - "uranium/(latest)@ultimaker/stable" - - "fdm_materials/(latest)@ultimaker/stable" + - "fdm_materials/5.1.0" + - "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" +"cura_9342": + requirements: + - "arcus/5.1.0" + - "curaengine/(latest)@ultimaker/stable" + - "savitar/5.1.0" + - "pynest2d/5.1.0" + - "uranium/(latest)@ultimaker/stable" + - "fdm_materials/5.1.0" - "cura_binary_data/(latest)@ultimaker/stable" - "cpython/3.10.4" runinfo: diff --git a/conanfile.py b/conanfile.py index b7164ecf56..0d0dbac3d1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -31,7 +31,7 @@ class CuraConan(ConanFile): # FIXME: Remove specific branch once merged to main # Extending the conanfile with the UMBaseConanfile https://github.com/Ultimaker/conan-ultimaker-index/tree/CURA-9177_Fix_CI_CD/recipes/umbase - python_requires = "umbase/0.1.4@ultimaker/testing" + python_requires = "umbase/0.1.5@ultimaker/testing" python_requires_extend = "umbase.UMBaseConanfile" options = { @@ -138,7 +138,7 @@ class CuraConan(ConanFile): cura_digital_factory_url = self._digital_factory_url)) def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, entitlements_file): - pyinstaller_metadata = self._um_data(self.version, self.channel)["pyinstaller"] + pyinstaller_metadata = self._um_data()["pyinstaller"] datas = [(str(self._base_dir.joinpath("conan_install_info.json")), ".")] for data in pyinstaller_metadata["datas"].values(): if "package" in data: # get the paths from conan package @@ -172,8 +172,6 @@ class CuraConan(ConanFile): binaries.append((str(bin), binary["dst"])) for _, dependency in self.dependencies.items(): - # if dependency.ref.name == "cpython": - # continue for bin_paths in dependency.cpp_info.bindirs: binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*.dll")]) binaries.extend([(f"{p}", ".") for p in Path(bin_paths).glob("**/*.dylib")]) @@ -197,6 +195,7 @@ class CuraConan(ConanFile): entrypoint = entrypoint_location, datas = datas, binaries = binaries, + venv_script_path = str(self._script_dir), hiddenimports = pyinstaller_metadata["hiddenimports"], collect_all = pyinstaller_metadata["collect_all"], icon = icon_path, @@ -224,7 +223,7 @@ class CuraConan(ConanFile): raise ConanInvalidConfiguration("Only versions 5+ are support") def requirements(self): - for req in self._um_data(self.version, self.channel)["requirements"]: + for req in self._um_data()["requirements"]: self.requires(req) def layout(self): @@ -243,8 +242,8 @@ class CuraConan(ConanFile): if self.options.devtools: entitlements_file = "'{}'".format(Path(self.source_folder, "packaging", "dmg", "cura.entitlements")) self._generate_pyinstaller_spec(location = self.generators_folder, - entrypoint_location = "'{}'".format(Path(self.source_folder, self._um_data(self.version, self.channel)["runinfo"]["entrypoint"])).replace("\\", "\\\\"), - icon_path = "'{}'".format(Path(self.source_folder, "packaging", self._um_data(self.version, self.channel)["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"), + entrypoint_location = "'{}'".format(Path(self.source_folder, self._um_data()["runinfo"]["entrypoint"])).replace("\\", "\\\\"), + icon_path = "'{}'".format(Path(self.source_folder, "packaging", self._um_data()["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"), entitlements_file = entitlements_file if self.settings.os == "Macos" else "None") def imports(self): @@ -341,8 +340,8 @@ echo "CURA_VERSION_FULL={{ cura_version_full }}" >> ${{ env_prefix }}GITHUB_ENV entitlements_file = "'{}'".format(Path(self.cpp_info.res_paths[2], "dmg", "cura.entitlements")) self._generate_pyinstaller_spec(location = self._base_dir, - entrypoint_location = "'{}'".format(Path(self.cpp_info.bin_paths[0], self._um_data(self.version, self.channel)["runinfo"]["entrypoint"])).replace("\\", "\\\\"), - icon_path = "'{}'".format(Path(self.cpp_info.res_paths[2], self._um_data(self.version, self.channel)["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"), + entrypoint_location = "'{}'".format(Path(self.cpp_info.bin_paths[0], self._um_data()["runinfo"]["entrypoint"])).replace("\\", "\\\\"), + icon_path = "'{}'".format(Path(self.cpp_info.res_paths[2], self._um_data()["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"), entitlements_file = entitlements_file if self.settings.os == "Macos" else "None") def package(self): diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 79ba5b4d5a..8030327dd2 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -1,4 +1,6 @@ [5.1] +For an overview of the new features in Cura 5.1, please watch our video. + * 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.