From ed6018d4ad9818390d5a0adbe723ef18e75c2c3e Mon Sep 17 00:00:00 2001 From: jspijker Date: Mon, 28 Nov 2022 11:22:11 +0100 Subject: [PATCH] Update pyinstaller scripts using UltiMaker Contributes to CURA-9808 --- .github/workflows/cura-installer.yml | 14 +++++++------- ...er-Cura.spec.jinja => UltiMaker-Cura.spec.jinja | 0 conanfile.py | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) rename Ultimaker-Cura.spec.jinja => UltiMaker-Cura.spec.jinja (100%) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 8b1ea6e390..082c707488 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -212,38 +212,38 @@ jobs: cp openssl/lib/*.lib ./cura_inst/Lib/ - name: Create the Cura dist - run: pyinstaller ./cura_inst/Ultimaker-Cura.spec + run: pyinstaller ./cura_inst/UltiMaker-Cura.spec - name: Archive the artifacts (bash) if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }} - run: tar -zcf "./Ultimaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.tar.gz" "./Ultimaker-Cura/" + run: tar -zcf "./UltiMaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.tar.gz" "./UltiMaker-Cura/" working-directory: dist - name: Archive the artifacts (Powershell) if: ${{ github.event.inputs.installer == 'false' && runner.os == 'Windows' }} - run: Compress-Archive -Path ".\Ultimaker-Cura" -DestinationPath ".\Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.zip" + run: Compress-Archive -Path ".\UltiMaker-Cura" -DestinationPath ".\UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.zip" working-directory: dist - name: Create the Windows exe installer (Powershell) if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }} run: | - python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.exe" + python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "UltiMaker-Cura-$Env:CURA_VERSION_FULL-${{ inputs.os_name }}.exe" working-directory: dist - name: Create the Linux AppImage (Bash) if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Linux' }} - run: python ../cura_inst/packaging/AppImage/create_appimage.py ./Ultimaker-Cura $CURA_VERSION_FULL "Ultimaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.AppImage" + run: python ../cura_inst/packaging/AppImage/create_appimage.py ./UltiMaker-Cura $CURA_VERSION_FULL "UltiMaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.AppImage" working-directory: dist - name: Create the MacOS dmg (Bash) if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }} - run: python ../cura_inst/packaging/dmg/dmg_sign_noterize.py ../cura_inst . "Ultimaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.dmg" + run: python ../cura_inst/packaging/dmg/dmg_sign_noterize.py ../cura_inst . "UltiMaker-Cura-$CURA_VERSION_FULL-${{ inputs.os_name }}.dmg" working-directory: dist - name: Upload the artifacts uses: actions/upload-artifact@v3 with: - name: Ultimaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ inputs.os_name }} + name: UltiMaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ inputs.os_name }} path: | dist/*.tar.gz dist/*.zip diff --git a/Ultimaker-Cura.spec.jinja b/UltiMaker-Cura.spec.jinja similarity index 100% rename from Ultimaker-Cura.spec.jinja rename to UltiMaker-Cura.spec.jinja diff --git a/conanfile.py b/conanfile.py index d890885794..111d4f9b9c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -21,7 +21,7 @@ class CuraConan(ConanFile): description = "3D printer / slicing GUI built on top of the Uranium framework" topics = ("conan", "python", "pyqt5", "qt", "qml", "3d-printing", "slicer") build_policy = "missing" - exports = "LICENSE*", "Ultimaker-Cura.spec.jinja", "CuraVersion.py.jinja" + exports = "LICENSE*", "UltiMaker-Cura.spec.jinja", "CuraVersion.py.jinja" settings = "os", "compiler", "build_type", "arch" no_copy_source = True # We won't build so no need to copy sources to the build folder @@ -226,13 +226,13 @@ class CuraConan(ConanFile): # Collect all dll's from PyQt6 and place them in the root binaries.extend([(f"{p}", ".") for p in Path(self._site_packages, "PyQt6", "Qt6").glob("**/*.dll")]) - with open(Path(__file__).parent.joinpath("Ultimaker-Cura.spec.jinja"), "r") as f: + with open(Path(__file__).parent.joinpath("UltiMaker-Cura.spec.jinja"), "r") as f: pyinstaller = Template(f.read()) version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) cura_version = Version(version) - with open(Path(location, "Ultimaker-Cura.spec"), "w") as f: + with open(Path(location, "UltiMaker-Cura.spec"), "w") as f: f.write(pyinstaller.render( name = str(self.options.display_name).replace(" ", "-"), display_name = self.options.display_name,