Browse Source

Merge remote-tracking branch 'origin/main' into CURA-10997_update_printjob_icon

Erwan MATHIEU 1 year ago
parent
commit
ba1d50fc0a

+ 1 - 1
.github/workflows/conan-package-create.yml

@@ -119,7 +119,7 @@ jobs:
           sudo apt upgrade
           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 flex bison -y
 
-      - name: Install GCC-132 on ubuntu
+      - name: Install GCC-13 on ubuntu
         if: ${{ startsWith(inputs.runs_on, 'ubuntu') }}
         run: |
           sudo apt install g++-13 gcc-13 -y

+ 223 - 71
.github/workflows/installers.yml

@@ -2,81 +2,233 @@ name: All installers
 run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }}
 
 on:
-    workflow_dispatch:
-        inputs:
-            cura_conan_version:
-                description: 'Cura Conan Version'
-                default: 'cura/latest@ultimaker/testing'
-                required: true
-                type: string
-            conan_args:
-                description: 'Conan args: eq.: --require-override'
-                default: ''
-                required: false
-                type: string
-            enterprise:
-                description: 'Build Cura as an Enterprise edition'
-                default: false
-                required: true
-                type: boolean
-            staging:
-                description: 'Use staging API'
-                default: false
-                required: true
-                type: boolean
+  workflow_dispatch:
+    inputs:
+      cura_conan_version:
+        description: 'Cura Conan Version'
+        default: 'cura/latest@ultimaker/testing'
+        required: true
+        type: string
+      conan_args:
+        description: 'Conan args: eq.: --require-override'
+        default: ''
+        required: false
+        type: string
+      enterprise:
+        description: 'Build Cura as an Enterprise edition'
+        default: false
+        required: true
+        type: boolean
+      staging:
+        description: 'Use staging API'
+        default: false
+        required: true
+        type: boolean
+      nightly:
+        description: 'Upload to nightly release'
+        default: false
+        required: true
+        type: boolean
+
+  schedule:
+    # Daily at 5:20 CET
+    - cron: '20 4 * * *'
+
+env:
+  CURA_CONAN_VERSION: ${{ inputs.cura_conan_version || 'cura/latest@ultimaker/testing' }}
+  CONAN_ARGS: ${{ inputs.conan_args || '' }}
+  ENTERPRISE: ${{ inputs.enterprise || false }}
+  STAGING: ${{ inputs.staging || false }}
 
 jobs:
-    windows-installer:
-        uses: ./.github/workflows/windows.yml
+  windows-installer:
+    uses: ./.github/workflows/windows.yml
+    with:
+      cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
+      conan_args: ${{ github.event.inputs.conan_args }}
+      enterprise: ${{ github.event.inputs.enterprise == 'true' }}
+      staging: ${{ github.event.inputs.staging == 'true' }}
+      architecture: X64
+      operating_system: windows-2022
+    secrets: inherit
+
+  linux-installer:
+    uses: ./.github/workflows/linux.yml
+    with:
+      cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
+      conan_args: ${{ github.event.inputs.conan_args }}
+      enterprise: ${{ github.event.inputs.enterprise == 'true' }}
+      staging: ${{ github.event.inputs.staging == 'true' }}
+      architecture: X64
+      operating_system: ubuntu-22.04
+    secrets: inherit
+
+  macos-installer:
+    uses: ./.github/workflows/macos.yml
+    with:
+      cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
+      conan_args: ${{ github.event.inputs.conan_args }}
+      enterprise: ${{ github.event.inputs.enterprise == 'true' }}
+      staging: ${{ github.event.inputs.staging == 'true' }}
+      architecture: X64
+      operating_system: macos-11.0
+    secrets: inherit
+
+  macos-arm-installer:
+    uses: ./.github/workflows/macos.yml
+    with:
+      cura_conan_version: ${{ github.event.inputs.CURA_CONAN_VERSION }}
+      conan_args: ${{ github.event.inputs.conan_args }}
+      enterprise: ${{ github.event.inputs.enterprise == 'true' }}
+      staging: ${{ github.event.inputs.staging == 'true' }}
+      architecture: ARM64
+      operating_system: self-hosted
+    secrets: inherit
+
+  # Run and update nightly release when the nightly input is set to true or if the schedule is triggered
+  update-nightly-release:
+    if: ${{ always() && (! cancelled()) && contains(needs.*.result, 'success') && (! contains(needs.*.result, 'failure')) && (inputs.nightly || github.event_name == 'schedule') }}
+    runs-on: ubuntu-latest
+    needs: [ windows-installer, linux-installer, macos-installer, macos-arm-installer ]
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      # It's not necessary to download all three, but it does make sure we have at least one if an OS is skipped.
+
+      - name: Download the run info
+        uses: actions/download-artifact@v2
         with:
-            cura_conan_version: ${{ inputs.cura_conan_version }}
-            conan_args: ${{ inputs.conan_args }}
-            enterprise: ${{ inputs.enterprise }}
-            staging: ${{ inputs.staging }}
-            architecture: X64
-            operating_system: windows-2022
-        secrets: inherit
-
-    linux-modern-installer:
-        uses: ./.github/workflows/linux.yml
+          name: linux-run-info
+
+      - name: Set the run info as environment variables
+        run: |
+          . run_info.sh 
+
+      - name: Output the name file name and extension
+        id: filename
+        shell: python
+        run: |
+          import os
+          import datetime
+          enterprise = "-Enterprise" if "${{ github.event.inputs.enterprise }}" == "true" else ""
+          linux = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64"
+          mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64"
+          mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64"
+          mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64"
+          mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64"
+          win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64"
+          win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64"
+          nightly_name = "UltiMaker-Cura-" + os.getenv('CURA_VERSION_FULL').split("+")[0]
+          nightly_creation_time = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
+          output_env = os.environ["GITHUB_OUTPUT"]
+          content = ""
+          if os.path.exists(output_env):
+              with open(output_env, "r") as f:
+                  content = f.read()
+          with open(output_env, "w") as f:
+              f.write(content)
+              f.writelines(f"LINUX={linux}\n")
+              f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n")
+              f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n")
+              f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n")
+              f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n")
+              f.writelines(f"WIN_MSI={win_msi}\n")
+              f.writelines(f"WIN_EXE={win_exe}\n")
+              f.writelines(f"NIGHTLY_NAME={nightly_name}\n")
+              f.writelines(f"NIGHTLY_TIME={nightly_creation_time}\n")
+
+      - name: Download linux installer jobs artifacts
+        uses: actions/download-artifact@v2
         with:
-            cura_conan_version: ${{ inputs.cura_conan_version }}
-            conan_args: ${{ inputs.conan_args }}
-            enterprise: ${{ inputs.enterprise }}
-            staging: ${{ inputs.staging }}
-            architecture: X64
-            operating_system: ubuntu-22.04
-        secrets: inherit
-
-    linux-legacy-installer:
-        uses: ./.github/workflows/linux.yml
+          name: ${{ steps.filename.outputs.LINUX }}-AppImage
+          path: installers
+
+      - name: Rename Linux installer to nightlies
+        run: |
+          mv installers/${{ steps.filename.outputs.LINUX }}.AppImage installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage
+
+      - name: Update nightly release for Linux
+        run: |
+          gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-linux-X64.AppImage --clobber
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Download win msi installer jobs artifacts
+        uses: actions/download-artifact@v2
         with:
-            cura_conan_version: ${{ inputs.cura_conan_version }}
-            conan_args: ${{ inputs.conan_args }}
-            enterprise: ${{ inputs.enterprise }}
-            staging: ${{ inputs.staging }}
-            architecture: X64
-            operating_system: ubuntu-20.04
-        secrets: inherit
-
-    macos-installer:
-        uses: ./.github/workflows/macos.yml
+          name: ${{ steps.filename.outputs.WIN_MSI }}-msi
+          path: installers
+
+      - name: Download win exe installer jobs artifacts
+        uses: actions/download-artifact@v2
         with:
-            cura_conan_version: ${{ inputs.cura_conan_version }}
-            conan_args: ${{ inputs.conan_args }}
-            enterprise: ${{ inputs.enterprise }}
-            staging: ${{ inputs.staging }}
-            architecture: X64
-            operating_system: macos-11.0
-        secrets: inherit
-
-    macos-arm-installer:
-        uses: ./.github/workflows/macos.yml
+          name: ${{ steps.filename.outputs.WIN_EXE }}-exe
+          path: installers
+
+      - name: Rename Windows installers to nightlies
+        run: |
+          mv installers/${{ steps.filename.outputs.WIN_MSI }}.msi installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi
+          mv installers/${{ steps.filename.outputs.WIN_EXE }}.exe installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe
+
+      - name: Update nightly release for Windows
+        run: |
+          gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.msi --clobber
+          gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-win64-X64.exe --clobber
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Download MacOS (X64) dmg installer jobs artifacts
+        uses: actions/download-artifact@v2
+        with:
+          name: ${{ steps.filename.outputs.MAC_X64_DMG }}-dmg
+          path: installers
+
+      - name: Download MacOS (X64) pkg installer jobs artifacts
+        uses: actions/download-artifact@v2
+        with:
+          name: ${{ steps.filename.outputs.MAC_X64_PKG }}-pkg
+          path: installers
+
+      - name: Rename MacOS (X64) installers to nightlies
+        run: |
+          mv installers/${{ steps.filename.outputs.MAC_X64_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg
+          mv installers/${{ steps.filename.outputs.MAC_X64_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg
+
+      - name: Update nightly release for MacOS (X64)
+        run: |
+          gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.dmg --clobber
+          gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-X64.pkg --clobber
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Download MacOS (ARM-64) dmg installer jobs artifacts
+        uses: actions/download-artifact@v2
+        with:
+          name: ${{ steps.filename.outputs.MAC_ARM_DMG }}-dmg
+          path: installers
+
+      - name: Download acOS (ARM-64) pkg installer jobs artifacts
+        uses: actions/download-artifact@v2
         with:
-            cura_conan_version: ${{ inputs.cura_conan_version }}
-            conan_args: ${{ inputs.conan_args }}
-            enterprise: ${{ inputs.enterprise }}
-            staging: ${{ inputs.staging }}
-            architecture: ARM64
-            operating_system: self-hosted
-        secrets: inherit
+          name: ${{ steps.filename.outputs.MAC_ARM_PKG }}-pkg
+          path: installers
+
+      - name: Rename MacOS (ARM-64) installers to nightlies
+        run: |
+          mv installers/${{ steps.filename.outputs.MAC_ARM_DMG }}.dmg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg
+          mv installers/${{ steps.filename.outputs.MAC_ARM_PKG }}.pkg installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg
+
+      - name: Update nightly release for MacOS (ARM-64)
+        run: |
+          gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.dmg --clobber
+          gh release upload nightly installers/${{ steps.filename.outputs.NIGHTLY_NAME }}-macos-ARM64.pkg --clobber
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Update nightly release description (with date)
+        if: always()
+        run: |
+          gh release edit nightly --title "${{ steps.filename.outputs.NIGHTLY_NAME }}" --notes "Nightly release created on: ${{ steps.filename.outputs.NIGHTLY_TIME }}"
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 28 - 7
.github/workflows/linux.yml

@@ -38,7 +38,7 @@ on:
         type: choice
         options:
           - ubuntu-22.04
-          - ubuntu-20.04
+
   workflow_call:
     inputs:
       cura_conan_version:
@@ -119,10 +119,20 @@ jobs:
           sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
           sudo apt update
           sudo apt upgrade
-          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
+          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 binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf squashfs-tools strace util-linux zsync -y
+          
+          # Get the AppImage tool
           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
+          
+          # Get the AppImage builder
+          wget --no-check-certificate --quiet -O $GITHUB_WORKSPACE/appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
+          chmod +x appimage-builder-x86_64.AppImage
+          echo "APPIMAGEBUILDER_LOCATION=$GITHUB_WORKSPACE/appimage-builder-x86_64.AppImage" >> $GITHUB_ENV
+          
+          # Make sure these tools can be found on the path
+          echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH          
 
       - name: Install GCC-13
         run: |
@@ -179,10 +189,7 @@ jobs:
         run: |
           import os
           enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
-          if "${{ inputs.operating_system }}" == "ubuntu-22.04":
-              installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-${{ inputs.architecture }}"
-          else:
-              installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-${{ inputs.architecture }}"
+          installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-${{ inputs.architecture }}"
           output_env = os.environ["GITHUB_OUTPUT"]
           content = ""
           if os.path.exists(output_env):
@@ -238,7 +245,7 @@ jobs:
 
       - name: Create the Linux AppImage (Bash)
         run: |
-          python ../cura_inst/packaging/AppImage/create_appimage.py ./UltiMaker-Cura $CURA_VERSION_FULL "${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage"
+          python ../cura_inst/packaging/AppImage-builder/create_appimage.py ./UltiMaker-Cura $CURA_VERSION_FULL "${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage"
           chmod +x "${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage"
         working-directory: dist
 
@@ -250,6 +257,20 @@ jobs:
             dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.AppImage
           retention-days: 5
 
+      - name: Write the run info
+        shell: python
+        run: |
+          import os
+          with open("run_info.sh", "w") as f:
+              f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n')
+      - name: Upload the run info
+        uses: actions/upload-artifact@v3
+        with:
+          name: linux-run-info
+          path: |
+            run_info.sh
+          retention-days: 5
+
   notify-export:
     if: ${{ always() }}
     needs: [ cura-installer-create ]

+ 285 - 270
.github/workflows/macos.yml

@@ -2,278 +2,293 @@ name: Macos Installer
 run-name: ${{ inputs.cura_conan_version }} for Macos-${{ inputs.architecture }} by @${{ github.actor }}
 
 on:
-    workflow_dispatch:
-        inputs:
-            cura_conan_version:
-                description: 'Cura Conan Version'
-                default: 'cura/latest@ultimaker/testing'
-                required: true
-                type: string
-            conan_args:
-                description: 'Conan args: eq.: --require-override'
-                default: ''
-                required: false
-                type: string
-            enterprise:
-                description: 'Build Cura as an Enterprise edition'
-                default: false
-                required: true
-                type: boolean
-            staging:
-                description: 'Use staging API'
-                default: false
-                required: true
-                type: boolean
-            architecture:
-                description: 'Architecture'
-                required: true
-                default: 'X64'
-                type: choice
-                options:
-                    - X64
-                    - ARM64
-            operating_system:
-                description: 'OS'
-                required: true
-                default: 'macos-11'
-                type: choice
-                options:
-                    - self-hosted
-                    - macos-11
-                    - macos-12
-    workflow_call:
-        inputs:
-            cura_conan_version:
-                description: 'Cura Conan Version'
-                default: 'cura/latest@ultimaker/testing'
-                required: true
-                type: string
-            conan_args:
-                description: 'Conan args: eq.: --require-override'
-                default: ''
-                required: false
-                type: string
-            enterprise:
-                description: 'Build Cura as an Enterprise edition'
-                default: false
-                required: true
-                type: boolean
-            staging:
-                description: 'Use staging API'
-                default: false
-                required: true
-                type: boolean
-            architecture:
-                description: 'Architecture'
-                required: true
-                default: 'X64'
-                type: string
-            operating_system:
-                description: 'OS'
-                required: true
-                default: 'macos-11'
-                type: string
+  workflow_dispatch:
+    inputs:
+      cura_conan_version:
+        description: 'Cura Conan Version'
+        default: 'cura/latest@ultimaker/testing'
+        required: true
+        type: string
+      conan_args:
+        description: 'Conan args: eq.: --require-override'
+        default: ''
+        required: false
+        type: string
+      enterprise:
+        description: 'Build Cura as an Enterprise edition'
+        default: false
+        required: true
+        type: boolean
+      staging:
+        description: 'Use staging API'
+        default: false
+        required: true
+        type: boolean
+      architecture:
+        description: 'Architecture'
+        required: true
+        default: 'X64'
+        type: choice
+        options:
+          - X64
+          - ARM64
+      operating_system:
+        description: 'OS'
+        required: true
+        default: 'macos-11'
+        type: choice
+        options:
+          - self-hosted
+          - macos-11
+          - macos-12
+  workflow_call:
+    inputs:
+      cura_conan_version:
+        description: 'Cura Conan Version'
+        default: 'cura/latest@ultimaker/testing'
+        required: true
+        type: string
+      conan_args:
+        description: 'Conan args: eq.: --require-override'
+        default: ''
+        required: false
+        type: string
+      enterprise:
+        description: 'Build Cura as an Enterprise edition'
+        default: false
+        required: true
+        type: boolean
+      staging:
+        description: 'Use staging API'
+        default: false
+        required: true
+        type: boolean
+      architecture:
+        description: 'Architecture'
+        required: true
+        default: 'X64'
+        type: string
+      operating_system:
+        description: 'OS'
+        required: true
+        default: 'macos-11'
+        type: string
 
 env:
-    CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
-    CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
-    CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }}
-    MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }}
-    MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }}
-    MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
-    MACOS_CERT_INSTALLER_P12: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
-    MACOS_CERT_USER: ${{ secrets.MACOS_CERT_USER }}
-    MACOS_CERT_PASSPHRASE: ${{ secrets.MACOS_CERT_PASSPHRASE }}
-    CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
-    ENTERPRISE: ${{ inputs.enterprise }}
-    STAGING: ${{ inputs.staging }}
+  CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
+  CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
+  CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }}
+  MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }}
+  MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }}
+  MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
+  MACOS_CERT_INSTALLER_P12: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
+  MACOS_CERT_USER: ${{ secrets.MACOS_CERT_USER }}
+  MACOS_CERT_PASSPHRASE: ${{ secrets.MACOS_CERT_PASSPHRASE }}
+  CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
+  ENTERPRISE: ${{ inputs.enterprise }}
+  STAGING: ${{ inputs.staging }}
 
 jobs:
-    cura-installer-create:
-        runs-on: ${{ inputs.operating_system }}
-
-        outputs:
-            INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
-
-        steps:
-            -   name: Checkout
-                uses: actions/checkout@v3
-
-            -   name: Setup Python and pip
-                uses: actions/setup-python@v4
-                with:
-                    python-version: '3.10.x'
-                    cache: 'pip'
-                    cache-dependency-path: .github/workflows/requirements-conan-package.txt
-
-            -   name: Install Python requirements for runner
-                run: pip install -r .github/workflows/requirements-conan-package.txt
-
-            -   name: Cache Conan local repository packages (Bash)
-                uses: actions/cache@v3
-                with:
-                    path: |
-                        $HOME/.conan/data
-                        $HOME/.conan/conan_download_cache
-                    key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
-
-            -   name: Install MacOS system requirements
-                run: brew install cmake autoconf automake ninja create-dmg
-
-            -   name: Create the default Conan profile
-                run: conan profile new default --detect --force
-
-            -   name: Remove Macos keychain (Bash)
-                run: security delete-keychain signing_temp.keychain || true
-
-            -   name: Configure Macos keychain Developer Cert(Bash)
-                id: macos-keychain-developer-cert
-                uses: apple-actions/import-codesign-certs@v1
-                with:
-                    keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
-                    p12-file-base64: ${{ secrets.MACOS_CERT_P12 }}
-                    p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
-
-            -   name: Configure Macos keychain Installer Cert (Bash)
-                id: macos-keychain-installer-cert
-                uses: apple-actions/import-codesign-certs@v1
-                with:
-                    keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
-                    create-keychain: false # keychain is created in previous use of action.
-                    p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
-                    p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
-
-            -   name: Get Conan configuration
-                run: |
-                    conan config install https://github.com/Ultimaker/conan-config.git
-                    conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
-
-            -   name: Use Conan download cache (Bash)
-                run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
-
-            -   name: Create the Packages (Bash)
-                run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json"
-
-            -   name: Upload the Package(s)
-                if: always()
-                run: |
-                    conan upload "*" -r cura --all -c
-
-            -   name: Set Environment variables for Cura (bash)
-                run: |
-                    . ./cura_inst/bin/activate_github_actions_env.sh
-                    . ./cura_inst/bin/activate_github_actions_version_env.sh
-
-            -   name: Unlock Macos keychain (Bash)
-                run: security unlock -p $TEMP_KEYCHAIN_PASSWORD signing_temp.keychain
-                env:
-                    TEMP_KEYCHAIN_PASSWORD: ${{  steps.macos-keychain-developer-cert.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)
-                run: |
-                    cp ./openssl/lib/*.so* ./cura_inst/bin/ || true
-                    cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true                    
-
-            -   name: Create the Cura dist
-                run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
-
-            -   name: Output the name file name and extension
-                id: filename
-                shell: python
-                run: |
-                    import os
-                    enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
-                    installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-${{ inputs.architecture }}"
-                    output_env = os.environ["GITHUB_OUTPUT"]
-                    content = ""
-                    if os.path.exists(output_env):
-                        with open(output_env, "r") as f:
-                            content = f.read()
-                    with open(output_env, "w") as f:
-                        f.write(content)
-                        f.writelines(f"INSTALLER_FILENAME={installer_filename}\n")
-
-            -   name: Summarize the used Conan dependencies
-                shell: python
-                run: |
-                    import os
-                    import json
-                    from pathlib import Path
-                    
-                    conan_install_info_path = Path("cura_inst/conan_install_info.json")
-                    conan_info = {"installed": []}
-                    if os.path.exists(conan_install_info_path):
-                        with open(conan_install_info_path, "r") as f:
-                            conan_info = json.load(f)
-                    sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
-                    
-                    summary_env = os.environ["GITHUB_STEP_SUMMARY"]
-                    content = ""
-                    if os.path.exists(summary_env):
-                        with open(summary_env, "r") as f:
-                            content = f.read()
-                    
-                    with open(summary_env, "w") as f:
-                        f.write(content)
-                        f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
-                        f.writelines("## Conan packages:\n")
-                        for dep in sorted_deps:
-                            f.writelines(f"`{dep}`\n")
-
-            -   name: Summarize the used Python modules
-                shell: python
-                run: |
-                    import os
-                    import pkg_resources
-                    summary_env = os.environ["GITHUB_STEP_SUMMARY"]
-                    content = ""
-                    if os.path.exists(summary_env):
-                        with open(summary_env, "r") as f:
-                            content = f.read()
-                    
-                    with open(summary_env, "w") as f:
-                        f.write(content)
-                        f.writelines("## Python modules:\n")
-                        for package in pkg_resources.working_set:
-                            f.writelines(f"`{package.key}/{package.version}`\n")
-
-            -   name: Create the Macos dmg (Bash)
-                run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ steps.filename.outputs.INSTALLER_FILENAME }}" --build_dmg --build_pkg --app_name "$CURA_APP_NAME"
-                working-directory: dist
-
-            -   name: Upload the dmg
-                uses: actions/upload-artifact@v3
-                with:
-                    name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-dmg
-                    path: |
-                        dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.dmg
-                    retention-days: 5
-
-            -   name: Upload the pkg
-                uses: actions/upload-artifact@v3
-                with:
-                    name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-pkg
-                    path: |
-                        dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.pkg
-                    retention-days: 5
-
-
-    notify-export:
-        if: ${{ always() }}
-        needs: [ cura-installer-create ]
-
-        uses: ultimaker/cura/.github/workflows/notify.yml@main
+  cura-installer-create:
+    runs-on: ${{ inputs.operating_system }}
+
+    outputs:
+      INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Setup Python and pip
+        uses: actions/setup-python@v4
+        with:
+          python-version: '3.10.x'
+          cache: 'pip'
+          cache-dependency-path: .github/workflows/requirements-conan-package.txt
+
+      - name: Install Python requirements for runner
+        run: pip install -r .github/workflows/requirements-conan-package.txt
+
+      - name: Cache Conan local repository packages (Bash)
+        uses: actions/cache@v3
+        with:
+          path: |
+            $HOME/.conan/data
+            $HOME/.conan/conan_download_cache
+          key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
+
+      - name: Install MacOS system requirements
+        run: brew install cmake autoconf automake ninja create-dmg
+
+      - name: Create the default Conan profile
+        run: conan profile new default --detect --force
+
+      - name: Remove Macos keychain (Bash)
+        run: security delete-keychain signing_temp.keychain || true
+
+      - name: Configure Macos keychain Developer Cert(Bash)
+        id: macos-keychain-developer-cert
+        uses: apple-actions/import-codesign-certs@v1
+        with:
+          keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
+          p12-file-base64: ${{ secrets.MACOS_CERT_P12 }}
+          p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
+
+      - name: Configure Macos keychain Installer Cert (Bash)
+        id: macos-keychain-installer-cert
+        uses: apple-actions/import-codesign-certs@v1
+        with:
+          keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
+          create-keychain: false # keychain is created in previous use of action.
+          p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
+          p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}
+
+      - name: Get Conan configuration
+        run: |
+          conan config install https://github.com/Ultimaker/conan-config.git
+          conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
+
+      - name: Use Conan download cache (Bash)
+        run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
+
+      - name: Create the Packages (Bash)
+        run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json"
+
+      - name: Upload the Package(s)
+        if: always()
+        run: |
+          conan upload "*" -r cura --all -c
+
+      - name: Set Environment variables for Cura (bash)
+        run: |
+          . ./cura_inst/bin/activate_github_actions_env.sh
+          . ./cura_inst/bin/activate_github_actions_version_env.sh
+
+      - name: Unlock Macos keychain (Bash)
+        run: security unlock -p $TEMP_KEYCHAIN_PASSWORD signing_temp.keychain
+        env:
+          TEMP_KEYCHAIN_PASSWORD: ${{  steps.macos-keychain-developer-cert.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)
+        run: |
+          cp ./openssl/lib/*.so* ./cura_inst/bin/ || true
+          cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true                    
+
+      - name: Create the Cura dist
+        run: pyinstaller ./cura_inst/UltiMaker-Cura.spec
+
+      - name: Output the name file name and extension
+        id: filename
+        shell: python
+        run: |
+          import os
+          enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
+          installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-${{ inputs.architecture }}"
+          output_env = os.environ["GITHUB_OUTPUT"]
+          content = ""
+          if os.path.exists(output_env):
+              with open(output_env, "r") as f:
+                  content = f.read()
+          with open(output_env, "w") as f:
+              f.write(content)
+              f.writelines(f"INSTALLER_FILENAME={installer_filename}\n")
+
+      - name: Summarize the used Conan dependencies
+        shell: python
+        run: |
+          import os
+          import json
+          from pathlib import Path
+          
+          conan_install_info_path = Path("cura_inst/conan_install_info.json")
+          conan_info = {"installed": []}
+          if os.path.exists(conan_install_info_path):
+              with open(conan_install_info_path, "r") as f:
+                  conan_info = json.load(f)
+          sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
+          
+          summary_env = os.environ["GITHUB_STEP_SUMMARY"]
+          content = ""
+          if os.path.exists(summary_env):
+              with open(summary_env, "r") as f:
+                  content = f.read()
+          
+          with open(summary_env, "w") as f:
+              f.write(content)
+              f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
+              f.writelines("## Conan packages:\n")
+              for dep in sorted_deps:
+                  f.writelines(f"`{dep}`\n")
+
+      - name: Summarize the used Python modules
+        shell: python
+        run: |
+          import os
+          import pkg_resources
+          summary_env = os.environ["GITHUB_STEP_SUMMARY"]
+          content = ""
+          if os.path.exists(summary_env):
+              with open(summary_env, "r") as f:
+                  content = f.read()
+          
+          with open(summary_env, "w") as f:
+              f.write(content)
+              f.writelines("## Python modules:\n")
+              for package in pkg_resources.working_set:
+                  f.writelines(f"`{package.key}/{package.version}`\n")
+
+      - name: Create the Macos dmg (Bash)
+        run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ steps.filename.outputs.INSTALLER_FILENAME }}" --build_dmg --build_pkg --app_name "$CURA_APP_NAME"
+        working-directory: dist
+
+      - name: Upload the dmg
+        uses: actions/upload-artifact@v3
+        with:
+          name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-dmg
+          path: |
+            dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.dmg
+          retention-days: 5
+
+      - name: Upload the pkg
+        uses: actions/upload-artifact@v3
         with:
-            success: ${{ contains(join(needs.*.result, ','), 'success') }}
-            success_title: "Create the Cura distributions"
-            success_body: "Installers for ${{ inputs.cura_conan_version }}"
-            failure_title: "Failed to create the Cura distributions"
-            failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
-        secrets: inherit
+          name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-pkg
+          path: |
+            dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.pkg
+          retention-days: 5
+
+      - name: Write the run info
+        shell: python
+        run: |
+          import os
+          with open("run_info.sh", "w") as f:
+              f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n')
+
+      - name: Upload the run info
+        uses: actions/upload-artifact@v3
+        with:
+          name: macos-run-info
+          path: |
+            run_info.sh
+          retention-days: 5
+
+
+  notify-export:
+    if: ${{ always() }}
+    needs: [ cura-installer-create ]
+
+    uses: ultimaker/cura/.github/workflows/notify.yml@main
+    with:
+      success: ${{ contains(join(needs.*.result, ','), 'success') }}
+      success_title: "Create the Cura distributions"
+      success_body: "Installers for ${{ inputs.cura_conan_version }}"
+      failure_title: "Failed to create the Cura distributions"
+      failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
+    secrets: inherit

+ 272 - 255
.github/workflows/windows.yml

@@ -2,269 +2,286 @@ name: Windows Installer
 run-name: ${{ inputs.cura_conan_version }} for Windows-${{ inputs.architecture }} by @${{ github.actor }}
 
 on:
-    workflow_dispatch:
-        inputs:
-            cura_conan_version:
-                description: 'Cura Conan Version'
-                default: 'cura/latest@ultimaker/testing'
-                required: true
-                type: string
-            conan_args:
-                description: 'Conan args: eq.: --require-override'
-                default: ''
-                required: false
-                type: string
-            enterprise:
-                description: 'Build Cura as an Enterprise edition'
-                default: false
-                required: true
-                type: boolean
-            staging:
-                description: 'Use staging API'
-                default: false
-                required: true
-                type: boolean
-            architecture:
-                description: 'Architecture'
-                required: true
-                default: 'X64'
-                type: choice
-                options:
-                    - X64
-            operating_system:
-                description: 'OS'
-                required: true
-                default: 'windows-2022'
-                type: choice
-                options:
-                    - windows-2022
-    workflow_call:
-        inputs:
-            cura_conan_version:
-                description: 'Cura Conan Version'
-                default: 'cura/latest@ultimaker/testing'
-                required: true
-                type: string
-            conan_args:
-                description: 'Conan args: eq.: --require-override'
-                default: ''
-                required: false
-                type: string
-            enterprise:
-                description: 'Build Cura as an Enterprise edition'
-                default: false
-                required: true
-                type: boolean
-            staging:
-                description: 'Use staging API'
-                default: false
-                required: true
-                type: boolean
-            architecture:
-                description: 'Architecture'
-                required: true
-                default: 'X64'
-                type: string
-            operating_system:
-                description: 'OS'
-                required: true
-                default: 'windows-2022'
-                type: string
+  workflow_dispatch:
+    inputs:
+      cura_conan_version:
+        description: 'Cura Conan Version'
+        default: 'cura/latest@ultimaker/testing'
+        required: true
+        type: string
+      conan_args:
+        description: 'Conan args: eq.: --require-override'
+        default: ''
+        required: false
+        type: string
+      enterprise:
+        description: 'Build Cura as an Enterprise edition'
+        default: false
+        required: true
+        type: boolean
+      staging:
+        description: 'Use staging API'
+        default: false
+        required: true
+        type: boolean
+      architecture:
+        description: 'Architecture'
+        required: true
+        default: 'X64'
+        type: choice
+        options:
+          - X64
+      operating_system:
+        description: 'OS'
+        required: true
+        default: 'windows-2022'
+        type: choice
+        options:
+          - windows-2022
+  workflow_call:
+    inputs:
+      cura_conan_version:
+        description: 'Cura Conan Version'
+        default: 'cura/latest@ultimaker/testing'
+        required: true
+        type: string
+      conan_args:
+        description: 'Conan args: eq.: --require-override'
+        default: ''
+        required: false
+        type: string
+      enterprise:
+        description: 'Build Cura as an Enterprise edition'
+        default: false
+        required: true
+        type: boolean
+      staging:
+        description: 'Use staging API'
+        default: false
+        required: true
+        type: boolean
+      architecture:
+        description: 'Architecture'
+        required: true
+        default: 'X64'
+        type: string
+      operating_system:
+        description: 'OS'
+        required: true
+        default: 'windows-2022'
+        type: string
 
 env:
-    CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
-    CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
-    WIN_CERT_INSTALLER_CER: ${{ secrets.WIN_CERT_INSTALLER_CER }}
-    WIN_CERT_INSTALLER_CER_PASS: ${{ secrets.WIN_CERT_INSTALLER_CER_PASS }}
-    CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
-    ENTERPRISE: ${{ inputs.enterprise }}
-    STAGING: ${{ inputs.staging }}
+  CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
+  CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
+  WIN_CERT_INSTALLER_CER: ${{ secrets.WIN_CERT_INSTALLER_CER }}
+  WIN_CERT_INSTALLER_CER_PASS: ${{ secrets.WIN_CERT_INSTALLER_CER_PASS }}
+  CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
+  ENTERPRISE: ${{ inputs.enterprise }}
+  STAGING: ${{ inputs.staging }}
 
 jobs:
-    cura-installer-create:
-        runs-on: ${{ inputs.operating_system }}
+  cura-installer-create:
+    runs-on: ${{ inputs.operating_system }}
 
-        outputs:
-            INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
+    outputs:
+      INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }}
 
-        steps:
-            -   name: Checkout
-                uses: actions/checkout@v3
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
 
-            -   name: Setup Python and pip
-                uses: actions/setup-python@v4
-                with:
-                    python-version: '3.10.x'
-                    cache: 'pip'
-                    cache-dependency-path: .github/workflows/requirements-conan-package.txt
-
-            -   name: Install Python requirements for runner
-                run: pip install -r .github/workflows/requirements-conan-package.txt
-
-            -   name: Cache Conan local repository packages (Powershell)
-                uses: actions/cache@v3
-                with:
-                    path: |
-                        C:\Users\runneradmin\.conan\data
-                        C:\.conan
-                        C:\Users\runneradmin\.conan\conan_download_cache
-                    key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
-
-            -   name: Create the default Conan profile
-                run: conan profile new default --detect --force
-
-            -   name: Get Conan configuration
-                run: |
-                    conan config install https://github.com/Ultimaker/conan-config.git
-                    conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
-
-            -   name: Use Conan download cache (Powershell)
-                run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
-
-            -   name: Create the Packages (Powershell)
-                run: conan install $Env:CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$Env:ENTERPRISE -o cura:staging=$Env:STAGING --json "cura_inst/conan_install_info.json"
-
-            -   name: Upload the Package(s)
-                if: always()
-                run: |
-                    conan upload "*" -r cura --all -c
-
-            -   name: Set Environment variables for Cura (Powershell)
-                run: |
-                    echo "${Env:WIX}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
-                    .\cura_inst\Scripts\activate_github_actions_env.ps1
-                    .\cura_inst\Scripts\activate_github_actions_version_env.ps1
-
-            -   name: Install OpenSSL shared
-                run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
-
-            -   name: Copy OpenSSL shared (Powershell)
-                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
-
-            -   name: Output the name file name and extension
-                id: filename
-                shell: python
-                run: |
-                    import os
-                    enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
-                    installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-${{ inputs.architecture }}"
-                    output_env = os.environ["GITHUB_OUTPUT"]
-                    content = ""
-                    if os.path.exists(output_env):
-                        with open(output_env, "r") as f:
-                            content = f.read()
-                    with open(output_env, "w") as f:
-                        f.write(content)
-                        f.writelines(f"INSTALLER_FILENAME={installer_filename}\n")
-
-            -   name: Summarize the used Conan dependencies
-                shell: python
-                run: |
-                    import os
-                    import json
-                    from pathlib import Path
-
-                    conan_install_info_path = Path("cura_inst/conan_install_info.json")
-                    conan_info = {"installed": []}
-                    if os.path.exists(conan_install_info_path):
-                        with open(conan_install_info_path, "r") as f:
-                            conan_info = json.load(f)
-                    sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
-
-                    summary_env = os.environ["GITHUB_STEP_SUMMARY"]
-                    content = ""
-                    if os.path.exists(summary_env):
-                        with open(summary_env, "r") as f:
-                            content = f.read()
-
-                    with open(summary_env, "w") as f:
-                        f.write(content)
-                        f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
-                        f.writelines("## Conan packages:\n")
-                        for dep in sorted_deps:
-                            f.writelines(f"`{dep}`\n")
-
-            -   name: Summarize the used Python modules
-                shell: python
-                run: |
-                    import os
-                    import pkg_resources
-                    summary_env = os.environ["GITHUB_STEP_SUMMARY"]
-                    content = ""
-                    if os.path.exists(summary_env):
-                        with open(summary_env, "r") as f:
-                            content = f.read()
-
-                    with open(summary_env, "w") as f:
-                        f.write(content)
-                        f.writelines("## Python modules:\n")
-                        for package in pkg_resources.working_set:
-                            f.writelines(f"`{package.key}/{package.version}`\n")
-
-            -   name: Create PFX certificate from BASE64_PFX_CONTENT secret
-                id: create-pfx
-                env:
-                    PFX_CONTENT: ${{ secrets.WIN_CERT_INSTALLER_CER }}
-                run: |
-                    $pfxPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath "cert.pfx"; 
-                    $encodedBytes = [System.Convert]::FromBase64String($env:PFX_CONTENT); 
-                    Set-Content $pfxPath -Value $encodedBytes -AsByteStream;
-                    echo "PFX_PATH=$pfxPath" >> $env:GITHUB_OUTPUT;
-
-            -   name: Create the Windows msi installer (Powershell)
-                run: |
-                    python ..\cura_inst\packaging\msi\create_windows_msi.py ..\cura_inst .\UltiMaker-Cura "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi" "$Env:CURA_APP_NAME"
-                working-directory: dist
-
-            -   name: Sign the Windows msi installer (Powershell)
-                env:
-                    PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
-                run: |
-                    & "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi"
-                working-directory: dist
-
-            -   name: Create the Windows exe installer (Powershell)
-                run: |
-                    python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
-                working-directory: dist
-
-            -   name: Sign the Windows exe installer (Powershell)
-                env:
-                    PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
-                run: |
-                    & "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
-                working-directory: dist
-
-            -   name: Upload the msi
-                uses: actions/upload-artifact@v3
-                with:
-                    name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-msi
-                    path: |
-                        dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.msi
-                    retention-days: 5
+      - name: Setup Python and pip
+        uses: actions/setup-python@v4
+        with:
+          python-version: '3.10.x'
+          cache: 'pip'
+          cache-dependency-path: .github/workflows/requirements-conan-package.txt
 
-            -   name: Upload the exe
-                uses: actions/upload-artifact@v3
-                with:
-                    name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-exe
-                    path: |
-                        dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.exe
-                    retention-days: 5
+      - name: Install Python requirements for runner
+        run: pip install -r .github/workflows/requirements-conan-package.txt
 
-    notify-export:
-        if: ${{ always() }}
-        needs: [ cura-installer-create ]
+      - name: Cache Conan local repository packages (Powershell)
+        uses: actions/cache@v3
+        with:
+          path: |
+            C:\Users\runneradmin\.conan\data
+            C:\.conan
+            C:\Users\runneradmin\.conan\conan_download_cache
+          key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
+
+      - name: Create the default Conan profile
+        run: conan profile new default --detect --force
+
+      - name: Get Conan configuration
+        run: |
+          conan config install https://github.com/Ultimaker/conan-config.git
+          conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
+
+      - name: Use Conan download cache (Powershell)
+        run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
+
+      - name: Create the Packages (Powershell)
+        run: conan install $Env:CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$Env:ENTERPRISE -o cura:staging=$Env:STAGING --json "cura_inst/conan_install_info.json"
+
+      - name: Upload the Package(s)
+        if: always()
+        run: |
+          conan upload "*" -r cura --all -c
+
+      - name: Set Environment variables for Cura (Powershell)
+        run: |
+          echo "${Env:WIX}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+          .\cura_inst\Scripts\activate_github_actions_env.ps1
+          .\cura_inst\Scripts\activate_github_actions_version_env.ps1
+
+      - name: Install OpenSSL shared
+        run: conan install openssl/1.1.1l@_/_ --build=missing --update -o openssl:shared=True -g deploy
+
+      - name: Copy OpenSSL shared (Powershell)
+        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
+
+      - name: Output the name file name and extension
+        id: filename
+        shell: python
+        run: |
+          import os
+          enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
+          installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-${{ inputs.architecture }}"
+          output_env = os.environ["GITHUB_OUTPUT"]
+          content = ""
+          if os.path.exists(output_env):
+              with open(output_env, "r") as f:
+                  content = f.read()
+          with open(output_env, "w") as f:
+              f.write(content)
+              f.writelines(f"INSTALLER_FILENAME={installer_filename}\n")
+
+      - name: Summarize the used Conan dependencies
+        shell: python
+        run: |
+          import os
+          import json
+          from pathlib import Path
+          
+          conan_install_info_path = Path("cura_inst/conan_install_info.json")
+          conan_info = {"installed": []}
+          if os.path.exists(conan_install_info_path):
+              with open(conan_install_info_path, "r") as f:
+                  conan_info = json.load(f)
+          sorted_deps = sorted([dep["recipe"]["id"].replace('#', r' rev: ') for dep in conan_info["installed"]])
+          
+          summary_env = os.environ["GITHUB_STEP_SUMMARY"]
+          content = ""
+          if os.path.exists(summary_env):
+              with open(summary_env, "r") as f:
+                  content = f.read()
+          
+          with open(summary_env, "w") as f:
+              f.write(content)
+              f.writelines("# ${{ steps.filename.outputs.INSTALLER_FILENAME }}\n")
+              f.writelines("## Conan packages:\n")
+              for dep in sorted_deps:
+                  f.writelines(f"`{dep}`\n")
+
+      - name: Summarize the used Python modules
+        shell: python
+        run: |
+          import os
+          import pkg_resources
+          summary_env = os.environ["GITHUB_STEP_SUMMARY"]
+          content = ""
+          if os.path.exists(summary_env):
+              with open(summary_env, "r") as f:
+                  content = f.read()
+          
+          with open(summary_env, "w") as f:
+              f.write(content)
+              f.writelines("## Python modules:\n")
+              for package in pkg_resources.working_set:
+                  f.writelines(f"`{package.key}/{package.version}`\n")
+
+      - name: Create PFX certificate from BASE64_PFX_CONTENT secret
+        id: create-pfx
+        env:
+          PFX_CONTENT: ${{ secrets.WIN_CERT_INSTALLER_CER }}
+        run: |
+          $pfxPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath "cert.pfx"; 
+          $encodedBytes = [System.Convert]::FromBase64String($env:PFX_CONTENT); 
+          Set-Content $pfxPath -Value $encodedBytes -AsByteStream;
+          echo "PFX_PATH=$pfxPath" >> $env:GITHUB_OUTPUT;
+
+      - name: Create the Windows msi installer (Powershell)
+        run: |
+          python ..\cura_inst\packaging\msi\create_windows_msi.py ..\cura_inst .\UltiMaker-Cura "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi" "$Env:CURA_APP_NAME"
+        working-directory: dist
+
+      - name: Sign the Windows msi installer (Powershell)
+        env:
+          PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
+        run: |
+          & "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.msi"
+        working-directory: dist
+
+      - name: Create the Windows exe installer (Powershell)
+        run: |
+          python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
+        working-directory: dist
+
+      - name: Sign the Windows exe installer (Powershell)
+        env:
+          PFX_PATH: ${{ steps.create-pfx.outputs.PFX_PATH }}
+        run: |
+          & "C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe" sign /f $Env:PFX_PATH /p "$Env:WIN_CERT_INSTALLER_CER_PASS" /fd SHA256 /t http://timestamp.digicert.com "${{steps.filename.outputs.INSTALLER_FILENAME }}.exe"
+        working-directory: dist
+
+      - name: Upload the msi
+        uses: actions/upload-artifact@v3
+        with:
+          name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-msi
+          path: |
+            dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.msi
+          retention-days: 5
 
-        uses: ultimaker/cura/.github/workflows/notify.yml@main
+      - name: Upload the exe
+        uses: actions/upload-artifact@v3
+        with:
+          name: ${{steps.filename.outputs.INSTALLER_FILENAME }}-exe
+          path: |
+            dist/${{steps.filename.outputs.INSTALLER_FILENAME }}.exe
+          retention-days: 5
+
+      # NOTE: The extension is .sh, since this isn't going to build-environment, so not on the Win build image.
+      - name: Write the run info
+        shell: python
+        run: |
+          import os
+          with open("run_info.sh", "w") as f:
+              f.writelines(f'echo "CURA_VERSION_FULL={os.environ["CURA_VERSION_FULL"]}" >> $GITHUB_ENV\n')
+
+      # NOTE: The extension is .sh, since this isn't going to build-environment, so not on the Win build image.
+      - name: Upload the run info
+        uses: actions/upload-artifact@v3
         with:
-            success: ${{ contains(join(needs.*.result, ','), 'success') }}
-            success_title: "Create the Cura distributions"
-            success_body: "Installers for ${{ inputs.cura_conan_version }}"
-            failure_title: "Failed to create the Cura distributions"
-            failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
-        secrets: inherit
+          name: windows-run-info
+          path: |
+            run_info.sh
+          retention-days: 5
+
+  notify-export:
+    if: ${{ always() }}
+    needs: [ cura-installer-create ]
+
+    uses: ultimaker/cura/.github/workflows/notify.yml@main
+    with:
+      success: ${{ contains(join(needs.*.result, ','), 'success') }}
+      success_title: "Create the Cura distributions"
+      success_body: "Installers for ${{ inputs.cura_conan_version }}"
+      failure_title: "Failed to create the Cura distributions"
+      failure_body: "Failed to create at least 1 installer for ${{ inputs.cura_conan_version }}"
+    secrets: inherit

+ 2 - 0
.gitignore

@@ -102,3 +102,5 @@ Ultimaker-Cura.spec
 .run/
 /printer-linter/src/printerlinter.egg-info/
 /resources/qml/Dialogs/AboutDialogVersionsList.qml
+/plugins/CuraEngineGradualFlow
+/resources/bundled_packages/bundled_*.json

+ 8 - 0
conandata.yml

@@ -19,6 +19,14 @@ pyinstaller:
             package: "cura"
             src: "plugins"
             dst: "share/cura/plugins"
+        curaengine_gradual_flow_plugin:
+            package: "curaengine_plugin_gradual_flow"
+            src: "res/plugins/CuraEngineGradualFlow"
+            dst: "share/cura/plugins/CuraEngineGradualFlow"
+        curaengine_gradual_flow_plugin_bundled:
+            package: "curaengine_plugin_gradual_flow"
+            src: "res/bundled_packages"
+            dst: "share/cura/resources/bundled_packages"
         cura_resources:
             package: "cura"
             src: "resources"

+ 58 - 73
conanfile.py

@@ -4,7 +4,7 @@ from pathlib import Path
 from jinja2 import Template
 
 from conan import ConanFile
-from conan.tools.files import copy, rmdir, save, mkdir
+from conan.tools.files import copy, rmdir, save, mkdir, rm
 from conan.tools.microsoft import unix_path
 from conan.tools.env import VirtualRunEnv, Environment, VirtualBuildEnv
 from conan.tools.scm import Version
@@ -21,12 +21,11 @@ class CuraConan(ConanFile):
     description = "3D printer / slicing GUI built on top of the Uranium framework"
     topics = ("conan", "python", "pyqt6", "qt", "qml", "3d-printing", "slicer")
     build_policy = "missing"
-    exports = "LICENSE*", "UltiMaker-Cura.spec.jinja", "CuraVersion.py.jinja", "AboutDialogVersionsList.qml.jinja"
+    exports = "LICENSE*", "*.jinja"
     settings = "os", "compiler", "build_type", "arch"
 
     # FIXME: Remove specific branch once merged to main
-    python_requires = "umbase/[>=0.1.7]@ultimaker/stable", "translationextractor/[>=2.1.1]@ultimaker/stable"
-    python_requires_extend = "umbase.UMBaseConanfile"
+    python_requires = "translationextractor/[>=2.1.1]@ultimaker/stable"
 
     options = {
         "enterprise": ["True", "False", "true", "false"],  # Workaround for GH Action passing boolean as lowercase string
@@ -210,8 +209,8 @@ class CuraConan(ConanFile):
                         src_path = os.path.join(self.source_folder, data["src"])
                 else:
                     src_path = os.path.join(self.deps_cpp_info[data["package"]].rootpath, data["src"])
-            elif "root" in data:  # get the paths relative from the sourcefolder
-                src_path = os.path.join(self.source_folder, data["root"], data["src"])
+            elif "root" in data:  # get the paths relative from the install folder
+                src_path = os.path.join(self.install_folder, data["root"], data["src"])
             else:
                 continue
             if Path(src_path).exists():
@@ -222,7 +221,9 @@ class CuraConan(ConanFile):
             if "package" in binary:  # get the paths from conan package
                 src_path = os.path.join(self.deps_cpp_info[binary["package"]].rootpath, binary["src"])
             elif "root" in binary:  # get the paths relative from the sourcefolder
-                src_path = os.path.join(self.source_folder, binary["root"], binary["src"])
+                src_path = str(self.source_path.joinpath(binary["root"], binary["src"]))
+                if self.settings.os == "Windows":
+                    src_path = src_path.replace("\\", "\\\\")
             else:
                 continue
             if not Path(src_path).exists():
@@ -294,6 +295,8 @@ class CuraConan(ConanFile):
         self.options["pynest2d"].shared = True
         self.options["cpython"].shared = True
         self.options["boost"].header_only = True
+        if self.settings.os == "Linux":
+            self.options["curaengine_grpc_definitions"].shared = True
 
     def validate(self):
         version = self.conf_info.get("user.cura:version", default = self.version, check_type = str)
@@ -302,10 +305,13 @@ class CuraConan(ConanFile):
 
     def requirements(self):
         self.requires("boost/1.82.0")
-        self.requires("pyarcus/(latest)@ultimaker/cura_10951")
+        self.requires("curaengine_grpc_definitions/latest@ultimaker/testing")
+        self.requires("zlib/1.2.13")
+        self.requires("pyarcus/5.3.0")
         self.requires("curaengine/(latest)@ultimaker/testing")
-        self.requires("pysavitar/(latest)@ultimaker/cura_10951")
-        self.requires("pynest2d/(latest)@ultimaker/cura_10951")
+        self.requires("pysavitar/5.3.0")
+        self.requires("pynest2d/5.3.0")
+        self.requires("curaengine_plugin_gradual_flow/(latest)@ultimaker/testing")
         self.requires("uranium/(latest)@ultimaker/testing")
         self.requires("cura_binary_data/(latest)@ultimaker/testing")
         self.requires("cpython/3.10.4")
@@ -348,30 +354,39 @@ class CuraConan(ConanFile):
             copy(self, "CuraEngine.exe", curaengine.bindirs[0], self.source_folder, keep_path = False)
             copy(self, "CuraEngine", curaengine.bindirs[0], self.source_folder, keep_path = False)
 
-            # Copy resources of cura_binary_data
-            cura_binary_data = self.dependencies["cura_binary_data"].cpp_info
-            copy(self, "*", cura_binary_data.resdirs[0], str(self._share_dir.joinpath("cura")), keep_path = True)
-            copy(self, "*", cura_binary_data.resdirs[1], str(self._share_dir.joinpath("uranium")), keep_path = True)
-            if self.settings.os == "Windows":
-                copy(self, "*", cura_binary_data.resdirs[2], str(self._share_dir.joinpath("windows")), keep_path = True)
-
-            for dependency in self.dependencies.host.values():
-                for bindir in dependency.cpp_info.bindirs:
-                    copy(self, "*.dll", bindir, str(self._site_packages), keep_path = False)
-                for libdir in dependency.cpp_info.libdirs:
-                    copy(self, "*.pyd", libdir, str(self._site_packages), keep_path = False)
-                    copy(self, "*.pyi", libdir, str(self._site_packages), keep_path = False)
-                    copy(self, "*.dylib", libdir, str(self._base_dir.joinpath("lib")), keep_path = False)
-
-            # Copy materials (flat)
-            rmdir(self, os.path.join(self.source_folder, "resources", "materials"))
-            fdm_materials = self.dependencies["fdm_materials"].cpp_info
-            copy(self, "*", fdm_materials.resdirs[0], self.source_folder)
-
-            # Copy internal resources
-            if self.options.internal:
-                cura_private_data = self.dependencies["cura_private_data"].cpp_info
-                copy(self, "*", cura_private_data.resdirs[0], str(self._share_dir.joinpath("cura")))
+            # Copy the external plugins that we want to bundle with Cura
+            rmdir(self,str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow")))
+            curaengine_plugin_gradual_flow = self.dependencies["curaengine_plugin_gradual_flow"].cpp_info
+            copy(self, "*.py", curaengine_plugin_gradual_flow.resdirs[0], str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow")), keep_path = True)
+            ext = ".exe" if self.settings.os == "Windows" else ""
+            copy(self, f"curaengine_plugin_gradual_flow{ext}", curaengine_plugin_gradual_flow.resdirs[0], str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow")), keep_path = True)
+            copy(self, "*.json", curaengine_plugin_gradual_flow.resdirs[0], str(self.source_path.joinpath("plugins", "CuraEngineGradualFlow")), keep_path = True)
+            copy(self, "bundled_*.json", curaengine_plugin_gradual_flow.resdirs[1], str(self.source_path.joinpath("resources", "bundled_packages")), keep_path = False)
+
+        # Copy resources of cura_binary_data
+        cura_binary_data = self.dependencies["cura_binary_data"].cpp_info
+        copy(self, "*", cura_binary_data.resdirs[0], str(self._share_dir.joinpath("cura")), keep_path = True)
+        copy(self, "*", cura_binary_data.resdirs[1], str(self._share_dir.joinpath("uranium")), keep_path = True)
+        if self.settings.os == "Windows":
+            copy(self, "*", cura_binary_data.resdirs[2], str(self._share_dir.joinpath("windows")), keep_path = True)
+
+        for dependency in self.dependencies.host.values():
+            for bindir in dependency.cpp_info.bindirs:
+                copy(self, "*.dll", bindir, str(self._site_packages), keep_path = False)
+            for libdir in dependency.cpp_info.libdirs:
+                copy(self, "*.pyd", libdir, str(self._site_packages), keep_path = False)
+                copy(self, "*.pyi", libdir, str(self._site_packages), keep_path = False)
+                copy(self, "*.dylib", libdir, str(self._base_dir.joinpath("lib")), keep_path = False)
+
+        # Copy materials (flat)
+        rmdir(self, os.path.join(self.source_folder, "resources", "materials"))
+        fdm_materials = self.dependencies["fdm_materials"].cpp_info
+        copy(self, "*", fdm_materials.resdirs[0], self.source_folder)
+
+        # Copy internal resources
+        if self.options.internal:
+            cura_private_data = self.dependencies["cura_private_data"].cpp_info
+            copy(self, "*", cura_private_data.resdirs[0], str(self._share_dir.joinpath("cura")))
 
         if self.options.devtools:
             entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements"))
@@ -402,56 +417,20 @@ class CuraConan(ConanFile):
                     self.run(f"{cpp_info.bindirs[0]}/msgfmt {po_file} -o {mo_file} -f", env="conanbuild", ignore_errors=True)
 
     def deploy(self):
-        # Copy CuraEngine.exe to bindirs of Virtual Python Environment
-        curaengine = self.dependencies["curaengine"].cpp_info
-        copy(self, "CuraEngine.exe", curaengine.bindirs[0], str(self._base_dir), keep_path = False)
-        copy(self, "CuraEngine", curaengine.bindirs[0], str(self._base_dir), keep_path = False)
+        copy(self, "*", os.path.join(self.package_folder, self.cpp.package.resdirs[2]), os.path.join(self.install_folder, "packaging"), keep_path = True)
 
-        # Copy resources of Cura (keep folder structure)
+        # Copy resources of Cura (keep folder structure) needed by pyinstaller to determine the module structure
         copy(self, "*", os.path.join(self.package_folder, self.cpp_info.bindirs[0]), str(self._base_dir), keep_path = False)
         copy(self, "*", os.path.join(self.package_folder, self.cpp_info.libdirs[0]), str(self._site_packages.joinpath("cura")), keep_path = True)
         copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[0]), str(self._share_dir.joinpath("cura", "resources")), keep_path = True)
         copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[1]), str(self._share_dir.joinpath("cura", "plugins")), keep_path = True)
 
-        # Copy materials (flat)
-        fdm_materials = self.dependencies["fdm_materials"].cpp_info
-        copy(self, "*", fdm_materials.resdirs[0], str(self._share_dir.joinpath("cura")))
-
-        # Copy internal resources
-        if self.options.internal:
-            cura_private_data = self.dependencies["cura_private_data"].cpp_info
-            copy(self, "*", cura_private_data.resdirs[0], str(self._share_dir.joinpath("cura")))
-
         # Copy resources of Uranium (keep folder structure)
         uranium = self.dependencies["uranium"].cpp_info
         copy(self, "*", uranium.resdirs[0], str(self._share_dir.joinpath("uranium", "resources")), keep_path = True)
         copy(self, "*", uranium.resdirs[1], str(self._share_dir.joinpath("uranium", "plugins")), keep_path = True)
         copy(self, "*", uranium.libdirs[0], str(self._site_packages.joinpath("UM")), keep_path = True)
 
-        # TODO: figure out if this is still needed
-        copy(self, "*", os.path.join(uranium.libdirs[0], "Qt", "qml", "UM"), str(self._site_packages.joinpath("PyQt6", "Qt6", "qml", "UM")), keep_path = True)
-
-        # Copy resources of cura_binary_data
-        cura_binary_data = self.dependencies["cura_binary_data"].cpp_info
-        copy(self, "*", cura_binary_data.resdirs[0], str(self._share_dir.joinpath("cura")), keep_path = True)
-        copy(self, "*", cura_binary_data.resdirs[1], str(self._share_dir.joinpath("uranium")), keep_path = True)
-        if self.settings.os == "Windows":
-            copy(self, "*", cura_binary_data.resdirs[2], str(self._share_dir.joinpath("windows")), keep_path = True)
-
-        for dependency in self.dependencies.host.values():
-            for bindir in dependency.cpp_info.bindirs:
-                copy(self, "*.dll", bindir, str(self._site_packages), keep_path = False)
-            for libdir in dependency.cpp_info.libdirs:
-                copy(self, "*.pyd", libdir, str(self._site_packages), keep_path = False)
-                copy(self, "*.pyi", libdir, str(self._site_packages), keep_path = False)
-                copy(self, "*.dylib", libdir, str(self._base_dir.joinpath("lib")), keep_path = False)
-
-        # Copy packaging scripts
-        copy(self, "*", os.path.join(self.package_folder, self.cpp_info.resdirs[2]), str(self._base_dir.joinpath("packaging")), keep_path = True)
-
-        # Copy requirements.txt's
-        copy(self, "*.txt", os.path.join(self.package_folder, self.cpp_info.resdirs[-1]), str(self._base_dir.joinpath("pip_requirements")), keep_path = False)
-
         # Generate the GitHub Action version info Environment
         version = self.conf_info.get("user.cura:version", default = self.version, check_type = str)
         cura_version = Version(version)
@@ -482,7 +461,6 @@ echo "CURA_APP_NAME={{ cura_app_name }}" >> ${{ env_prefix }}GITHUB_ENV
                                         icon_path = "'{}'".format(os.path.join(self.package_folder, self.cpp_info.resdirs[2], self.conan_data["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"),
                                         entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
 
-
     def package(self):
         copy(self, "cura_app.py", src = self.source_folder, dst = os.path.join(self.package_folder, self.cpp.package.bindirs[0]))
         copy(self, "*", src = os.path.join(self.source_folder, "cura"), dst = os.path.join(self.package_folder, self.cpp.package.libdirs[0]))
@@ -492,6 +470,13 @@ echo "CURA_APP_NAME={{ cura_app_name }}" >> ${{ env_prefix }}GITHUB_ENV
         copy(self, "requirement*.txt", src = self.source_folder, dst = os.path.join(self.package_folder, self.cpp.package.resdirs[-1]))
         copy(self, "*", src = os.path.join(self.source_folder, "packaging"), dst = os.path.join(self.package_folder, self.cpp.package.resdirs[2]))
 
+        # Remove the CuraEngineGradualFlow plugin from the package
+        rmdir(self, os.path.join(self.package_folder, self.cpp.package.resdirs[1], "CuraEngineGradualFlow"))
+        rm(self, "bundled_*.json", os.path.join(self.package_folder, self.cpp.package.resdirs[0], "bundled_packages"), recursive = False)
+
+        # Remove the fdm_materials from the package
+        rmdir(self, os.path.join(self.package_folder, self.cpp.package.resdirs[0], "materials"))
+
     def package_info(self):
         self.user_info.pip_requirements = "requirements.txt"
         self.user_info.pip_requirements_git = "requirements-ultimaker.txt"

+ 110 - 0
cura/BackendPlugin.py

@@ -0,0 +1,110 @@
+# Copyright (c) 2023 Ultimaker B.V.
+# Cura is released under the terms of the LGPLv3 or higher.
+import subprocess
+from typing import Optional, List
+
+from UM.Logger import Logger
+from UM.Message import Message
+from UM.Settings.AdditionalSettingDefinitionAppender import AdditionalSettingDefinitionsAppender
+from UM.PluginObject import PluginObject
+from UM.i18n import i18nCatalog
+from UM.Platform import Platform
+
+
+class BackendPlugin(AdditionalSettingDefinitionsAppender, PluginObject):
+    catalog = i18nCatalog("cura")
+
+    def __init__(self) -> None:
+        super().__init__()
+        self.__port: int = 0
+        self._plugin_address: str = "127.0.0.1"
+        self._plugin_command: Optional[List[str]] = None
+        self._process = None
+        self._is_running = False
+        self._supported_slots: List[int] = []
+
+    def getSupportedSlots(self) -> List[int]:
+        return self._supported_slots
+
+    def isRunning(self):
+        return self._is_running
+
+    def setPort(self, port: int) -> None:
+        self.__port = port
+
+    def getPort(self) -> int:
+        return self.__port
+
+    def getAddress(self) -> str:
+        return self._plugin_address
+
+    def _validatePluginCommand(self) -> list[str]:
+        """
+        Validate the plugin command and add the port parameter if it is missing.
+
+        :return: A list of strings containing the validated plugin command.
+        """
+        if not self._plugin_command or "--port" in self._plugin_command:
+            return self._plugin_command or []
+
+        return self._plugin_command + ["--address", self.getAddress(), "--port", str(self.__port)]
+
+    def start(self) -> bool:
+        """
+        Starts the backend_plugin process.
+
+        :return: True if the plugin process started successfully, False otherwise.
+        """
+        try:
+            # STDIN needs to be None because we provide no input, but communicate via a local socket instead.
+            # The NUL device sometimes doesn't exist on some computers.
+            Logger.info(f"Starting backend_plugin [{self._plugin_id}] with command: {self._validatePluginCommand()}")
+            popen_kwargs = {"stdin": None}
+            if Platform.isWindows():
+                popen_kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW
+            self._process = subprocess.Popen(self._validatePluginCommand(), **popen_kwargs)
+            self._is_running = True
+            return True
+        except PermissionError:
+            Logger.log("e", f"Couldn't start EnginePlugin: {self._plugin_id} No permission to execute process.")
+            self._showMessage(self.catalog.i18nc("@info:plugin_failed",
+                                                 f"Couldn't start EnginePlugin: {self._plugin_id}\nNo permission to execute process."),
+                              message_type = Message.MessageType.ERROR)
+        except FileNotFoundError:
+            Logger.logException("e", f"Unable to find local EnginePlugin server executable for: {self._plugin_id}")
+            self._showMessage(self.catalog.i18nc("@info:plugin_failed",
+                                                 f"Unable to find local EnginePlugin server executable for: {self._plugin_id}"),
+                              message_type = Message.MessageType.ERROR)
+        except BlockingIOError:
+            Logger.logException("e", f"Couldn't start EnginePlugin: {self._plugin_id} Resource is temporarily unavailable")
+            self._showMessage(self.catalog.i18nc("@info:plugin_failed",
+                                                 f"Couldn't start EnginePlugin: {self._plugin_id}\nResource is temporarily unavailable"),
+                              message_type = Message.MessageType.ERROR)
+        except OSError as e:
+            Logger.logException("e", f"Couldn't start EnginePlugin {self._plugin_id} Operating system is blocking it (antivirus?)")
+            self._showMessage(self.catalog.i18nc("@info:plugin_failed",
+                                                 f"Couldn't start EnginePlugin: {self._plugin_id}\nOperating system is blocking it (antivirus?)"),
+                              message_type = Message.MessageType.ERROR)
+        return False
+
+    def stop(self) -> bool:
+        if not self._process:
+            self._is_running = False
+            return True  # Nothing to stop
+
+        try:
+            self._process.terminate()
+            return_code = self._process.wait()
+            self._is_running = False
+            Logger.log("d", f"EnginePlugin: {self._plugin_id} was killed. Received return code {return_code}")
+            return True
+        except PermissionError:
+            Logger.log("e", f"Unable to kill running EnginePlugin: {self._plugin_id} Access is denied.")
+            self._showMessage(self.catalog.i18nc("@info:plugin_failed",
+                                                 f"Unable to kill running EnginePlugin: {self._plugin_id}\nAccess is denied."),
+                              message_type = Message.MessageType.ERROR)
+            return False
+
+    def _showMessage(self, message: str, message_type: Message.MessageType = Message.MessageType.ERROR) -> None:
+        Message(message, title=self.catalog.i18nc("@info:title", "EnginePlugin"), message_type = message_type).show()
+

+ 21 - 0
cura/CuraApplication.py

@@ -50,6 +50,7 @@ from UM.Settings.Validator import Validator
 from UM.View.SelectionPass import SelectionPass  # For typing.
 from UM.Workspace.WorkspaceReader import WorkspaceReader
 from UM.i18n import i18nCatalog
+from UM.Version import Version
 from cura import ApplicationMetadata
 from cura.API import CuraAPI
 from cura.API.Account import Account
@@ -206,6 +207,8 @@ class CuraApplication(QtApplication):
         self._cura_scene_controller = None
         self._machine_error_checker = None
 
+        self._backend_plugins: List[BackendPlugin] = []
+
         self._machine_settings_manager = MachineSettingsManager(self, parent = self)
         self._material_management_model = None
         self._quality_management_model = None
@@ -616,6 +619,16 @@ class CuraApplication(QtApplication):
 
     def _onEngineCreated(self):
         self._qml_engine.addImageProvider("print_job_preview", PrintJobPreviewImageProvider.PrintJobPreviewImageProvider())
+        version = Version(self.getVersion())
+        if hasattr(sys, "frozen") and version.hasPostFix() and "beta" not in version.getPostfixType():
+            self._qml_engine.rootObjects()[0].setTitle(f"{ApplicationMetadata.CuraAppDisplayName} {ApplicationMetadata.CuraVersion}")
+            message = Message(
+                self._i18n_catalog.i18nc("@info:warning",
+                                         f"This version is not intended for production use. If you encounter any issues, please report them on our GitHub page, mentioning the full version {self.getVersion()}"),
+                lifetime = 0,
+                title = self._i18n_catalog.i18nc("@info:title", "Nightly build"),
+                message_type = Message.MessageType.WARNING)
+            message.show()
 
     @pyqtProperty(bool)
     def needToShowUserAgreement(self) -> bool:
@@ -799,6 +812,7 @@ class CuraApplication(QtApplication):
 
         self._plugin_registry.addType("profile_reader", self._addProfileReader)
         self._plugin_registry.addType("profile_writer", self._addProfileWriter)
+        self._plugin_registry.addType("backend_plugin", self._addBackendPlugin)
 
         if Platform.isLinux():
             lib_suffixes = {"", "64", "32", "x32"}  # A few common ones on different distributions.
@@ -1754,6 +1768,13 @@ class CuraApplication(QtApplication):
     def _addProfileWriter(self, profile_writer):
         pass
 
+    def _addBackendPlugin(self, backend_plugin: "BackendPlugin") -> None:
+        self._container_registry.addAdditionalSettingDefinitionsAppender(backend_plugin)
+        self._backend_plugins.append(backend_plugin)
+
+    def getBackendPlugins(self) -> List["BackendPlugin"]:
+        return self._backend_plugins
+
     @pyqtSlot("QSize")
     def setMinimumWindowSize(self, size):
         main_window = self.getMainWindow()

Some files were not shown because too many files changed in this diff