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 <softfeverever@gmail.com>
This commit is contained in:
Scott Mudge 2023-05-05 11:01:10 -04:00 committed by GitHub
parent f6741a933f
commit a4b4ce0ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 9 deletions

View File

@ -1,9 +1,14 @@
include(ExternalProject) include(ExternalProject)
# Use boost 1.78 for Windows, to support VS2022
if (WIN32) 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(_bootstrap_cmd bootstrap.bat)
set(_build_cmd b2.exe) set(_build_cmd b2.exe)
else() 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(_bootstrap_cmd ./bootstrap.sh)
set(_build_cmd ./b2) set(_build_cmd ./b2)
endif() 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}'") message(STATUS "Standard boost build with install command '${_install_cmd}'")
ExternalProject_Add( ExternalProject_Add(
dep_Boost dep_Boost
URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz" URL ${_boost_url}
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a URL_HASH SHA256=${_boost_hash}
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
CONFIGURE_COMMAND "${_bootstrap_cmd}" CONFIGURE_COMMAND "${_bootstrap_cmd}"
PATCH_COMMAND ${_patch_command} PATCH_COMMAND ${_patch_command}
@ -161,8 +166,8 @@ else()
ExternalProject_Add( ExternalProject_Add(
dep_Boost dep_Boost
URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz" URL ${_boost_url}
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a URL_HASH SHA256=${_boost_hash}
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
CONFIGURE_COMMAND ./bootstrap.sh CONFIGURE_COMMAND ./bootstrap.sh
--with-toolset=clang --with-toolset=clang

View File

@ -25,7 +25,10 @@ index cc3298ff33..8adbeaea4f 100644
- set(WEBVIEW2_VERSION "1.0.705.50") - set(WEBVIEW2_VERSION "1.0.705.50")
+ set(WEBVIEW2_VERSION "1.0.1418.22") + set(WEBVIEW2_VERSION "1.0.1418.22")
set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}") 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 diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h
index 09ad8c8ef3..3c0c2d8f7e 100644 index 09ad8c8ef3..3c0c2d8f7e 100644

View File

@ -17,7 +17,7 @@ else ()
endif () endif ()
if (MSVC) 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 () else ()
set(_patch_cmd test -f WXWIDGETS_PATCHED || ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch && touch WXWIDGETS_PATCHED) set(_patch_cmd test -f WXWIDGETS_PATCHED || ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch && touch WXWIDGETS_PATCHED)
endif () endif ()
@ -26,8 +26,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_patch_cmd ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch) set(_patch_cmd ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wxWidget-fix.patch)
endif () endif ()
bambustudio_add_cmake_project(
bambustudio_add_cmake_project(wxWidgets wxWidgets
GIT_REPOSITORY "https://github.com/wxWidgets/wxWidgets" GIT_REPOSITORY "https://github.com/wxWidgets/wxWidgets"
GIT_TAG ${_wx_git_tag} GIT_TAG ${_wx_git_tag}
PATCH_COMMAND ${_patch_cmd} PATCH_COMMAND ${_patch_cmd}

View File

@ -5694,7 +5694,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
int i = 0; int i = 0;
for (auto & path : targets) { for (auto & path : targets) {
for (auto & type : types) for (auto & type : types)
stream << " <Relationship Target=\"/" << xml_escape(path) << "\" Id=\"rel-" << boost::to_string(++i) << "\" Type=\"" << type << "\"/>\n"; stream << " <Relationship Target=\"/" << xml_escape(path) << "\" Id=\"rel-" << std::to_string(++i) << "\" Type=\"" << type << "\"/>\n";
} }
} }
stream << "</Relationships>"; stream << "</Relationships>";