mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 22:39:03 +08:00
Patched wxWidgets to be compilable on OSX 14.4+
This commit is contained in:
parent
2b01d14f7b
commit
2b8dc48b6d
15
deps/+wxWidgets/webview.patch
vendored
15
deps/+wxWidgets/webview.patch
vendored
@ -1,15 +0,0 @@
|
|||||||
diff -ur build.orig/cmake/lib/webview/CMakeLists.txt build/cmake/lib/webview/CMakeLists.txt
|
|
||||||
--- wxWidgets.orig/build/cmake/lib/webview/CMakeLists.txt 2024-06-14 19:02:36.000000000 +0200
|
|
||||||
+++ wxWidgets/build/cmake/lib/webview/CMakeLists.txt 2024-07-01 16:21:52.922737200 +0200
|
|
||||||
@@ -46,9 +46,9 @@
|
|
||||||
elseif(WXMSW)
|
|
||||||
if(wxUSE_WEBVIEW_EDGE)
|
|
||||||
# Update the following variables if updating WebView2 SDK
|
|
||||||
- set(WEBVIEW2_VERSION "1.0.705.50")
|
|
||||||
+ set(WEBVIEW2_VERSION "1.0.2592.51")
|
|
||||||
set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}")
|
|
||||||
- set(WEBVIEW2_SHA256 "6a34bb553e18cfac7297b4031f3eac2558e439f8d16a45945c22945ac404105d")
|
|
||||||
+ set(WEBVIEW2_SHA256 "805c79e05184fab18c9fe7b8ba820c598399b97adc1fbf5b0ea490efad91d5b8")
|
|
||||||
|
|
||||||
set(WEBVIEW2_DEFAULT_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages/Microsoft.Web.WebView2.${WEBVIEW2_VERSION}")
|
|
||||||
|
|
45
deps/+wxWidgets/wx-fixes.patch
vendored
Normal file
45
deps/+wxWidgets/wx-fixes.patch
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
diff --color -urN wxWidgets-323a465e577e03f330e2e6a4c78e564d125340cb/build/cmake/lib/webview/CMakeLists.txt dep_wxWidgets/build/cmake/lib/webview/CMakeLists.txt
|
||||||
|
--- wxWidgets-323a465e577e03f330e2e6a4c78e564d125340cb/src/osx/carbon/dcscreen.cpp 2024-06-26 10:39:50.000000000 +0200
|
||||||
|
+++ dep_wxWidgets/src/osx/carbon/dcscreen.cpp 2025-01-08 14:13:51.980634573 +0100
|
||||||
|
@@ -14,6 +14,7 @@
|
||||||
|
#include "wx/osx/dcscreen.h"
|
||||||
|
|
||||||
|
#include "wx/osx/private.h"
|
||||||
|
+#include "wx/osx/private/available.h"
|
||||||
|
#include "wx/graphics.h"
|
||||||
|
|
||||||
|
wxIMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl);
|
||||||
|
@@ -68,15 +69,26 @@
|
||||||
|
if ( subrect )
|
||||||
|
srcRect = CGRectOffset( srcRect, -subrect->x, -subrect->y ) ;
|
||||||
|
|
||||||
|
- CGImageRef image = NULL;
|
||||||
|
-
|
||||||
|
- image = CGDisplayCreateImage(kCGDirectMainDisplay);
|
||||||
|
+ CGImageRef image = nullptr;
|
||||||
|
|
||||||
|
- wxASSERT_MSG(image, wxT("wxScreenDC::GetAsBitmap - unable to get screenshot."));
|
||||||
|
-
|
||||||
|
- CGContextDrawImage(context, srcRect, image);
|
||||||
|
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000
|
||||||
|
+ if ( WX_IS_MACOS_AVAILABLE(14, 4) ) // errors on lower versions of macOS 14
|
||||||
|
+ {
|
||||||
|
+ // TODO add ScreenKit implementation
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+#endif // macOS 10.14+
|
||||||
|
+ {
|
||||||
|
+#if __MAC_OS_X_VERSION_MAX_ALLOWED < 150000
|
||||||
|
+ image = CGDisplayCreateImage(kCGDirectMainDisplay);
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- CGImageRelease(image);
|
||||||
|
+ if ( image != nullptr )
|
||||||
|
+ {
|
||||||
|
+ CGContextDrawImage(context, srcRect, image);
|
||||||
|
+ CGImageRelease(image);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
CGContextRestoreGState(context);
|
||||||
|
#else
|
2
deps/+wxWidgets/wxWidgets.cmake
vendored
2
deps/+wxWidgets/wxWidgets.cmake
vendored
@ -30,7 +30,7 @@ endif ()
|
|||||||
add_cmake_project(wxWidgets
|
add_cmake_project(wxWidgets
|
||||||
URL https://github.com/prusa3d/wxWidgets/archive/5462e7d7cfac645926188443e842171e107b312c.zip
|
URL https://github.com/prusa3d/wxWidgets/archive/5462e7d7cfac645926188443e842171e107b312c.zip
|
||||||
URL_HASH SHA256=3EBB971DDB45CEEA6D9B965C3D0266F44EDAE71F2A7DAA5D48DB34BD95AA878B
|
URL_HASH SHA256=3EBB971DDB45CEEA6D9B965C3D0266F44EDAE71F2A7DAA5D48DB34BD95AA878B
|
||||||
PATCH_COMMAND COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/webview.patch
|
PATCH_COMMAND COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/wx-fixes.patch
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
"-DCMAKE_DEBUG_POSTFIX:STRING="
|
"-DCMAKE_DEBUG_POSTFIX:STRING="
|
||||||
-DwxBUILD_PRECOMP=ON
|
-DwxBUILD_PRECOMP=ON
|
||||||
|
Loading…
x
Reference in New Issue
Block a user