From efc778ad5701f5712c80185e222c821d000b562e Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 1 Aug 2024 16:31:54 +0200 Subject: [PATCH] test linux and macos build --- .github/workflows/ccpp_mac.yml | 2 +- .github/workflows/ccpp_mac_arm.yml | 2 +- .github/workflows/ccpp_mac_arm_debug.yml | 2 +- .github/workflows/ccpp_mac_arm_rc.yml | 2 +- .github/workflows/ccpp_mac_debug.yml | 2 +- .github/workflows/ccpp_mac_rc.yml | 2 +- .github/workflows/ccpp_ubuntu.yml | 10 +- .github/workflows/ccpp_ubuntu_debug.yml | 13 +- .github/workflows/ccpp_ubuntu_gtk3.yml | 13 +- .github/workflows/ccpp_ubuntu_gtk3_debug.yml | 13 +- .github/workflows/ccpp_ubuntu_gtk3_rc.yml | 13 +- .github/workflows/ccpp_ubuntu_rc.yml | 13 +- BuildLinux.sh | 76 ++++-- BuildMacOS.sh | 232 ++++++++++++------- deps/CMakeLists.txt | 4 + resources/profiles | 1 + src/ArcWelderLib | 1 - src/libslic3r/Config.hpp | 5 +- src/libslic3r/GCode/GCodeFormatter.cpp | 1 + src/slic3r/GUI/DesktopIntegrationDialog.cpp | 4 +- src/slic3r/GUI/FreeCADDialog.cpp | 4 +- src/slic3r/GUI/GUI_Tags.cpp | 6 +- src/slic3r/Utils/MPMDv2.cpp | 1 + 23 files changed, 241 insertions(+), 181 deletions(-) create mode 160000 resources/profiles delete mode 160000 src/ArcWelderLib diff --git a/.github/workflows/ccpp_mac.yml b/.github/workflows/ccpp_mac.yml index 886f4807753..c64632c4b81 100644 --- a/.github/workflows/ccpp_mac.yml +++ b/.github/workflows/ccpp_mac.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: build deps & slicer - run: ./BuildMacOS.sh -i + run: ./BuildMacOS.sh -dsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_mac_arm.yml b/.github/workflows/ccpp_mac_arm.yml index 090671cc17d..788b8badc8d 100644 --- a/.github/workflows/ccpp_mac_arm.yml +++ b/.github/workflows/ccpp_mac_arm.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: build deps & slicer - run: ./BuildMacOS.sh -ia + run: ./BuildMacOS.sh -adsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_mac_arm_debug.yml b/.github/workflows/ccpp_mac_arm_debug.yml index 10b4e1ce387..566d75f5d32 100644 --- a/.github/workflows/ccpp_mac_arm_debug.yml +++ b/.github/workflows/ccpp_mac_arm_debug.yml @@ -15,7 +15,7 @@ jobs: with: ref: 'debug_macos' - name: build deps & slicer - run: ./BuildMacOS.sh -bia + run: ./BuildMacOS.sh -badsi - name: ls build working-directory: ./build run: ls diff --git a/.github/workflows/ccpp_mac_arm_rc.yml b/.github/workflows/ccpp_mac_arm_rc.yml index 0fbba7b9c21..cf49d68462d 100644 --- a/.github/workflows/ccpp_mac_arm_rc.yml +++ b/.github/workflows/ccpp_mac_arm_rc.yml @@ -15,7 +15,7 @@ jobs: with: ref: 'rc' - name: build deps & slicer - run: ./BuildMacOS.sh -ia + run: ./BuildMacOS.sh -adsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_mac_debug.yml b/.github/workflows/ccpp_mac_debug.yml index 99d39410010..2974d2aaa4c 100644 --- a/.github/workflows/ccpp_mac_debug.yml +++ b/.github/workflows/ccpp_mac_debug.yml @@ -15,7 +15,7 @@ jobs: with: ref: 'debug_macos' - name: build deps & slicer - run: ./BuildMacOS.sh -bi + run: ./BuildMacOS.sh -bdsi - name: tar the pack working-directory: ./build run: ls diff --git a/.github/workflows/ccpp_mac_rc.yml b/.github/workflows/ccpp_mac_rc.yml index b988f28aeb2..72dcba569a2 100644 --- a/.github/workflows/ccpp_mac_rc.yml +++ b/.github/workflows/ccpp_mac_rc.yml @@ -15,7 +15,7 @@ jobs: with: ref: 'rc' - name: build deps & slicer - run: ./BuildMacOS.sh -i + run: ./BuildMacOS.sh -dsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_ubuntu.yml b/.github/workflows/ccpp_ubuntu.yml index 363cdba227c..05ac71690a8 100644 --- a/.github/workflows/ccpp_ubuntu.yml +++ b/.github/workflows/ccpp_ubuntu.yml @@ -30,14 +30,8 @@ jobs: run: sudo apt update - name: install gtk2 glew run: sudo apt install libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev gettext - - name: build deps & slicer - run: ./BuildLinux.sh -dgs - - name: make .pot - working-directory: ./build - run: make gettext_make_pot - - name: build tar & appimage - working-directory: ./build - run: src/BuildLinuxImage.sh -i + - name: build deps & slicer, tar & appimage + run: ./BuildLinux.sh -dgsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_ubuntu_debug.yml b/.github/workflows/ccpp_ubuntu_debug.yml index 824b34b4af4..b9ec63b3fc4 100644 --- a/.github/workflows/ccpp_ubuntu_debug.yml +++ b/.github/workflows/ccpp_ubuntu_debug.yml @@ -18,9 +18,6 @@ jobs: uses: jwlawson/actions-setup-cmake@v1.13 with: cmake-version: '3.16.x' - - name: update submodule profiles - working-directory: ./resources/profiles - run: git submodule update --init - name: change date in version run: sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc - name: update clock @@ -29,14 +26,8 @@ jobs: run: sudo apt update - name: install gtk2 glew run: sudo apt install libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev libssl-dev libcurl4-openssl-dev gettext - - name: build deps & slicer - run: ./BuildLinux.sh -bdgs - - name: make .pot - working-directory: ./build - run: make gettext_make_pot - - name: build tar & appimage - working-directory: ./build - run: src/BuildLinuxImage.sh -i + - name: build deps & slicer, tar & appimage + run: ./BuildLinux.sh -bdgsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_ubuntu_gtk3.yml b/.github/workflows/ccpp_ubuntu_gtk3.yml index 6bcf54eb255..b342931fbff 100644 --- a/.github/workflows/ccpp_ubuntu_gtk3.yml +++ b/.github/workflows/ccpp_ubuntu_gtk3.yml @@ -19,9 +19,6 @@ jobs: uses: jwlawson/actions-setup-cmake@v1.13 with: cmake-version: '3.16.x' - - name: update submodule profiles - working-directory: ./resources/profiles - run: git submodule update --init - name: change date in version run: sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc - name: update clock @@ -30,14 +27,8 @@ jobs: run: sudo apt update - name: install gtk3 glew run: sudo apt install libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev gettext - - name: build deps & slicer - run: ./BuildLinux.sh -ds - - name: make .pot - working-directory: ./build - run: make gettext_make_pot - - name: build tar & appimage - working-directory: ./build - run: src/BuildLinuxImage.sh -i + - name: build deps & slicer, tar & appimage + run: ./BuildLinux.sh -dsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_ubuntu_gtk3_debug.yml b/.github/workflows/ccpp_ubuntu_gtk3_debug.yml index c8c4d69bd55..07510d67c2f 100644 --- a/.github/workflows/ccpp_ubuntu_gtk3_debug.yml +++ b/.github/workflows/ccpp_ubuntu_gtk3_debug.yml @@ -18,9 +18,6 @@ jobs: uses: jwlawson/actions-setup-cmake@v1.13 with: cmake-version: '3.16.x' - - name: update submodule profiles - working-directory: ./resources/profiles - run: git submodule update --init - name: change date in version run: sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc - name: update clock @@ -29,14 +26,8 @@ jobs: run: sudo apt update - name: install gtk3 glew run: sudo apt install libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev libssl-dev libcurl4-openssl-dev gettext - - name: build deps & slicer - run: ./BuildLinux.sh -bds - - name: make .pot - working-directory: ./build - run: make gettext_make_pot - - name: build tar & appimage - working-directory: ./build - run: src/BuildLinuxImage.sh -i + - name: build deps & slicer, tar & appimage + run: ./BuildLinux.sh -bdsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_ubuntu_gtk3_rc.yml b/.github/workflows/ccpp_ubuntu_gtk3_rc.yml index 70c07c82277..2c312d3e8b2 100644 --- a/.github/workflows/ccpp_ubuntu_gtk3_rc.yml +++ b/.github/workflows/ccpp_ubuntu_gtk3_rc.yml @@ -20,9 +20,6 @@ jobs: uses: jwlawson/actions-setup-cmake@v1.13 with: cmake-version: '3.16.x' - - name: update submodule profiles - working-directory: ./resources/profiles - run: git submodule update --init - name: change date in version run: sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc - name: update clock @@ -31,14 +28,8 @@ jobs: run: sudo apt update - name: install gtk3 glew run: sudo apt install libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev gettext - - name: build deps & slicer - run: ./BuildLinux.sh -ds - - name: make .pot - working-directory: ./build - run: make gettext_make_pot - - name: build tar & appimage - working-directory: ./build - run: src/BuildLinuxImage.sh -i + - name: build deps & slicer, tar & appimage + run: ./BuildLinux.sh -dsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/.github/workflows/ccpp_ubuntu_rc.yml b/.github/workflows/ccpp_ubuntu_rc.yml index a8412e7a131..db1c2128c83 100644 --- a/.github/workflows/ccpp_ubuntu_rc.yml +++ b/.github/workflows/ccpp_ubuntu_rc.yml @@ -18,9 +18,6 @@ jobs: uses: jwlawson/actions-setup-cmake@v1.13 with: cmake-version: '3.16.x' - - name: update submodule profiles - working-directory: ./resources/profiles - run: git submodule update --init - name: change date in version run: sed -i "s/+UNKNOWN//" version.inc - name: update clock @@ -29,14 +26,8 @@ jobs: run: sudo apt update - name: install gtk2 glew run: sudo apt install libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev gettext - - name: build deps & slicer - run: ./BuildLinux.sh -dgs - - name: make .pot - working-directory: ./build - run: make gettext_make_pot - - name: build tar & appimage - working-directory: ./build - run: src/BuildLinuxImage.sh -i + - name: build deps & slicer, tar & appimage + run: ./BuildLinux.sh -dgsi - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/BuildLinux.sh b/BuildLinux.sh index 4a97d81e988..06a926a0a37 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -1,12 +1,12 @@ #!/bin/bash export ROOT=`pwd` -export NCORES=`nproc --all` +export NCORES=`nproc` FOUND_GTK2=$(dpkg -l libgtk* | grep gtk2) FOUND_GTK3=$(dpkg -l libgtk* | grep gtk-3) unset name -while getopts ":dsiuhgb" opt; do +while getopts ":hwdrigbsyu" opt; do case ${opt} in u ) UPDATE_LIB="1" @@ -20,18 +20,31 @@ while getopts ":dsiuhgb" opt; do s ) BUILD_SLIC3R="1" ;; + t) + BUILD_TESTS="1" + ;; b ) BUILD_DEBUG="1" ;; g ) FOUND_GTK3="" ;; - h ) echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]" + w ) + BUILD_WIPE="1" + ;; + r ) + BUILD_CLEANDEPEND="1" + ;; + h ) echo "Usage: ./BuildLinux.sh [-h][-w][-d][-r][-i][-g][-b][-s][-t][-u]" + echo " -h: this message" + echo " -w: wipe build directories before building" + echo " -d: build deps (optional)" + echo " -r: clean dependencies building files (reduce disk usage)" echo " -i: Generate appimage (optional)" echo " -g: force gtk2 build" - echo " -b: build in debug mode" - echo " -d: build deps (optional)" - echo " -s: build slic3r (optional)" + echo " -b: build with debug symbols" + echo " -s: build Slic3r/SuperSlicer" + echo " -t: build tests (in combination with -s)" echo " -u: only update clock & dependency packets (optional and need sudo)" echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" echo " and then './BuildLinux.sh -dsi'" @@ -42,12 +55,16 @@ done if [ $OPTIND -eq 1 ] then - echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]" + echo "Usage: ./BuildLinux.sh [-h][-w][-d][-r][-i][-g][-b][-s][-t][-u]" + echo " -h: this message" + echo " -w: wipe build directories before building" + echo " -d: build deps (optional)" + echo " -r: clean dependencies building files (reduce disk usage)" echo " -i: Generate appimage (optional)" echo " -g: force gtk2 build" - echo " -b: build in debug mode" - echo " -d: build deps (optional)" - echo " -s: build slic3r (optional)" + echo " -b: build with debug symbols" + echo " -s: build Slic3r/SuperSlicer" + echo " -t: build tests (in combination with -s)" echo " -u: only update clock & dependency packets (optional and need sudo)" echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" echo " and then './BuildLinux.sh -dsi'" @@ -135,6 +152,17 @@ fi if [[ -n "$BUILD_DEPS" ]] then + if [[ -n $BUILD_WIPE ]] + then + echo -e "\n wiping deps/build directory ...\n" + rm -fr deps/build + echo -e " ... done\n" + fi + # mkdir in deps + if [ ! -d "deps/build" ] + then + mkdir deps/build + fi echo "[3/9] Configuring dependencies..." BUILD_ARGS="" if [[ -n "$FOUND_GTK3_DEV" ]] @@ -167,20 +195,28 @@ then pushd destdir/usr/local/lib if [[ -z "$FOUND_GTK3_DEV" ]] then - cp libwxscintilla-3.1.a libwx_gtk2u_scintilla-3.1.a + cp libwxscintilla-3.2.a libwx_gtk2u_scintilla-3.2.a else - cp libwxscintilla-3.1.a libwx_gtk3u_scintilla-3.1.a + cp libwxscintilla-3.2.a libwx_gtk3u_scintilla-3.2.a fi popd echo "done" - # clean deps - echo "[6/9] Cleaning dependencies..." - rm -rf dep_* popd echo "done" fi +# clean deps +if [[ -n "$BUILD_CLEANDEPEND" ]] +then + echo -e "[6/9] Cleaning dependencies...\n" + pushd deps/build + pwd + rm -fr dep_* + popd > /dev/null + echo -e "\n ... done\n" +fi + if [[ -n "$BUILD_SLIC3R" ]] then echo "[7/9] Configuring Slic3r..." @@ -193,6 +229,12 @@ then then BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug" fi + if [[ -n "$BUILD_TESTS" ]] + then + BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TESTS=1" + else + BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TESTS=0" + fi # cmake pushd build @@ -211,7 +253,9 @@ then # make OCCTWrapper.so make OCCTWrapper - + + # update the pot + make gettext_make_pot popd echo "done" fi diff --git a/BuildMacOS.sh b/BuildMacOS.sh index d6d1fd086fd..e6fc7426bf7 100755 --- a/BuildMacOS.sh +++ b/BuildMacOS.sh @@ -12,34 +12,74 @@ then exit -1 fi -while getopts ":iaxbhc" opt; do +while getopts ":idaxbhcstwr" opt; do case ${opt} in i ) - export BUILD_IMAGE="1" + BUILD_IMAGE="1" + ;; + d ) + BUILD_DEPS="1" ;; a ) - export BUILD_ARCH="arm64" + BUILD_ARCH="arm64" + BUILD_IMG="-a" ;; x ) - export BUILD_ARCH="x86_64" + BUILD_ARCH="x86_64" + BUILD_IMG="-x" ;; b ) - export BUILD_DEBUG="1" + BUILD_DEBUG="1" + ;; + s ) + BUILD_SLIC3R="1" + ;; + t) + BUILD_TESTS="1" ;; c) - export BUILD_XCODE="1" + BUILD_XCODE="1" + ;; + w ) + BUILD_WIPE="1" ;; - h ) echo "Usage: ./BuildMacOS.sh [-i]" - echo " -i: Generate DMG image (optional)" - echo " -a: Build for arm64 (Apple Silicon)" - echo " -x: Build for x86_64 (Intel)" - echo " -b: Build with debug symbols" - echo " -c: Build for XCode" + r ) + BUILD_CLEANDEPEND="1" + ;; + h ) echo "Usage: ./BuildMacOS.sh [-h][-w][-d][-r][-a][-x][-b][-c][-s][-t][-i]" + echo " -h: this message" + echo " -w: wipe build directories before building" + echo " -d: build dependencies" + echo " -r: clean dependencies building files (reduce disk usage)" + echo " -a: build for arm64 (Apple Silicon)" + echo " -x: build for x86_64 (Intel)" + echo " -b: build with debug symbols" + echo " -c: build for XCode" + echo " -s: build Slic3r/SuperSlicer" + echo " -t: build tests (in combination with -s)" + echo " -i: generate DMG image (optional)\n" exit 0 ;; esac done +if [ $OPTIND -eq 1 ] +then + echo "Usage: ./BuildLinux.sh [-h][-w][-d][-r][-a][-x][-b][-c][-s][-t][-i]" + echo " -h: this message" + echo " -w: wipe build directories before building" + echo " -d: build dependencies" + echo " -r: clean dependencies building files (reduce disk usage)" + echo " -a: build for arm64 (Apple Silicon)" + echo " -x: build for x86_64 (Intel)" + echo " -b: build with debug symbols" + echo " -c: build for XCode" + echo " -s: build Slic3r/SuperSlicer" + echo " -t: build tests (in combination with -s)" + echo -e " -i: Generate DMG image (optional)\n" + exit 0 +fi + echo "Build architecture: ${BUILD_ARCH}" echo "\n/Applications:\n" @@ -63,12 +103,6 @@ export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/ # export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix libiconv)/lib/ #fi -# mkdir build -if [ ! -d "build" ] -then - mkdir build -fi - echo -n "[1/9] Updating submodules..." { # update submodule profiles @@ -86,14 +120,20 @@ echo -n "[2/9] Changing date in version..." } #&> $ROOT/build/Build.log # Capture all command output echo "done" -# mkdir in deps -if [ ! -d "deps/build" ] +if [[ -n "$BUILD_DEPS" ]] then - mkdir deps/build -fi - -echo -n "[3/9] Configuring dependencies..." -{ + if [[ -n $BUILD_WIPE ]] + then + echo -e "\n wiping deps/build directory ...\n" + rm -fr deps/build + echo -e " ... done\n" + fi + # mkdir in deps + if [ ! -d "deps/build" ] + then + mkdir deps/build + fi + echo -e " \n[3/9] Configuring dependencies ... \n" BUILD_ARGS="" if [[ -n "$BUILD_ARCH" ]] then @@ -105,53 +145,56 @@ echo -n "[3/9] Configuring dependencies..." fi # cmake deps echo "Cmake command: cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=\"10.14\" ${BUILD_ARCH} " - pushd deps/build - cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" $BUILD_ARGS - echo "ls deps/build:" - ls -al - echo "ls deps/build/dep_GLEW-prefix" - ls -al dep_GLEW-prefix -} #&> $ROOT/build/Build.log # Capture all command output -echo "done" + pushd deps/build > /dev/null + cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" $BUILD_ARGS + + echo -e "\n ... done\n" + + echo -e "[4/9] Building dependencies ...\n" -echo -n "[4/9] Building dependencies..." -{ # make deps make -j$NCORES - echo "ls $PWD/destdir/usr/local/lib" - ls $PWD/destdir/usr/local/lib - - echo "ls $PWD/destdir/usr/local/lib/cmake" - ls $PWD/destdir/usr/local/lib/cmake - - echo "ls $PWD/destdir/usr/local/lib/cmake/boost_locale-1.75.0" - ls $PWD/destdir/usr/local/lib/cmake/boost_locale-1.75.0 + echo -e "\n ... done\n" -} #&> $ROOT/build/Build.log # Capture all command output -echo "done" + echo -e "[5/9] Renaming wxscintilla library ...\n" -echo -n "[5/9] Renaming wxscintilla library..." -{ # rename wxscintilla - pushd destdir/usr/local/lib - cp libwxscintilla-3.1.a libwx_osx_cocoau_scintilla-3.1.a - echo "ls deps/build/destdir/usr/local/lib" - ls -al - popd -} #&> $ROOT/build/Build.log # Capture all command output -echo "done" + pushd destdir/usr/local/lib > /dev/null + cp libwxscintilla-3.2.a libwx_osx_cocoau_scintilla-3.2.a -echo -n "[6/9] Cleaning dependencies..." -{ - # clean deps - rm -rf dep_* - popd -} #&> $ROOT/build/Build.log # Capture all command output -echo "done" + popd > /dev/null + popd > /dev/null + echo -e "\n ... done\n" +fi + +if [[ -n "$BUILD_CLEANDEPEND" ]] +then + echo -e "[6/9] Cleaning dependencies...\n" + pushd deps/build + pwd + rm -fr dep_* + popd > /dev/null + echo -e "\n ... done\n" +fi + +if [[ -n "$BUILD_SLIC3R" ]] +then + echo -e "[5/9] Configuring Slicer ...\n" + + if [[ -n $BUILD_WIPE ]] + then + echo -e "\n wiping build directory...\n" + rm -fr build + echo -e " ... done\n" + fi + + # mkdir build + if [ ! -d "build" ] + then + mkdir build + fi -echo -n "[7/9] Configuring Slic3r..." -{ BUILD_ARGS="" if [[ -n "$BUILD_ARCH" ]] then @@ -165,38 +208,55 @@ echo -n "[7/9] Configuring Slic3r..." then BUILD_ARGS="-GXcode ${BUILD_ARGS}" fi + + if [[ -n "$BUILD_TESTS" ]] + then + BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TESTS=1" + else + BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TESTS=0" + fi + # cmake - pushd build - echo "Slic3r Cmake command: cmake .. -DCMAKE_PREFIX_PATH=\"$PWD/../deps/build/destdir/usr/local\" -DCMAKE_OSX_DEPLOYMENT_TARGET=\"10.14\" -DSLIC3R_STATIC=1 ${BUILD_ARGS}" + pushd build > /dev/null cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" -DSLIC3R_STATIC=1 ${BUILD_ARGS} -} #&> $ROOT/build/Build.log # Capture all command output -echo "done" + echo -e "\n ... done" -echo -n "[8/9] Building Slic3r..." -{ # make Slic3r if [[ -z "$BUILD_XCODE" ]] then - make -j$NCORES Slic3r + echo -e "\n[6/9] Building Slicer ...\n" + make -j1 + echo -e "\n ... done" fi - # make .mo + echo -e "\n[7/9] Generating language files ...\n" + #make .mo make gettext_po_to_mo -} #&> $ROOT/build/Build.log # Capture all command output -echo "done" -echo "ls ROOT" -ls $ROOT -echo "ls ROOT/build" -ls $ROOT/build -echo "ls -al ROOT/build/src" -ls -al $ROOT/build/src -# Give proper permissions to script -chmod 755 $ROOT/build/src/BuildMacOSImage.sh + + popd > /dev/null + echo -e "\n ... done" + + # Give proper permissions to script + chmod 755 $ROOT/build/src/BuildMacOSImage.sh + + pushd build > /dev/null + $ROOT/build/src/BuildMacOSImage.sh -p $BUILD_IMG + popd > /dev/null + + echo "ls ROOT" + ls $ROOT + echo "ls ROOT/build" + ls $ROOT/build + echo "ls -al ROOT/build/src" + ls -al $ROOT/build/src +fi if [[ -n "$BUILD_IMAGE" ]] then - $ROOT/build/src/BuildMacOSImage.sh -i -else - $ROOT/build/src/BuildMacOSImage.sh + # Give proper permissions to script + chmod 755 $ROOT/build/src/BuildMacOSImage.sh + pushd build > /dev/null + $ROOT/build/src/BuildMacOSImage.sh -i $BUILD_IMG + popd > /dev/null fi -echo "ls -al ROOT/build" -ls -al $ROOT/build + + diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index cbab10aadd2..ee480b9d6cf 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -45,6 +45,10 @@ endif () # Slightly controversial set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/modules) +if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.21) + cmake_policy(SET CMP0127 NEW) +endif () + if (MSVC) option(DEP_DEBUG "Build in debug version of packages automatically" ON) endif () diff --git a/resources/profiles b/resources/profiles new file mode 160000 index 00000000000..ca25c7ec55d --- /dev/null +++ b/resources/profiles @@ -0,0 +1 @@ +Subproject commit ca25c7ec55dcc6073da61e39692c321cdb6497dc diff --git a/src/ArcWelderLib b/src/ArcWelderLib deleted file mode 160000 index fe18f18b4c0..00000000000 --- a/src/ArcWelderLib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fe18f18b4c005a2c4e4b69a5866d0d065bde82aa diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp index 0b19d33425d..7f1bf5f97c0 100644 --- a/src/libslic3r/Config.hpp +++ b/src/libslic3r/Config.hpp @@ -662,11 +662,12 @@ class ConfigOptionSingle : public ConfigOption { bool operator==(const ConfigOption &rhs) const override { - if (rhs.type() != this->type()) + if (rhs.type() != this->type()) { throw ConfigurationError("ConfigOptionSingle: Comparing incompatible types"); + } assert(dynamic_cast*>(&rhs)); return (this->value == static_cast*>(&rhs)->value - || this->is_nil() && rhs.is_nil()) + || (this->is_nil() && rhs.is_nil())) && this->is_enabled() == rhs.is_enabled() && this->is_phony() == rhs.is_phony(); // should compare all flags? diff --git a/src/libslic3r/GCode/GCodeFormatter.cpp b/src/libslic3r/GCode/GCodeFormatter.cpp index 1a89297e9be..f550bd73657 100644 --- a/src/libslic3r/GCode/GCodeFormatter.cpp +++ b/src/libslic3r/GCode/GCodeFormatter.cpp @@ -5,6 +5,7 @@ ///|/ #include "GCodeFormatter.hpp" +#include namespace Slic3r { diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp index dac7ff6b8b7..557c993d081 100644 --- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp +++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp @@ -507,7 +507,7 @@ void DesktopIntegrationDialog::perform_downloader_desktop_integration() resolve_path_from_var("XDG_DATA_HOME", target_candidates); resolve_path_from_var("XDG_DATA_DIRS", target_candidates); - AppConfig* app_config = wxGetApp().app_config; + AppConfig* app_config = wxGetApp().app_config.get(); // suffix string to create different desktop file for alpha, beta. std::string version_suffix; @@ -620,7 +620,7 @@ void DesktopIntegrationDialog::perform_downloader_desktop_integration() } void DesktopIntegrationDialog::undo_downloader_registration() { - const AppConfig *app_config = wxGetApp().app_config; + const AppConfig *app_config = wxGetApp().app_config.get(); std::string path = std::string(app_config->get("desktop_integration_URL_path")); if (!path.empty()) { BOOST_LOG_TRIVIAL(debug) << "removing " << path; diff --git a/src/slic3r/GUI/FreeCADDialog.cpp b/src/slic3r/GUI/FreeCADDialog.cpp index 17f1f2e7f1f..822bc4e2d9a 100644 --- a/src/slic3r/GUI/FreeCADDialog.cpp +++ b/src/slic3r/GUI/FreeCADDialog.cpp @@ -8,9 +8,9 @@ #include "GUI.hpp" #include "GUI_Utils.hpp" #include "GUI_ObjectList.hpp" -#include "../Utils/Http.hpp" -#include "Plater.hpp" #include "slic3r/Utils/Http.hpp" +#include "slic3r/Utils/MacDarkMode.hpp" +#include "Plater.hpp" #include "Tab.hpp" #include "MainFrame.hpp" diff --git a/src/slic3r/GUI/GUI_Tags.cpp b/src/slic3r/GUI/GUI_Tags.cpp index 9004d1305e7..3eb91340701 100644 --- a/src/slic3r/GUI/GUI_Tags.cpp +++ b/src/slic3r/GUI/GUI_Tags.cpp @@ -12,7 +12,6 @@ #include "libslic3r/Config.hpp" #include "BitmapCache.hpp" -#include "format.hpp" #include "GUI.hpp" #include "GUI_App.hpp" #include "GUI_ObjectList.hpp" @@ -22,6 +21,7 @@ #include "Plater.hpp" #include "../Utils/MacDarkMode.hpp" #include "BitmapComboBox.hpp" +#include "format.hpp" namespace Slic3r{ namespace GUI{ @@ -82,8 +82,8 @@ ModeButton::ModeButton(wxWindow *parent, const std::string &mode_name, int px_cn void ModeButton::Init(const wxString &mode) { - m_tt_focused = format_wxstr(_L("Switch to the %s mode"), mode); - m_tt_selected = format_wxstr(_L("Current mode is %s"), mode); + m_tt_focused = Slic3r::GUI::format_wxstr(_L("Switch to the %s mode"), mode); + m_tt_selected = Slic3r::GUI::format_wxstr(_L("Current mode is %s"), mode); SetBitmapMargins(3, 0); diff --git a/src/slic3r/Utils/MPMDv2.cpp b/src/slic3r/Utils/MPMDv2.cpp index 896062a5a62..e4f726e88d3 100644 --- a/src/slic3r/Utils/MPMDv2.cpp +++ b/src/slic3r/Utils/MPMDv2.cpp @@ -18,6 +18,7 @@ #include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/GUI.hpp" +#include "slic3r/GUI/format.hpp" #include "Http.hpp"