diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index ba649d7263a..3bc96179738 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -61,13 +61,14 @@ jobs: mkdir ${{ github.workspace }}/deps/build mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep .\build_release_vs2022.bat deps + .\build_release_vs2022.bat pack cd ${{ github.workspace }}/deps/build - name: Build on Mac x86_64 if: matrix.os == 'macos-12' && matrix.arch == 'x86_64' working-directory: ${{ github.workspace }} run: | - brew install cmake git gettext + brew install cmake git gettext automake mkdir -p ${{ github.workspace }}/deps/build_x86_64 mkdir -p ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep_x86_64 ./build_release_macos.sh -dp -a x86_64 @@ -76,7 +77,7 @@ jobs: if: matrix.os == 'macos-12' && matrix.arch == 'arm64' working-directory: ${{ github.workspace }} run: | - brew install cmake git gettext + brew install cmake git gettext automake mkdir -p ${{ github.workspace }}/deps/build_arm64 mkdir -p ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep_arm64 ./build_release_macos.sh -dp -a arm64 @@ -96,6 +97,8 @@ jobs: sudo ./BuildLinux.sh -ur sudo chown $USER -R ./ ./BuildLinux.sh -dr + cd deps/build + tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir - name: Upload Mac arm64 artifacts if: matrix.os == 'macos-12' && matrix.arch == 'arm64' @@ -116,12 +119,12 @@ jobs: uses: actions/upload-artifact@v3 with: name: OrcaSlicer_dep_win64_${{ env.date }} - path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep + path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip - name: Upload Ubuntu artifacts if: matrix.os == 'ubuntu-20.04' uses: actions/upload-artifact@v3 with: name: OrcaSlicer_dep_ubuntu_${{ env.date }} - path: ${{ github.workspace }}/deps/build/destdir + path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz \ No newline at end of file diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index e6722e50e20..b6b939d81bc 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -32,7 +32,7 @@ jobs: matrix: include: - os: ubuntu-20.04 - - os: windows-2019 + - os: windows-latest - os: macos-12 arch: x86_64 - os: macos-12 @@ -44,7 +44,7 @@ jobs: uses: actions/checkout@v3 - name: Get the version and date on Ubuntu and macOS - if: matrix.os != 'windows-2019' + if: matrix.os != 'windows-latest' id: get-version-unix run: | ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2) @@ -53,7 +53,7 @@ jobs: shell: bash - name: Get the version and date on Windows - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' id: get-version-windows run: | echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 @@ -70,7 +70,7 @@ jobs: - name: Install tools mac if: matrix.os == 'macos-12' run: | - brew install cmake git gettext zstd + brew install cmake git gettext zstd tree mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}} mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}} @@ -93,11 +93,11 @@ jobs: if: matrix.os == 'macos-12' working-directory: ${{ github.workspace }} run: | - curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08.2/OrcaSlicer_dep_mac_${{matrix.arch}}_06-08-2023.tar.gz - tar -zxfOrcaSlicer_dep_mac_${{matrix.arch}}_06-08-2023.tar.gz -C ${{ github.workspace }}/deps/build_${{matrix.arch}} - chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}} - ls -l ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}} - rm OrcaSlicer_dep_mac_${{matrix.arch}}_06-08-2023.tar.gz + curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz + tar -zvxf ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz -C ${{ github.workspace }}/deps/build_${{matrix.arch}} + chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_${{matrix.arch}} + tree ${{ github.workspace }}/deps/build_${{matrix.arch}} + rm ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz - name: Build slicer mac @@ -149,34 +149,34 @@ jobs: # Windows - name: setup MSVC - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' uses: microsoft/setup-msbuild@v1.1 - name: Install nsis - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' run: | choco install nsis - name: download deps - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' shell: powershell - run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/SoftFever/FileSharing/releases/download/4/OrcaSlicer_dep_18Jul2023.zip", "$env:temp\OrcaSlicer_dep_18Jul2023.zip")' + run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_win64_20230810_vs2022.zip", "$env:temp\OrcaSlicer_dep_win64_20230810_vs2022.zip")' - name: maker dir - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' working-directory: ${{ github.workspace }} run: | mkdir ${{ github.workspace }}/deps/build mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep - name: extract deps - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' working-directory: ${{ github.workspace }}/deps/build shell: cmd - run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_18Jul2023.zip' + run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_win64_20230810_vs2022.zip' # - name: build deps - # if: matrix.os == 'windows-2019' + # if: matrix.os == 'windows-latest' # id: cache_deps # uses: actions/cache@v3 # env: @@ -194,31 +194,31 @@ jobs: # - run: Get-ChildItem ${{ github.workspace }}/deps/build/ -Exclude OrcaSlicer_dep | Remove-Item -Recurse -Force - name: Build slicer Win - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' working-directory: ${{ github.workspace }} - run: .\build_release.bat slicer + run: .\build_release_vs2022.bat slicer - name: Create installer Win - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' working-directory: ${{ github.workspace }}/build run: | cpack -G NSIS # - name: pack app - # if: matrix.os == 'windows-2019' + # if: matrix.os == 'windows-latest' # working-directory: ${{ github.workspace }}/build # shell: cmd # run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_dev_build.zip ${{ github.workspace }}/build/OrcaSlicer' - name: Upload artifacts Win zip - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: name: OrcaSlicer_Windows_V${{ env.ver }}_portable path: ${{ github.workspace }}/build/OrcaSlicer - name: Upload artifacts Win installer - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v3 with: name: OrcaSlicer_Windows_V${{ env.ver }} @@ -265,11 +265,11 @@ jobs: run: | mkdir -p ${{ github.workspace }}/deps/build mkdir -p ${{ github.workspace }}/deps/build/destdir - curl -LJO https://github.com/SoftFever/FileSharing/releases/download/2023.08/OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz - tar -zxf OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz -C ${{ github.workspace }}/deps/build + curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_ubuntu_20231008.zip + unzip ./OrcaSlicer_dep_ubuntu_20231008.zip -d ${{ github.workspace }}/deps/build/destdir chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build/destdir ls -l ${{ github.workspace }}/deps/build/destdir - rm OrcaSlicer_dep_ubuntu_02-08-2023.tar.gz + rm OrcaSlicer_dep_ubuntu_20231008.zip - name: Build slicer diff --git a/build_release_macos.sh b/build_release_macos.sh index b6c278c44c7..a9defeaf24a 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -62,7 +62,7 @@ then cmake --build . --config Release --target deps if [ "1." == "$PACK_DEPS". ]; then - tar -zcvf OrcaSlicer_dep_mac_${ARCH}_$(date +"%d-%m-%Y").tar.gz OrcaSlicer_dep_$ARCH + tar -zcvf OrcaSlicer_dep_mac_${ARCH}_$(date +"%Y%m%d").tar.gz OrcaSlicer_dep_$ARCH fi fi diff --git a/build_release_vs2022.bat b/build_release_vs2022.bat index c335a290f46..a2711771217 100644 --- a/build_release_vs2022.bat +++ b/build_release_vs2022.bat @@ -1,12 +1,30 @@ +@REM OcarSlicer build script for Windows +@echo off set WP=%CD% + +@REM Pack deps +if "%1"=="pack" ( + setlocal ENABLEDELAYEDEXPANSION + cd %WP%/deps/build + for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set build_date=%%c%%b%%a + echo packing deps: OrcaSlicer_dep_win64_!build_date!_vs2022.zip + + %WP%/tools/7z.exe a OrcaSlicer_dep_win64_!build_date!_vs2022.zip OrcaSlicer_dep + exit /b 0 +) + +setlocal DISABLEDELAYEDEXPANSION cd deps mkdir build cd build set DEPS=%CD%/OrcaSlicer_dep + if "%1"=="slicer" ( GOTO :slicer ) echo "building deps.." + + cmake ../ -G "Visual Studio 17 2022" -A x64 -DDESTDIR="%CD%/OrcaSlicer_dep" -DCMAKE_BUILD_TYPE=Release cmake --build . --config Release --target deps -- -m @@ -18,9 +36,10 @@ cd %WP% mkdir build cd build -cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release +echo cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release +cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.22000.0" cmake --build . --config Release --target ALL_BUILD -- -m cd .. call run_gettext.bat cd build -cmake --build . --target install --config Release \ No newline at end of file +cmake --build . --target install --config Release diff --git a/deps/CURL/CURL.cmake b/deps/CURL/CURL.cmake index 92cfbb892a2..9846c7c9c6f 100644 --- a/deps/CURL/CURL.cmake +++ b/deps/CURL/CURL.cmake @@ -25,7 +25,8 @@ set(_curl_platform_flags ) if (WIN32) - set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON) + #set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON) + set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_OPENSSL=ON -DCURL_CA_PATH:STRING=none) elseif (APPLE) set(_curl_platform_flags @@ -71,9 +72,9 @@ orcaslicer_add_cmake_project(CURL ${_curl_platform_flags} ) -if (APPLE OR (CMAKE_SYSTEM_NAME STREQUAL "Linux")) +# if (APPLE OR (CMAKE_SYSTEM_NAME STREQUAL "Linux")) add_dependencies(dep_CURL dep_OpenSSL) -endif () +# endif () if (MSVC) add_debug_dep(dep_CURL) diff --git a/deps/OpenSSL/OpenSSL.cmake b/deps/OpenSSL/OpenSSL.cmake index b42b1a808d2..7eb28af1a73 100644 --- a/deps/OpenSSL/OpenSSL.cmake +++ b/deps/OpenSSL/OpenSSL.cmake @@ -40,10 +40,10 @@ endif() ExternalProject_Add(dep_OpenSSL #EXCLUDE_FROM_ALL ON - #URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_1k.tar.gz" - URL "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.1.2.tar.gz" - #URL_HASH SHA256=b92f9d3d12043c02860e5e602e50a73ed21a69947bcc74d391f41148e9f6aa95 - URL_HASH SHA256=8c776993154652d0bb393f506d850b811517c8bd8d24b1008aef57fbe55d3f31 + URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz" + URL_HASH SHA256=2130E8C2FB3B79D1086186F78E59E8BC8D1A6AEDF17AB3907F4CB9AE20918C41 + # URL "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.1.2.tar.gz" + # URL_HASH SHA256=8c776993154652d0bb393f506d850b811517c8bd8d24b1008aef57fbe55d3f31 DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenSSL CONFIGURE_COMMAND ${_conf_cmd} ${_cross_arch} "--openssldir=${DESTDIR}/usr/local" diff --git a/tools/7z.exe b/tools/7z.exe new file mode 100644 index 00000000000..a739ca0fde8 Binary files /dev/null and b/tools/7z.exe differ