Browse Source

Merge remote-tracking branch 'origin/5.1' into 5.1

j.delarago 2 years ago
parent
commit
6693354bf7

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

@@ -0,0 +1,171 @@
+name: Cura Installer
+
+on:
+    workflow_dispatch:
+        inputs:
+            cura_conan_version:
+                description: 'Cura Conan Version'
+                # Fixme: default to cura/latest@testing (which is main)
+                default: 'cura/latest@ultimaker/stable'
+                required: true
+            conan_config:
+                description: 'Conan config branch to use'
+                default: ''
+                required: false
+            enterprise:
+                description: 'Build Cura as an Enterprise edition'
+                required: true
+                default: false
+                type: boolean
+            staging:
+                description: 'Use staging API'
+                required: true
+                default: false
+                type: boolean
+            installer:
+                description: 'Create the installer'
+                required: true
+                default: false
+                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 }}
+    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
+    CODESIGN_IDENTITY: ${{ secrets.CODESIGN_IDENTITY }}
+    NOTARIZE_USER: ${{ secrets.NOTARIZE_USER }}
+    NOTARIZE_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }}
+
+jobs:
+    cura-installer-create:
+        runs-on: ${{ matrix.os }}
+
+        strategy:
+            fail-fast: false
+            matrix:
+                os: [ macos-10.15, windows-2022, ubuntu-20.04 ]
+
+        steps:
+            -   name: Checkout
+                uses: actions/checkout@v3
+
+            -   name: Setup Python and pip
+                uses: actions/setup-python@v4
+                with:
+                    python-version: '3.10.4'
+                    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: 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-${{ runner.os }}-${{ runner.arch }}
+
+            -   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-${{ runner.os }}-${{ runner.arch }}
+
+            -   name: Install MacOS system requirements
+                if:  ${{ runner.os == 'Macos' }}
+                run: brew install autoconf automake ninja
+
+            -   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
+
+            -   name: Clean Conan local cache
+                if: ${{ inputs.conan_clean_local_cache }}
+                run: conan remove "*" -f
+
+            -   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: 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: Upload the Package(s)
+                if: always()
+                run: |
+                    conan upload "*" -r cura --all -c
+                    conan upload "*" -r cura-ce -c
+
+            -   name: Set Environment variables for Cura (bash)
+                if: ${{ runner.os != 'Windows' }}
+                run: |
+                    . ./cura_inst/bin/activate_github_actions_env.sh
+                    . ./cura_inst/bin/activate_github_actions_version_env.sh
+
+            -   name: Set Environment variables for Cura (Powershell)
+                if: ${{ runner.os == 'Windows' }}
+                run: |
+                    .\cura_inst\Scripts\activate_github_actions_env.ps1
+                    .\cura_inst\Scripts\activate_github_actions_version_env.ps1
+
+            -   name: Create the Cura dist
+                run: pyinstaller ./cura_inst/Ultimaker-Cura.spec
+
+            -   name: Archive the artifacts (bash)
+                if: ${{ github.event.inputs.installer == 'false' && runner.os != 'Windows' }}
+                run: tar -zcf "./Ultimaker-Cura-$CURA_VERSION_FULL-${{ runner.os }}-${{ runner.arch }}.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"
+                working-directory: dist
+
+            -   name: Create the Windows exe installer (Powershell)
+                if: ${{ github.event.inputs.installer == 'true' && runner.os == 'Windows' }}
+                run: |
+                    python ..\cura_inst\packaging\NSIS\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
+                working-directory: dist
+
+            -   name: Upload the artifacts
+                uses: actions/upload-artifact@v3
+                with:
+                    name: Ultimaker-Cura-${{ env.CURA_VERSION_FULL }}-${{ runner.os }}-${{ runner.arch }}
+                    path: |
+                        dist/*.tar.gz
+                        dist/*.zip
+                        dist/*.exe
+                        dist/*.msi
+                        dist/*.dmg
+                        dist/*.AppImage
+                    retention-days: 2

+ 21 - 0
conanfile.py

@@ -302,9 +302,30 @@ class CuraConan(ConanFile):
         self.copy_deps("*.pyi", src = "@libdirs", dst = self._site_packages)
         self.copy_deps("*.dylib", src = "@libdirs", dst = self._script_dir)
 
+        # Copy packaging scripts
+        self.copy("*", src = self.cpp_info.resdirs[2], dst = self._base_dir.joinpath("packaging"))
+
         # Copy requirements.txt's
         self.copy("*.txt", src = self.cpp_info.resdirs[-1], dst = self._base_dir.joinpath("pip_requirements"))
 
+        # Generate the GitHub Action version info Environment
+        cura_version = tools.Version(self.version)
+        env_prefix = "Env:" if self.settings.os == "Windows" else ""
+        activate_github_actions_version_env = Template(r"""echo "CURA_VERSION_MAJOR={{ cura_version_major }}" >> ${{ env_prefix }}GITHUB_ENV
+echo "CURA_VERSION_MINOR={{ cura_version_minor }}" >> ${{ env_prefix }}GITHUB_ENV
+echo "CURA_VERSION_PATCH={{ cura_version_patch }}" >> ${{ env_prefix }}GITHUB_ENV
+echo "CURA_VERSION_BUILD={{ cura_version_build }}" >> ${{ env_prefix }}GITHUB_ENV
+echo "CURA_VERSION_FULL={{ cura_version_full }}" >> ${{ env_prefix }}GITHUB_ENV
+        """).render(cura_version_major = cura_version.major,
+                    cura_version_minor = cura_version.minor,
+                    cura_version_patch = cura_version.patch,
+                    cura_version_build = cura_version.build,
+                    cura_version_full = self.version,
+                    env_prefix = env_prefix)
+
+        ext = ".sh" if self.settings.os != "Windows" else ".ps1"
+        files.save(self, self._script_dir.joinpath(f"activate_github_actions_version_env{ext}"), activate_github_actions_version_env)
+
         self._generate_cura_version(Path(self._site_packages, "cura"))
 
         entitlements_file = "'{}'".format(Path(self.cpp_info.res_paths[2], "dmg", "cura.entitlements"))

BIN
packaging/NSIS/cura_banner_nsis.bmp


+ 39 - 0
resources/texts/change_log.txt

@@ -1,3 +1,42 @@
+[5.1]
+* Improved toolpath simplification algorithm
+The algorithm that reduces the resolution of the print has been rewritten, providing a more constant resolution to allow for greater precision without causing buffer underruns.
+
+* Adjusted combing boundaries to reduce scarring
+Travel moves through the inside of the models are adjusted so that they should keep more distance from the model where possible, yet allowing travels through narrow parts without retractions.
+
+* Reduced acceleration and jerk commands for travel moves
+We added the option to disable acceleration and jerk commands for travel moves. If disabled, they will take on the acceleration of the printed part of its destination. This greatly reduces file size and buffer underruns.
+
+* Project files know which packages they require
+Newly created project files will now store which packages they require from the Ultimaker Marketplace. If a project needs a material from there, the user will be prompted to download it.
+
+* Other new features and improvements:
+- Cura now links toolpaths to project files in the Digital Factory.
+- Improved performance of loading STL files on Linux.
+- Packages from the Marketplace can now contain intent profiles.
+- The application now makes heavy use of Conan to make it easier and faster to build releases of Cura.
+- Start and end g-code can now refer to the currently active profile with replacement keys.
+
+* Bug fixes:
+- Fix resetting configuration if it gets corrupt.
+- Monotonic ordering now works again for top surfaces.
+- Fixed a bug where Remove Raft Inside Corners didn't always remove all corners.
+- Fixed the position of the toolbar if the toolbar is too tall to fit.
+- Intents in the Recommended Mode now show a description again.
+- Remove Inside Corners and Raft Base Wall Count can now be changed per extruder, though they will affect the entire print.
+- Fixed opening STL files with special characters in their header.
+
+* Printer definitions, profiles and materials:
+- Improved profiles for PVA and support for Ultimaker printers.
+- Adjust retraction speed and distance for Voron.
+- Heat up extruder and build plate at the same time for Ender 3 Pro.
+- Add new Tough PLA colours.
+- Add DD0.4 print cores for Ultimaker printers.
+- Add MakerGear M2 printer.
+- Add Trimarker Nebula Plus printer.
+- Various small profile improvements.
+
 [5.0]
 <i><a href="https://youtu.be/kRj7pR4OkQA">Watch the launch event</a> to learn more about Ultimaker Cura 5.0.</i>