From a4b4ce0ff7e1902d1fd4a4b28ecb96bdb863c790 Mon Sep 17 00:00:00 2001 From: Scott Mudge <19617165+scottmudge@users.noreply.github.com> Date: Fri, 5 May 2023 11:01:10 -0400 Subject: [PATCH] Dependency Update: add support for Visual Studio 2022, update Boost to 1.78, improve wxWidgets patch (#911) * Changed wxWidgets to use forked version with patch applied to 3.1.5, rather than patching at build. Updated boost to 1.78 for VS2022 support, and fixed boost compat issue. * Boost update to 1.78 only for Windows, fixed wxWidgets re-patching issue for Windows, corrected wxWidgets webview nuget hash. --------- Co-authored-by: SoftFever --- deps/Boost/Boost.cmake | 13 +++++++++---- deps/wxWidgets/0001-wxWidget-fix.patch | 5 ++++- deps/wxWidgets/wxWidgets.cmake | 6 +++--- src/libslic3r/Format/bbs_3mf.cpp | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/deps/Boost/Boost.cmake b/deps/Boost/Boost.cmake index d65c483dfe..61a1f4a8e2 100644 --- a/deps/Boost/Boost.cmake +++ b/deps/Boost/Boost.cmake @@ -1,9 +1,14 @@ include(ExternalProject) +# Use boost 1.78 for Windows, to support VS2022 if (WIN32) + set(_boost_url "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz") + set(_boost_hash 94CED8B72956591C4775AE2207A9763D3600B30D9D7446562C552F0A14A63BE7) set(_bootstrap_cmd bootstrap.bat) set(_build_cmd b2.exe) else() + set(_boost_url "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz") + set(_boost_hash AEB26F80E80945E82EE93E5939BAEBDCA47B9DEE80A07D3144BE1E1A6A66DD6A) set(_bootstrap_cmd ./bootstrap.sh) set(_build_cmd ./b2) endif() @@ -147,8 +152,8 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE OR BUILD_SHARED_LIBS) message(STATUS "Standard boost build with install command '${_install_cmd}'") ExternalProject_Add( dep_Boost - URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz" - URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a + URL ${_boost_url} + URL_HASH SHA256=${_boost_hash} DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost CONFIGURE_COMMAND "${_bootstrap_cmd}" PATCH_COMMAND ${_patch_command} @@ -161,8 +166,8 @@ else() ExternalProject_Add( dep_Boost - URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz" - URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a + URL ${_boost_url} + URL_HASH SHA256=${_boost_hash} DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost CONFIGURE_COMMAND ./bootstrap.sh --with-toolset=clang diff --git a/deps/wxWidgets/0001-wxWidget-fix.patch b/deps/wxWidgets/0001-wxWidget-fix.patch index e60f46402d..1104d5d147 100644 --- a/deps/wxWidgets/0001-wxWidget-fix.patch +++ b/deps/wxWidgets/0001-wxWidget-fix.patch @@ -25,7 +25,10 @@ index cc3298ff33..8adbeaea4f 100644 - set(WEBVIEW2_VERSION "1.0.705.50") + set(WEBVIEW2_VERSION "1.0.1418.22") set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}") - set(WEBVIEW2_SHA256 "6a34bb553e18cfac7297b4031f3eac2558e439f8d16a45945c22945ac404105d") +- set(WEBVIEW2_SHA256 "6a34bb553e18cfac7297b4031f3eac2558e439f8d16a45945c22945ac404105d") ++ set(WEBVIEW2_SHA256 "51d2ef56196e2a9d768a6843385bcb9c6baf9ed34b2603ddb074fb4995543a99") + + set(WEBVIEW2_DEFAULT_PACKAGE_DIR "${CMAKE_BINARY_DIR}/packages/Microsoft.Web.WebView2.${WEBVIEW2_VERSION}") diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h index 09ad8c8ef3..3c0c2d8f7e 100644 diff --git a/deps/wxWidgets/wxWidgets.cmake b/deps/wxWidgets/wxWidgets.cmake index 27cd47bdab..7af0d602c1 100644 --- a/deps/wxWidgets/wxWidgets.cmake +++ b/deps/wxWidgets/wxWidgets.cmake @@ -17,7 +17,7 @@ else () endif () if (MSVC) - set(_patch_cmd ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch) + set(_patch_cmd if not exist WXWIDGETS_PATCHED ( "${GIT_EXECUTABLE}" apply --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch && type nul > WXWIDGETS_PATCHED ) ) else () set(_patch_cmd test -f WXWIDGETS_PATCHED || ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch && touch WXWIDGETS_PATCHED) endif () @@ -26,8 +26,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux") set(_patch_cmd ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch) endif () - -bambustudio_add_cmake_project(wxWidgets +bambustudio_add_cmake_project( + wxWidgets GIT_REPOSITORY "https://github.com/wxWidgets/wxWidgets" GIT_TAG ${_wx_git_tag} PATCH_COMMAND ${_patch_cmd} diff --git a/src/libslic3r/Format/bbs_3mf.cpp b/src/libslic3r/Format/bbs_3mf.cpp index c2e114471d..c2a826100a 100644 --- a/src/libslic3r/Format/bbs_3mf.cpp +++ b/src/libslic3r/Format/bbs_3mf.cpp @@ -5694,7 +5694,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) int i = 0; for (auto & path : targets) { for (auto & type : types) - stream << " \n"; + stream << " \n"; } } stream << "";