From 2f9e5b00bb2429804cc8f49c4a76a41009611beb Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Sun, 7 Aug 2022 10:09:33 +0200 Subject: [PATCH 01/42] Use is not operator rather than not ... is This is advocated by both PEP8 and the Google Python Style Guide --- plugins/X3DReader/X3DReader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index 548c9f44e6..e62c0886be 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -134,7 +134,7 @@ class X3DReader(MeshReader): geometry = self.resolveDefUse(sub_node) # TODO: appearance is completely ignored. At least apply the material color... - if not geometry is None: + if geometry is not None: try: self.verts = self.faces = [] # Safeguard self.geometry_importers[geometry.tag](self, geometry) From d65e198e8c400199f4761ef0a727354de43b2355 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Mon, 8 Aug 2022 09:28:26 +0200 Subject: [PATCH 02/42] Use is not operator rather than not ...is This is advocated by both PEP8 and the Google Python Style Guide --- plugins/X3DReader/X3DReader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index e62c0886be..bf1966d013 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -703,7 +703,7 @@ class X3DReader(MeshReader): for c in node: if c.tag == "Coordinate": c = self.resolveDefUse(c) - if not c is None: + if c is not None: pt = c.attrib.get("point") if pt: # allow the list of float values in 'point' attribute to From 0f0815efabfed1083c3aab8f2654d4b9f3440562 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Mon, 8 Aug 2022 09:33:26 +0200 Subject: [PATCH 03/42] Use is not operator rather than not ...is This is advocated by both PEP8 and the Google Python Style Guide --- plugins/X3DReader/X3DReader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index bf1966d013..4ef60824f1 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -493,7 +493,7 @@ class X3DReader(MeshReader): # Columns are the unit vectors for the xz plane for the cross-section if orient: mrot = orient[i] if len(orient) > 1 else orient[0] - if not mrot is None: + if mrot is not None: m = m.dot(mrot) # Tested against X3DOM, the result matches, still not sure :( if scale: From 72751b2507952e8d5308bab87c009247d18d87d1 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Mon, 8 Aug 2022 09:36:53 +0200 Subject: [PATCH 04/42] Use is not operator rather than not ... is This is advocated by both PEP8 and the Google Python Style Guide --- plugins/X3DReader/X3DReader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index 4ef60824f1..0b41578a05 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -498,7 +498,7 @@ class X3DReader(MeshReader): if scale: mscale = scale[i] if len(scale) > 1 else scale[0] - if not mscale is None: + if mscale is not None: m = m.dot(mscale) # First the cross-section 2-vector is scaled, From 06e61a31291bc4fc307837ebf496e12089de2b3a Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Mon, 8 Aug 2022 09:48:33 +0200 Subject: [PATCH 05/42] Use is not operator rather than not ... is This is advocated by both PEP8 and the Google Python Style Guide --- cura/Arranging/ShapeArray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Arranging/ShapeArray.py b/cura/Arranging/ShapeArray.py index 5607c03663..45454f6239 100644 --- a/cura/Arranging/ShapeArray.py +++ b/cura/Arranging/ShapeArray.py @@ -74,7 +74,7 @@ class ShapeArray: # If the child-nodes are included, adjust convex hulls as well: if include_children: children = node.getAllChildren() - if not children is None: + if children is not None: for child in children: # 'Inefficient' combination of convex hulls through known code rather than mess it up: child_hull = child.callDecoration("getConvexHull") @@ -159,4 +159,4 @@ class ShapeArray: max_col_idx = (idxs[0] - p1[0]) / (p2[0] - p1[0]) * (p2[1] - p1[1]) + p1[1] sign = numpy.sign(p2[0] - p1[0]) - return idxs[1] * sign <= max_col_idx * sign \ No newline at end of file + return idxs[1] * sign <= max_col_idx * sign From ff07129f2ce6bf92d192be003f0ef5457ae2b842 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Mon, 8 Aug 2022 09:50:36 +0200 Subject: [PATCH 06/42] Use is not operator rather than not ... is This is advocated by both PEP8 and the Google Python Style Guide --- cura/Arranging/ShapeArray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Arranging/ShapeArray.py b/cura/Arranging/ShapeArray.py index 45454f6239..3060ea6e8e 100644 --- a/cura/Arranging/ShapeArray.py +++ b/cura/Arranging/ShapeArray.py @@ -78,7 +78,7 @@ class ShapeArray: for child in children: # 'Inefficient' combination of convex hulls through known code rather than mess it up: child_hull = child.callDecoration("getConvexHull") - if not child_hull is None: + if child_hull is not None: hull_verts = hull_verts.unionConvexHulls(child_hull) child_hull_head = child.callDecoration("getConvexHullHead") or child_hull if not child_hull_head is None: From 54b9ed97aeb3e8ddf7af65e479fe7ade3a492aa0 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Mon, 8 Aug 2022 09:52:16 +0200 Subject: [PATCH 07/42] Use is not operator rather than not ... is This is advocated by both PEP8 and the Google Python Style Guide --- cura/Arranging/ShapeArray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Arranging/ShapeArray.py b/cura/Arranging/ShapeArray.py index 3060ea6e8e..714d9d3837 100644 --- a/cura/Arranging/ShapeArray.py +++ b/cura/Arranging/ShapeArray.py @@ -81,7 +81,7 @@ class ShapeArray: if child_hull is not None: hull_verts = hull_verts.unionConvexHulls(child_hull) child_hull_head = child.callDecoration("getConvexHullHead") or child_hull - if not child_hull_head is None: + if child_hull_head is not None: hull_head_verts = hull_head_verts.unionConvexHulls(child_hull_head) offset_verts = hull_head_verts.getMinkowskiHull(Polygon.approximatedCircle(min_offset)) From 7ebf5d5e708f19e7c3107a906477250a2119f280 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 8 Aug 2022 15:02:22 +0200 Subject: [PATCH 08/42] update to gcc-12 --- .github/workflows/conan-package-create.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index da641c5c78..4f5a0d2e39 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -107,7 +107,7 @@ jobs: run: | sudo apt update sudo apt upgrade - sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + sudo apt install build-essential gcc-12 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 - name: Get Conan configuration from branch if: ${{ inputs.conan_config_branch != '' }} From 605dc2989084c97c8bc8de7a7dbe00ab829e0a9c Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 8 Aug 2022 15:02:58 +0200 Subject: [PATCH 09/42] Update to gcc-12 --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 2941d34e7f..73b8f17b34 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -118,7 +118,7 @@ jobs: run: | sudo apt update sudo apt upgrade - sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + sudo apt install build-essential gcc-12 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 From 4724b25f531d51904587d93c7afb2714a745bb6b Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Tue, 9 Aug 2022 11:35:30 +0200 Subject: [PATCH 10/42] Build GCC-12 from source The ubuntu-22.04 doesn't have the GCC-12 in the repository yet (which we need got C++20) --- .github/workflows/cura-installer.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 73b8f17b34..ebca4f3404 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -118,11 +118,27 @@ jobs: run: | sudo apt update sudo apt upgrade - sudo apt install build-essential gcc-12 checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -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 + # Workaround for gcc-12 not yet being available on ubuntu-2022 GH runner + - name: Install GCC-12 + if: ${{ matrix.os == 'ubuntu-22.04' }} + run: | + if ! command -v &> /dev/null + then + git clone --branch releases/gcc-12 https://gcc.gnu.org/git/gcc.git gcc-source + ./gcc-source/contrib/download_prerequisites + mkdir gcc-12-build + cd gcc-12-build + ./../gcc-source/configure --prefix=${{ runner.tool_cache }}/gcc-12 --enable-languages=c,c++ + make -j$(nproc) + sudo make install + echo "PATH=$PATH:${{ runner.tool_cache }}/gcc-12" >> $GITHUB_ENV + fi + - name: Configure GPG Key Linux (Bash) if: ${{ runner.os == 'Linux' }} run: echo -n "$GPG_PRIVATE_KEY" | base64 --decode | gpg --import From 56e5bab1743cae6e147463dfb012cdec4c5c73c5 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 9 Aug 2022 11:42:18 +0200 Subject: [PATCH 11/42] Test against gcc-12 --- .github/workflows/cura-installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index ebca4f3404..827f5e289a 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -127,7 +127,7 @@ jobs: - name: Install GCC-12 if: ${{ matrix.os == 'ubuntu-22.04' }} run: | - if ! command -v &> /dev/null + if ! command -v gcc-12 &> /dev/null then git clone --branch releases/gcc-12 https://gcc.gnu.org/git/gcc.git gcc-source ./gcc-source/contrib/download_prerequisites From 265824043d180896884e58608ee7fb4d5a771feb Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Tue, 9 Aug 2022 12:15:45 +0200 Subject: [PATCH 12/42] install dependencies gcc-12 and disable multilib --- .github/workflows/cura-installer.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 827f5e289a..c0acbfcdcb 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -130,10 +130,12 @@ jobs: if ! command -v gcc-12 &> /dev/null then git clone --branch releases/gcc-12 https://gcc.gnu.org/git/gcc.git gcc-source - ./gcc-source/contrib/download_prerequisites + cd gcc-source + ./contrib/download_prerequisites + cd .. mkdir gcc-12-build cd gcc-12-build - ./../gcc-source/configure --prefix=${{ runner.tool_cache }}/gcc-12 --enable-languages=c,c++ + ./../gcc-source/configure --prefix=${{ runner.tool_cache }}/gcc-12 --enable-languages=c,c++ --disable-multilib make -j$(nproc) sudo make install echo "PATH=$PATH:${{ runner.tool_cache }}/gcc-12" >> $GITHUB_ENV From 4dbcf464e1abc2707fd8e9092ad8a2762c13b342 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Tue, 9 Aug 2022 12:20:50 +0200 Subject: [PATCH 13/42] Use latest test ppa to obtain GCC-12 --- .github/workflows/cura-installer.yml | 35 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index c0acbfcdcb..688915899d 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -116,30 +116,31 @@ jobs: - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt update sudo apt upgrade - sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + sudo apt install g++-12 gcc-12 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 # Workaround for gcc-12 not yet being available on ubuntu-2022 GH runner - - name: Install GCC-12 - if: ${{ matrix.os == 'ubuntu-22.04' }} - run: | - if ! command -v gcc-12 &> /dev/null - then - git clone --branch releases/gcc-12 https://gcc.gnu.org/git/gcc.git gcc-source - cd gcc-source - ./contrib/download_prerequisites - cd .. - mkdir gcc-12-build - cd gcc-12-build - ./../gcc-source/configure --prefix=${{ runner.tool_cache }}/gcc-12 --enable-languages=c,c++ --disable-multilib - make -j$(nproc) - sudo make install - echo "PATH=$PATH:${{ runner.tool_cache }}/gcc-12" >> $GITHUB_ENV - fi +# - name: Install GCC-12 +# if: ${{ matrix.os == 'ubuntu-22.04' }} +# run: | +# if ! command -v gcc-12 &> /dev/null +# then +# git clone --branch releases/gcc-12 https://gcc.gnu.org/git/gcc.git gcc-source +# cd gcc-source +# ./contrib/download_prerequisites +# cd .. +# mkdir gcc-12-build +# cd gcc-12-build +# ./../gcc-source/configure --prefix=${{ runner.tool_cache }}/gcc-12 --enable-languages=c,c++ --disable-multilib +# make -j$(nproc) +# sudo make install +# echo "PATH=$PATH:${{ runner.tool_cache }}/gcc-12" >> $GITHUB_ENV +# fi - name: Configure GPG Key Linux (Bash) if: ${{ runner.os == 'Linux' }} From ca9c1070337e0abed61605bfdcd0dd968ec0bd3c Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Tue, 9 Aug 2022 12:33:12 +0200 Subject: [PATCH 14/42] Don't install gcc-12 on ubuntu 20.04 Allready present on the runner by default --- .github/workflows/conan-package-create.yml | 9 ++++++++- .github/workflows/cura-installer.yml | 23 +++++----------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 4f5a0d2e39..6a75d78ead 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -105,9 +105,16 @@ jobs: - name: Install Linux system requirements if: ${{ runner.os == 'Linux' }} run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt update sudo apt upgrade - sudo apt install build-essential gcc-12 checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + + - name: Install GCC-12 on ubuntu-22.04 + if: ${{ matrix.os = 'ubuntu-22.04' }} + run: | + sudo apt install g++-12 gcc-12 -y + - name: Get Conan configuration from branch if: ${{ inputs.conan_config_branch != '' }} diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 688915899d..78dd9c1fa3 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -119,28 +119,15 @@ jobs: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt update sudo apt upgrade - sudo apt install g++-12 gcc-12 build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -y + sudo apt install build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config -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 - # Workaround for gcc-12 not yet being available on ubuntu-2022 GH runner -# - name: Install GCC-12 -# if: ${{ matrix.os == 'ubuntu-22.04' }} -# run: | -# if ! command -v gcc-12 &> /dev/null -# then -# git clone --branch releases/gcc-12 https://gcc.gnu.org/git/gcc.git gcc-source -# cd gcc-source -# ./contrib/download_prerequisites -# cd .. -# mkdir gcc-12-build -# cd gcc-12-build -# ./../gcc-source/configure --prefix=${{ runner.tool_cache }}/gcc-12 --enable-languages=c,c++ --disable-multilib -# make -j$(nproc) -# sudo make install -# echo "PATH=$PATH:${{ runner.tool_cache }}/gcc-12" >> $GITHUB_ENV -# fi + - name: Install GCC-12 on ubuntu-22.04 + if: ${{ matrix.os = 'ubuntu-22.04' }} + run: | + sudo apt install g++-12 gcc-12 -y - name: Configure GPG Key Linux (Bash) if: ${{ runner.os == 'Linux' }} From 8fa1cad635a2fed2f859edc593c4a4e098d1a211 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Tue, 9 Aug 2022 12:39:47 +0200 Subject: [PATCH 15/42] Fix syntax mistake --- .github/workflows/conan-package-create.yml | 5 ++--- .github/workflows/cura-installer.yml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 6a75d78ead..07de113222 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -111,9 +111,8 @@ jobs: 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 - name: Install GCC-12 on ubuntu-22.04 - if: ${{ matrix.os = 'ubuntu-22.04' }} - run: | - sudo apt install g++-12 gcc-12 -y + if: ${{ matrix.os == 'ubuntu-22.04' }} + run: sudo apt install g++-12 gcc-12 -y - name: Get Conan configuration from branch diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 78dd9c1fa3..68daa681d3 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -125,9 +125,8 @@ jobs: echo "APPIMAGETOOL_LOCATION=$GITHUB_WORKSPACE/appimagetool" >> $GITHUB_ENV - name: Install GCC-12 on ubuntu-22.04 - if: ${{ matrix.os = 'ubuntu-22.04' }} - run: | - sudo apt install g++-12 gcc-12 -y + if: ${{ matrix.os == 'ubuntu-22.04' }} + run: sudo apt install g++-12 gcc-12 -y - name: Configure GPG Key Linux (Bash) if: ${{ runner.os == 'Linux' }} From 7b6e56287b487d78e53d5eba3deb1b00162c2bb8 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 9 Aug 2022 13:37:15 +0200 Subject: [PATCH 16/42] Make sure the detection of the Conan profile happens after inst of build tools --- .github/workflows/conan-package-create.yml | 8 ++++---- .github/workflows/cura-installer.yml | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index 07de113222..c13a0fb9b0 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -66,10 +66,8 @@ 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 .github/workflows/requirements-conan-package.txt - name: Use Conan download cache (Bash) if: ${{ runner.os != 'Windows' }} @@ -114,6 +112,8 @@ jobs: if: ${{ matrix.os == 'ubuntu-22.04' }} run: sudo apt install g++-12 gcc-12 -y + - name: Create the default Conan profile + run: conan profile new default --detec - name: Get Conan configuration from branch if: ${{ inputs.conan_config_branch != '' }} diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index 68daa681d3..a39f8d9019 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -77,10 +77,8 @@ 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 .github/workflows/requirements-conan-package.txt - name: Use Conan download cache (Bash) if: ${{ runner.os != 'Windows' }} @@ -128,6 +126,9 @@ jobs: if: ${{ matrix.os == 'ubuntu-22.04' }} run: sudo apt install g++-12 gcc-12 -y + - 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 From 982074c047b742569054e7ff1441250cfa3b32ae Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Wed, 10 Aug 2022 09:27:15 +0200 Subject: [PATCH 17/42] set gcc-12 as main alternative on ubuntu 22.04 --- .github/workflows/conan-package-create.yml | 7 +++++-- .github/workflows/cura-installer.yml | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index c13a0fb9b0..f9fbbef6f7 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -110,10 +110,13 @@ jobs: - name: Install GCC-12 on ubuntu-22.04 if: ${{ matrix.os == 'ubuntu-22.04' }} - run: sudo apt install g++-12 gcc-12 -y + 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: Create the default Conan profile - run: conan profile new default --detec + run: conan profile new default --detect - name: Get Conan configuration from branch if: ${{ inputs.conan_config_branch != '' }} diff --git a/.github/workflows/cura-installer.yml b/.github/workflows/cura-installer.yml index a39f8d9019..10e7888029 100644 --- a/.github/workflows/cura-installer.yml +++ b/.github/workflows/cura-installer.yml @@ -124,7 +124,10 @@ jobs: - name: Install GCC-12 on ubuntu-22.04 if: ${{ matrix.os == 'ubuntu-22.04' }} - run: sudo apt install g++-12 gcc-12 -y + 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: Create the default Conan profile run: conan profile new default --detect From 476033e6b677b860065df11f7266b305122beeaa Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:02:06 +0200 Subject: [PATCH 18/42] repositories.md: Breakup text into lists This makes it easier to read and to understand what each repository does. --- docs/repositories.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/repositories.md b/docs/repositories.md index 3b4c4bc317..4ccd51d7ca 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -1,8 +1,17 @@ Repositories ==== Cura uses a number of repositories where parts of our source code are separated, in order to get a cleaner architecture. Those repositories are: -* [Cura](https://github.com/Ultimaker/Cura), the main repository for the front-end of Cura. This contains all of the business logic for the front-end, including the specific types of profiles that are available, the concept of 3D printers and materials, specific tools for handling 3D printed models, pretty much all of the GUI, as well as Ultimaker services such as the Marketplace and accounts. -* The Cura repository is built on [Uranium](https://github.com/Ultimaker/Uranium), a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with a basic GUI framework ([Qt](https://www.qt.io/)), a 3D scene, a rendering system, a plug-in system and a system for stacked profiles that change settings. +* [Cura](https://github.com/Ultimaker/Cura), the main repository for the front-end of Cura. This contains: + - all of the business logic for the front-end, including the specific types of profiles that are available + - the concept of 3D printers and materials + - specific tools for handling 3D printed models + - pretty much all of the GUI + - Ultimaker services such as the Marketplace and accounts. +* The Cura repository is built on [Uranium](https://github.com/Ultimaker/Uranium), a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: + - a basic GUI framework ([Qt](https://www.qt.io/)) + - a 3D scene, a rendering system + - a plug-in system + - a system for stacked profiles that change settings. * In order to slice, Cura starts [CuraEngine](https://github.com/Ultimaker/CuraEngine) in the background. This does the actual process that converts 3D models into a toolpath for the printer. * Communication to CuraEngine goes via [libArcus](https://github.com/Ultimaker/libArcus), a small library that wraps around [Protobuf](https://developers.google.com/protocol-buffers/) in order to make it run over a local socket. * Cura's build scripts are in [cura-build](https://github.com/Ultimaker/cura-build) and build scripts for building dependencies are in [cura-build-environment](https://github.com/Ultimaker/cura-build-environment). @@ -10,7 +19,9 @@ Cura uses a number of repositories where parts of our source code are separated, There are also a number of repositories under our control that are not integral parts of Cura's architecture, but more like separated side-gigs: * Loading and writing 3MF files is done through [libSavitar](https://github.com/Ultimaker/libSavitar). * Loading and writing UFP files is done through [libCharon](https://github.com/Ultimaker/libCharon). -* To make the build system a bit simpler, some parts are pre-compiled in [cura-binary-data](https://github.com/Ultimaker/cura-binary-data). This holds things like the machine-readable translation files and the Marlin builds for firmware updates, which would require considerable tooling to build automatically. +* To make the build system a bit simpler, some parts are pre-compiled in [cura-binary-data](https://github.com/Ultimaker/cura-binary-data). This holds things which would require considerable tooling to build automatically like: + - the machine-readable translation files + - the Marlin builds for firmware updates * There are automated GUI tests in [Cura-squish-tests](https://github.com/Ultimaker/Cura-squish-tests). * Material profiles are stored in [fdm_materials](https://github.com/Ultimaker/fdm_materials). This is separated out and combined in our build process, so that the firmware for Ultimaker's printers can use the same set of profiles too. @@ -18,4 +29,4 @@ Interplay ---- At a very high level, Cura's repositories interconnect as follows: -![Overview of interplay between repositories](resources/repositories.svg) \ No newline at end of file +![Overview of interplay between repositories](resources/repositories.svg) From 64fa88d52281288a07ee944ab818863ba9b213d8 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 10 Aug 2022 10:04:58 +0200 Subject: [PATCH 19/42] Use Conan lower then 1.51 Fails on windows due to I'll formed msbuild not sure if it is a bug on Conan side or ours. --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 9ac91d2704..352df3f179 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan!=1.51.0 +conan<1.51.0 sip==6.5.1 From e4516021fb5a4909b40624895de84b22f8e08956 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 10 Aug 2022 10:13:06 +0200 Subject: [PATCH 20/42] Don't use Conan 1.51.x Fails on Windows due to this bug https://github.com/conan-io/conan/issues/11822 PR https://github.com/conan-io/conan/pull/11826 with the fix is planned for 1.52.0 --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 352df3f179..0858484831 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan<1.51.0 +conan<1.51.0,>=1.52.0 sip==6.5.1 From 340254490637d0b6bdfcb8d2fc52304e0e2db097 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:16:39 +0200 Subject: [PATCH 21/42] repositoires.md: reformat to start with repos Move the name of the repos to the beginning of the line/ beginning of each section. This makes it much easier to read. --- docs/repositories.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/repositories.md b/docs/repositories.md index 4ccd51d7ca..9e2b8ad5d4 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -7,23 +7,24 @@ Cura uses a number of repositories where parts of our source code are separated, - specific tools for handling 3D printed models - pretty much all of the GUI - Ultimaker services such as the Marketplace and accounts. -* The Cura repository is built on [Uranium](https://github.com/Ultimaker/Uranium), a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: +* [Uranium](https://github.com/Ultimaker/Uranium) the underlying framework the Cura repository is built on . [Uranium](https://github.com/Ultimaker/Uranium) is a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: - a basic GUI framework ([Qt](https://www.qt.io/)) - a 3D scene, a rendering system - a plug-in system - a system for stacked profiles that change settings. -* In order to slice, Cura starts [CuraEngine](https://github.com/Ultimaker/CuraEngine) in the background. This does the actual process that converts 3D models into a toolpath for the printer. -* Communication to CuraEngine goes via [libArcus](https://github.com/Ultimaker/libArcus), a small library that wraps around [Protobuf](https://developers.google.com/protocol-buffers/) in order to make it run over a local socket. -* Cura's build scripts are in [cura-build](https://github.com/Ultimaker/cura-build) and build scripts for building dependencies are in [cura-build-environment](https://github.com/Ultimaker/cura-build-environment). +* [CuraEngine](https://github.com/Ultimaker/CuraEngine) the slicer used by Cura in the background. This does the actual process that converts 3D models into a toolpath for the printer. +* [libArcus](https://github.com/Ultimaker/libArcus) handles the communication to CuraEngine. [libArcus](https://github.com/Ultimaker/libArcus) is a small library that wraps around [Protobuf](https://developers.google.com/protocol-buffers/) in order to make it run over a local socket. +* [cura-build](https://github.com/Ultimaker/cura-build): Cura's build scripts. +* [cura-build-environment](https://github.com/Ultimaker/cura-build-environment) build scripts for building dependencies. There are also a number of repositories under our control that are not integral parts of Cura's architecture, but more like separated side-gigs: -* Loading and writing 3MF files is done through [libSavitar](https://github.com/Ultimaker/libSavitar). -* Loading and writing UFP files is done through [libCharon](https://github.com/Ultimaker/libCharon). -* To make the build system a bit simpler, some parts are pre-compiled in [cura-binary-data](https://github.com/Ultimaker/cura-binary-data). This holds things which would require considerable tooling to build automatically like: +* [libSavitar](https://github.com/Ultimaker/libSavitar) is used for loading and writing 3MF files. +* [libCharon](https://github.com/Ultimaker/libCharon) is used for loading and writing UFP files. +* [cura-binary-data](https://github.com/Ultimaker/cura-binary-data) pre-compiled parts to make the build system a bit simpler. This holds things which would require considerable tooling to build automatically like: - the machine-readable translation files - the Marlin builds for firmware updates -* There are automated GUI tests in [Cura-squish-tests](https://github.com/Ultimaker/Cura-squish-tests). -* Material profiles are stored in [fdm_materials](https://github.com/Ultimaker/fdm_materials). This is separated out and combined in our build process, so that the firmware for Ultimaker's printers can use the same set of profiles too. +* [Cura-squish-tests](https://github.com/Ultimaker/Cura-squish-tests): automated GUI tests. +* [fdm_materials](https://github.com/Ultimaker/fdm_materials) stores Material profiles. This is separated out and combined in our build process, so that the firmware for Ultimaker's printers can use the same set of profiles too. Interplay ---- From 3f440a448153a84b0ae68eef53073cf1811b15ea Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:18:15 +0200 Subject: [PATCH 22/42] repositories.md: remove extra whitespace Remove extra whitespace. --- docs/repositories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repositories.md b/docs/repositories.md index 9e2b8ad5d4..2e3b5c9bdf 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -7,7 +7,7 @@ Cura uses a number of repositories where parts of our source code are separated, - specific tools for handling 3D printed models - pretty much all of the GUI - Ultimaker services such as the Marketplace and accounts. -* [Uranium](https://github.com/Ultimaker/Uranium) the underlying framework the Cura repository is built on . [Uranium](https://github.com/Ultimaker/Uranium) is a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: +* [Uranium](https://github.com/Ultimaker/Uranium) the underlying framework the Cura repository is built on. [Uranium](https://github.com/Ultimaker/Uranium) is a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: - a basic GUI framework ([Qt](https://www.qt.io/)) - a 3D scene, a rendering system - a plug-in system From 850749fdf53c5e8e4d0893a6d35a9841a466d9ea Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:20:24 +0200 Subject: [PATCH 23/42] repositories.md use is instead of comma Is should be used instead of a comma here --- docs/repositories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repositories.md b/docs/repositories.md index 2e3b5c9bdf..bccb5d64be 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -1,7 +1,7 @@ Repositories ==== Cura uses a number of repositories where parts of our source code are separated, in order to get a cleaner architecture. Those repositories are: -* [Cura](https://github.com/Ultimaker/Cura), the main repository for the front-end of Cura. This contains: +* [Cura](https://github.com/Ultimaker/Cura) is the main repository for the front-end of Cura. This contains: - all of the business logic for the front-end, including the specific types of profiles that are available - the concept of 3D printers and materials - specific tools for handling 3D printed models From 67d58397754b6aa868026a9e42b3199ca535a0c2 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:22:30 +0200 Subject: [PATCH 24/42] repositories.md: use is in descriptions Use is in these two instances as well for consistency with the first list item. --- docs/repositories.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/repositories.md b/docs/repositories.md index bccb5d64be..6b92993369 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -7,12 +7,12 @@ Cura uses a number of repositories where parts of our source code are separated, - specific tools for handling 3D printed models - pretty much all of the GUI - Ultimaker services such as the Marketplace and accounts. -* [Uranium](https://github.com/Ultimaker/Uranium) the underlying framework the Cura repository is built on. [Uranium](https://github.com/Ultimaker/Uranium) is a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: +* [Uranium](https://github.com/Ultimaker/Uranium) is the underlying framework the Cura repository is built on. [Uranium](https://github.com/Ultimaker/Uranium) is a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: - a basic GUI framework ([Qt](https://www.qt.io/)) - a 3D scene, a rendering system - a plug-in system - a system for stacked profiles that change settings. -* [CuraEngine](https://github.com/Ultimaker/CuraEngine) the slicer used by Cura in the background. This does the actual process that converts 3D models into a toolpath for the printer. +* [CuraEngine](https://github.com/Ultimaker/CuraEngine) is the slicer used by Cura in the background. This does the actual process that converts 3D models into a toolpath for the printer. * [libArcus](https://github.com/Ultimaker/libArcus) handles the communication to CuraEngine. [libArcus](https://github.com/Ultimaker/libArcus) is a small library that wraps around [Protobuf](https://developers.google.com/protocol-buffers/) in order to make it run over a local socket. * [cura-build](https://github.com/Ultimaker/cura-build): Cura's build scripts. * [cura-build-environment](https://github.com/Ultimaker/cura-build-environment) build scripts for building dependencies. From 780bbe0854b74056aa8b207f792821a2a6e79d67 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 10 Aug 2022 10:23:57 +0200 Subject: [PATCH 25/42] Fix I'll formed version range --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 0858484831..6ddd421dc6 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan<1.51.0,>=1.52.0 +conan!=1.51 sip==6.5.1 From 4e0addbe676a1ea965e031a9ea1784f96b8a239a Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:23:58 +0200 Subject: [PATCH 26/42] repositories.md: fix grammatical mistake Fix grammatical mistake. --- docs/repositories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repositories.md b/docs/repositories.md index 6b92993369..210c3fd29b 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -7,7 +7,7 @@ Cura uses a number of repositories where parts of our source code are separated, - specific tools for handling 3D printed models - pretty much all of the GUI - Ultimaker services such as the Marketplace and accounts. -* [Uranium](https://github.com/Ultimaker/Uranium) is the underlying framework the Cura repository is built on. [Uranium](https://github.com/Ultimaker/Uranium) is a framework for desktop applications that handle 3D models and have a separate back-end. This provides Cura with: +* [Uranium](https://github.com/Ultimaker/Uranium) is the underlying framework the Cura repository is built on. [Uranium](https://github.com/Ultimaker/Uranium) is a framework for desktop applications that handle 3D models. It has a separate back-end. This provides Cura with: - a basic GUI framework ([Qt](https://www.qt.io/)) - a 3D scene, a rendering system - a plug-in system From 2a11555a4afea900c1acafbb4756f480bbc38749 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:34:50 +0200 Subject: [PATCH 27/42] repositories.md: remove extra whitespace Remove extra whitespace in markdown. --- docs/repositories.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/repositories.md b/docs/repositories.md index 210c3fd29b..0d882c44b2 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -12,7 +12,7 @@ Cura uses a number of repositories where parts of our source code are separated, - a 3D scene, a rendering system - a plug-in system - a system for stacked profiles that change settings. -* [CuraEngine](https://github.com/Ultimaker/CuraEngine) is the slicer used by Cura in the background. This does the actual process that converts 3D models into a toolpath for the printer. +* [CuraEngine](https://github.com/Ultimaker/CuraEngine) is the slicer used by Cura in the background. This does the actual process that converts 3D models into a toolpath for the printer. * [libArcus](https://github.com/Ultimaker/libArcus) handles the communication to CuraEngine. [libArcus](https://github.com/Ultimaker/libArcus) is a small library that wraps around [Protobuf](https://developers.google.com/protocol-buffers/) in order to make it run over a local socket. * [cura-build](https://github.com/Ultimaker/cura-build): Cura's build scripts. * [cura-build-environment](https://github.com/Ultimaker/cura-build-environment) build scripts for building dependencies. @@ -20,7 +20,7 @@ Cura uses a number of repositories where parts of our source code are separated, There are also a number of repositories under our control that are not integral parts of Cura's architecture, but more like separated side-gigs: * [libSavitar](https://github.com/Ultimaker/libSavitar) is used for loading and writing 3MF files. * [libCharon](https://github.com/Ultimaker/libCharon) is used for loading and writing UFP files. -* [cura-binary-data](https://github.com/Ultimaker/cura-binary-data) pre-compiled parts to make the build system a bit simpler. This holds things which would require considerable tooling to build automatically like: +* [cura-binary-data](https://github.com/Ultimaker/cura-binary-data) pre-compiled parts to make the build system a bit simpler. This holds things which would require considerable tooling to build automatically like: - the machine-readable translation files - the Marlin builds for firmware updates * [Cura-squish-tests](https://github.com/Ultimaker/Cura-squish-tests): automated GUI tests. From 5a3ed4ca471a771a6fde95a619d92b46e3170c7d Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 10 Aug 2022 10:42:30 +0200 Subject: [PATCH 28/42] fixed ill-formed version exclusion --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 6ddd421dc6..43bb7fc70a 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan!=1.51 +conan!=1.51.0,!=1.51.1 sip==6.5.1 From aed16cf8493747a60c07657b3c62f777ad6b3671 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 10 Aug 2022 10:47:18 +0200 Subject: [PATCH 29/42] PostProcessingPlugin/.../Stretch.py Use enumerate Use enumerate instead of range(len --- plugins/PostProcessingPlugin/scripts/Stretch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/Stretch.py b/plugins/PostProcessingPlugin/scripts/Stretch.py index 924563d305..8d35f68822 100644 --- a/plugins/PostProcessingPlugin/scripts/Stretch.py +++ b/plugins/PostProcessingPlugin/scripts/Stretch.py @@ -432,7 +432,7 @@ class Stretcher: """ dist_palp = self.line_width # Palpation distance to seek for a wall mrot = np.array([[0, -1], [1, 0]]) # Rotation matrix for a quarter turn - for i in range(len(orig_seq)): + for i, _ in enumerate(orig_seq): ibeg = i # Index of the first point of the segment iend = i + 1 # Index of the last point of the segment if iend == len(orig_seq): From c09eb17a247a22187926ba0564a35901e06530b8 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Wed, 10 Aug 2022 12:20:01 +0200 Subject: [PATCH 30/42] Allow for additional metadata to be passed along --- .github/workflows/conan-recipe-version.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index fe85766db0..5a24754f03 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -7,6 +7,11 @@ on: required: true type: string + additional_buildmetadata: + required: false + default: "" + type: string + outputs: recipe_id_full: description: "The full Conan recipe id: /@/" @@ -79,6 +84,7 @@ jobs: issue_number = "${{ github.ref }}".split('/')[2] is_tag = "${{ github.ref_type }}" == "tag" is_release_branch = False + buildmetadata = "" if "${{ inputs.additional_buildmetadata }}" == "" else "${{ inputs.additional_buildmetadata }}_" # FIXME: for when we push a tag (such as an release) channel = "testing" @@ -130,7 +136,7 @@ jobs: channel = "_" else: 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()}+pr_{issue_number}_{no_commits}" + 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}" else: if channel in ("stable", "_", ""): channel_metadata = f"{no_commits}" @@ -139,9 +145,9 @@ jobs: # FIXME: for when we create a new release branch if latest_branch_version.prerelease == "": bump_up_minor = int(latest_branch_version.minor) + 1 - actual_version = f"{latest_branch_version.major}.{bump_up_minor}.{latest_branch_version.patch}-alpha+{channel_metadata}" + actual_version = f"{latest_branch_version.major}.{bump_up_minor}.{latest_branch_version.patch}-alpha+{buildmetadata}{channel_metadata}" else: - actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.lower()}+{channel_metadata}" + actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.lower()}+{buildmetadata}{channel_metadata}" # %% print to output cmd_name = ["echo", f"::set-output name=name::{project_name}"] From e8c9df179431eb9d9afa1ad4be450d3b8ad98e2d Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Wed, 10 Aug 2022 12:36:41 +0200 Subject: [PATCH 31/42] Add internal build options This will add the keyword `internal` to the build metadata such that it is easier to distinguish between normal Cura builds and internal builds with private data. --- conanfile.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index c59a22eef2..74106fd169 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,8 @@ class CuraConan(ConanFile): "devtools": [True, False], # FIXME: Split this up in testing and (development / build (pyinstaller) / system installer) tools "cloud_api_version": "ANY", "display_name": "ANY", # TODO: should this be an option?? - "cura_debug_mode": [True, False] # FIXME: Use profiles + "cura_debug_mode": [True, False], # FIXME: Use profiles + "internal": [True, False] } default_options = { "enterprise": "False", @@ -48,7 +49,8 @@ class CuraConan(ConanFile): "devtools": False, "cloud_api_version": "1", "display_name": "Ultimaker Cura", - "cura_debug_mode": False # Not yet implemented + "cura_debug_mode": False, # Not yet implemented + "internal": False, } scm = { "type": "git", @@ -157,11 +159,16 @@ class CuraConan(ConanFile): with open(Path(__file__).parent.joinpath("CuraVersion.py.jinja"), "r") as f: cura_version_py = Template(f.read()) + cura_version = self.version + if self.options.internal: + version = tools.Version(self.version) + cura_version = f"{version.major}.{version.minor}.{version.patch}-{version.prerelease.replace('+', '+internal_')}" + with open(Path(location, "CuraVersion.py"), "w") as f: f.write(cura_version_py.render( cura_app_name = self.name, cura_app_display_name = self.options.display_name, - cura_version = self.version, + cura_version = cura_version, cura_build_type = "Enterprise" if self._enterprise else "", cura_debug_mode = self.options.cura_debug_mode, cura_cloud_api_root = self._cloud_api_root, From fd8d6498ee0f84f49996a427fdb4680ea3216ea2 Mon Sep 17 00:00:00 2001 From: joeydelarago Date: Wed, 10 Aug 2022 16:45:16 +0200 Subject: [PATCH 32/42] When changing to an intent with infillDensity > 100 in recommended settings the RecommendedInfillDensitySelector would set infillDensity=100. This is because the onValueChanged function checks if the slider has a different value from the settings and updates the settings if it does. The slider has a max value of 100, so when setting the sliders value to 1000 the slider would update to have a value of 100. This would then update the setting to value to 100. The fix is as follows. When updating the slider value > 100 just ignore the first onValueChanged. Following onValueChanged, which are triggered by the user sliding the slider, will still trigger. CURA-9488 --- .../RecommendedInfillDensitySelector.qml | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index bb3b0cdbec..0317cb7814 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -51,7 +51,17 @@ Item { target: infillSlider property: "value" - value: parseInt(infillDensity.properties.value) + value: { + // The infill slider has a max value of 100. When it is given a value > 100 onValueChanged updates the setting to be 100. + // When changing to an intent with infillDensity > 100, it would always be clamped to 100. + // This will force the slider to ignore the first onValueChanged for values > 100 so higher values can be set. + var density = parseInt(infillDensity.properties.value) + if (density > 100) { + infillSlider.ignoreValueChange = true + } + + return density + } } // Here are the elements that are shown in the left column @@ -84,6 +94,8 @@ Item { id: infillSlider + property var ignoreValueChange: false + width: parent.width height: UM.Theme.getSize("print_setup_slider_handle").height // The handle is the widest element of the slider @@ -157,7 +169,13 @@ Item target: infillSlider function onValueChanged() { - // Don't round the value if it's already the same + if (infillSlider.ignoreValueChange) + { + infillSlider.ignoreValueChange = false + return + } + + // Don't update if the setting value, if the slider has the same value if (parseInt(infillDensity.properties.value) == infillSlider.value) { return From a0f32c403d8b41302316f5939de07fd5dfa6e88d Mon Sep 17 00:00:00 2001 From: joeydelarago Date: Thu, 11 Aug 2022 16:44:07 +0200 Subject: [PATCH 33/42] Move run configuration templates out of conan-config into this repo. Add extra test run configuration. CURA-8792 --- .run_templates/pycharm_cura_run.run.xml.jinja | 25 +++++++++++++++++++ .../pycharm_cura_test.run.xml.jinja | 25 +++++++++++++++++++ conanfile.py | 23 ++++++++++------- 3 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 .run_templates/pycharm_cura_run.run.xml.jinja create mode 100644 .run_templates/pycharm_cura_test.run.xml.jinja diff --git a/.run_templates/pycharm_cura_run.run.xml.jinja b/.run_templates/pycharm_cura_run.run.xml.jinja new file mode 100644 index 0000000000..3c04c5eaef --- /dev/null +++ b/.run_templates/pycharm_cura_run.run.xml.jinja @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/.run_templates/pycharm_cura_test.run.xml.jinja b/.run_templates/pycharm_cura_test.run.xml.jinja new file mode 100644 index 0000000000..4f685b6d8c --- /dev/null +++ b/.run_templates/pycharm_cura_test.run.xml.jinja @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index c59a22eef2..867e19abcd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,11 +1,6 @@ import os -import sys from pathlib import Path -from io import StringIO - -from platform import python_version - from jinja2 import Template from conans import tools @@ -58,16 +53,26 @@ class CuraConan(ConanFile): } # TODO: Add unit tests (but they need a different jinja template - _pycharm_targets = [{ + _pycharm_targets = [ + { "name": "cura", "module_name": "Cura", "script_name": "cura_app.py", - }, { + "jinja_path": ".run_templates/pycharm_cura_run.run.xml.jinja" + }, + { "name": "cura_external_engine", "module_name": "Cura", "script_name": "cura_app.py", - "parameters": "--external-backend" - } + "parameters": "--external-backend", + "jinja_path": ".run_templates/pycharm_cura_run.run.xml.jinja" + }, + { + "name": "cura_test", + "module_name": "Cura", + "script_name": "run_coverage.py", + "jinja_path": ".run_templates/pycharm_cura_test.run.xml.jinja" + }, ] # FIXME: These env vars should be defined in the runenv. From c5acaa768b7155661198a9afb271a57a441139b8 Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Thu, 11 Aug 2022 18:01:45 +0200 Subject: [PATCH 34/42] Moved pycharm_targets to conandata Added individual tests. Still not everything Contributes to CURA-8827 --- .../pycharm_cura_test.run.xml.jinja | 14 +-- conandata.yml | 110 ++++++++++++++++++ conanfile.py | 25 +--- 3 files changed, 119 insertions(+), 30 deletions(-) diff --git a/.run_templates/pycharm_cura_test.run.xml.jinja b/.run_templates/pycharm_cura_test.run.xml.jinja index 4f685b6d8c..428876ee52 100644 --- a/.run_templates/pycharm_cura_test.run.xml.jinja +++ b/.run_templates/pycharm_cura_test.run.xml.jinja @@ -13,13 +13,11 @@