Browse Source

Merge branch 'main' into CURA-10317_other_inconsitent_material_profiles_in_internal_builds

Jelle Spijker 1 year ago
parent
commit
b88576bd25

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

@@ -145,48 +145,10 @@ jobs:
                 if: ${{ inputs.conan_config_branch == '' }}
                 run: conan config install https://github.com/Ultimaker/conan-config.git
 
-            -   name: Create the lock file
-                if: ${{ inputs.build_info }}
-                run: |
-                    conan_build_info --v2 start ${{ inputs.project_name }} ${{ github.run_number }}000${{ inputs.build_id }}
-                    conan lock create --reference ${{ inputs.recipe_id_full }} --lockfile-out=conan.lock                    
-
-            -   name: Create the Packages using lockfile
-                if: ${{ inputs.build_info }}
-                run: conan install ${{ inputs.recipe_id_full }} --build=missing --update --lockfile=conan.lock --lockfile-out=conan.lock
-
             -   name: Create the Packages
-                if: ${{ ! inputs.build_info }}
                 run: conan install ${{ inputs.recipe_id_full }} --build=missing --update
 
-            -   name: Create the build info
-                if: ${{ inputs.build_info }}
-                run: conan_build_info --v2 create buildinfo.json --lockfile conan.lock --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
-
             -   name: Upload the Package(s)
                 if: always()
-                run: conan upload "*" -r cura --all -c
-
-            -   name: Upload the build info
-                if: ${{ inputs.build_info }}
                 run: |
-                    conan_build_info --v2 publish buildinfo.json --url https://ultimaker.jfrog.io/artifactory --user ${{ secrets.CONAN_USER }} --password ${{ secrets.CONAN_PASS }}
-                    conan_build_info --v2 stop
-
-            -   name: Upload the Package(s) community
-                if: ${{ always() && inputs.conan_upload_community == true }}
-                run: conan upload "*" -r cura-ce -c
-
-            -   name: Upload the log and build artifacts
-                if: always()
-                uses: actions/upload-artifact@v3
-                with:
-                    name: log-${{ inputs.runs_on }}-${{ runner.arch }}
-                    path: |
-                        buildinfo.json
-                        conan.lock
-                        conanbuildinfo.txt
-                        conaninfo.txt
-                        graph_info.json
-                        build/**
-                    retention-days: 1
+                    conan upload ${{ inputs.recipe_id_full }} -r cura --all -c

+ 15 - 30
.github/workflows/conan-package.yml

@@ -75,28 +75,22 @@ jobs:
       - 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.10.x'
+          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 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: Cache Conan local repository packages (Bash)
-        uses: actions/cache@v3
-        with:
-          path: |
-            $HOME/.conan/data
-            $HOME/.conan/conan_download_cache
-          key: conan-ubuntu-${{ runner.arch }}-create-cache
+        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.
@@ -108,38 +102,29 @@ jobs:
           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 -y
-
-      - name: Install GCC-12
-        run: |
+          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
+        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 using lockfile
+      - 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: Remove the latest alias
-        if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' }}
-        run: |
-          conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura -f || true
-          conan remove ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} -r cura-ce -f || true
-
       - name: Create the latest alias
-        if: ${{ needs.conan-recipe-version.outputs.recipe_id_latest != '' && always() }}
+        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 "*" -r cura --all -c
-          conan upload "*" -r cura-ce -c
+          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')) }}

+ 4 - 12
.github/workflows/conan-recipe-export.yml

@@ -88,20 +88,12 @@ jobs:
                 if: ${{ !inputs.conan_export_binaries }}
                 run: conan export . ${{ inputs.recipe_id_full }}
 
-            -   name: Remove the latest alias
-                if: ${{ inputs.recipe_id_latest != '' && runner.os == 'Linux' }}
-                run: |
-                    conan remove ${{ inputs.recipe_id_latest }} -r cura -f || true
-                    conan remove ${{ inputs.recipe_id_latest }} -r cura-ce -f || true
-
             -   name: Create the latest alias
-                if: ${{ inputs.recipe_id_latest != '' && always() }}
+                if: always()
                 run: conan alias ${{ inputs.recipe_id_latest }} ${{ inputs.recipe_id_full }}
 
             -   name: Upload the Package(s)
                 if: always()
-                run: conan upload "*" -r cura --all -c
-
-            -   name: Upload the Package(s) community
-                if: ${{ always() && inputs.conan_upload_community == true }}
-                run: conan upload "*" -r cura-ce -c
+                run: |
+                    conan upload ${{ inputs.recipe_id_full }} -r cura --all -c
+                    conan upload ${{ inputs.recipe_id_latest }} -r cura -c

+ 6 - 4
.github/workflows/conan-recipe-version.yml

@@ -132,7 +132,7 @@ jobs:
                         # %% Get the actual version
                         latest_branch_version = Version("0.0.0")
                         latest_branch_tag = None
-                        for tag in repo.git.tag(merged = True).splitlines():
+                        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:
@@ -156,7 +156,7 @@ jobs:
                                 # 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}-{latest_branch_version_prerelease.lower()}+{buildmetadata}pr_{issue_number}_{no_commits}"
+                                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", "_", ""):
@@ -170,10 +170,12 @@ jobs:
                                     # 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}-{latest_branch_version.pre.split('.')[0]}.{bump_up_release_tag}+{buildmetadata}{channel_metadata}"
+                                    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

+ 26 - 0
.github/workflows/cura-installer.yml

@@ -273,6 +273,32 @@ jobs:
                         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: ${{ !inputs.installer && runner.os != 'Windows' }}
                 run: tar -zcf "./${{ steps.filename.outputs.INSTALLER_FILENAME }}.tar.gz" "./UltiMaker-Cura/"

+ 71 - 0
.github/workflows/security_badge.yml

@@ -0,0 +1,71 @@
+# NOTE: Best to keep all of these remarks in, they might prove useful in the future.
+#       This is basically just the standard one that is sugested on 'new workflow'.
+
+name: Scorecard supply-chain security
+on:
+  # For Branch-Protection check. Only the default branch is supported. See
+  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
+  branch_protection_rule:
+  # To guarantee Maintained check is occasionally updated. See
+  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
+  schedule:
+    - cron: '25 2 * * 5'
+  push:
+    branches: [ "main" ]
+
+# Declare default permissions as read only.
+permissions: read-all
+
+jobs:
+  analysis:
+    name: Scorecard analysis
+    runs-on: ubuntu-latest
+    permissions:
+      # Needed to upload the results to code-scanning dashboard.
+      security-events: write
+      # Needed to publish results and get a badge (see publish_results below).
+      id-token: write
+      # Uncomment the permissions below if installing in a private repository.
+      # contents: read
+      # actions: read
+
+    steps:
+      - name: "Checkout code"
+        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
+        with:
+          persist-credentials: false
+
+      - name: "Run analysis"
+        uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
+        with:
+          results_file: results.sarif
+          results_format: sarif
+          # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
+          # - you want to enable the Branch-Protection check on a *public* repository, or
+          # - you are installing Scorecard on a *private* repository
+          # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
+          # repo_token: ${{ secrets.SCORECARD_TOKEN }}
+
+          # Public repositories:
+          #   - Publish results to OpenSSF REST API for easy access by consumers
+          #   - Allows the repository to include the Scorecard badge.
+          #   - See https://github.com/ossf/scorecard-action#publishing-results.
+          # For private repositories:
+          #   - `publish_results` will always be set to `false`, regardless
+          #     of the value entered here.
+          publish_results: true
+
+      # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
+      # format to the repository Actions tab.
+      - name: "Upload artifact"
+        uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
+        with:
+          name: SARIF file
+          path: results.sarif
+          retention-days: 5
+
+      # Upload the results to GitHub's code scanning dashboard.
+      - name: "Upload to code-scanning"
+        uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
+        with:
+          sarif_file: results.sarif

+ 75 - 0
.github/workflows/update-translation.yml

@@ -0,0 +1,75 @@
+name: update-translations
+
+on:
+    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'
+
+jobs:
+    update-translations:
+        name: Update translations
+
+        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: generate the files using Conan install
+                run: conan install . --build=missing --update -o cura:devtools=True
+
+            -   uses: stefanzweifel/git-auto-commit-action@v4
+                with:
+                    file_pattern: resources/i18n/*.po resources/i18n/*.pot
+                    status_options: --untracked-files=no
+                    commit_message: update translations

+ 9 - 0
README.md

@@ -1,4 +1,10 @@
 
+> # Work with us!
+> If you're interested in working with us on Cura and Thingiverse, please apply to one of the open positions below. 
+> - [Software Engineer C++ & Python](https://www.linkedin.com/jobs/view/3516545085) for [Cura](https://github.com/Ultimaker/Cura)
+> - [DevOps Engineer Community Software](https://www.linkedin.com/jobs/view/3516542580) for [Cura](https://github.com/Ultimaker/Cura) and [Thingiverse](https://www.thingiverse.com/)
+> - [QA / Test Engineer Cura (3D printing)](https://www.linkedin.com/jobs/view/3516538895) for [Cura](https://github.com/Ultimaker/Cura) and [Thingiverse](https://www.thingiverse.com/)
+
 <br>
 
 <div align = center>
@@ -51,6 +57,9 @@
 
 <br>
 
+[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Ultimaker/Cura/badge)](https://api.securityscorecards.dev/projects/github.com/Ultimaker/Cura)
+
+<br>
 
 <!----------------------------------------------------------------------------->
 

+ 11 - 16
conanfile.py

@@ -26,8 +26,7 @@ class CuraConan(ConanFile):
     no_copy_source = True  # We won't build so no need to copy sources to the build folder
 
     # FIXME: Remove specific branch once merged to main
-    # Extending the conanfile with the UMBaseConanfile https://github.com/Ultimaker/conan-ultimaker-index/tree/CURA-9177_Fix_CI_CD/recipes/umbase
-    python_requires = "umbase/[>=0.1.7]@ultimaker/stable", "translationextractor/[>=1.0.0]@ultimaker/stable"
+    python_requires = "umbase/[>=0.1.7]@ultimaker/stable", "translationextractor/[>=2.1.1]@ultimaker/stable"
     python_requires_extend = "umbase.UMBaseConanfile"
 
     options = {
@@ -49,6 +48,10 @@ class CuraConan(ConanFile):
         "internal": False,
     }
 
+    def set_version(self):
+        if self.version == "auto":
+            self.version = "5.4.0-alpha"
+
     @property
     def _pycharm_targets(self):
         return self.conan_data["pycharm_targets"]
@@ -257,10 +260,6 @@ class CuraConan(ConanFile):
         copy(self, "CuraVersion.py.jinja", self.recipe_folder, self.export_sources_folder)
         copy(self, "cura_app.py", self.recipe_folder, self.export_sources_folder)
 
-    def set_version(self):
-        if self.version is None:
-            self.version = self._umdefault_version()
-
     def configure(self):
         self.options["pyarcus"].shared = True
         self.options["pysavitar"].shared = True
@@ -278,17 +277,17 @@ class CuraConan(ConanFile):
         self.requires("pysavitar/5.2.2")
         self.requires("pynest2d/5.2.2")
         self.requires("uranium/(latest)@ultimaker/testing")
-        self.requires("fdm_materials/(latest)@{}/cura_10317".format("internal" if self.options.internal else "ultimaker"))
+        self.requires("fdm_materials/(latest)@{}/testing".format("internal" if self.options.internal else "ultimaker"))
         self.requires("cura_binary_data/(latest)@ultimaker/testing")
         self.requires("cpython/3.10.4")
         if self.options.internal:
-            self.requires("cura_private_data/(latest)@ultimaker/cura_10317")
+            self.requires("cura_private_data/(latest)@ultimaker/testing")
 
     def build_requirements(self):
         if self.options.devtools:
             if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type = str):
                 # FIXME: once m4, autoconf, automake are Conan V2 ready use self.win_bash and add gettext as base tool_requirement
-                self.tool_requires("gettext/0.21", force_host_context=True)
+                self.tool_requires("gettext/0.21@ultimaker/testing", force_host_context = True)
 
     def layout(self):
         self.folders.source = "."
@@ -317,19 +316,15 @@ class CuraConan(ConanFile):
                                             icon_path = "'{}'".format(os.path.join(self.source_folder, "packaging", self.conan_data["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"),
                                             entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
 
-            # Update the po files
+            # Update the po and pot files
             if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type=str):
                 vb = VirtualBuildEnv(self)
                 vb.generate()
 
                 # FIXME: once m4, autoconf, automake are Conan V2 ready use self.win_bash and add gettext as base tool_requirement
                 cpp_info = self.dependencies["gettext"].cpp_info
-                for po_file in self.source_path.joinpath("resources", "i18n").glob("**/*.po"):
-                    pot_file = self.source_path.joinpath("resources", "i18n", po_file.with_suffix('.pot').name)
-                    mkdir(self, str(unix_path(self, pot_file.parent)))
-                    self.run(
-                        f"{cpp_info.bindirs[0]}/msgmerge --no-wrap --no-fuzzy-matching -width=140 -o {po_file} {po_file} {pot_file}",
-                        env="conanbuild", ignore_errors=True)
+                pot = self.python_requires["translationextractor"].module.ExtractTranslations(self, cpp_info.bindirs[0])
+                pot.generate()
 
     def build(self):
         if self.options.devtools:

+ 4 - 0
cura/CuraApplication.py

@@ -2076,3 +2076,7 @@ class CuraApplication(QtApplication):
     @classmethod
     def getInstance(cls, *args, **kwargs) -> "CuraApplication":
         return cast(CuraApplication, super().getInstance(**kwargs))
+
+    @pyqtProperty(bool, constant=True)
+    def isEnterprise(self) -> bool:
+        return ApplicationMetadata.IsEnterpriseVersion

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