Browse Source

Merge branch 'main' into fix_postprocessing_script_folders

Aldo Hoeben 1 year ago
parent
commit
7ddd1037a6

+ 0 - 4
.dockerignore

@@ -1,4 +0,0 @@
-.git
-.github
-resources/materials
-CuraEngine

+ 2 - 2
.github/ISSUE_TEMPLATE/featurerequest.yaml

@@ -1,6 +1,6 @@
 name: Feature Request
 description: Suggest an idea for this project.
-labels: "Type: New Feature"
+labels: ["Type: New Feature", "Status: Triage"]
 body:
 - type: markdown
   attributes:
@@ -41,4 +41,4 @@ body:
 - type: textarea
   attributes:
     label: Additional information & file uploads
-    description: You can add pictures or files to visualize your feature request in the comments below.
+    description: You can add pictures or files to visualize your feature request in the comments below.

+ 33 - 0
.github/PULL_REQUEST_TEMPLATE.md

@@ -0,0 +1,33 @@
+# Description
+
+<!-- Please include a summary of which issue is fixed or feature was added. Please also include relevant motivation and context. 
+If this pull request adds settings definitions for machines/materials, list them here. 
+
+This fixes... OR This improves... -->
+
+## Type of change
+
+<!-- Please delete options that are not relevant. -->
+
+- [ ] Bug fix (non-breaking change which fixes an issue)
+- [ ] New feature (non-breaking change which adds functionality)
+- [ ] Printer definition file(s)
+- [ ] Translations
+
+# How Has This Been Tested?
+
+<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->
+
+- [ ] Test A
+- [ ] Test B
+
+**Test Configuration**:
+* Operating System:
+
+# Checklist:
+<!-- Check if relevant -->
+
+- [ ] My code follows the style guidelines of this project as described in [UltiMaker Meta](https://github.com/Ultimaker/Meta) and [Cura QML best practices](https://github.com/Ultimaker/Cura/wiki/QML-Best-Practices)
+- [ ] I have read the [Contribution guide](https://github.com/Ultimaker/Cura/blob/main/contributing.md) 
+- [ ] I have commented my code, particularly in hard-to-understand areas
+- [ ] I have uploaded any files required to test this change

+ 0 - 24
.github/workflows/ci.yml

@@ -1,24 +0,0 @@
----
-name: CI
-on:
-  push:
-    branches:
-      - master
-      - 'WIP**'
-      - '4.*'
-      - 'CURA-*'
-  pull_request:
-permissions:
-  contents: read
-
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    container: ultimaker/cura-build-environment
-    steps:
-    - name: Checkout Cura
-      uses: actions/checkout@v2
-    - name: Build
-      run: docker/build.sh
-    - name: Test
-      run: docker/test.sh

+ 158 - 0
.github/workflows/conan-package-create.yml

@@ -0,0 +1,158 @@
+name: Create and Upload Conan package
+
+on:
+    workflow_call:
+        inputs:
+            project_name:
+                required: true
+                type: string
+
+            recipe_id_full:
+                required: true
+                type: string
+
+            build_id:
+                required: true
+                type: number
+
+            build_info:
+                required: false
+                default: true
+                type: boolean
+
+            recipe_id_latest:
+                required: false
+                type: string
+
+            runs_on:
+                required: true
+                type: string
+
+            python_version:
+                required: true
+                type: string
+
+            conan_config_branch:
+                required: false
+                type: string
+
+            conan_logging_level:
+                required: false
+                type: string
+
+            conan_clean_local_cache:
+                required: false
+                type: boolean
+                default: false
+
+            conan_upload_community:
+                required: false
+                default: true
+                type: boolean
+
+env:
+    CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
+    CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
+    CONAN_LOG_RUN_TO_OUTPUT: 1
+    CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
+    CONAN_NON_INTERACTIVE: 1
+
+jobs:
+    conan-package-create:
+        runs-on: ${{ inputs.runs_on }}
+
+        steps:
+            -   name: Checkout
+                uses: actions/checkout@v3
+
+            -   name: Setup Python and pip
+                uses: actions/setup-python@v4
+                with:
+                    python-version: ${{ inputs.python_version }}
+                    cache: 'pip'
+                    cache-dependency-path: .github/workflows/requirements-conan-package.txt
+
+            -   name: Install Python requirements for runner
+                run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
+                #  Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
+
+            -   name: Use Conan download cache (Bash)
+                if: ${{ runner.os != 'Windows' }}
+                run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
+
+            -   name: Use Conan download cache (Powershell)
+                if: ${{ runner.os == 'Windows' }}
+                run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
+
+            -   name: Cache Conan local repository packages (Bash)
+                uses: actions/cache@v3
+                if: ${{ runner.os != 'Windows' }}
+                with:
+                    path: |
+                        $HOME/.conan/data
+                        $HOME/.conan/conan_download_cache
+                    key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
+
+            -   name: Cache Conan local repository packages (Powershell)
+                uses: actions/cache@v3
+                if: ${{ runner.os == 'Windows' }}
+                with:
+                    path: |
+                        C:\Users\runneradmin\.conan\data
+                        C:\.conan
+                        C:\Users\runneradmin\.conan\conan_download_cache
+                    key: conan-${{ inputs.runs_on }}-${{ runner.arch }}-create-cache
+
+            -   name: Install MacOS system requirements
+                if:  ${{ runner.os == 'Macos' }}
+                run: brew install autoconf automake ninja
+
+            # NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
+            #       This is maybe because grub caches the disk it uses last time, which is recreated each time.
+            -   name: Install Linux system requirements
+                if: ${{ runner.os == 'Linux' }}
+                run: |
+                    sudo rm /var/cache/debconf/config.dat
+                    sudo dpkg --configure -a
+                    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 flex bison -y
+
+            -   name: Install GCC-12 on ubuntu-22.04
+                if: ${{ startsWith(inputs.runs_on, 'ubuntu-22.04') }}
+                run: |
+                    sudo apt install g++-12 gcc-12 -y
+                    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
+                    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
+
+            -   name: Use GCC-10 on ubuntu-20.04
+                if: ${{ startsWith(inputs.runs_on, 'ubuntu-20.04') }}
+                run: |
+                    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
+                    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
+
+            -   name: Create the default Conan profile
+                run:  conan profile new default --detect
+
+            -   name: Get Conan configuration from branch
+                if: ${{ inputs.conan_config_branch != '' }}
+                run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
+
+            -   name: Get Conan configuration
+                if: ${{ inputs.conan_config_branch == '' }}
+                run: conan config install https://github.com/Ultimaker/conan-config.git
+
+            -   name: Add Cura private Artifactory remote
+                run: conan remote add cura-private https://ultimaker.jfrog.io/artifactory/api/conan/cura-private True
+
+            -   name: Create the Packages
+                run: conan install ${{ inputs.recipe_id_full }} --build=missing --update
+
+            -   name: Upload the Package(s)
+                if: ${{ always() && inputs.conan_upload_community }}
+                run: conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
+
+            -   name: Upload the Package(s) to the private Artifactory
+                if: ${{ always() && ! inputs.conan_upload_community }}
+                run: conan upload ${{ inputs.recipe_id_full }} -r cura-private --all -c

+ 140 - 0
.github/workflows/conan-package.yml

@@ -0,0 +1,140 @@
+---
+name: conan-package
+
+# Exports the recipe, sources and binaries for Mac, Windows and Linux and upload these to the server such that these can
+# be used downstream.
+#
+# It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches
+
+on:
+  workflow_dispatch:
+    inputs:
+      create_binaries_windows:
+        required: true
+        default: false
+        description: 'create binaries Windows'
+      create_binaries_linux:
+        required: true
+        default: false
+        description: 'create binaries Linux'
+      create_binaries_macos:
+        required: true
+        default: false
+        description: 'create binaries Macos'
+
+  push:
+    paths:
+      - 'plugins/**'
+      - 'resources/**'
+      - 'cura/**'
+      - 'icons/**'
+      - 'tests/**'
+      - 'packaging/**'
+      - '.github/workflows/conan-*.yml'
+      - '.github/workflows/notify.yml'
+      - '.github/workflows/requirements-conan-package.txt'
+      - 'requirements*.txt'
+      - 'conanfile.py'
+      - 'conandata.yml'
+      - 'GitVersion.yml'
+      - '*.jinja'
+    branches:
+      - main
+      - 'CURA-*'
+      - '[1-9].[0-9]'
+      - '[1-9].[0-9][0-9]'
+    tags:
+      - '[1-9].[0-9].[0-9]*'
+      - '[1-9].[0-9].[0-9]'
+      - '[1-9].[0-9][0-9].[0-9]*'
+
+env:
+    CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
+    CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
+    CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
+    CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
+    CONAN_LOG_RUN_TO_OUTPUT: 1
+    CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
+    CONAN_NON_INTERACTIVE: 1
+
+permissions: {}
+jobs:
+  conan-recipe-version:
+    permissions:
+      contents: read
+
+    uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main
+    with:
+      project_name: cura
+
+  conan-package-create-linux:
+    needs: [ conan-recipe-version ]
+    runs-on: 'ubuntu-latest'
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Cache Conan data
+        id: cache-conan
+        uses: actions/cache@v3
+        with:
+          path: ~/.conan
+          key: ${{ runner.os }}-conan
+
+      - name: Setup Python and pip
+        uses: actions/setup-python@v4
+        with:
+          python-version: '3.11.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
+
+      # NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
+      #       This is maybe because grub caches the disk it uses last time, which is recreated each time.
+      - name: Install Linux system requirements
+        if: ${{ runner.os == 'Linux' }}
+        run: |
+          sudo rm /var/cache/debconf/config.dat
+          sudo dpkg --configure -a
+          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
+          sudo apt update
+          sudo apt upgrade
+          sudo apt install efibootmgr 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 g++-12 gcc-12 -y
+          sudo apt install g++-12 gcc-12 -y
+          sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
+          sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
+
+      - 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
+
+      - name: Create the Packages
+        run: conan create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} --build=missing --update -o ${{ needs.conan-recipe-version.outputs.project_name }}:devtools=True
+
+      - name: Create the latest alias
+        if: always()
+        run: conan alias ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
+
+      - name: Upload the Package(s)
+        if: always()
+        run: |
+          conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -r cura --all -c
+          conan upload ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -c
+
+  notify-create:
+    if: ${{ always() && (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) }}
+    needs: [ conan-recipe-version, conan-package-create-linux ]
+
+    uses: ultimaker/cura/.github/workflows/notify.yml@main
+    with:
+      success: ${{ contains(join(needs.*.result, ','), 'success') }}
+      success_title: "New binaries created in ${{ github.repository }}"
+      success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
+      failure_title: "Failed to create binaries in ${{ github.repository }}"
+      failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
+    secrets: inherit

+ 106 - 0
.github/workflows/conan-recipe-export.yml

@@ -0,0 +1,106 @@
+name: Export Conan Recipe to server
+
+on:
+    workflow_call:
+        inputs:
+            recipe_id_full:
+                required: true
+                type: string
+
+            recipe_id_latest:
+                required: false
+                type: string
+
+            runs_on:
+                required: true
+                type: string
+
+            python_version:
+                required: true
+                type: string
+
+            conan_config_branch:
+                required: false
+                type: string
+
+            conan_logging_level:
+                required: false
+                type: string
+
+            conan_export_binaries:
+                required: false
+                type: boolean
+
+            conan_upload_community:
+                required: false
+                default: true
+                type: boolean
+
+env:
+    CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
+    CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
+    CONAN_LOG_RUN_TO_OUTPUT: 1
+    CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
+    CONAN_NON_INTERACTIVE: 1
+
+jobs:
+    package-export:
+        runs-on: ${{ inputs.runs_on }}
+
+        steps:
+            -   name: Checkout project
+                uses: actions/checkout@v3
+
+            -   name: Setup Python and pip
+                uses: actions/setup-python@v4
+                with:
+                    python-version: ${{ inputs.python_version }}
+                    cache: 'pip'
+                    cache-dependency-path: .github/workflows/requirements-conan-package.txt
+
+            -   name: Install Python requirements and Create default Conan profile
+                run: |
+                    pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
+                    conan profile new default --detect
+                #  Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
+
+            -   name: Cache Conan local repository packages
+                uses: actions/cache@v3
+                with:
+                    path: $HOME/.conan/data
+                    key: ${{ runner.os }}-conan-export-cache
+
+            -   name: Get Conan configuration from branch
+                if: ${{ inputs.conan_config_branch != '' }}
+                run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
+
+            -   name: Get Conan configuration
+                if: ${{ inputs.conan_config_branch == '' }}
+                run: conan config install https://github.com/Ultimaker/conan-config.git
+
+            -   name: Add Cura private Artifactory remote
+                run: conan remote add cura-private https://ultimaker.jfrog.io/artifactory/api/conan/cura-private True
+
+            -   name: Export the Package (binaries)
+                if: ${{ inputs.conan_export_binaries }}
+                run: conan create . ${{ inputs.recipe_id_full }} --build=missing --update
+
+            -   name: Export the Package
+                if: ${{ !inputs.conan_export_binaries }}
+                run: conan export . ${{ inputs.recipe_id_full }}
+
+            -   name: Create the latest alias
+                if: always()
+                run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}
+
+            -   name: Upload the Package(s)
+                if: ${{ always() && inputs.conan_upload_community }}
+                run: |
+                    conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
+                    conan upload ${{ inputs.recipe_id_latest }} -r cura -c
+
+            -   name: Upload the Package(s) to the private Artifactory
+                if: ${{ always() && ! inputs.conan_upload_community }}
+                run: |
+                    conan upload ${{ inputs.recipe_id_full }} -r cura-private --all -c
+                    conan upload ${{ inputs.recipe_id_latest }} -r cura-private -c

+ 223 - 0
.github/workflows/conan-recipe-version.yml

@@ -0,0 +1,223 @@
+name: Get Conan Recipe Version
+
+on:
+    workflow_call:
+        inputs:
+            project_name:
+                required: true
+                type: string
+
+            user:
+                required: false
+                default: ultimaker
+                type: string
+
+            additional_buildmetadata:
+                required: false
+                default: ""
+                type: string
+
+        outputs:
+            recipe_id_full:
+                description: "The full Conan recipe id: <name>/<version>@<user>/<channel>"
+                value: ${{ jobs.get-semver.outputs.recipe_id_full }}
+
+            recipe_id_latest:
+                description: "The full Conan recipe aliased (latest) id: <name>/(latest)@<user>/<channel>"
+                value: ${{ jobs.get-semver.outputs.recipe_id_latest }}
+
+            recipe_semver_full:
+                description: "The full semver <Major>.<Minor>.<Patch>-<PreReleaseTag>+<BuildMetaData>"
+                value: ${{ jobs.get-semver.outputs.semver_full }}
+
+            is_release_branch:
+                description: "is current branch a release branch?"
+                value: ${{ jobs.get-semver.outputs.release_branch }}
+
+            user:
+                description: "The conan user"
+                value: ${{ jobs.get-semver.outputs.user }}
+
+            channel:
+                description: "The conan channel"
+                value: ${{ jobs.get-semver.outputs.channel }}
+
+            project_name:
+                description: "The conan projectname"
+                value: ${{ inputs.project_name }}
+
+jobs:
+    get-semver:
+
+        runs-on: ubuntu-latest
+
+        outputs:
+            recipe_id_full: ${{ steps.get-conan-broadcast-data.outputs.recipe_id_full }}
+            recipe_id_latest: ${{ steps.get-conan-broadcast-data.outputs.recipe_id_latest }}
+            semver_full: ${{ steps.get-conan-broadcast-data.outputs.semver_full }}
+            is_release_branch: ${{ steps.get-conan-broadcast-data.outputs.is_release_branch }}
+            user: ${{ steps.get-conan-broadcast-data.outputs.user }}
+            channel: ${{ steps.get-conan-broadcast-data.outputs.channel }}
+
+        steps:
+            -   name: Checkout repo
+                uses: actions/checkout@v3
+                if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
+                with:
+                    fetch-depth: 0
+                    ref: ${{ github.head_ref }}
+
+            -   name: Checkout repo PR
+                uses: actions/checkout@v3
+                if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
+                with:
+                    fetch-depth: 0
+                    ref: ${{ github.base_ref }}
+
+            -   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 and Create default Conan profile
+                run: |
+                    pip install -r .github/workflows/requirements-conan-package.txt
+                    pip install gitpython
+
+            -   id: get-conan-broadcast-data
+                name: Get Conan broadcast data
+                run: |
+                    import subprocess
+                    import os
+                    from conan.tools.scm import Version
+                    from conan.errors import ConanException
+                    from git import Repo
+                    
+                    repo = Repo('.')
+                    user = "${{ inputs.user }}".lower()
+                    project_name = "${{ inputs.project_name }}"
+                    event_name = "${{ github.event_name }}"
+                    issue_number = "${{ github.ref }}".split('/')[2]
+                    is_tag = "${{ github.ref_type }}" == "tag"
+                    is_release_branch = False
+                    ref_name = "${{ github.base_ref }}" if event_name == "pull_request" else "${{ github.ref_name }}"
+                    buildmetadata = "" if "${{ inputs.additional_buildmetadata }}" == "" else "${{ inputs.additional_buildmetadata }}_"
+                    
+                    # FIXME: for when we push a tag (such as an release)
+                    channel = "testing"
+                    if is_tag:
+                        branch_version = Version(ref_name)
+                        is_release_branch = True
+                        channel = "_"
+                        user = "_"
+                        actual_version = f"{branch_version}"
+                    else:
+                        try:
+                            branch_version = Version(repo.active_branch.name)
+                        except ConanException:
+                            branch_version = Version('0.0.0')
+                        if ref_name == f"{branch_version.major}.{branch_version.minor}":
+                            channel = 'stable'
+                            is_release_branch = True
+                        elif ref_name in ("main", "master"):
+                            channel = 'testing'
+                        else:
+                            channel = "_".join(repo.active_branch.name.replace("-", "_").split("_")[:2]).lower()
+                    
+                        if "pull_request" in event_name:
+                            channel = f"pr_{issue_number}"
+                    
+                        # %% Get the actual version
+                        latest_branch_version = Version("0.0.0")
+                        latest_branch_tag = None
+                        for tag in repo.active_branch.repo.tags:
+                            if str(tag).startswith("firmware") or str(tag).startswith("master"):
+                                continue  # Quick-fix for the versioning scheme name of the embedded team in fdm_materials(_private) repo
+                            try:
+                                version = Version(tag)
+                            except ConanException:
+                                continue
+                            if version > latest_branch_version and version < Version("6.0.0"):
+                                # FIXME: stupid old Cura tags 13.04 etc. keep popping up, als  the fdm_material tag for firmware are messing with this
+                                latest_branch_version = version
+                                latest_branch_tag = repo.tag(tag)
+                        
+                        if latest_branch_tag:
+                            # %% Get the actual version
+                            no_commits = 0
+                            for commit in repo.iter_commits("HEAD"):
+                                if commit == latest_branch_tag.commit:
+                                    break
+                                no_commits += 1
+                            latest_branch_version_prerelease = latest_branch_version.pre
+                            if latest_branch_version.pre and not "." in str(latest_branch_version.pre):
+                                # The prerealese did not contain a version number, default it to 1
+                                latest_branch_version_prerelease = f"{latest_branch_version.pre}.1"
+                            if event_name == "pull_request":
+                                actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{str(latest_branch_version_prerelease).lower()}+{buildmetadata}pr_{issue_number}_{no_commits}"
+                                channel_metadata = f"{channel}_{no_commits}"
+                            else:
+                                if channel in ("stable", "_", ""):
+                                    channel_metadata = f"{no_commits}"
+                                else:
+                                    channel_metadata = f"{channel}_{no_commits}"
+                            if is_release_branch:
+                                if latest_branch_version.pre == "" and branch_version > latest_branch_version:
+                                    actual_version = f"{branch_version.major}.{branch_version.minor}.0-beta.1+{buildmetadata}{channel_metadata}"
+                                elif latest_branch_version.pre == "":
+                                    # An actual full release has been created, we are working on patch
+                                    bump_up_patch = int(str(latest_branch_version.patch)) + 1
+                                    actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{bump_up_patch}-beta.1+{buildmetadata}{channel_metadata}"
+                                elif latest_branch_version.pre is None:
+                                    actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{int(latest_branch_version.patch.value) + 1}-beta.1+{buildmetadata}{channel_metadata}"
+                                else:
+                                    # An beta release has been created we are working toward a next beta or full release
+                                    bump_up_release_tag = int(str(latest_branch_version.pre).split('.')[1]) + 1
+                                    actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{str(latest_branch_version.pre).split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}"
+                            else:
+                                max_branches_version = Version("0.0.0")
+                                branches_no_commits = no_commits
+                                for branch in repo.references:
+                                    try:
+                                        if "remotes/origin" in branch.abspath:
+                                            b_version = Version(branch.name.split("/")[-1])
+                                            if b_version <  Version("6.0.0") and b_version > max_branches_version:
+                                                max_branches_version = b_version
+                                                branches_no_commits = repo.commit().count() - branch.commit.count()
+                                    except:
+                                        pass
+                                if max_branches_version > latest_branch_version:
+                                    actual_version = f"{max_branches_version.major}.{int(str(max_branches_version.minor)) + 1}.0-alpha+{buildmetadata}{channel}_{branches_no_commits}"
+                                else:
+                                    actual_version = f"{latest_branch_version.major}.{int(str(latest_branch_version.minor)) + 1}.0-alpha+{buildmetadata}{channel_metadata}"
+
+                    # %% Set the environment output
+                    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"name={project_name}\n")
+                        f.writelines(f"version={actual_version}\n")
+                        f.writelines(f"channel={channel}\n")
+                        f.writelines(f"recipe_id_full={project_name}/{actual_version}@{user}/{channel}\n")
+                        f.writelines(f"recipe_id_latest={project_name}/latest@{user}/{channel}\n")
+                        f.writelines(f"semver_full={actual_version}\n")
+                        f.writelines(f"is_release_branch={str(is_release_branch).lower()}\n")
+                    
+                    summary_env = os.environ["GITHUB_STEP_SUMMARY"]
+                    with open(summary_env, "w") as f:
+                        f.writelines(f"# {project_name}\n")
+                        f.writelines(f"name={project_name}\n")
+                        f.writelines(f"version={actual_version}\n")
+                        f.writelines(f"channel={channel}\n")
+                        f.writelines(f"recipe_id_full={project_name}/{actual_version}@{user}/{channel}\n")
+                        f.writelines(f"recipe_id_latest={project_name}/latest@{user}/{channel}\n")
+                        f.writelines(f"semver_full={actual_version}\n")
+                        f.writelines(f"is_release_branch={str(is_release_branch).lower()}\n")
+                shell: python

+ 151 - 0
.github/workflows/cura-all-installers.yml

@@ -0,0 +1,151 @@
+name: Cura All Installers
+run-name: ${{ inputs.cura_conan_version }} for exe ${{ inputs.build_windows_exe }}, msi ${{ inputs.build_windows_msi }}, dmg ${{ inputs.build_macos }}, pkg ${{ inputs.build_macos_installer }}, appimage ${{ inputs.build_linux }} - enterprise ${{ inputs.enterprise }}
+
+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
+            conan_config:
+                description: 'Conan config branch to use'
+                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
+            installer:
+                description: 'Create the installer'
+                default: true
+                required: true
+                type: boolean
+            build_windows_exe:
+                description: 'Build for Windows exe'
+                default: false
+                required: true
+                type: boolean
+            build_windows_msi:
+                description: 'Build for msi+pkg'
+                default: true
+                required: true
+                type: boolean
+            build_linux:
+                description: 'Build for Linux'
+                default: true
+                required: true
+                type: boolean
+            build_macos:
+                description: 'Build dmg for MacOS'
+                default: true
+                required: true
+                type: boolean
+
+    # Run the nightly at 3:25 UTC on working days
+    schedule:
+    - cron: '25 3 * * 1-5'
+
+jobs:
+    windows-installer-create-exe:
+        if: ${{ inputs.build_windows_exe }}
+        uses: ./.github/workflows/cura-installer.yml
+        with:
+            platform: 'windows-2022'
+            os_name: 'win64'
+            cura_conan_version: ${{ inputs.cura_conan_version }}
+            conan_args: ${{ inputs.conan_args }}
+            conan_config: ${{ inputs.conan_config }}
+            enterprise: ${{ inputs.enterprise }}
+            staging: ${{ inputs.staging }}
+            installer: ${{ inputs.installer }}
+            msi_installer: false
+        secrets: inherit
+
+    windows-installer-create-msi:
+        if: ${{ inputs.build_windows_msi }}
+        uses: ./.github/workflows/cura-installer.yml
+        with:
+            platform: 'windows-2022'
+            os_name: 'win64'
+            cura_conan_version: ${{ inputs.cura_conan_version }}
+            conan_args: ${{ inputs.conan_args }}
+            conan_config: ${{ inputs.conan_config }}
+            enterprise: ${{ inputs.enterprise }}
+            staging: ${{ inputs.staging }}
+            installer: ${{ inputs.installer }}
+            msi_installer: true
+        secrets: inherit
+
+    linux-installer-create:
+        if: ${{ inputs.build_linux }}
+        uses: ./.github/workflows/cura-installer.yml
+        with:
+            platform: 'ubuntu-20.04'
+            os_name: 'linux'
+            cura_conan_version: ${{ inputs.cura_conan_version }}
+            conan_args: ${{ inputs.conan_args }}
+            conan_config: ${{ inputs.conan_config }}
+            enterprise: ${{ inputs.enterprise }}
+            staging: ${{ inputs.staging }}
+            installer: ${{ inputs.installer }}
+            msi_installer: false
+        secrets: inherit
+
+    linux-modern-installer-create:
+        if: ${{ inputs.build_linux }}
+        uses: ./.github/workflows/cura-installer.yml
+        with:
+            platform: 'ubuntu-22.04'
+            os_name: 'linux-modern'
+            cura_conan_version: ${{ inputs.cura_conan_version }}
+            conan_args: ${{ inputs.conan_args }}
+            conan_config: ${{ inputs.conan_config }}
+            enterprise: ${{ inputs.enterprise }}
+            staging: ${{ inputs.staging }}
+            installer: ${{ inputs.installer }}
+            msi_installer: false
+        secrets: inherit
+
+    macos-dmg-create:
+        if: ${{ inputs.build_macos }}
+        uses: ./.github/workflows/cura-installer.yml
+        with:
+            platform: 'macos-11'
+            os_name: 'mac'
+            cura_conan_version: ${{ inputs.cura_conan_version }}
+            conan_args: ${{ inputs.conan_args }}
+            conan_config: ${{ inputs.conan_config }}
+            enterprise: ${{ inputs.enterprise }}
+            staging: ${{ inputs.staging }}
+            installer: ${{ inputs.installer }}
+            msi_installer: false
+        secrets: inherit
+
+    macos-installer-create:
+        if: ${{ inputs.build_macos }}
+        uses: ./.github/workflows/cura-installer.yml
+        with:
+            platform: 'macos-11'
+            os_name: 'mac'
+            cura_conan_version: ${{ inputs.cura_conan_version }}
+            conan_args: ${{ inputs.conan_args }}
+            conan_config: ${{ inputs.conan_config }}
+            enterprise: ${{ inputs.enterprise }}
+            staging: ${{ inputs.staging }}
+            installer: ${{ inputs.installer }}
+            msi_installer: true
+        secrets: inherit

+ 226 - 69
.github/workflows/cura-installer.yml

@@ -1,37 +1,55 @@
 name: Cura Installer
+run-name: ${{ inputs.cura_conan_version }} for ${{ inputs.platform }} by @${{ github.actor }}
 
 on:
-    workflow_dispatch:
+    workflow_call:
         inputs:
+            platform:
+                description: 'Selected Installer OS'
+                default: 'ubuntu-20.04'
+                required: true
+                type: string
+            os_name:
+                description: 'OS Friendly Name'
+                default: 'linux'
+                required: true
+                type: string
             cura_conan_version:
                 description: 'Cura Conan Version'
-                # Fixme: default to cura/latest@testing (which is main)
-                default: 'cura/latest@ultimaker/stable'
+                default: 'cura/latest@ultimaker/testing'
                 required: true
+                type: string
+            conan_args:
+                description: 'Conan args: eq.: --require-override'
+                default: ''
+                required: false
+                type: string
             conan_config:
                 description: 'Conan config branch to use'
                 default: ''
                 required: false
+                type: string
             enterprise:
                 description: 'Build Cura as an Enterprise edition'
-                required: true
                 default: false
+                required: true
                 type: boolean
             staging:
                 description: 'Use staging API'
-                required: true
                 default: false
+                required: true
                 type: boolean
             installer:
                 description: 'Create the installer'
+                default: true
                 required: true
+                type: boolean
+            msi_installer:
+                description: 'Create the msi'
                 default: false
+                required: true
                 type: boolean
 
-# Run the nightly at 5:25 UTC on working days
-    schedule:
-    - cron: '25 3 * * 1-5'
-
 env:
     CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
     CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
@@ -44,19 +62,19 @@ env:
     MAC_NOTARIZE_USER: ${{ secrets.MAC_NOTARIZE_USER }}
     MAC_NOTARIZE_PASS: ${{ secrets.MAC_NOTARIZE_PASS }}
     MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
-    MACOS_CERT_PASS: ${{ secrets.MACOS_CERT_PASS }}
+    MACOS_CERT_INSTALLER_P12: ${{ secrets.MACOS_CERT_INSTALLER_P12 }}
     MACOS_CERT_USER: ${{ secrets.MACOS_CERT_USER }}
     GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
     MACOS_CERT_PASSPHRASE: ${{ secrets.MACOS_CERT_PASSPHRASE }}
+    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: ${{ matrix.os }}
-
-        strategy:
-            fail-fast: false
-            matrix:
-                os: [ macos-10.15, windows-2022, ubuntu-20.04 ]
+        runs-on: ${{ inputs.platform }}
 
         steps:
             -   name: Checkout
@@ -69,10 +87,9 @@ jobs:
                     cache: 'pip'
                     cache-dependency-path: .github/workflows/requirements-conan-package.txt
 
-            -   name: Install Python requirements and Create default Conan profile
-                run: |
-                    pip install -r .github/workflows/requirements-conan-package.txt
-                    conan profile new default --detect
+            -   name: Install Python requirements for runner
+                run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
+                #  Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
 
             -   name: Use Conan download cache (Bash)
                 if: ${{ runner.os != 'Windows' }}
@@ -89,7 +106,7 @@ jobs:
                     path: |
                         $HOME/.conan/data
                         $HOME/.conan/conan_download_cache
-                    key: conan-${{ runner.os }}-${{ runner.arch }}
+                    key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
 
             -   name: Cache Conan local repository packages (Powershell)
                 uses: actions/cache@v3
@@ -99,46 +116,96 @@ jobs:
                         C:\Users\runneradmin\.conan\data
                         C:\.conan
                         C:\Users\runneradmin\.conan\conan_download_cache
-                    key: conan-${{ runner.os }}-${{ runner.arch }}
+                    key: conan-${{ runner.os }}-${{ runner.arch }}-installer-cache
 
             -   name: Install MacOS system requirements
                 if:  ${{ runner.os == 'Macos' }}
-                run: brew install autoconf automake ninja
+                run: brew install autoconf automake ninja create-dmg # Delete create-dmg when deprecating dmg
+
+            -   name: Hack needed specifically for ubuntu-22.04 from mid-Feb 2023 onwards
+                if: ${{ runner.os == 'Linux' && startsWith(inputs.platform, 'ubuntu-22.04') }}
+                run: sudo apt remove libodbc2 libodbcinst2 unixodbc-common -y
 
+            # NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
+            #       This is maybe because grub caches the disk it uses last time, which is recreated each time.
             -   name: Install Linux system requirements
                 if: ${{ runner.os == 'Linux' }}
                 run: |
-                    sudo apt install build-essential checkinstall 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 -y
+                    sudo rm /var/cache/debconf/config.dat
+                    sudo dpkg --configure -a
+                    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
                     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
 
+            -   name: Install GCC-12 on ubuntu-22.04
+                if: ${{ startsWith(inputs.platform, 'ubuntu-22.04') }}
+                run: |
+                    sudo apt install g++-12 gcc-12 -y
+                    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
+                    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
+
+            -   name: Use GCC-10 on ubuntu-20.04
+                if: ${{ startsWith(inputs.platform, 'ubuntu-20.04') }}
+                run: |
+                    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
+                    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
+
+            -   name: Create the default Conan profile
+                run:  conan profile new default --detect
+
             -   name: Configure GPG Key Linux (Bash)
                 if: ${{ runner.os == 'Linux' }}
                 run: echo -n "$GPG_PRIVATE_KEY" | base64 --decode | gpg --import
 
-            -   name: Configure Macos keychain (Bash)
+            -   name: Configure Macos keychain Developer Cert(Bash)
+                id: macos-keychain-developer-cert
                 if: ${{ runner.os == 'Macos' }}
-                run: |
-                    CERTIFICATE_PATH=$RUNNER_TEMP/um_keychain.p12
-                    echo -n "$MACOS_CERT_P12" | base64 --decode --output $CERTIFICATE_PATH
-                    security import $CERTIFICATE_PATH -p $MACOS_CERT_PASSPHRASE -A
-                    security unlock -p $MACOS_CERT_USER $CERTIFICATE_PATH
+                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: Clean Conan local cache
-                if: ${{ inputs.conan_clean_local_cache }}
-                run: conan remove "*" -f
+            -   name: Configure Macos keychain Installer Cert (Bash)
+                id: macos-keychain-installer-cert
+                if: ${{ runner.os == 'Macos' }}
+                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: Create PFX certificate from BASE64_PFX_CONTENT secret
+                if: ${{ runner.os == 'Windows' }}
+                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: Get Conan configuration from branch
-                if: ${{ inputs.conan_config_branch != '' }}
-                run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
+                if: ${{ inputs.conan_config != '' }}
+                run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config }}"
 
             -   name: Get Conan configuration
-                if: ${{ inputs.conan_config_branch == '' }}
+                if: ${{ inputs.conan_config == '' }}
                 run: conan config install https://github.com/Ultimaker/conan-config.git
 
-            -   name: Create the Packages
-                run: conan install ${{ inputs.cura_conan_version }} --build=missing --update -c tools.env.virtualenv:powershell=True -if cura_inst -g VirtualPythonEnv -o cura:enterprise=${{ inputs.enterprise }} -o cura:staging=${{ inputs.staging }}
+            -   name: Create the Packages (Bash)
+                if: ${{ runner.os != 'Windows' }}
+                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: Create the Packages (Powershell)
+                if: ${{ runner.os == 'Windows' }}
+                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: Set Environment variables for Cura (bash)
                 if: ${{ runner.os != 'Windows' }}
@@ -149,67 +216,157 @@ jobs:
             -   name: Set Environment variables for Cura (Powershell)
                 if: ${{ runner.os == 'Windows' }}
                 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: Unlock Macos keychain (Bash)
+                if: ${{ runner.os == 'Macos' }}
+                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)
+                if: ${{ runner.os != 'Windows' }}
+                run: |
+                    cp ./openssl/lib/*.so* ./cura_inst/bin/ || true
+                    cp ./openssl/lib/*.dylib* ./cura_inst/bin/ || true                    
+
+            -   name: Copy OpenSSL shared (Powershell)
+                if: ${{ runner.os == 'Windows' }}
+                run: |
+                    cp openssl/bin/*.dll ./cura_inst/Scripts/
+                    cp openssl/lib/*.lib ./cura_inst/Lib/
+
             -   name: Create the Cura dist
-                run: pyinstaller ./cura_inst/Ultimaker-Cura.spec
+                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}-${{ inputs.os_name }}"
+                    if "${{ runner.os }}" == "Windows":
+                        installer_ext = "msi" if "${{ inputs.msi_installer }}" == "true" else "exe"
+                    elif "${{ runner.os }}" == "macOS":
+                        installer_ext = "pkg" if "${{ inputs.msi_installer }}" == "true" else "dmg"
+                    else:
+                        installer_ext = "AppImage"
+                    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")
+                        f.writelines(f"INSTALLER_EXT={installer_ext}\n")
+                        f.writelines(f"FULL_INSTALLER_FILENAME={installer_filename}.{installer_ext}\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.FULL_INSTALLER_FILENAME }} uses:\n")
+                        for dep in sorted_deps:
+                            f.writelines(f"`{dep}`\n")
 
             -   name: Archive the artifacts (bash)
-                if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }}
-                run: tar -zcf "./Ultimaker-Cura-$CURA_VERSION_FULL-${{ runner.os }}-${{ runner.arch }}.tar.gz" "./Ultimaker-Cura/"
+                if: ${{ !inputs.installer && runner.os != 'Windows' }}
+                run: tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}.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-${{ runner.os }}-${{ runner.arch }}.zip"
+                if: ${{ !inputs.installer && runner.os == 'Windows' }}
+                run: Compress-Archive -Path ".\UltiMaker-Cura" -DestinationPath ".\${{ steps.filename.outputs.INSTALLER_FILENAME }}.zip"
                 working-directory: dist
 
             -   name: Create the Windows exe installer (Powershell)
-                if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }}
+                if: ${{ inputs.installer && runner.os == 'Windows' && !inputs.msi_installer }}
                 run: |
-                    python ..\cura_inst\packaging\NSIS\nsis-configurator.py ".\Ultimaker-Cura" "..\cura_inst\packaging\NSIS\Ultimaker-Cura.nsi.jinja" "Ultimaker Cura" "Ultimaker-Cura.exe" "$Env:CURA_VERSION_MAJOR" "$Env:CURA_VERSION_MINOR" "$Env:CURA_VERSION_PATCH" "$Env:CURA_VERSION_BUILD" "Ultimaker B.V." "https://ultimaker.com" "..\cura_inst\packaging\cura_license.txt" "LZMA" "..\cura_inst\packaging\NSIS\cura_banner_nsis.bmp" "..\cura_inst\packaging\icons\Cura.ico" "Ultimaker-Cura-$Env:CURA_VERSION_FULL-${{ runner.os }}-${{ runner.arch }}.exe"
-                    makensis /V2 /P4 Ultimaker-Cura.nsi
+                    python ..\cura_inst\packaging\NSIS\create_windows_installer.py ../cura_inst . "${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }}"
                 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
+            -   name: Create the Windows msi installer (Powershell)
+                if: ${{ inputs.installer && runner.os == 'Windows' && inputs.msi_installer }}
+                run: |
+                    python ..\cura_inst\packaging\msi\create_windows_msi.py ..\cura_inst .\UltiMaker-Cura "${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }}" "$Env:CURA_APP_NAME"
                 working-directory: dist
 
-            -   name: Create the MacOS dmg (Bash) alternative
-                if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }}
-                run: create-dmg --window-pos 640 360 --volicon "../cura_inst/packaging/icons/VolumeIcons_Cura.icns" --window-size 690 503 --icon-size 90 --icon "Ultimaker-Cura.app" 169 272 --app-drop-link 520 272 --eula "../cura_inst/packaging/cura_license.txt" --background "../cura_inst/packaging/icons/cura_background_dmg.png" --rez Rez "./Ultimaker-Cura.dmg" "./Ultimaker-Cura.app"
+            -   name: Sign the Windows exe installer (Powershell)
+                if: ${{ inputs.installer && runner.os == 'Windows' && !inputs.msi_installer }}
+                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.FULL_INSTALLER_FILENAME }}"
                 working-directory: dist
 
-            -   name: Sign the MacOS dmg (Bash) alternative
-                if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }}
-                run: codesign -s "$CODESIGN_IDENTITY" --timestamp -i "nl.ultimaker.cura.dmg" "./Ultimaker-Cura.dmg"
+            -   name: Sign the Windows msi installer (Powershell)
+                if: ${{ inputs.installer && runner.os == 'Windows' && inputs.msi_installer }}
+                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.FULL_INSTALLER_FILENAME }}"
                 working-directory: dist
 
-            -   name: Notarize the MacOS dmg (Bash) alternative
-                if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }}
-                run: xcrun altool --notarize-app --primary-bundle-id "nl.ultimaker.cura" --username "$MAC_NOTARIZE_USER" --password "$MAC_NOTARIZE_PASS" --file "./Ultimaker-Cura.dmg"
+            -   name: Create the Linux AppImage (Bash)
+                if: ${{ inputs.installer && runner.os == 'Linux' }}
+                run: python ../cura_inst/packaging/AppImage/create_appimage.py ./UltiMaker-Cura $CURA_VERSION_FULL "${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }}"
                 working-directory: dist
 
-            -   name: Create the MacOS dmg (Bash)
+            -   name: Create the MacOS dmg and/or pkg (Bash)
                 if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Macos' }}
-                run: python ../cura_inst/packaging/dmg/dmg_sign_notarize.py
+                run: python ../cura_inst/packaging/MacOS/build_macos.py ../cura_inst . $CURA_CONAN_VERSION "${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }}" "$CURA_APP_NAME"
                 working-directory: dist
-                env:
-                    SOURCE_DIR: ${{ env.GITHUB_WORKSPACE }}/cura_inst
-                    DIST_DIR: ${{ env.GITHUB_WORKSPACE }}/dist
 
             -   name: Upload the artifacts
                 uses: actions/upload-artifact@v3
                 with:
-                    name: Ultimaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ runner.os }}-${{ runner.arch }}
+                    name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-${{ steps.filename.outputs.INSTALLER_EXT }}
                     path: |
                         dist/*.tar.gz
                         dist/*.zip
-                        dist/*.exe
-                        dist/*.msi
-                        dist/*.dmg
-                        dist/*.AppImage
+                        dist/${{ steps.filename.outputs.FULL_INSTALLER_FILENAME }}
                         dist/*.asc
-                    retention-days: 2
+                    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

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