diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 02a07ffd3b..3bbc7314e3 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -204,16 +204,19 @@ else() endif() set(ZLIB_PKG "") +find_package(ZLIB) if (NOT ZLIB_FOUND) include(ZLIB/ZLIB.cmake) set(ZLIB_PKG dep_ZLIB) endif () set(PNG_PKG "") +find_package(PNG) if (NOT PNG_FOUND) include(PNG/PNG.cmake) set(PNG_PKG dep_PNG) endif () set(EXPAT_PKG "") +find_package(EXPAT) if (NOT EXPAT_FOUND) include(EXPAT/EXPAT.cmake) set(EXPAT_PKG dep_EXPAT) @@ -226,6 +229,7 @@ include(Boost/Boost.cmake) include(Cereal/Cereal.cmake) include(Qhull/Qhull.cmake) include(GLEW/GLEW.cmake) + include(GLFW/GLFW.cmake) include(OpenCSG/OpenCSG.cmake) @@ -241,23 +245,45 @@ include(CGAL/CGAL.cmake) include(NLopt/NLopt.cmake) -include(OpenSSL/OpenSSL.cmake) - set(CURL_PKG "") +find_package(CURL) if (NOT CURL_FOUND) + message(WARNING "no curl package found, building openssl and curl") + include(OpenSSL/OpenSSL.cmake) include(CURL/CURL.cmake) + set(OPENSSL_PKG dep_OpenSSL) set(CURL_PKG dep_CURL) endif () -include(JPEG/JPEG.cmake) -include(TIFF/TIFF.cmake) +set(JPEG_PKG "") +find_package(JPEG) +if (NOT JPEG_FOUND) + include(JPEG/JPEG.cmake) + set(JPEG_PKG dep_JPEG) +endif() + +set(TIFF_PKG "") +find_package(TIFF) +if (NOT TIFF_FOUND) + include(TIFF/TIFF.cmake) + set(TIFF_PKG "dep_TIFF") +endif() + include(wxWidgets/wxWidgets.cmake) + +set(FREETYPE_PKG "") +find_package(Freetype) +if(NOT FREETYPE_FOUND) + include(FREETYPE/FREETYPE.cmake) + set(FREETYPE_PKG "dep_FREETYPE") +endif() + include(OCCT/OCCT.cmake) -include(FREETYPE/FREETYPE.cmake) set(_dep_list dep_Boost dep_TBB + ${OPENSSL_PKG} ${CURL_PKG} dep_wxWidgets dep_Cereal @@ -265,8 +291,9 @@ set(_dep_list dep_OpenVDB dep_OpenCSG dep_CGAL - dep_OpenSSL dep_GLFW + dep_OCCT + ${FREETYPE_PKG} ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} @@ -281,9 +308,6 @@ else() #list(APPEND _dep_list "dep_libigl") endif() -list(APPEND _dep_list "dep_OCCT") -list(APPEND _dep_list "dep_FREETYPE") - add_custom_target(deps ALL DEPENDS ${_dep_list}) # Note: I'm not using any of the LOG_xxx options in ExternalProject_Add() commands diff --git a/deps/OCCT/OCCT.cmake b/deps/OCCT/OCCT.cmake index 541412b1ca..651e40ec83 100644 --- a/deps/OCCT/OCCT.cmake +++ b/deps/OCCT/OCCT.cmake @@ -14,7 +14,7 @@ orcaslicer_add_cmake_project(OCCT #PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-OCCT-fix.patch PATCH_COMMAND git apply --directory ${BINARY_DIR_REL}/dep_OCCT-prefix/src/dep_OCCT --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-OCCT-fix.patch #DEPENDS dep_Boost - #DEPENDS dep_FREETYPE + DEPENDS ${FREETYPE_PKG} CMAKE_ARGS -DBUILD_LIBRARY_TYPE=${library_build_type} -DUSE_TK=OFF @@ -31,4 +31,4 @@ orcaslicer_add_cmake_project(OCCT -DBUILD_MODULE_Visualization=OFF ) -add_dependencies(dep_OCCT dep_FREETYPE) +# add_dependencies(dep_OCCT ${FREETYPE_PKG}) diff --git a/deps/wxWidgets/wxWidgets.cmake b/deps/wxWidgets/wxWidgets.cmake index 50cf991a65..30b7196dda 100644 --- a/deps/wxWidgets/wxWidgets.cmake +++ b/deps/wxWidgets/wxWidgets.cmake @@ -31,7 +31,7 @@ orcaslicer_add_cmake_project( GIT_REPOSITORY "https://github.com/wxWidgets/wxWidgets" GIT_TAG ${_wx_git_tag} PATCH_COMMAND ${_patch_cmd} - DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG + DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${TIFF_PKG} ${JPEG_PKG} CMAKE_ARGS -DwxBUILD_PRECOMP=ON ${_wx_toolkit} @@ -62,4 +62,4 @@ orcaslicer_add_cmake_project( if (MSVC) add_debug_dep(dep_wxWidgets) -endif () \ No newline at end of file +endif () diff --git a/flatpak/.gitignore b/flatpak/.gitignore new file mode 100644 index 0000000000..1c882e3c63 --- /dev/null +++ b/flatpak/.gitignore @@ -0,0 +1,2 @@ +builddir +.flatpak-builder/* diff --git a/flatpak/README.md b/flatpak/README.md new file mode 100644 index 0000000000..4445f1e869 --- /dev/null +++ b/flatpak/README.md @@ -0,0 +1,3 @@ +# OrcaSlicer + +This is basically a copy of [com.bambulab.BambuStudio](https://github.com/flathub/com.bambulab.BambuStudio). As such, same rules apply here as does over there. diff --git a/flatpak/entrypoint b/flatpak/entrypoint new file mode 100644 index 0000000000..958d1cd130 --- /dev/null +++ b/flatpak/entrypoint @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +# Work-around https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/754 +grep -q org.freedesktop.Platform.GL.nvidia /.flatpak-info && export WEBKIT_DISABLE_DMABUF_RENDERER=1 + +# Work-around https://github.com/bambulab/BambuStudio/issues/3440 +export LC_ALL=C.UTF-8 + +if [ $BAMBU_STUDIO_DARK_THEME == true ]; then + export GTK_THEME='Adwaita:dark' + # echo "Message: $(date +%T): INFO: using dark theme variant" +fi + +exec /app/bin/orca-slicer "$@" & +$(/app/bin/set-dark-theme-variant.py) & diff --git a/flatpak/images/1.png b/flatpak/images/1.png new file mode 100644 index 0000000000..bf69169a02 Binary files /dev/null and b/flatpak/images/1.png differ diff --git a/flatpak/images/2.png b/flatpak/images/2.png new file mode 100644 index 0000000000..510b7564fb Binary files /dev/null and b/flatpak/images/2.png differ diff --git a/flatpak/io.github.softfever.OrcaSlicer.metainfo.xml b/flatpak/io.github.softfever.OrcaSlicer.metainfo.xml new file mode 100755 index 0000000000..1b2a60d743 --- /dev/null +++ b/flatpak/io.github.softfever.OrcaSlicer.metainfo.xml @@ -0,0 +1,48 @@ + + + io.github.softfever.OrcaSlicer + io.github.softfever.OrcaSlicer.desktop + + io.github.softfever.OrcaSlicer.desktop + + OrcaSlicer + + Get even more perfect prints! + SoftFever + https://github.com/SoftFever/OrcaSlicer + https://github.com/SoftFever/OrcaSlicer/wiki + https://github.com/SoftFever/OrcaSlicer/issues/ + https://ko-fi.com/SoftFever + 0BSD + AGPL-3.0-only + + + 768 + + + keyboard + pointing + + + + https://raw.githubusercontent.com/powpingdone/com.github.softfever.orcaslicer/master/images/1.png + A model ready to be sliced on a buildplate. + + + https://raw.githubusercontent.com/powpingdone/com.github.softfever.orcaslicer/master/images/2.png + + A calibration test ready to be printed out. + + + + A 3D printer slicer forked from Bambu Studio, PrusaSlicer, and SuperSlicer with many more printer profiles, helpful calibration prints, and many more features to get your 3D printer printing perfectly! + + + #009688 + + + https://github.com/SoftFever/OrcaSlicer/commit/951fc8e98a0d5ca0ccb254315646ce7889a44836 + + + diff --git a/flatpak/io.github.softfever.OrcaSlicer.yml b/flatpak/io.github.softfever.OrcaSlicer.yml new file mode 100755 index 0000000000..f410c61054 --- /dev/null +++ b/flatpak/io.github.softfever.OrcaSlicer.yml @@ -0,0 +1,392 @@ +app-id: io.github.softfever.OrcaSlicer +runtime: org.gnome.Platform +runtime-version: "45" +sdk: org.gnome.Sdk +command: entrypoint +separate-locales: true +rename-icon: OrcaSlicer +finish-args: + - --share=ipc + - --socket=x11 + - --share=network + - --device=all + - --filesystem=home + - --filesystem=xdg-run/gvfs + - --filesystem=/run/media + - --filesystem=/media + # Allow OrcaSlicer to talk to other instances + - --talk-name=io.github.softfever.OrcaSlicer.InstanceCheck.* + - --system-talk-name=org.freedesktop.UDisks2 + # set dark theme + - --env=BAMBU_STUDIO_DARK_THEME=false + +modules: + + # JPEG codec for the liveview + - name: gst-plugins-good + buildsystem: meson + config-opts: + - -Dauto_features=disabled + - -Djpeg=enabled + - -Ddoc=disabled + - -Dexamples=disabled + - -Dtests=disabled + sources: + - type: archive + url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.22.8.tar.xz + sha256: e305b9f07f52743ca481da0a4e0c76c35efd60adaf1b0694eb3bb021e2137e39 + + # xprop, xlib is needed to manipulate the X11 window and set _GTK_THEME_VARIANT dark on X11 + # and paint the window dark when PRUSA_SLICER_DARK_THEME is true + # see: entrypoint & set-dark-theme-variant.py (originated from spotify client flatpak) + - name: xprop + sources: + - type: archive + url: http://mirrors.ircam.fr/pub/x.org/individual/app/xprop-1.2.5.tar.gz + sha256: b7bf6b6be6cf23e7966a153fc84d5901c14f01ee952fbd9d930aa48e2385d670 + - name: python-setuptools_scm + buildsystem: simple + build-commands: + - pip3 install --no-deps --no-build-isolation --verbose --prefix=${FLATPAK_DEST} . + sources: + - type: archive + url: https://files.pythonhosted.org/packages/57/38/930b1241372a9f266a7df2b184fb9d4f497c2cef2e016b014f82f541fe7c/setuptools_scm-6.0.1.tar.gz + sha256: d1925a69cb07e9b29416a275b9fadb009a23c148ace905b2fb220649a6c18e92 + - name: python-xlib + buildsystem: simple + build-commands: + - pip3 install --no-deps --no-build-isolation --verbose --prefix=${FLATPAK_DEST} . + sources: + - type: archive + url: https://files.pythonhosted.org/packages/86/f5/8c0653e5bb54e0cbdfe27bf32d41f27bc4e12faa8742778c17f2a71be2c0/python-xlib-0.33.tar.gz + sha256: 55af7906a2c75ce6cb280a584776080602444f75815a7aff4d287bb2d7018b32 + + # For libOSMesa + - name: mesa + buildsystem: meson + config-opts: + - -Dosmesa=classic + - -Ddri-drivers=[] + - -Dgallium-drivers=[] + - -Dvulkan-drivers=[] + - -Dplatforms=[] + build-options: + arch: + aarch64: + config-opts: + - -Dlibunwind=disabled + cleanup: + - /share/drirc.d + - /include + - "*.a" + sources: + - type: archive + # url: https://archive.mesa3d.org/mesa-20.2.6.tar.xz + url: https://ftp.icm.edu.pl/pub/graphics/mesa/mesa-20.2.6.tar.xz + sha256: f12ca3c6c622f11cd79ad66b4220f04514fa96f795062fe92a37339ab19885db + + - name: glu + config-opts: + - --disable-static + sources: + - type: archive + url: https://ftp.osuosl.org/pub/blfs/conglomeration/glu/glu-9.0.2.tar.xz + sha256: 6e7280ff585c6a1d9dfcdf2fca489251634b3377bfc33c29e4002466a38d02d4 + cleanup: + - /include + - /lib/*.a + - /lib/*.la + - /lib/pkgconfig + + - name: kde-extra-cmake-modules + buildsystem: cmake + sources: + - type: git + url: https://github.com/KDE/extra-cmake-modules + tag: v5.249.0 + cleanup: + - / + + # - name: boost + # buildsystem: simple + # build-commands: + # - ./bootstrap.sh --prefix=/app --with-libraries=system,iostreams,filesystem,thread,log,locale,regex,date_time + # - ./b2 headers + # - ./b2 -j$FLATPAK_BUILDER_N_JOBS install variant=release cxxstd=17 --layout=system + # sources: + # - type: archive + # url: https://freefr.dl.sourceforge.net/project/boost/boost/1.78.0/boost_1_78_0.zip + # sha256: f22143b5528e081123c3c5ed437e92f648fe69748e95fa6e2bd41484e2986cc3 + # cleanup: + # - /include + # - /lib/cmake + + #- name: glfw + # buildsystem: cmake-ninja + # config-opts: + # - -DCMAKE_BUILD_TYPE=RelWithDebInfo + # - -DBUILD_SHARED_LIBS:BOOL=ON + # - -DGLFW_USE_WAYLAND=OFF + # sources: + # - type: git + # url: https://github.com/glfw/glfw.git + # tag: 3.3.9 + # - type: patch + # path: patches/glfw-Don-t-crash-on-calls-to-focus-or-icon.patch + # cleanup: + # - /include + # - /lib/cmake + # - /lib/pkgconfig + + #- name: wxwidgets + # buildsystem: cmake-ninja + # config-opts: + # - -DwxBUILD_PRECOMP=ON + # - -DwxBUILD_TOOLKIT=gtk3 + # - -DwxBUILD_DEBUG_LEVEL=0 + # - -DwxBUILD_SAMPLES=OFF + # - -DwxBUILD_SHARED=OFF + # - -DwxUSE_MEDIACTRL=ON + # - -DwxUSE_DETECT_SM=OFF + # - -DwxUSE_UNICODE=ON + # - -DwxUSE_PRIVATE_FONTS=1 + # - -DwxUSE_OPENGL=ON + # - -DwxUSE_WEBREQUEST=ON + # - -DwxUSE_WEBVIEW=ON + # - -DwxUSE_REGEX=sys + # - -DwxUSE_LIBSDL=OFF + # - -DwxUSE_XTEST=OFF + # - -DwxUSE_STC=OFF + # - -DwxUSE_AUI=ON + # - -DwxUSE_LIBPNG=sys + # - -DwxUSE_ZLIB=sys + # - -DwxUSE_LIBJPEG=sys + # - -DwxUSE_LIBTIFF=sys + # - -DwxUSE_NANOSVG=OFF + # - -DwxUSE_EXPAT=sys + # sources: + # - type: archive + # url: https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2 + # sha256: d7b3666de33aa5c10ea41bb9405c40326e1aeb74ee725bb88f90f1d50270a224 + # # https://github.com/bambulab/BambuStudio/issues/3279 + # - type: patch + # path: patches/disable-gstplayer.patch + # # https://github.com/wxWidgets/wxWidgets/issues/23630 + # - type: patch + # path: patches/0001-Add-support-for-building-WebView-with-libwebkit2gtk-.patch + # # wx-config/build fixes between 3.1.5 and 3.1.6 + # - type: patch + # path: patches/wxwidgets-not-found.patch + # #- type: patch + # # path: patches/wxwidgets-system-def.patch + # cleanup: + # - /include + # - /lib/cmake + + - name: orca_deps + buildsystem: simple + build-commands: + # start build + - | + mkdir deps/build && cd deps/build + cmake ../ \ + -DDEP_WX_GTK3=1 \ + -DDEP_DOWNLOAD_DIR=/run/build/orca_deps/external-packages \ + -DCMAKE_INSTALL_LIBDIR=/app/lib \ + -DCMAKE_INSTALL_PREFIX=/app + cmake --build . + + cleanup: + - /app/include + - "*.a" + - "*.la" + + sources: + # - + # Section bellow fetches all OrcaSlicer dependencies before the build process and stores them in external-packages/*/* . + # -DDEP_DOWNLOAD_DIR is set in the build process which has to match with dest. + # + # NOTE: The url, dest folder name and sha256 must match from OrcaSlicer's cmake scripts and folder names in OrcaSlicer/deps/ + # - + + # OrcaSlicer Source Archive + - type: dir + path: ../ + + # Blosc + - type: file + url: https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip + dest: external-packages/Blosc + sha256: dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3 + + # Cereal + - type: file + url: https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.0.zip + dest: external-packages/Cereal + sha256: 71642cb54658e98c8f07a0f0d08bf9766f1c3771496936f6014169d3726d9657 + + # CGAL + - type: file + url: https://github.com/CGAL/cgal/archive/refs/tags/v5.4.zip + dest: external-packages/CGAL + sha256: d7605e0a5a5ca17da7547592f6f6e4a59430a0bc861948974254d0de43eab4c0 + + # GMP + - type: file + url: https://github.com/SoftFever/OrcaSlicer_deps/releases/download/gmp-6.2.1/gmp-6.2.1.tar.bz2 + dest: external-packages/GMP + sha256: eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c + + # MPFR + - type: file + url: https://www.mpfr.org/mpfr-current/mpfr-4.2.1.tar.bz2 + dest: external-packages/MPFR + sha256: b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0 + + # NLopt + - type: file + url: https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz + dest: external-packages/NLopt + sha256: c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae + + # OCCT + - type: file + url: https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_0.zip + dest: external-packages/OCCT + sha256: 28334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc + + # OpenCSG + - type: file + url: https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-4-2-release.zip + dest: external-packages/OpenCSG + sha256: 51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5 + + # OpenEXR + - type: file + url: https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip + dest: external-packages/OpenEXR + sha256: 0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de + + # OpenVDB + - type: file + url: https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip + dest: external-packages/OpenVDB + sha256: f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81 + + # Qhull + - type: file + url: https://github.com/qhull/qhull/archive/v8.0.1.zip + dest: external-packages/Qhull + sha256: 5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b + + # TBB + - type: file + url: https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip + dest: external-packages/TBB + sha256: 83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47 + + # Patched TBB cmake to make build without lto flag + - type: file + dest: deps/TBB + path: patches/TBB/GNU.cmake + + # Apply TTB patches to fix linking failure. More info: https://github.com/prusa3d/PrusaSlicer/issues/8922 + - type: patch + path: patches/0001-Apply-TBB-LTO-patch.patch + + # Boost + - type: file + url: https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz + dest: external-packages/Boost + sha256: 4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95 + + # GLFW + - type: file + url: https://github.com/glfw/glfw/archive/refs/tags/3.3.7.zip + dest: external-packages/GLFW + sha256: e02d956935e5b9fb4abf90e2c2e07c9a0526d7eacae8ee5353484c69a2a76cd0 + + # wxWidgets + - type: git + url: https://github.com/wxWidgets/wxWidgets + dest: external-packages/wxWidgets + tag: v3.1.5 + + - name: OrcaSlicer + buildsystem: simple + build-commands: + - | + mkdir -p build && cd build + CXXFLAGS=-std=gnu++20 cmake ../ \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX=/app \ + -DCMAKE_INSTALL_LIBDIR=/app/lib \ + -DCMAKE_PREFIX_PATH=/run/build/OrcaSlicer/deps/build/destdir/usr/local \ + -DSLIC3R_PCH=OFF \ + -DSLIC3R_FHS=ON \ + -DSLIC3R_GTK=3 \ + -DSLIC3R_STATIC=ON \ + -DSLIC3R_BUILD_TESTS=OFF \ + -DSLIC3R_DESKTOP_INTEGRATION=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DBBL_RELEASE_TO_PUBLIC=1 + CXXFLAGS=-std=gnu++20 cmake --build . --target install -j$FLATPAK_BUILDER_N_JOBS + + cleanup: + - /include + + post-install: + + - | # Desktop Integration files + install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ resources/images/OrcaSlicer.svg + install -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml + mv /app/share/applications/OrcaSlicer.desktop /app/share/applications/${FLATPAK_ID}.desktop + desktop-file-edit --set-key=Exec --set-value="entrypoint %U" /app/share/applications/${FLATPAK_ID}.desktop + install -Dm755 set-dark-theme-variant.py /app/bin + install -Dm755 entrypoint /app/bin + install -Dm755 umount /app/bin + + sources: + # - + # Section bellow fetches all OrcaSlicer dependencies before the build process and stores them in external-packages/*/* . + # -DDEP_DOWNLOAD_DIR is set in the build process which has to match with dest. + # + # NOTE: The url, dest folder name and sha256 must match from OrcaSlicer's cmake scripts and folder names in OrcaSlicer/deps/ + # - + + # OrcaSlicer Source Archive + - type: dir + path: ../ + + + - type: patch + path: patches/0001-Work-around-ClipperLib-union_-declaration-problem.patch + + # Use system deps instead of building them within BambuStudio + # https://github.com/hadess/BambuStudio/tree/wip/hadess/use-sysdeps , modified + - type: patch + path: patches/use-sysdeps.patch + + ## other patches to contrib + #- type: patch + # path: patches/0001-megapatch.patch + + # AppData metainfo for Gnome Software & Co. + - type: file + path: io.github.softfever.OrcaSlicer.metainfo.xml + + # script to set dark theme variant + - type: file + path: set-dark-theme-variant.py + + # start-up script + # README: workaround for the following issues, also enables dark theme variant: + # SEE: https://github.com/flathub/com.bambulab.BambuStudio/issues/27 + # SEE: https://github.com/flathub/com.bambulab.BambuStudio/issues/3 + # SEE: https://github.com/prusa3d/PrusaSlicer/issues/2365 + - type: file + path: entrypoint + + # umount wrapper used to redirect umount calls to udisk2 + - type: file + path: umount diff --git a/flatpak/local-build.sh b/flatpak/local-build.sh new file mode 100755 index 0000000000..cbf4945943 --- /dev/null +++ b/flatpak/local-build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +rm -rf _build ; mkdir _build +rm -rf _repo ; mkdir _repo + +BRANCH=test + +powerprofilesctl launch flatpak-builder --ccache --force-clean --default-branch=$BRANCH _build com.bambulab.BambuStudio.yml --repo=_repo diff --git a/flatpak/patches/0001-Add-support-for-building-WebView-with-libwebkit2gtk-.patch b/flatpak/patches/0001-Add-support-for-building-WebView-with-libwebkit2gtk-.patch new file mode 100644 index 0000000000..6bae9c168d --- /dev/null +++ b/flatpak/patches/0001-Add-support-for-building-WebView-with-libwebkit2gtk-.patch @@ -0,0 +1,167 @@ +From df46add1165314bce93d70e611ddc453561ffb60 Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Mon, 12 Jun 2023 20:28:35 -0400 +Subject: [PATCH] Add support for building WebView with libwebkit2gtk-4.1 + +libwebkit2gtk-4.1 has the same API as libwebkit2gtk-4.0, except that the +former links with libsoup-3.0 and the latter links with libsoup-2.4. + +Fixes #23630. + +(cherry picked from commit 1b8664426603376b68f8ca3c54de97ec630e5940) +--- + build/cmake/init.cmake | 10 ++- + build/cmake/modules/FindLIBSOUP.cmake | 14 +++- + build/cmake/modules/FindWEBKIT2.cmake | 5 +- + configure | 95 +++++++++++++++++++++++++-- + configure.in | 16 ++++- + src/gtk/webview_webkit2.cpp | 4 ++ + 6 files changed, 129 insertions(+), 15 deletions(-) + +diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake +index fc206cf2e03a..5d88a7e487cc 100644 +--- a/build/cmake/init.cmake ++++ b/build/cmake/init.cmake +@@ -453,15 +453,21 @@ if(wxUSE_GUI) + if(wxUSE_WEBVIEW) + if(WXGTK) + if(wxUSE_WEBVIEW_WEBKIT) +- find_package(LIBSOUP) ++ set(WEBKIT_LIBSOUP_VERSION 2.4) + if(WXGTK2) + find_package(WEBKIT 1.0) + elseif(WXGTK3) +- find_package(WEBKIT2) ++ find_package(WEBKIT2 4.1 QUIET) ++ if(WEBKIT2_FOUND) ++ set(WEBKIT_LIBSOUP_VERSION 3.0) ++ else() ++ find_package(WEBKIT2 4.0) ++ endif() + if(NOT WEBKIT2_FOUND) + find_package(WEBKIT 3.0) + endif() + endif() ++ find_package(LIBSOUP ${WEBKIT_LIBSOUP_VERSION}) + endif() + set(wxUSE_WEBVIEW_WEBKIT OFF) + set(wxUSE_WEBVIEW_WEBKIT2 OFF) +diff --git a/build/cmake/modules/FindLIBSOUP.cmake b/build/cmake/modules/FindLIBSOUP.cmake +index cbfba1cf9366..2433d141eaf7 100644 +--- a/build/cmake/modules/FindLIBSOUP.cmake ++++ b/build/cmake/modules/FindLIBSOUP.cmake +@@ -31,19 +31,27 @@ + # LibSoup does not provide an easy way to retrieve its version other than its + # .pc file, so we need to rely on PC_LIBSOUP_VERSION and REQUIRE the .pc file + # to be found. ++SET(LIBSOUP_VERSION 2.4) ++if(DEFINED LIBSOUP_FIND_VERSION) ++ SET(LIBSOUP_VERSION ${LIBSOUP_FIND_VERSION}) ++endif() ++ ++set(LIBSOUP_INCLUDE_DIRS LIBSOUP_INCLUDE_DIRS-NOTFOUND) ++set(LIBSOUP_LIBRARIES LIBSOUP_LIBRARIES-NOTFOUND) ++ + FIND_PACKAGE(PkgConfig) +-PKG_CHECK_MODULES(PC_LIBSOUP QUIET libsoup-2.4) ++PKG_CHECK_MODULES(PC_LIBSOUP QUIET libsoup-${LIBSOUP_VERSION}) + + if(PC_LIBSOUP_FOUND) + FIND_PATH(LIBSOUP_INCLUDE_DIRS + NAMES libsoup/soup.h + HINTS ${PC_LIBSOUP_INCLUDEDIR} + ${PC_LIBSOUP_INCLUDE_DIRS} +- PATH_SUFFIXES libsoup-2.4 ++ PATH_SUFFIXES libsoup-${LIBSOUP_VERSION} + ) + + FIND_LIBRARY(LIBSOUP_LIBRARIES +- NAMES soup-2.4 ++ NAMES soup-${LIBSOUP_VERSION} + HINTS ${PC_LIBSOUP_LIBDIR} + ${PC_LIBSOUP_LIBRARY_DIRS} + ) +diff --git a/build/cmake/modules/FindWEBKIT2.cmake b/build/cmake/modules/FindWEBKIT2.cmake +index 133e7a4563ea..e39077ac4a71 100644 +--- a/build/cmake/modules/FindWEBKIT2.cmake ++++ b/build/cmake/modules/FindWEBKIT2.cmake +@@ -5,7 +5,10 @@ + # WEBKIT2_LIBRARIES - List of libraries when using Webkit2. + # WEBKIT2_FOUND - True if Webkit2 found. + +-SET( WEBKIT2_VERSION 4.0) ++SET(WEBKIT2_VERSION 4.0) ++if(DEFINED WEBKIT2_FIND_VERSION) ++ SET(WEBKIT2_VERSION ${WEBKIT2_FIND_VERSION}) ++endif() + + set(WEBKIT2_INCLUDE_DIR WEBKIT2_INCLUDE_DIR-NOTFOUND) + set(WEBKIT2_LIBRARY WEBKIT2_LIBRARY-NOTFOUND) +diff --git a/configure.in b/configure.in +index 957be8dda34c..257c95a6009b 100644 +--- a/configure.in ++++ b/configure.in +@@ -7529,15 +7529,27 @@ if test "$wxUSE_WEBVIEW" = "yes"; then + if test "$wxUSE_GTK" = 1; then + if test "$WXGTK3" = 1; then + PKG_CHECK_MODULES([WEBKIT], +- [webkit2gtk-4.0], ++ [webkit2gtk-4.1], + [ + USE_WEBVIEW_WEBKIT2=1 + CXXFLAGS="$CXXFLAGS $WEBKIT_CFLAGS" + EXTRALIBS_WEBVIEW="$WEBKIT_LIBS" + ], + [ +- AC_MSG_WARN([webkit2gtk not found, falling back to webkitgtk]) ++ AC_MSG_WARN([webkit2gtk-4.1 not found, falling back to webkit2gtk-4.0]) + ]) ++ if test "$USE_WEBVIEW_WEBKIT2" = 0; then ++ PKG_CHECK_MODULES([WEBKIT], ++ [webkit2gtk-4.0], ++ [ ++ USE_WEBVIEW_WEBKIT2=1 ++ CXXFLAGS="$CXXFLAGS $WEBKIT_CFLAGS" ++ EXTRALIBS_WEBVIEW="$WEBKIT_LIBS" ++ ], ++ [ ++ AC_MSG_WARN([webkit2gtk-4.0 not found, falling back to webkitgtk]) ++ ]) ++ fi + fi + if test "$USE_WEBVIEW_WEBKIT2" = 0; then + webkitgtk=webkit-1.0 +diff --git a/src/gtk/webview_webkit2.cpp b/src/gtk/webview_webkit2.cpp +index 191cbcf2cc18..87a9bd5ad3a8 100644 +--- a/src/gtk/webview_webkit2.cpp ++++ b/src/gtk/webview_webkit2.cpp +@@ -173,15 +173,18 @@ wxgtk_webview_webkit_load_failed(WebKitWebView *, + { + switch (error->code) + { ++#if SOUP_MAJOR_VERSION < 3 + case SOUP_STATUS_CANCELLED: + type = wxWEBVIEW_NAV_ERR_USER_CANCELLED; + break; + + case SOUP_STATUS_CANT_RESOLVE: ++#endif + case SOUP_STATUS_NOT_FOUND: + type = wxWEBVIEW_NAV_ERR_NOT_FOUND; + break; + ++#if SOUP_MAJOR_VERSION < 3 + case SOUP_STATUS_CANT_RESOLVE_PROXY: + case SOUP_STATUS_CANT_CONNECT: + case SOUP_STATUS_CANT_CONNECT_PROXY: +@@ -193,6 +196,7 @@ wxgtk_webview_webkit_load_failed(WebKitWebView *, + case SOUP_STATUS_MALFORMED: + type = wxWEBVIEW_NAV_ERR_REQUEST; + break; ++#endif + + case SOUP_STATUS_BAD_REQUEST: + type = wxWEBVIEW_NAV_ERR_REQUEST; +-- +2.43.0 + diff --git a/flatpak/patches/0001-Apply-TBB-LTO-patch.patch b/flatpak/patches/0001-Apply-TBB-LTO-patch.patch new file mode 100644 index 0000000000..9259b7ac4b --- /dev/null +++ b/flatpak/patches/0001-Apply-TBB-LTO-patch.patch @@ -0,0 +1,16 @@ +diff --git a/deps/TBB/TBB.cmake b/deps/TBB/TBB.cmake +index 6bf28ca2e..5bd158e30 100644 +--- a/deps/TBB/TBB.cmake ++++ b/deps/TBB/TBB.cmake +@@ -1,8 +1,10 @@ ++set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/GNU.cmake cmake/compilers/GNU.cmake) ++ + orcaslicer_add_cmake_project( + TBB + URL "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip" + URL_HASH SHA256=83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47 +- #PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-TBB-GCC13.patch ++ PATCH_COMMAND ${_patch_command} + CMAKE_ARGS + -DTBB_BUILD_SHARED=OFF + -DTBB_BUILD_TESTS=OFF diff --git a/flatpak/patches/0001-Work-around-ClipperLib-union_-declaration-problem.patch b/flatpak/patches/0001-Work-around-ClipperLib-union_-declaration-problem.patch new file mode 100644 index 0000000000..599053139f --- /dev/null +++ b/flatpak/patches/0001-Work-around-ClipperLib-union_-declaration-problem.patch @@ -0,0 +1,57 @@ +From 504e2a789502b76cf2553124a777e32e08bfa15c Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 13 Dec 2023 12:38:11 +0100 +Subject: [PATCH] Work-around ClipperLib/union_ declaration problem +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[116/471] Building CXX object src/libslic3r/CMakeFiles/libslic3r.dir/Format/svg.cpp.o +FAILED: src/libslic3r/CMakeFiles/libslic3r.dir/Format/svg.cpp.o +/run/ccache/bin/c++ -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_NO_LIB -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_NO_LIB -DBOOST_LOCALE_NO_LIB -DBOOST_LOG_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_NO_LIB -DHAVE_FREETYPE -DHAVE_OPENGL_EXT -DHAVE_XLIB -DLIBNEST2D_GEOMETRIES_libslic3r -DLIBNEST2D_OPTIMIZER_nlopt -DLIBNEST2D_STATIC -DLIBNEST2D_THREADING_tbb -DOCC_CONVERT_SIGNALS -DOPENVDB_OPENEXR_STATICLIB -DOPENVDB_STATICLIB -DSLIC3R_GUI -DTBB_USE_CAPTURED_EXCEPTION=0 -DUNICODE -DUSE_TBB -DWXINTL_NO_GETTEXT_MACRO -D_UNICODE -DwxNO_UNSAFE_WXSTRING_CONV -DwxUSE_UNICODE -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/run/build/BambuStudio/src -I/run/build/BambuStudio/build/src/platform -I/run/build/BambuStudio/src/libslic3r -I/run/build/BambuStudio/build/src/libslic3r -I/run/build/BambuStudio/deps/build/destdir/usr/local/include/opencascade -I/run/build/BambuStudio/src/libnest2d/include -I/run/build/BambuStudio/src/miniz -I/run/build/BambuStudio/src/glu-libtess/include -I/run/build/BambuStudio/src/clipper2/Clipper2Lib/include -isystem /run/build/BambuStudio/src/eigen -isystem /run/build/BambuStudio/src/libigl -isystem /run/build/BambuStudio/deps/build/destdir/usr/local/include -isystem /run/build/BambuStudio/deps/build/destdir/usr/local/include/boost-1_78 -isystem /run/build/BambuStudio/deps/build/destdir/usr/local/include/OpenEXR -O2 -pipe -g -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -fext-numeric-literals -Wall -Wno-reorder -O3 -DNDEBUG -std=gnu++17 -fPIC -fsigned-char -Werror=return-type -Wno-ignored-attributes -Wno-unknown-pragmas -DOPENVDB_ABI_VERSION_NUMBER=8 -MD -MT src/libslic3r/CMakeFiles/libslic3r.dir/Format/svg.cpp.o -MF src/libslic3r/CMakeFiles/libslic3r.dir/Format/svg.cpp.o.d -o src/libslic3r/CMakeFiles/libslic3r.dir/Format/svg.cpp.o -c /run/build/BambuStudio/src/libslic3r/Format/svg.cpp +/run/build/BambuStudio/src/libslic3r/Format/svg.cpp:214:29: error: ‘Path’ is not a member of ‘Slic3r::ClipperLib’; did you mean ‘ClipperLib::Path’? + 214 | ClipperLib::Path pt_path; + | ^~~~ +In file included from /run/build/BambuStudio/src/libslic3r/Format/svg.cpp:22: +/run/build/BambuStudio/src/clipper/clipper.hpp:113:31: note: ‘ClipperLib::Path’ declared here + 113 | typedef std::vector Path; + | ^~~~ +/run/build/BambuStudio/src/libslic3r/Format/svg.cpp:240:28: error: ‘union_’ was not declared in this scope; did you mean ‘union’? + 240 | polygons = union_(polygons); + | ^~~~~~ + | union +--- + src/libslic3r/Format/svg.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/libslic3r/Format/svg.cpp b/src/libslic3r/Format/svg.cpp +index 4a96274b99e4..ff895402255d 100644 +--- a/src/libslic3r/Format/svg.cpp ++++ b/src/libslic3r/Format/svg.cpp +@@ -204,12 +204,14 @@ bool get_svg_profile(const char *path, std::vector &element_infos, + path_line_points.push_back(profile_line_points); + } + ++#if 0 + if (shape->fill.gradient == nullptr) { + double scale_size = 1e6; + std::vector>> new_path_line_points; + float stroke_width = shape->strokeWidth * scale_size; + Polygons polygons; + bool close_polygon = false; ++ + for (int i = 0; i < path_line_points.size(); ++i) { + ClipperLib::Path pt_path; + for (auto line_point : path_line_points[i]) { +@@ -253,7 +255,7 @@ bool get_svg_profile(const char *path, std::vector &element_infos, + + path_line_points = new_path_line_points; + } +- ++#endif + // generate all profile curves + std::vector wires; + int index = 0; +-- +2.43.0 + diff --git a/flatpak/patches/0001-megapatch.patch b/flatpak/patches/0001-megapatch.patch new file mode 100644 index 0000000000..45c1cec8dc --- /dev/null +++ b/flatpak/patches/0001-megapatch.patch @@ -0,0 +1,1711 @@ +diff --git a/src/libslic3r/Arrange.cpp b/src/libslic3r/Arrange.cpp +index 5b4aee507..2631b936e 100644 +--- a/src/libslic3r/Arrange.cpp ++++ b/src/libslic3r/Arrange.cpp +@@ -17,6 +17,7 @@ + #define BOOST_NO_CXX17_HDR_STRING_VIEW + #endif + ++#include + #include + #include + +diff --git a/src/libslic3r/Color.hpp b/src/libslic3r/Color.hpp +index a11174639..c13f0bd2c 100644 +--- a/src/libslic3r/Color.hpp ++++ b/src/libslic3r/Color.hpp +@@ -1,6 +1,8 @@ + #ifndef slic3r_Color_hpp_ + #define slic3r_Color_hpp_ + ++#include ++#include + #include + #include + +diff --git a/src/libslic3r/Format/bbs_3mf.hpp b/src/libslic3r/Format/bbs_3mf.hpp +index af6994b77..d2f46be3e 100644 +--- a/src/libslic3r/Format/bbs_3mf.hpp ++++ b/src/libslic3r/Format/bbs_3mf.hpp +@@ -8,6 +8,7 @@ + + namespace Slic3r { + class Model; ++class ModelObject; + struct ConfigSubstitutionContext; + class DynamicPrintConfig; + class Preset; +diff --git a/src/libslic3r/GCodeReader.cpp b/src/libslic3r/GCodeReader.cpp +index 1a660b4c1..116837828 100644 +--- a/src/libslic3r/GCodeReader.cpp ++++ b/src/libslic3r/GCodeReader.cpp +@@ -1,6 +1,7 @@ + #include "GCodeReader.hpp" + #include + #include ++#include + #include + #include + #include +diff --git a/src/libslic3r/Orient.cpp b/src/libslic3r/Orient.cpp +index a87694ad9..ce448fc7e 100644 +--- a/src/libslic3r/Orient.cpp ++++ b/src/libslic3r/Orient.cpp +@@ -3,6 +3,7 @@ + #include + #include + #include ++#include + #include + + #if defined(_MSC_VER) && defined(__clang__) +diff --git a/src/libslic3r/PNGReadWrite.cpp b/src/libslic3r/PNGReadWrite.cpp +index e4b7489b8..32b9a8f79 100644 +--- a/src/libslic3r/PNGReadWrite.cpp ++++ b/src/libslic3r/PNGReadWrite.cpp +@@ -5,6 +5,7 @@ + #include + #include + ++#include + #include + #include + +diff --git a/src/libslic3r/PNGReadWrite.hpp b/src/libslic3r/PNGReadWrite.hpp +index c76d7b168..9a27fed49 100644 +--- a/src/libslic3r/PNGReadWrite.hpp ++++ b/src/libslic3r/PNGReadWrite.hpp +@@ -1,6 +1,7 @@ + #ifndef PNGREAD_HPP + #define PNGREAD_HPP + ++#include + #include + #include + #include +diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp +index c9b1d5d98..0616ac5da 100644 +--- a/src/libslic3r/PerimeterGenerator.cpp ++++ b/src/libslic3r/PerimeterGenerator.cpp +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + static const int overhang_sampling_number = 6; + static const double narrow_loop_length_threshold = 10; +diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp +index 7993f6a7b..da3a6da52 100644 +--- a/src/libslic3r/Print.cpp ++++ b/src/libslic3r/Print.cpp +@@ -40,6 +40,7 @@ + #include "Utils.hpp" + #include "PrintConfig.hpp" + #include "Model.hpp" ++#include "format.hpp" + #include + + #include +@@ -49,6 +50,10 @@ + #include + #include + #include ++#include ++ ++#include ++#include + + //BBS: add json support + #include "nlohmann/json.hpp" +@@ -1117,8 +1122,8 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* + return + // Test whether the last slicing plane is below or above the print volume. + { 0.5 * (layers[layers.size() - 2] + layers.back()) > this->config().printable_height + EPSILON ? +- format(_u8L("The object %1% exceeds the maximum build volume height."), print_object.model_object()->name) : +- format(_u8L("While the object %1% itself fits the build volume, its last layer exceeds the maximum build volume height."), print_object.model_object()->name) + ++ Slic3r::format(_u8L("The object %1% exceeds the maximum build volume height."), print_object.model_object()->name) : ++ Slic3r::format(_u8L("While the object %1% itself fits the build volume, its last layer exceeds the maximum build volume height."), print_object.model_object()->name) + + " " + _u8L("You might want to reduce the size of your model or change current print settings and retry.") }; + } + } +@@ -1401,7 +1406,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* + } + + StringObjectException except; +- except.string = format(L("Plate %d: %s does not support filament %s"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1); ++ except.string = Slic3r::format(L("Plate %d: %s does not support filament %s"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1); + except.string += "\n"; + except.type = STRING_EXCEPT_FILAMENT_NOT_MATCH_BED_TYPE; + except.params.push_back(std::to_string(this->get_plate_index() + 1)); +diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp +index 6664b28a3..76598cca2 100644 +--- a/src/libslic3r/PrintApply.cpp ++++ b/src/libslic3r/PrintApply.cpp +@@ -1,6 +1,7 @@ + #include "Model.hpp" + #include "Print.hpp" + ++#include + #include + + namespace Slic3r { +diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp +index 5ba9306b5..25b282c7b 100644 +--- a/src/libslic3r/PrintBase.cpp ++++ b/src/libslic3r/PrintBase.cpp +@@ -3,6 +3,7 @@ + + #include + #include ++#include + + #include "I18N.hpp" + +diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp +index 45a7f926e..0e24a821f 100644 +--- a/src/libslic3r/PrintConfig.cpp ++++ b/src/libslic3r/PrintConfig.cpp +@@ -20,6 +20,7 @@ + ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher + ///|/ + #include "PrintConfig.hpp" ++#include "ClipperUtils.hpp" + #include "Config.hpp" + #include "I18N.hpp" + +diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp +index 0dabd5ea0..8eada8cc4 100644 +--- a/src/libslic3r/PrintObject.cpp ++++ b/src/libslic3r/PrintObject.cpp +@@ -29,6 +29,7 @@ + #include "Fill/FillLightning.hpp" + #include "Format/STL.hpp" + #include "TreeSupport.hpp" ++#include "format.hpp" + + #include + #include +@@ -659,7 +660,7 @@ void PrintObject::generate_support_material() + {SharpTail,L("floating regions")}, + {Cantilever,L("floating cantilever")}, + {LargeOverhang,L("large overhangs")} }; +- std::string warning_message = format(L("It seems object %s has %s. Please re-orient the object or enable support generation."), ++ std::string warning_message = Slic3r::format(L("It seems object %s has %s. Please re-orient the object or enable support generation."), + this->model_object()->name, reasons[sntype]); + this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, warning_message, PrintStateBase::SlicingNeedSupportOn); + } +diff --git a/src/libslic3r/ProjectTask.cpp b/src/libslic3r/ProjectTask.cpp +index 622a20a85..fe5fd36a4 100644 +--- a/src/libslic3r/ProjectTask.cpp ++++ b/src/libslic3r/ProjectTask.cpp +@@ -9,6 +9,7 @@ + #include + + #include ++#include + #include + #include + #include +diff --git a/src/libslic3r/SVG.cpp b/src/libslic3r/SVG.cpp +index 6377f405e..9ccddcd4f 100644 +--- a/src/libslic3r/SVG.cpp ++++ b/src/libslic3r/SVG.cpp +@@ -1,6 +1,7 @@ + #include "SVG.hpp" + #include + ++#include + #include + + namespace Slic3r { +diff --git a/src/libslic3r/Shape/TextShape.cpp b/src/libslic3r/Shape/TextShape.cpp +index e740905ce..63c5f96df 100644 +--- a/src/libslic3r/Shape/TextShape.cpp ++++ b/src/libslic3r/Shape/TextShape.cpp +@@ -28,6 +28,8 @@ + #include "BRepPrimAPI_MakePrism.hxx" + #include "Font_FontMgr.hxx" + ++#include ++ + namespace Slic3r { + + static std::map g_occt_fonts_maps; //map +diff --git a/src/libslic3r/Shape/TextShape.hpp b/src/libslic3r/Shape/TextShape.hpp +index 75c93bc64..d093c2da4 100644 +--- a/src/libslic3r/Shape/TextShape.hpp ++++ b/src/libslic3r/Shape/TextShape.hpp +@@ -1,6 +1,8 @@ + #ifndef slic3r_Text_Shape_hpp_ + #define slic3r_Text_Shape_hpp_ + ++#include "libslic3r/TriangleMesh.hpp" ++ + namespace Slic3r { + class TriangleMesh; + +@@ -17,4 +19,4 @@ std::map get_occt_fonts_maps(); + + }; // namespace Slic3r + +-#endif // slic3r_Text_Shape_hpp_ +\ No newline at end of file ++#endif // slic3r_Text_Shape_hpp_ +diff --git a/src/libslic3r/Support/SupportCommon.cpp b/src/libslic3r/Support/SupportCommon.cpp +index 9b2610a4b..c494507c7 100644 +--- a/src/libslic3r/Support/SupportCommon.cpp ++++ b/src/libslic3r/Support/SupportCommon.cpp +@@ -11,9 +11,11 @@ + #include "../MutablePolygon.hpp" + #include "../Geometry.hpp" + #include "../Point.hpp" ++#include "clipper/clipper_z.hpp" + + #include + #include ++#include + + #include + +diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp +index 5b3ec7049..71080cf20 100644 +--- a/src/libslic3r/TreeSupport.cpp ++++ b/src/libslic3r/TreeSupport.cpp +@@ -12,6 +12,10 @@ + #include "I18N.hpp" + #include + ++#include ++#include ++#include ++ + #define _L(s) Slic3r::I18N::translate(s) + + #define USE_PLAN_LAYER_HEIGHTS 1 +diff --git a/src/libslic3r/TriangleSelector.cpp b/src/libslic3r/TriangleSelector.cpp +index 6499215b2..e78dd878d 100644 +--- a/src/libslic3r/TriangleSelector.cpp ++++ b/src/libslic3r/TriangleSelector.cpp +@@ -2,6 +2,7 @@ + #include "Model.hpp" + + #include ++#include + + #ifndef NDEBUG + // #define EXPENSIVE_DEBUG_CHECKS +diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp +index 1a5422b7b..dae1c13e5 100644 +--- a/src/libslic3r/utils.cpp ++++ b/src/libslic3r/utils.cpp +@@ -13,6 +13,7 @@ + #include + #include + ++#include "format.hpp" + #include "Platform.hpp" + #include "Time.hpp" + #include "libslic3r.h" +@@ -1510,7 +1511,7 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out) + // SoftFever: copy directory recursively + void copy_directory_recursively(const boost::filesystem::path &source, const boost::filesystem::path &target) + { +- BOOST_LOG_TRIVIAL(info) << format("copy_directory_recursively %1% -> %2%", source, target); ++ BOOST_LOG_TRIVIAL(info) << Slic3r::format("copy_directory_recursively %1% -> %2%", source, target); + std::string error_message; + + if (boost::filesystem::exists(target)) +@@ -1530,7 +1531,7 @@ void copy_directory_recursively(const boost::filesystem::path &source, const boo + CopyFileResult cfr = copy_file(source_file, target_file, error_message, false); + if (cfr != CopyFileResult::SUCCESS) { + BOOST_LOG_TRIVIAL(error) << "Copying failed(" << cfr << "): " << error_message; +- throw Slic3r::CriticalException(format( ++ throw Slic3r::CriticalException(Slic3r::format( + ("Copying directory %1% to %2% failed: %3%"), + source, target, error_message)); + } +diff --git a/src/slic3r/GUI/AMSMaterialsSetting.cpp b/src/slic3r/GUI/AMSMaterialsSetting.cpp +index 8e11493b3..ddbf120b2 100644 +--- a/src/slic3r/GUI/AMSMaterialsSetting.cpp ++++ b/src/slic3r/GUI/AMSMaterialsSetting.cpp +@@ -4,6 +4,8 @@ + #include "GUI_App.hpp" + #include "libslic3r/Preset.hpp" + #include "I18N.hpp" ++#include ++#include + #include + #include "CalibUtils.hpp" + +diff --git a/src/slic3r/GUI/AMSMaterialsSetting.hpp b/src/slic3r/GUI/AMSMaterialsSetting.hpp +index 065198863..c66052a07 100644 +--- a/src/slic3r/GUI/AMSMaterialsSetting.hpp ++++ b/src/slic3r/GUI/AMSMaterialsSetting.hpp +@@ -5,6 +5,7 @@ + #include "wxExtensions.hpp" + #include "GUI_Utils.hpp" + #include "DeviceManager.hpp" ++#include "wx/colourdata.h" + #include "wx/clrpicker.h" + #include "Widgets/RadioBox.hpp" + #include "Widgets/Button.hpp" +diff --git a/src/slic3r/GUI/Auxiliary.cpp b/src/slic3r/GUI/Auxiliary.cpp +index 623d39736..c28457ea0 100644 +--- a/src/slic3r/GUI/Auxiliary.cpp ++++ b/src/slic3r/GUI/Auxiliary.cpp +@@ -21,6 +21,8 @@ + #include + #include + ++#include ++ + #include "wxExtensions.hpp" + #include "GUI_App.hpp" + #include "GUI_ObjectList.hpp" +diff --git a/src/slic3r/GUI/AuxiliaryDataViewModel.cpp b/src/slic3r/GUI/AuxiliaryDataViewModel.cpp +index 212566338..50368b854 100644 +--- a/src/slic3r/GUI/AuxiliaryDataViewModel.cpp ++++ b/src/slic3r/GUI/AuxiliaryDataViewModel.cpp +@@ -3,6 +3,11 @@ + #include "libslic3r/Model.hpp" + #include "libslic3r/Format/bbs_3mf.hpp" + ++ ++#include ++ ++#include ++ + const static std::array s_default_folders = { + _L("Model Pictures"), + _L("Bill of Materials"), +diff --git a/src/slic3r/GUI/AuxiliaryDataViewModel.hpp b/src/slic3r/GUI/AuxiliaryDataViewModel.hpp +index 109b74a25..76c046c5e 100644 +--- a/src/slic3r/GUI/AuxiliaryDataViewModel.hpp ++++ b/src/slic3r/GUI/AuxiliaryDataViewModel.hpp +@@ -8,7 +8,7 @@ + + #include "I18N.hpp" + +-#include ++#include + + class AuxiliaryModelNode; + WX_DEFINE_ARRAY_PTR(AuxiliaryModelNode*, AuxiliaryModelNodePtrArray); +diff --git a/src/slic3r/GUI/AuxiliaryDialog.cpp b/src/slic3r/GUI/AuxiliaryDialog.cpp +index 5fadbf7ff..0fce2cc83 100644 +--- a/src/slic3r/GUI/AuxiliaryDialog.cpp ++++ b/src/slic3r/GUI/AuxiliaryDialog.cpp +@@ -4,6 +4,8 @@ + + #include "libslic3r/Utils.hpp" + ++#include ++ + namespace pt = boost::property_tree; + typedef pt::ptree JSON; + +@@ -33,4 +35,4 @@ void AuxiliaryDialog::on_dpi_changed(const wxRect& suggested_rect) + } + + } // namespace GUI +-} // namespace Slic3r +\ No newline at end of file ++} // namespace Slic3r +diff --git a/src/slic3r/GUI/BBLStatusBar.hpp b/src/slic3r/GUI/BBLStatusBar.hpp +index 02a3af3ca..e643a9b53 100644 +--- a/src/slic3r/GUI/BBLStatusBar.hpp ++++ b/src/slic3r/GUI/BBLStatusBar.hpp +@@ -2,6 +2,7 @@ + #define BBLSTATUSBAR_HPP + + #include ++#include + #include + + #include +diff --git a/src/slic3r/GUI/BBLStatusBarSend.cpp b/src/slic3r/GUI/BBLStatusBarSend.cpp +index 35ebd0f1b..3976ae7bb 100644 +--- a/src/slic3r/GUI/BBLStatusBarSend.cpp ++++ b/src/slic3r/GUI/BBLStatusBarSend.cpp +@@ -12,7 +12,7 @@ + #include "I18N.hpp" + + #include +- ++#include + + namespace Slic3r { + +diff --git a/src/slic3r/GUI/BBLTopbar.cpp b/src/slic3r/GUI/BBLTopbar.cpp +index 7e33b8cd8..ee7c380a6 100644 +--- a/src/slic3r/GUI/BBLTopbar.cpp ++++ b/src/slic3r/GUI/BBLTopbar.cpp +@@ -1,6 +1,7 @@ + #include "BBLTopbar.hpp" + #include "wx/artprov.h" + #include "wx/aui/framemanager.h" ++#include "wx/display.h" + #include "I18N.hpp" + #include "GUI_App.hpp" + #include "GUI.hpp" +@@ -10,6 +11,8 @@ + #include "WebViewDialog.hpp" + #include "PartPlate.hpp" + ++#include ++ + #define TOPBAR_ICON_SIZE 18 + #define TOPBAR_TITLE_WIDTH 300 + +diff --git a/src/slic3r/GUI/BindDialog.cpp b/src/slic3r/GUI/BindDialog.cpp +index 3c97fdf3d..df52d84b1 100644 +--- a/src/slic3r/GUI/BindDialog.cpp ++++ b/src/slic3r/GUI/BindDialog.cpp +@@ -5,6 +5,7 @@ + #include + #include + #include "wx/evtloop.h" ++#include + #include + #include + #include +diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp +index 318160f11..d5facd3f3 100644 +--- a/src/slic3r/GUI/BitmapCache.cpp ++++ b/src/slic3r/GUI/BitmapCache.cpp +@@ -5,6 +5,7 @@ + #include "GUI.hpp" + #include "GUI_Utils.hpp" + ++#include + #include + + #ifdef __WXGTK2__ +diff --git a/src/slic3r/GUI/CameraPopup.hpp b/src/slic3r/GUI/CameraPopup.hpp +index a256f317b..8135f41fa 100644 +--- a/src/slic3r/GUI/CameraPopup.hpp ++++ b/src/slic3r/GUI/CameraPopup.hpp +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/slic3r/GUI/CreatePresetsDialog.cpp b/src/slic3r/GUI/CreatePresetsDialog.cpp +index 628af9deb..a5b363568 100644 +--- a/src/slic3r/GUI/CreatePresetsDialog.cpp ++++ b/src/slic3r/GUI/CreatePresetsDialog.cpp +@@ -6,6 +6,8 @@ + #include + #include + #include ++#include ++#include + #include "libslic3r/PresetBundle.hpp" + #include "I18N.hpp" + #include "GUI_App.hpp" +diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp +index 1e142a97c..1c3c5881b 100644 +--- a/src/slic3r/GUI/DeviceManager.hpp ++++ b/src/slic3r/GUI/DeviceManager.hpp +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include "nlohmann/json.hpp" +diff --git a/src/slic3r/GUI/ExtrusionCalibration.cpp b/src/slic3r/GUI/ExtrusionCalibration.cpp +index f4c17b5b7..8d5a939cb 100644 +--- a/src/slic3r/GUI/ExtrusionCalibration.cpp ++++ b/src/slic3r/GUI/ExtrusionCalibration.cpp +@@ -3,6 +3,7 @@ + #include "MsgDialog.hpp" + #include "libslic3r/Preset.hpp" + #include "I18N.hpp" ++#include + #include + + namespace Slic3r { namespace GUI { +diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp +index 96e296322..cec2f1e40 100644 +--- a/src/slic3r/GUI/GCodeViewer.cpp ++++ b/src/slic3r/GUI/GCodeViewer.cpp +@@ -2,6 +2,7 @@ + #include "GCodeViewer.hpp" + + #include "libslic3r/BuildVolume.hpp" ++#include "libslic3r/ClipperUtils.hpp" + #include "libslic3r/Print.hpp" + #include "libslic3r/Geometry.hpp" + #include "libslic3r/Model.hpp" +diff --git a/src/slic3r/GUI/GLTexture.cpp b/src/slic3r/GUI/GLTexture.cpp +index dba352349..fcd9045ce 100644 +--- a/src/slic3r/GUI/GLTexture.cpp ++++ b/src/slic3r/GUI/GLTexture.cpp +@@ -33,6 +33,7 @@ + + #include "libslic3r/Utils.hpp" + #include "GUI_App.hpp" ++#include + #include + namespace Slic3r { + namespace GUI { +diff --git a/src/slic3r/GUI/GLTexture.hpp b/src/slic3r/GUI/GLTexture.hpp +index 9af4f8a87..41068a9fb 100644 +--- a/src/slic3r/GUI/GLTexture.hpp ++++ b/src/slic3r/GUI/GLTexture.hpp +@@ -6,6 +6,9 @@ + #include + #include + ++#include ++#include ++ + class wxImage; + + namespace Slic3r { +diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp +index 42c19513c..41e8a2c30 100644 +--- a/src/slic3r/GUI/GUI_App.cpp ++++ b/src/slic3r/GUI/GUI_App.cpp +@@ -28,6 +28,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp +index bd7868dbd..893874ab3 100644 +--- a/src/slic3r/GUI/GUI_App.hpp ++++ b/src/slic3r/GUI/GUI_App.hpp +@@ -1,6 +1,13 @@ + #ifndef slic3r_GUI_App_hpp_ + #define slic3r_GUI_App_hpp_ + ++#include ++#include ++#include ++#include ++#include ++#include ++ + #include + #include + #include "ImGuiWrapper.hpp" +@@ -17,13 +24,6 @@ + #include "slic3r/GUI/HttpServer.hpp" + #include "../Utils/PrintHost.hpp" + +-#include +-#include +-#include +-#include +-#include +-#include +- + #include + #include + +diff --git a/src/slic3r/GUI/GUI_Colors.hpp b/src/slic3r/GUI/GUI_Colors.hpp +index 0395e997c..4da03360b 100644 +--- a/src/slic3r/GUI/GUI_Colors.hpp ++++ b/src/slic3r/GUI/GUI_Colors.hpp +@@ -3,6 +3,7 @@ + + #include "imgui/imgui.h" + #include "libslic3r/Color.hpp" ++#include + + enum RenderCol_ { + RenderCol_3D_Background = 0, +diff --git a/src/slic3r/GUI/GUI_ObjectTable.cpp b/src/slic3r/GUI/GUI_ObjectTable.cpp +index eda7c15b7..199be2062 100644 +--- a/src/slic3r/GUI/GUI_ObjectTable.cpp ++++ b/src/slic3r/GUI/GUI_ObjectTable.cpp +@@ -1,4 +1,5 @@ + #include "wx/clipbrd.h" ++#include "wx/display.h" + + #include "SelectMachine.hpp" + #include "I18N.hpp" +diff --git a/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp b/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp +index 9e7aa0520..4ed37d5ae 100644 +--- a/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp ++++ b/src/slic3r/GUI/Gizmos/GLGizmoBase.hpp +@@ -15,6 +15,8 @@ + + #include + ++#include ++ + #define ENABLE_FIXED_GRABBER 1 + + class wxWindow; +diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp +index ccf3956f3..0471d0235 100644 +--- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp ++++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp +@@ -15,9 +15,9 @@ + #include "slic3r/GUI/GUI.hpp" + #include "slic3r/Utils/UndoRedo.hpp" + +- + #include + ++#include + + namespace Slic3r::GUI { + +diff --git a/src/slic3r/GUI/Gizmos/GLGizmoText.cpp b/src/slic3r/GUI/Gizmos/GLGizmoText.cpp +index e7793c017..7034b0eb2 100644 +--- a/src/slic3r/GUI/Gizmos/GLGizmoText.cpp ++++ b/src/slic3r/GUI/Gizmos/GLGizmoText.cpp +@@ -6,7 +6,7 @@ + #include "slic3r/GUI/ImGuiWrapper.hpp" + #include "slic3r/GUI/GUI_ObjectList.hpp" + #include "slic3r/GUI/Plater.hpp" +- ++#include "libslic3r/ClipperUtils.hpp" + #include "libslic3r/Geometry/ConvexHull.hpp" + #include "libslic3r/Model.hpp" + +@@ -14,6 +14,8 @@ + + #include + ++#include ++ + #include + + #ifndef IMGUI_DEFINE_MATH_OPERATORS +diff --git a/src/slic3r/GUI/HMS.cpp b/src/slic3r/GUI/HMS.cpp +index 2f9ad630d..3e87d1fd2 100644 +--- a/src/slic3r/GUI/HMS.cpp ++++ b/src/slic3r/GUI/HMS.cpp +@@ -1,5 +1,6 @@ + #include "HMS.hpp" + ++#include + + + namespace Slic3r { +diff --git a/src/slic3r/GUI/HttpServer.hpp b/src/slic3r/GUI/HttpServer.hpp +index 2a6a980ec..c545ab9b2 100644 +--- a/src/slic3r/GUI/HttpServer.hpp ++++ b/src/slic3r/GUI/HttpServer.hpp +@@ -1,6 +1,7 @@ + #ifndef slic3r_Http_App_hpp_ + #define slic3r_Http_App_hpp_ + ++#include + #include + #include + +@@ -12,7 +13,6 @@ + #include + #include + +-using namespace boost; + using namespace boost::system; + using namespace boost::asio; + +@@ -73,21 +73,21 @@ public: + + class session + { +- asio::streambuf buff; ++ boost::asio::streambuf buff; + http_headers headers; + + static void read_body(std::shared_ptr pThis) + { + int nbuffer = 1000; + std::shared_ptr> bufptr = std::make_shared>(nbuffer); +- asio::async_read(pThis->socket, boost::asio::buffer(*bufptr, nbuffer), [pThis](const boost::beast::error_code& e, std::size_t s) ++ boost::asio::async_read(pThis->socket, boost::asio::buffer(*bufptr, nbuffer), [pThis](const boost::beast::error_code& e, std::size_t s) + { + }); + } + + static void read_next_line(std::shared_ptr pThis) + { +- asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) ++ boost::asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) + { + std::string line, ignore; + std::istream stream{ &pThis->buff }; +@@ -100,7 +100,7 @@ class session + if (pThis->headers.content_length() == 0) + { + std::shared_ptr str = std::make_shared(pThis->headers.get_response()); +- asio::async_write(pThis->socket, boost::asio::buffer(str->c_str(), str->length()), [pThis, str](const boost::beast::error_code& e, std::size_t s) ++ boost::asio::async_write(pThis->socket, boost::asio::buffer(str->c_str(), str->length()), [pThis, str](const boost::beast::error_code& e, std::size_t s) + { + std::cout << "done" << std::endl; + }); +@@ -119,7 +119,7 @@ class session + + static void read_first_line(std::shared_ptr pThis) + { +- asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) ++ boost::asio::async_read_until(pThis->socket, pThis->buff, '\r', [pThis](const boost::beast::error_code& e, std::size_t s) + { + std::string line, ignore; + std::istream stream{ &pThis->buff }; +diff --git a/src/slic3r/GUI/IMSlider.hpp b/src/slic3r/GUI/IMSlider.hpp +index 2bf700787..1b700d0d0 100644 +--- a/src/slic3r/GUI/IMSlider.hpp ++++ b/src/slic3r/GUI/IMSlider.hpp +@@ -3,6 +3,7 @@ + + #include "TickCode.hpp" + #include ++#include + + #include + +diff --git a/src/slic3r/GUI/IconManager.cpp b/src/slic3r/GUI/IconManager.cpp +index 896c5203f..f302f6ceb 100644 +--- a/src/slic3r/GUI/IconManager.cpp ++++ b/src/slic3r/GUI/IconManager.cpp +@@ -1,6 +1,9 @@ + #include "IconManager.hpp" + #include ++#include + #include ++#include ++#include + #include "nanosvg/nanosvg.h" + #include "nanosvg/nanosvgrast.h" + #include "libslic3r/Utils.hpp" // ScopeGuard +diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp +index 07ca50990..c188f61cc 100644 +--- a/src/slic3r/GUI/ImGuiWrapper.hpp ++++ b/src/slic3r/GUI/ImGuiWrapper.hpp +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include + +diff --git a/src/slic3r/GUI/ImageGrid.cpp b/src/slic3r/GUI/ImageGrid.cpp +index 2ab6748f4..770d46ec0 100644 +--- a/src/slic3r/GUI/ImageGrid.cpp ++++ b/src/slic3r/GUI/ImageGrid.cpp +@@ -8,6 +8,8 @@ + + #include + ++#include ++ + wxDEFINE_EVENT(EVT_ITEM_ACTION, wxCommandEvent); + + BEGIN_EVENT_TABLE(Slic3r::GUI::ImageGrid, wxPanel) +diff --git a/src/slic3r/GUI/ImageGrid.h b/src/slic3r/GUI/ImageGrid.h +index 34e016c06..4bc17e4b6 100644 +--- a/src/slic3r/GUI/ImageGrid.h ++++ b/src/slic3r/GUI/ImageGrid.h +@@ -9,6 +9,7 @@ + #define ImageGrid_h + + #include ++#include + #include + #include + +diff --git a/src/slic3r/GUI/Jobs/Job.hpp b/src/slic3r/GUI/Jobs/Job.hpp +index 6c251cac3..55c6196c3 100644 +--- a/src/slic3r/GUI/Jobs/Job.hpp ++++ b/src/slic3r/GUI/Jobs/Job.hpp +@@ -9,6 +9,8 @@ + #include + #include + ++#include ++ + #include "libslic3r/libslic3r.h" + #include "ProgressIndicator.hpp" + +diff --git a/src/slic3r/GUI/Jobs/PrintJob.hpp b/src/slic3r/GUI/Jobs/PrintJob.hpp +index e703f86fb..7806a8623 100644 +--- a/src/slic3r/GUI/Jobs/PrintJob.hpp ++++ b/src/slic3r/GUI/Jobs/PrintJob.hpp +@@ -3,6 +3,7 @@ + + #include + #include ++#include "libslic3r/PrintConfig.hpp" + #include "Job.hpp" + + namespace fs = boost::filesystem; +diff --git a/src/slic3r/GUI/Jobs/ProgressIndicator.hpp b/src/slic3r/GUI/Jobs/ProgressIndicator.hpp +index 4aa5757d2..4f7ec5d9f 100644 +--- a/src/slic3r/GUI/Jobs/ProgressIndicator.hpp ++++ b/src/slic3r/GUI/Jobs/ProgressIndicator.hpp +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + namespace Slic3r { + +diff --git a/src/slic3r/GUI/Jobs/SLAImportJob.hpp b/src/slic3r/GUI/Jobs/SLAImportJob.hpp +index bb620c982..627452333 100644 +--- a/src/slic3r/GUI/Jobs/SLAImportJob.hpp ++++ b/src/slic3r/GUI/Jobs/SLAImportJob.hpp +@@ -6,6 +6,7 @@ + #define SLAIMPORTJOB_HPP + + #include "Job.hpp" ++#include "libslic3r/Point.hpp" + + namespace Slic3r { namespace GUI { + +diff --git a/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp b/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp +index 0af597d0f..5a531065f 100644 +--- a/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp ++++ b/src/slic3r/GUI/Jobs/UpgradeNetworkJob.hpp +@@ -1,8 +1,11 @@ + #ifndef __UpgradeNetworkJob_HPP__ + #define __UpgradeNetworkJob_HPP__ + ++#include ++#include + #include + #include "Job.hpp" ++#include + + namespace fs = boost::filesystem; + +diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp +index 3b70614da..1dda42dbe 100644 +--- a/src/slic3r/GUI/MainFrame.cpp ++++ b/src/slic3r/GUI/MainFrame.cpp +@@ -27,6 +27,7 @@ + + #include + #include ++#include + + #include "libslic3r/Print.hpp" + #include "libslic3r/Polygon.hpp" +diff --git a/src/slic3r/GUI/MainFrame.hpp b/src/slic3r/GUI/MainFrame.hpp +index 14f11f1a2..9ef81a8b0 100644 +--- a/src/slic3r/GUI/MainFrame.hpp ++++ b/src/slic3r/GUI/MainFrame.hpp +@@ -26,6 +26,8 @@ + #include "Widgets/SideButton.hpp" + #include "Widgets/SideMenuPopup.hpp" + ++#include ++ + // BBS + #include "BBLTopbar.hpp" + #include "PrinterWebView.hpp" +diff --git a/src/slic3r/GUI/MarkdownTip.cpp b/src/slic3r/GUI/MarkdownTip.cpp +index 63eafd361..7ffeae9e3 100644 +--- a/src/slic3r/GUI/MarkdownTip.cpp ++++ b/src/slic3r/GUI/MarkdownTip.cpp +@@ -7,6 +7,8 @@ + #include "libslic3r/Utils.hpp" + #include "I18N.hpp" + ++#include ++ + namespace fs = boost::filesystem; + + namespace Slic3r { namespace GUI { +diff --git a/src/slic3r/GUI/MediaFilePanel.h b/src/slic3r/GUI/MediaFilePanel.h +index 8b9d84ae4..1ae5df791 100644 +--- a/src/slic3r/GUI/MediaFilePanel.h ++++ b/src/slic3r/GUI/MediaFilePanel.h +@@ -10,7 +10,7 @@ + + #include "GUI_Utils.hpp" + #include "wxExtensions.hpp" +- ++#include + #include + + class Button; +diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp +index 7fb8392f6..b5ab46647 100644 +--- a/src/slic3r/GUI/MediaPlayCtrl.cpp ++++ b/src/slic3r/GUI/MediaPlayCtrl.cpp +@@ -8,6 +8,9 @@ + #include "MsgDialog.hpp" + #include "DownloadProgressDialog.hpp" + ++#include ++#include ++#include + #include + #undef pid_t + #include +@@ -18,6 +21,8 @@ + #include + #endif + ++#include ++ + namespace Slic3r { + namespace GUI { + +diff --git a/src/slic3r/GUI/MonitorPage.hpp b/src/slic3r/GUI/MonitorPage.hpp +index 9cb05eecc..3efaccda3 100644 +--- a/src/slic3r/GUI/MonitorPage.hpp ++++ b/src/slic3r/GUI/MonitorPage.hpp +@@ -2,6 +2,7 @@ + #define slic3r_MonitorPage_hpp_ + + #include ++#include + + namespace Slic3r { + namespace GUI { +diff --git a/src/slic3r/GUI/NetworkTestDialog.cpp b/src/slic3r/GUI/NetworkTestDialog.cpp +index 195c0d55b..69be995e6 100644 +--- a/src/slic3r/GUI/NetworkTestDialog.cpp ++++ b/src/slic3r/GUI/NetworkTestDialog.cpp +@@ -8,7 +8,7 @@ + #include "slic3r/Utils/Http.hpp" + #include "libslic3r/AppConfig.hpp" + #include +- ++#include + + namespace Slic3r { + namespace GUI { +diff --git a/src/slic3r/GUI/Notebook.hpp b/src/slic3r/GUI/Notebook.hpp +index d75898a7c..7e6e94da3 100644 +--- a/src/slic3r/GUI/Notebook.hpp ++++ b/src/slic3r/GUI/Notebook.hpp +@@ -4,6 +4,7 @@ + //#ifdef _WIN32 + + #include ++#include + + class ModeSizer; + class ScalableButton; +diff --git a/src/slic3r/GUI/ObjectDataViewModel.hpp b/src/slic3r/GUI/ObjectDataViewModel.hpp +index 872564519..47ac80d3d 100644 +--- a/src/slic3r/GUI/ObjectDataViewModel.hpp ++++ b/src/slic3r/GUI/ObjectDataViewModel.hpp +@@ -5,6 +5,7 @@ + #ifndef slic3r_GUI_ObjectDataViewModel_hpp_ + #define slic3r_GUI_ObjectDataViewModel_hpp_ + ++#include + #include + #include + #include +diff --git a/src/slic3r/GUI/ParamsPanel.hpp b/src/slic3r/GUI/ParamsPanel.hpp +index 1a20ec7d2..dfd3196f5 100644 +--- a/src/slic3r/GUI/ParamsPanel.hpp ++++ b/src/slic3r/GUI/ParamsPanel.hpp +@@ -20,6 +20,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp +index 940028bd7..fc63dfce3 100644 +--- a/src/slic3r/GUI/PartPlate.cpp ++++ b/src/slic3r/GUI/PartPlate.cpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + + #include "libslic3r/libslic3r.h" +diff --git a/src/slic3r/GUI/PresetComboBoxes.hpp b/src/slic3r/GUI/PresetComboBoxes.hpp +index 4598b3dc3..954c06862 100644 +--- a/src/slic3r/GUI/PresetComboBoxes.hpp ++++ b/src/slic3r/GUI/PresetComboBoxes.hpp +@@ -4,6 +4,7 @@ + //#include + #include + #include ++#include + + #include "libslic3r/Preset.hpp" + #include "wxExtensions.hpp" +diff --git a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp +index aeba24834..886421c65 100644 +--- a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp ++++ b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp +@@ -7,10 +7,14 @@ + #include "../../Utils/NetworkAgent.hpp" + #include "../BitmapCache.hpp" + ++#include ++#include + #include + #include + #include + ++#include ++ + #include "nlohmann/json.hpp" + + #include +diff --git a/src/slic3r/GUI/Printer/PrinterFileSystem.h b/src/slic3r/GUI/Printer/PrinterFileSystem.h +index 2900685f8..237378744 100644 +--- a/src/slic3r/GUI/Printer/PrinterFileSystem.h ++++ b/src/slic3r/GUI/Printer/PrinterFileSystem.h +@@ -4,6 +4,7 @@ + #define BAMBU_DYNAMIC + #include "BambuTunnel.h" + ++#include + #include + + #include
A 3D printer slicer forked from Bambu Studio, PrusaSlicer, and SuperSlicer with many more printer profiles, helpful calibration prints, and many more features to get your 3D printer printing perfectly!