From d49875f34f119fac570c4ce35742ec14101087ae Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 4 Jul 2020 20:47:20 +0200 Subject: [PATCH 01/20] SDK 10.11 minimum --- src/html/htmlctrl/webkit/webkit.mm | 12 +++--------- src/osx/cocoa/dataview.mm | 4 +--- src/osx/cocoa/window.mm | 5 ++--- src/osx/core/colour.cpp | 2 -- src/osx/webview_webkit.mm | 12 +++--------- 5 files changed, 9 insertions(+), 26 deletions(-) diff --git a/src/html/htmlctrl/webkit/webkit.mm b/src/html/htmlctrl/webkit/webkit.mm index ef8f8a3797..1052900d6e 100644 --- a/src/html/htmlctrl/webkit/webkit.mm +++ b/src/html/htmlctrl/webkit/webkit.mm @@ -30,12 +30,6 @@ #define DEBUG_WEBKIT_SIZING 0 -#if defined(MAC_OS_X_VERSION_10_11) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto > -#else - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) -#endif - extern WXDLLEXPORT_DATA(const char) wxWebKitCtrlNameStr[] = "webkitctrl"; // ---------------------------------------------------------------------------- @@ -114,7 +108,7 @@ inline int wxNavTypeFromWebNavType(int type){ return wxWEBKIT_NAV_OTHER; } -@interface MyFrameLoadMonitor : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate) +@interface MyFrameLoadMonitor : NSObject { wxWebKitCtrl* webKitWindow; } @@ -123,7 +117,7 @@ inline int wxNavTypeFromWebNavType(int type){ @end -@interface MyPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate) +@interface MyPolicyDelegate : NSObject { wxWebKitCtrl* webKitWindow; } @@ -132,7 +126,7 @@ inline int wxNavTypeFromWebNavType(int type){ @end -@interface MyUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate) +@interface MyUIDelegate : NSObject { wxWebKitCtrl* webKitWindow; } diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index b093ca6a6d..c7577e2305 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -3035,14 +3035,12 @@ bool wxDataViewTextRenderer::MacRender() [par setLineBreakMode:[cell lineBreakMode]]; // Tightening looks very ugly when combined with non-tightened rows, // so disabled it on OS X version where it's used: -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 if ( WX_IS_MACOS_AVAILABLE(10, 11) ) { [par setAllowsDefaultTighteningForTruncation:NO]; } else -#endif - [par setTighteningFactorForTruncation:0.0]; + [par setTighteningFactorForTruncation:0.0]; [str addAttribute:NSParagraphStyleAttributeName value:par diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 739fead0b8..7bb550b800 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -2828,11 +2828,10 @@ bool wxWidgetCocoaImpl::ShowWithEffect(bool show, return ShowViewOrWindowWithEffect(m_wxPeer, show, effect, timeout); } -// To avoid warnings about incompatible pointer types with OS X 10.11 SDK (and -// maybe even earlier? This has changed at some time between 10.9 and 10.11), +// To avoid warnings about incompatible pointer types with OS X 10.11 SDK // we need to constrain the comparison function arguments instead of just using // "id". -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 && __has_feature(objc_kindof) +#if __has_feature(objc_kindof) typedef __kindof NSView* KindOfView; #else typedef id KindOfView; diff --git a/src/osx/core/colour.cpp b/src/osx/core/colour.cpp index 9430d914d3..17d80c629f 100644 --- a/src/osx/core/colour.cpp +++ b/src/osx/core/colour.cpp @@ -118,7 +118,6 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col) } else if (model != kCGColorSpaceModelRGB) { -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 if ( WX_IS_MACOS_AVAILABLE(10, 11) ) { rgbacol = CGColorCreateCopyByMatchingToColorSpace(wxMacGetGenericRGBColorSpace(), kCGRenderingIntentDefault, col, NULL); @@ -126,7 +125,6 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col) components = CGColorGetComponents(rgbacol); } else -#endif { isRGB = false; } diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index c5bf2bcc16..77bfc3dc9e 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -44,12 +44,6 @@ #define DEBUG_WEBKIT_SIZING 0 -#if defined(MAC_OS_X_VERSION_10_11) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto > -#else - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) -#endif - // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- @@ -59,7 +53,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView); wxBEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl) wxEND_EVENT_TABLE() -@interface WebViewLoadDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate) +@interface WebViewLoadDelegate : NSObject { wxWebViewWebKit* webKitWindow; } @@ -68,7 +62,7 @@ wxEND_EVENT_TABLE() @end -@interface WebViewPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate) +@interface WebViewPolicyDelegate : NSObject { wxWebViewWebKit* webKitWindow; } @@ -77,7 +71,7 @@ wxEND_EVENT_TABLE() @end -@interface WebViewUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate) +@interface WebViewUIDelegate : NSObject { wxWebViewWebKit* webKitWindow; } From 89761300c844d45a59ee47de300dfe77f89c3a68 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 4 Jul 2020 21:03:41 +0200 Subject: [PATCH 02/20] always available with 10.11 SDK --- src/osx/cocoa/window.mm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 7bb550b800..1ed6cf0ade 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -2828,14 +2828,7 @@ bool wxWidgetCocoaImpl::ShowWithEffect(bool show, return ShowViewOrWindowWithEffect(m_wxPeer, show, effect, timeout); } -// To avoid warnings about incompatible pointer types with OS X 10.11 SDK -// we need to constrain the comparison function arguments instead of just using -// "id". -#if __has_feature(objc_kindof) typedef __kindof NSView* KindOfView; -#else -typedef id KindOfView; -#endif class CocoaWindowCompareContext { From 6cab9052b85e292b62fb6d5d9363e4e0f53723ea Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 4 Jul 2020 21:28:13 +0200 Subject: [PATCH 03/20] updating docs for min system --- docs/changes.txt | 7 +++---- docs/doxygen/mainpages/introduction.h | 4 ++-- docs/doxygen/mainpages/platdetails.h | 2 +- docs/readme.txt | 2 +- interface/wx/app.h | 3 +-- interface/wx/fswatcher.h | 2 +- interface/wx/settings.h | 2 +- interface/wx/toplevel.h | 5 ++--- 8 files changed, 12 insertions(+), 15 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 6bdb254eb6..9f33fbbb49 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -152,9 +152,8 @@ Changes in behaviour which may result in build errors wxArrayString. Please update your code to use the appropriate setter Set[Char]{In,Ex}cludes(), instead of mutating the internal data directly. -- Under macOS, 10.9 SDK is used by default now. 10.7 SDK is still supported, - but must be explicitly selected (and libstdc++ must be installed in order - to use it). +- Under macOS, 10.11 SDK is the minimum SDK, building and deploying under 10.10.5 and + higher is supported, you must at least use Xcode 7.2.1. - wxPGProperty ctors are not longer public since this class is intended to be a base class and should not be instantiated directly. @@ -802,7 +801,7 @@ wxMSW: wxOSX/Cocoa: - Make wxiOS (iPhone) port build and minimally work again (Tobias Taschner). -- Use more efficient FSEvents (10.7+) in wxFileSystemWatcher (Roberto Perpuly). +- Use more efficient FSEvents in wxFileSystemWatcher (Roberto Perpuly). - Implement wxWindow::Disable() for non-native controls too (Steve Browne). - Implement wxTopLevelWindow::EnableCloseButton() (John Roberts). - Fix wxEVT_CHAR for non-BMP Unicode characters (ARATA Mizuki). diff --git a/docs/doxygen/mainpages/introduction.h b/docs/doxygen/mainpages/introduction.h index 33baadfd54..c08329f8a4 100644 --- a/docs/doxygen/mainpages/introduction.h +++ b/docs/doxygen/mainpages/introduction.h @@ -91,10 +91,10 @@ NetBSD, Solaris, AIX, ...) and require GTK+ 2.6 or later or GTK+ 3.x. The primary supported compiler is GNU g++. @li wxOSX/Cocoa: This is the native port for Apple computers. wxOSX/Cocoa -supports 32 or 64 bit Intel Macs running OS X 10.7 or later. The port can be +supports 32 or 64 bit Intel Macs running OS X 10.10 or later. The port can be built either with g++ or clang. -Other platforms (e.g. iOS - with a minimum requirement of iOS 9), compilers (Borland C++ +Other platforms (e.g. iOS - with a minimum requirement of iOS 13), compilers (Borland C++ under Windows, Sun CC, HP-UX aCC, IBM xlC or SGI mipsPro under Unix) and ports ( wxQT, wxGTK1, wxX11, wxDFB...) are also supported but to a lesser extent. Please see the @subpage page_port "platform details page" for more information. diff --git a/docs/doxygen/mainpages/platdetails.h b/docs/doxygen/mainpages/platdetails.h index da82f68be6..5b3501234a 100644 --- a/docs/doxygen/mainpages/platdetails.h +++ b/docs/doxygen/mainpages/platdetails.h @@ -53,7 +53,7 @@ starting with 3.1.4. Use @c configure option @c \--with-gtk=2 to use GTK 2. @section page_port_wxosx wxOSX/Cocoa wxOSX/Cocoa is the port of wxWidgets for the OS X platform. It requires -OS X 10.7 or later and fully supports 64 bit builds. +OS X 10.10 or later, Xcode 7.2.1 or greater, and fully supports 64 bit builds. @subpage plat_osx_install "Build and Install Instructions" diff --git a/docs/readme.txt b/docs/readme.txt index 0b0c5a7a12..d8a4f08685 100644 --- a/docs/readme.txt +++ b/docs/readme.txt @@ -97,7 +97,7 @@ This version of wxWidgets supports the following primary platforms: * Windows XP, Vista, 7, 8 and 10 (32/64 bits). * Most Unix variants using the GTK+ toolkit (version 2.6 or newer) -* OS X (10.7 or newer) using Cocoa (32/64 bits) +* OS X (10.10 or newer) using Cocoa (32/64 bits) There is some support for the following platforms: diff --git a/interface/wx/app.h b/interface/wx/app.h index 7e965c4b3f..ebb7c1bb58 100644 --- a/interface/wx/app.h +++ b/interface/wx/app.h @@ -755,8 +755,7 @@ public: std::locale::global(std::locale("")); @endcode but be warned that locale support in C++ standard library can be poor - or worse under some platforms, e.g. the above line results in an - immediate crash under OS X up to the version 10.8.2. + or worse under some platforms. @since 2.9.5 */ diff --git a/interface/wx/fswatcher.h b/interface/wx/fswatcher.h index c911c1c23c..648b5cc1e2 100644 --- a/interface/wx/fswatcher.h +++ b/interface/wx/fswatcher.h @@ -85,7 +85,7 @@ public: Additionally a file mask can be specified to include only files matching that particular mask. - This method is implemented efficiently on MSW and OS X >= 10.7, but + This method is implemented efficiently on MSW and OS X, but should be used with care on other platforms for directories with lots of children (e.g. the root directory) as it calls Add() for each subdirectory, potentially creating a lot of watches and taking a long diff --git a/interface/wx/settings.h b/interface/wx/settings.h index 38784d15a1..1a692d274b 100644 --- a/interface/wx/settings.h +++ b/interface/wx/settings.h @@ -274,7 +274,7 @@ public: /** Return the name if available or empty string otherwise. - This is currently only implemented for macOS 10.9 or later and returns + This is currently only implemented for macOS and returns a not necessarily user-readable string such as "NSAppearanceNameAqua" there and an empty string under all the other platforms. */ diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h index a24ea8dbc7..e6d8c5be44 100644 --- a/interface/wx/toplevel.h +++ b/interface/wx/toplevel.h @@ -646,9 +646,8 @@ public: under another OS. @note Having the button is also required to let ShowFullScreen() - make use of the full screen API available since OS X 10.7: a full - screen window gets its own space and entering and exiting the mode - is animated. + make use of the full screen API: a full screen window gets its own space + and entering and exiting the mode is animated. If the button is not present the old way of switching to full screen is used. From 21edba705dfdbf4f928f1fb4d38122ace6c0062e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 4 Jul 2020 22:45:02 +0200 Subject: [PATCH 04/20] updating xcode --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50e8e80fcd..e863481d1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,10 +32,10 @@ matrix: env: wxGTK_VERSION=3 wxTOOLSET=cmake wxCMAKE_GENERATOR="Unix Makefiles" name: wxGTK 3 CMake Ubuntu 18.04 - os: osx - osx_image: xcode6.4 + osx_image: xcode7.3 compiler: clang env: wxCONFIGURE_FLAGS="--enable-cxx11" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxSKIP_SAMPLES=1 - name: wxOSX Xcode 6.4 + name: wxOSX Xcode 7.3 - os: osx osx_image: xcode9.4 compiler: clang From 0f3bc091091cab6e683fa3736447caeeb4ef0c83 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 5 Jul 2020 08:37:14 +0200 Subject: [PATCH 05/20] lower systems are not supported anymore, cleanup --- src/ribbon/art_aui.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/ribbon/art_aui.cpp b/src/ribbon/art_aui.cpp index 97d3750ec1..d2eca5a256 100644 --- a/src/ribbon/art_aui.cpp +++ b/src/ribbon/art_aui.cpp @@ -244,11 +244,10 @@ void wxRibbonAUIArtProvider::SetColourScheme( m_tab_ctrl_background_colour = LikePrimary(0.9); #ifdef __WXMAC__ - if ( wxPlatformInfo::Get().CheckOSVersion(10, 10 ) ) - m_tab_ctrl_background_gradient_colour = m_tab_ctrl_background_colour; - else -#endif + m_tab_ctrl_background_gradient_colour = m_tab_ctrl_background_colour; +#else m_tab_ctrl_background_gradient_colour = LikePrimary(1.7); +#endif m_tab_border_pen = LikePrimary(0.75); #ifdef __WXMAC__ m_tab_label_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT); @@ -259,19 +258,17 @@ void wxRibbonAUIArtProvider::SetColourScheme( m_tab_hover_label_colour = m_tab_label_colour; m_tab_hover_background_top_colour = primary_hsl.ToRGB(); #ifdef __WXMAC__ - if ( wxPlatformInfo::Get().CheckOSVersion(10, 10 ) ) - m_tab_hover_background_top_gradient_colour = m_tab_hover_background_top_colour; - else -#endif + m_tab_hover_background_top_gradient_colour = m_tab_hover_background_top_colour; +#else m_tab_hover_background_top_gradient_colour = LikePrimary(1.6); +#endif m_tab_hover_background_brush = m_tab_hover_background_top_colour; m_tab_active_background_colour = m_tab_ctrl_background_gradient_colour; #ifdef __WXMAC__ - if ( wxPlatformInfo::Get().CheckOSVersion(10, 10 ) ) - m_tab_active_background_gradient_colour = m_tab_active_background_colour; - else -#endif + m_tab_active_background_gradient_colour = m_tab_active_background_colour; +#else m_tab_active_background_gradient_colour = primary_hsl.ToRGB(); +#endif m_tab_active_top_background_brush = m_tab_active_background_colour; m_panel_label_colour = m_tab_label_colour; m_panel_minimised_label_colour = m_panel_label_colour; From 3e5b21e9829e89910579a406b2d81b0a64bcdbf9 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 5 Jul 2020 08:38:15 +0200 Subject: [PATCH 06/20] cleanup, make clause symmetric --- src/osx/cocoa/dataview.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index c7577e2305..257cafb949 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -3036,9 +3036,7 @@ bool wxDataViewTextRenderer::MacRender() // Tightening looks very ugly when combined with non-tightened rows, // so disabled it on OS X version where it's used: if ( WX_IS_MACOS_AVAILABLE(10, 11) ) - { [par setAllowsDefaultTighteningForTruncation:NO]; - } else [par setTighteningFactorForTruncation:0.0]; From dedefa65c1c1c2fabc25998b2ba0d2eb7240e508 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 5 Jul 2020 15:54:27 +0200 Subject: [PATCH 07/20] applying CMake patch from @MaartenBent --- CMakeLists.txt | 2 +- build/cmake/functions.cmake | 8 -------- build/cmake/init.cmake | 5 ----- build/cmake/setup.cmake | 6 +----- 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c671fb1c0b..c63a2361ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ endif() if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET) # If no deployment target has been set default to the minimum supported # OS X version (this has to be set before the first project() call) - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9 CACHE STRING "OS X Deployment Target") + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "OS X Deployment Target") endif() include(build/cmake/policies.cmake NO_POLICY_SCOPE) diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake index 741358f633..c33dd3946c 100644 --- a/build/cmake/functions.cmake +++ b/build/cmake/functions.cmake @@ -77,14 +77,6 @@ endmacro() function(wx_set_common_target_properties target_name) cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN}) - if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND wxHAS_CXX11) - if(CMAKE_GENERATOR STREQUAL "Xcode") - set_target_properties(${target_name} PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY libc++) - else() - target_compile_options(${target_name} PUBLIC "-stdlib=libc++") - target_link_libraries(${target_name} PRIVATE "-stdlib=libc++") - endif() - endif() set_target_properties(${target_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}" ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}" diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index 4524bc70e6..d013e92a5a 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -11,11 +11,6 @@ if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT) set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD}) endif() -if(NOT CMAKE_CXX_STANDARD EQUAL 98) - set(wxHAS_CXX11 TRUE) -else() - set(wxHAS_CXX11 FALSE) -endif() if(MSVC) # Determine MSVC runtime library flag diff --git a/build/cmake/setup.cmake b/build/cmake/setup.cmake index e26af41982..1272e3de49 100644 --- a/build/cmake/setup.cmake +++ b/build/cmake/setup.cmake @@ -23,10 +23,6 @@ include(CheckTypeSize) include(CMakePushCheckState) include(TestBigEndian) -if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND wxHAS_CXX11) - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-stdlib=libc++") -endif() - # Add a definition to setup.h and append it to a list of defines for # for compile checks macro(wx_setup_definition def) @@ -143,7 +139,7 @@ wx_check_c_source_compiles( stdio.h ) #TODO: wxNO_VARIADIC_MACROS -if(wxUSE_STL AND NOT wxHAS_CXX11) +if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98) wx_check_cxx_source_compiles(" std::vector moo; std::list foo; From baeda25a67a286a7e82c78f94e6f10c50ace9442 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 5 Jul 2020 17:26:32 +0200 Subject: [PATCH 08/20] Update docs/changes.txt Co-authored-by: VZ --- docs/changes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 9f33fbbb49..92a0efab73 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -153,7 +153,7 @@ Changes in behaviour which may result in build errors Set[Char]{In,Ex}cludes(), instead of mutating the internal data directly. - Under macOS, 10.11 SDK is the minimum SDK, building and deploying under 10.10.5 and - higher is supported, you must at least use Xcode 7.2.1. + higher is supported, you must use at least Xcode 7.2.1. - wxPGProperty ctors are not longer public since this class is intended to be a base class and should not be instantiated directly. From 01ac922431409e5e27f7c3c0eb6ed987c7ed075f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 18:12:33 +0200 Subject: [PATCH 09/20] Use 10.10 as minimum macOS version by default in configure Just bump the default to 10.10 from the old 10.9. --- configure | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 501e726ab3..6ad269e234 100755 --- a/configure +++ b/configure @@ -18699,7 +18699,7 @@ $as_echo "$as_me: WARNING: Could not determine deployment target from SDKSetting wxUSE_MACOSX_VERSION_MIN= fi elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then - wxUSE_MACOSX_VERSION_MIN=10.9 + wxUSE_MACOSX_VERSION_MIN=10.10 fi if test "x$MACOSX_SDK_OPTS" != "x"; then diff --git a/configure.in b/configure.in index 196b3b61d9..a50f88dd9f 100644 --- a/configure.in +++ b/configure.in @@ -1304,7 +1304,7 @@ dnl We need to quote the next line where we don't need macros and do need [] in wxUSE_MACOSX_VERSION_MIN= fi elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then - wxUSE_MACOSX_VERSION_MIN=10.9 + wxUSE_MACOSX_VERSION_MIN=10.10 fi if test "x$MACOSX_SDK_OPTS" != "x"; then From bbf1953051386c6ad94c812f0265bfafeaad633c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 18:16:00 +0200 Subject: [PATCH 10/20] Improve error messages if configure build test fails under macOS Telling people to try using a different SDK was rather confusing if they didn't specify any SDK in the first place and not very helpful if the problem was due to specifying an incompatible minimum OS version, so fix both problems at once by using the appropriate error message depending on the configure options actually used. --- configure | 36 +++++++++++++++--------------------- configure.in | 16 ++++++++++++++-- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 6ad269e234..c14085a4af 100755 --- a/configure +++ b/configure @@ -1028,7 +1028,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1455,7 +1454,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1708,15 +1706,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1854,7 +1843,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -2007,7 +1996,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -18650,6 +18638,8 @@ if test "x$wxUSE_MACOSX_SDK" = "xno"; then wxUSE_MACOSX_SDK= elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then wxUSE_MACOSX_SDK="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" +elif test "x$wxUSE_MACOSX_SDK" != "x"; then + macosx_sdk_specified=yes fi @@ -18700,6 +18690,8 @@ $as_echo "$as_me: WARNING: Could not determine deployment target from SDKSetting fi elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then wxUSE_MACOSX_VERSION_MIN=10.10 +else + macosx_minver_specified=yes fi if test "x$MACOSX_SDK_OPTS" != "x"; then @@ -18728,6 +18720,14 @@ if test "$HAVE_CXX11" = "1" ; then fi if test "x$retest_macosx_linking" = "xyes"; then + if test "x$macosx_sdk_specified" = "xyes"; then + error_message="no, try using a different SDK or using the default one." + elif test "x$macosx_minver_specified" = "xyes"; then + error_message="no, try using a different min OS version or omitting it." + else + error_message="no, check that Xcode command line tools are installed." + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18751,10 +18751,7 @@ if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no. Try a different SDK -See \`config.log' for more details" "$LINENO" 5; }; exit 1 + as_fn_error $? "$error_message" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -18788,10 +18785,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no. Try a different SDK -See \`config.log' for more details" "$LINENO" 5; }; exit 1 + as_fn_error $? "$error_message" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext diff --git a/configure.in b/configure.in index a50f88dd9f..b8da4f823f 100644 --- a/configure.in +++ b/configure.in @@ -1253,6 +1253,8 @@ if test "x$wxUSE_MACOSX_SDK" = "xno"; then elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then dnl Try to use the default SDK. wxUSE_MACOSX_SDK="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" +elif test "x$wxUSE_MACOSX_SDK" != "x"; then + macosx_sdk_specified=yes fi @@ -1305,6 +1307,8 @@ dnl We need to quote the next line where we don't need macros and do need [] in fi elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then wxUSE_MACOSX_VERSION_MIN=10.10 +else + macosx_minver_specified=yes fi if test "x$MACOSX_SDK_OPTS" != "x"; then @@ -1341,14 +1345,22 @@ dnl If either an SDK or a version option was added, make sure that we can dnl still compile and link both C and C++. If we didn't do this, then most dnl of the remaining tests would fail. if test "x$retest_macosx_linking" = "xyes"; then + if test "x$macosx_sdk_specified" = "xyes"; then + error_message="no, try using a different SDK or using the default one." + elif test "x$macosx_minver_specified" = "xyes"; then + error_message="no, try using a different min OS version or omitting it." + else + error_message="no, check that Xcode command line tools are installed." + fi + AC_LANG_PUSH(C) AC_MSG_CHECKING([if C compiler ($CC) works with SDK/version options]) - AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1]) + AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([$error_message])]) AC_LANG_POP() AC_LANG_PUSH(C++) AC_MSG_CHECKING([if C++ compiler ($CXX) works with SDK/version options]) - AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1]) + AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([$error_message])]) AC_LANG_POP() fi From 101a693bc231979546571d056e67555f1df07a93 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 18:21:58 +0200 Subject: [PATCH 11/20] Add check for 10.11 SDK to configure Verify that we're using a supported version of SDK and further improve the error message if building a test program fails to mention that Xcode 7.3 or later is required. --- configure | 10 +++++++++- configure.in | 16 ++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/configure b/configure index c14085a4af..ac05aba5bf 100755 --- a/configure +++ b/configure @@ -18725,7 +18725,7 @@ if test "x$retest_macosx_linking" = "xyes"; then elif test "x$macosx_minver_specified" = "xyes"; then error_message="no, try using a different min OS version or omitting it." else - error_message="no, check that Xcode command line tools are installed." + error_message="no, check that command line tools from Xcode 7.3 or later are installed." fi ac_ext=c @@ -18773,10 +18773,17 @@ $as_echo_n "checking if C++ compiler ($CXX) works with SDK/version options... " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include + int main () { + #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 + #else + #error macOS SDK version is too low, 10.11 or later is required. + #endif + ; return 0; } @@ -18786,6 +18793,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "yes" >&6; } else as_fn_error $? "$error_message" "$LINENO" 5 + fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext diff --git a/configure.in b/configure.in index b8da4f823f..bac103241f 100644 --- a/configure.in +++ b/configure.in @@ -1350,7 +1350,7 @@ if test "x$retest_macosx_linking" = "xyes"; then elif test "x$macosx_minver_specified" = "xyes"; then error_message="no, try using a different min OS version or omitting it." else - error_message="no, check that Xcode command line tools are installed." + error_message="no, check that command line tools from Xcode 7.3 or later are installed." fi AC_LANG_PUSH(C) @@ -1360,7 +1360,19 @@ if test "x$retest_macosx_linking" = "xyes"; then AC_LANG_PUSH(C++) AC_MSG_CHECKING([if C++ compiler ($CXX) works with SDK/version options]) - AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([$error_message])]) + AC_TRY_LINK( + [ + #include + ], + [ + #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 + #else + #error macOS SDK version is too low, 10.11 or later is required. + #endif + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_ERROR([$error_message])] + ) AC_LANG_POP() fi From 9b02dbf8b283a1cf6d08f08e2f4a8554a482d79c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 19:15:50 +0200 Subject: [PATCH 12/20] Correct minimum supported Xcode version, it's 7.2.1, not 7.3 This correction is important because 7.2 can be used under macOS 10.10, unlike 7.3. --- configure | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index ac05aba5bf..b34c6d5ffd 100755 --- a/configure +++ b/configure @@ -18725,7 +18725,7 @@ if test "x$retest_macosx_linking" = "xyes"; then elif test "x$macosx_minver_specified" = "xyes"; then error_message="no, try using a different min OS version or omitting it." else - error_message="no, check that command line tools from Xcode 7.3 or later are installed." + error_message="no, check that command line tools from Xcode 7.2.1 or later are installed." fi ac_ext=c diff --git a/configure.in b/configure.in index bac103241f..bbc744e4fb 100644 --- a/configure.in +++ b/configure.in @@ -1350,7 +1350,7 @@ if test "x$retest_macosx_linking" = "xyes"; then elif test "x$macosx_minver_specified" = "xyes"; then error_message="no, try using a different min OS version or omitting it." else - error_message="no, check that command line tools from Xcode 7.3 or later are installed." + error_message="no, check that command line tools from Xcode 7.2.1 or later are installed." fi AC_LANG_PUSH(C) From a4f9e207dc7bdf5525481423a26a3284fd11cb34 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 19:29:26 +0200 Subject: [PATCH 13/20] Make macOS configure error messages even more precise Mention the configure options to use to correct the problem explicitly. Also restore the use AC_MSG_FAILURE() instead of AC_MSG_ERROR(), this was originally correct and just the calls to exit() were unnecessary. --- configure | 20 +++++++++++++++----- configure.in | 14 +++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/configure b/configure index b34c6d5ffd..38aee0cbe3 100755 --- a/configure +++ b/configure @@ -18721,13 +18721,17 @@ fi if test "x$retest_macosx_linking" = "xyes"; then if test "x$macosx_sdk_specified" = "xyes"; then - error_message="no, try using a different SDK or using the default one." + error_message="try using --with-macosx-sdk with a different SDK or \ +omitting it entirely to use the default one." elif test "x$macosx_minver_specified" = "xyes"; then - error_message="no, try using a different min OS version or omitting it." + error_message="try using --with-macosx-version-min with a different OS \ +version or omitting it entirely." else - error_message="no, check that command line tools from Xcode 7.2.1 or later are installed." + error_message="check that command line tools from Xcode 7.2.1 or later are installed." fi + error_message="building C++ programs doesn't work, $error_message" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18751,7 +18755,10 @@ if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - as_fn_error $? "$error_message" "$LINENO" 5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "$error_message +See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -18792,7 +18799,10 @@ if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - as_fn_error $? "$error_message" "$LINENO" 5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "$error_message +See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext \ diff --git a/configure.in b/configure.in index bbc744e4fb..e4034af723 100644 --- a/configure.in +++ b/configure.in @@ -1346,16 +1346,20 @@ dnl still compile and link both C and C++. If we didn't do this, then most dnl of the remaining tests would fail. if test "x$retest_macosx_linking" = "xyes"; then if test "x$macosx_sdk_specified" = "xyes"; then - error_message="no, try using a different SDK or using the default one." + error_message="try using --with-macosx-sdk with a different SDK or \ +omitting it entirely to use the default one." elif test "x$macosx_minver_specified" = "xyes"; then - error_message="no, try using a different min OS version or omitting it." + error_message="try using --with-macosx-version-min with a different OS \ +version or omitting it entirely." else - error_message="no, check that command line tools from Xcode 7.2.1 or later are installed." + error_message="check that command line tools from Xcode 7.2.1 or later are installed." fi + error_message="building C++ programs doesn't work, $error_message" + AC_LANG_PUSH(C) AC_MSG_CHECKING([if C compiler ($CC) works with SDK/version options]) - AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([$error_message])]) + AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([$error_message])]) AC_LANG_POP() AC_LANG_PUSH(C++) @@ -1371,7 +1375,7 @@ if test "x$retest_macosx_linking" = "xyes"; then #endif ], [AC_MSG_RESULT([yes])], - [AC_MSG_ERROR([$error_message])] + [AC_MSG_FAILURE([$error_message])] ) AC_LANG_POP() fi From 94fc2ca6d8962e31af5571f4c01d928d59acd2ae Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 19:34:27 +0200 Subject: [PATCH 14/20] Check minimum macOS version in configure too Targeting anything less than 10.10 is not supported any longer, so check for this and also update --with-macosx-version-min description in help to mention it. --- configure | 8 +++++--- configure.in | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 38aee0cbe3..0c031573db 100755 --- a/configure +++ b/configure @@ -2341,7 +2341,7 @@ Optional Packages: --with-zlib use zlib for LZW compression --with-expat enable XML support using expat parser --with-macosx-sdk=PATH use an OS X SDK at PATH - --with-macosx-version-min=VER build binaries which require at least this OS X version + --with-macosx-version-min=VER build binaries which require at least this OS X version (default and lowest supported: 10.10) --with-cxx=11|14|17 use the given C++ dialect --with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) @@ -18786,8 +18786,10 @@ int main () { - #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 - #else + #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 + #error macOS versions < 10.10 are not supported. + #endif + #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100 #error macOS SDK version is too low, 10.11 or later is required. #endif diff --git a/configure.in b/configure.in index e4034af723..ea1968298b 100644 --- a/configure.in +++ b/configure.in @@ -582,7 +582,7 @@ AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval" ]) -AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version], [ +AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version (default and lowest supported: 10.10)], [ wxUSE_MACOSX_VERSION_MIN=$withval wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval" ]) @@ -1369,8 +1369,10 @@ version or omitting it entirely." #include ], [ - #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 - #else + #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 + #error macOS versions < 10.10 are not supported. + #endif + #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100 #error macOS SDK version is too low, 10.11 or later is required. #endif ], From 19dc182b4820ff9b2be992c347cafa7455be38f3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 19:36:29 +0200 Subject: [PATCH 15/20] Replace Mac OS X with macOS in configure Use the new Apple OS name in the user-visible messages. --- configure | 10 +++++----- configure.in | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 0c031573db..5aec52a34d 100755 --- a/configure +++ b/configure @@ -2310,9 +2310,9 @@ Optional Packages: --with-themes=all|list use only the specified comma-separated list of wxUniversal themes --with-gtk[=VERSION] use GTK+, VERSION can be 3 (default), 2, 1 or "any" --with-motif use Motif/Lesstif - --with-osx_cocoa use Mac OS X (Cocoa) - --with-osx_iphone use iPhone OS X port - --with-osx use Mac OS X (default port, Cocoa) + --with-osx_cocoa use macOS (Cocoa) + --with-osx_iphone use iOS + --with-osx use macOS (default port, Cocoa) --with-cocoa same as --with-osx_cocoa --with-iphone same as --with-osx_iphone --with-mac same as --with-osx @@ -2340,8 +2340,8 @@ Optional Packages: --with-liblzma use LZMA compression) --with-zlib use zlib for LZW compression --with-expat enable XML support using expat parser - --with-macosx-sdk=PATH use an OS X SDK at PATH - --with-macosx-version-min=VER build binaries which require at least this OS X version (default and lowest supported: 10.10) + --with-macosx-sdk=PATH use macOS SDK at PATH + --with-macosx-version-min=VER build binaries requiring at least this macOS version (default and lowest supported: 10.10) --with-cxx=11|14|17 use the given C++ dialect --with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) diff --git a/configure.in b/configure.in index ea1968298b..97a4604b0b 100644 --- a/configure.in +++ b/configure.in @@ -81,7 +81,7 @@ USE_MAC=0 dnl Unix kind USE_AIX= USE_BSD= dnl any BSD -USE_DARWIN= dnl a.k.a. Mac OS X +USE_DARWIN= dnl a.k.a. macOS USE_FREEBSD= USE_GNU= dnl GNU/Hurd USE_HPUX= @@ -429,9 +429,9 @@ dnl we use AC_ARG_WITH and not WX_ARG_WITH for the toolkit options as they dnl shouldn't default to wxUSE_ALL_FEATURES AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 3 (default), 2, 1 or "any"]], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1]) -WX_ARG_ONLY_WITH(osx_cocoa, [ --with-osx_cocoa use Mac OS X (Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) -WX_ARG_ONLY_WITH(osx_iphone, [ --with-osx_iphone use iPhone OS X port], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1]) -WX_ARG_ONLY_WITH(osx, [ --with-osx use Mac OS X (default port, Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) +WX_ARG_ONLY_WITH(osx_cocoa, [ --with-osx_cocoa use macOS (Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) +WX_ARG_ONLY_WITH(osx_iphone, [ --with-osx_iphone use iOS], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1]) +WX_ARG_ONLY_WITH(osx, [ --with-osx use macOS (default port, Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(cocoa, [ --with-cocoa same as --with-osx_cocoa], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(iphone, [ --with-iphone same as --with-osx_iphone], [wxUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT_GIVEN=1]) WX_ARG_ONLY_WITH(mac, [ --with-mac same as --with-osx], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) @@ -577,12 +577,12 @@ WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using e if test "$USE_DARWIN" = 1; then -AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [ +AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use macOS SDK at PATH], [ wxUSE_MACOSX_SDK=$withval wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval" ]) -AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version (default and lowest supported: 10.10)], [ +AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries requiring at least this macOS version (default and lowest supported: 10.10)], [ wxUSE_MACOSX_VERSION_MIN=$withval wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval" ]) From c01747555fe3337256b71eb0c9ffcc6ac27276ee Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 19:37:15 +0200 Subject: [PATCH 16/20] Remove explicit libc++ option, it is the default anyhow now No supported version still use libstdc++ by default, so remove the useless option. --- configure | 4 ---- configure.in | 9 --------- 2 files changed, 13 deletions(-) diff --git a/configure b/configure index 5aec52a34d..af6a54f13d 100755 --- a/configure +++ b/configure @@ -18715,10 +18715,6 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then retest_macosx_linking=yes fi -if test "$HAVE_CXX11" = "1" ; then - eval "CXX=\"$CXX -stdlib=libc++\"" -fi - if test "x$retest_macosx_linking" = "xyes"; then if test "x$macosx_sdk_specified" = "xyes"; then error_message="try using --with-macosx-sdk with a different SDK or \ diff --git a/configure.in b/configure.in index 97a4604b0b..a34c80a94b 100644 --- a/configure.in +++ b/configure.in @@ -1332,15 +1332,6 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then retest_macosx_linking=yes fi -if test "$HAVE_CXX11" = "1" ; then - dnl We also need to use libc++ standard library instead of libstdc++ for - dnl C++11 support, both when compiling (for both C++ and Objective-C++, so - dnl putting this in just CXXFLAGS wouldn't be enough) and when linking - dnl (both libraries and plugins, using bakefile shared-ld-sh script which - dnl doesn't handle this option, so putting it in LDFLAGS wouldn't work). - eval "CXX=\"$CXX -stdlib=libc++\"" -fi - dnl If either an SDK or a version option was added, make sure that we can dnl still compile and link both C and C++. If we didn't do this, then most dnl of the remaining tests would fail. From 232e8677b1f74e2d292db88beb8ac3273d5164ce Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 19:50:24 +0200 Subject: [PATCH 17/20] Enforce using C++11 under macOS in configure There is no reason not to turn it on there, as all compilers/compiler versions supported under this platform support C++11 too. --- configure | 4 ++++ configure.in | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/configure b/configure index af6a54f13d..c4eadcb9cb 100755 --- a/configure +++ b/configure @@ -15152,6 +15152,10 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then as_fn_error $? "C++ compiler is needed to build wxWidgets" "$LINENO" 5 fi +if test "$wxUSE_MAC" = 1 -a -z "$wxWITH_CXX"; then + wxWITH_CXX=11 +fi + if test -n "$wxWITH_CXX"; then case "$wxWITH_CXX" in 11) diff --git a/configure.in b/configure.in index a34c80a94b..47129cd400 100644 --- a/configure.in +++ b/configure.in @@ -1098,6 +1098,13 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then AC_MSG_ERROR([C++ compiler is needed to build wxWidgets]) fi +dnl Always use C++11 under macOS, there are no supported compilers not +dnl supporting it there, but don't prevent a latest version of C++ from being +dnl used. +if test "$wxUSE_MAC" = 1 -a -z "$wxWITH_CXX"; then + wxWITH_CXX=11 +fi + if test -n "$wxWITH_CXX"; then dnl AX_CXX_COMPILE_STDCXX requires its VERSION argument to be specified at dnl autoconf, not run, time. From 4fb1764d6b1825af8e089b151650ceaa76e79666 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 5 Jul 2020 21:03:32 +0200 Subject: [PATCH 18/20] adapt naming to macOS --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c63a2361ba..e30d3db934 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ endif() if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET) # If no deployment target has been set default to the minimum supported # OS X version (this has to be set before the first project() call) - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "OS X Deployment Target") + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target") endif() include(build/cmake/policies.cmake NO_POLICY_SCOPE) From d3812ab091076f97aeb802cacc6e8ca87c02578f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 23:41:12 +0200 Subject: [PATCH 19/20] Remove explicit C++11 options from Xcode 7.3 Travis CI build They're not needed any longer as C++11 is used by default in wxOSX builds if nothing else is specified. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e863481d1f..7e990d75a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ matrix: - os: osx osx_image: xcode7.3 compiler: clang - env: wxCONFIGURE_FLAGS="--enable-cxx11" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxSKIP_SAMPLES=1 + env: wxSKIP_SAMPLES=1 name: wxOSX Xcode 7.3 - os: osx osx_image: xcode9.4 From b85d4fc758203f0c1888baa8aa132ce6e992bcc8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 23:46:34 +0200 Subject: [PATCH 20/20] Don't check macOS symbols when building for iOS in configure We should probably check __IPHONE_OS_VERSION_MIN_REQUIRED and maybe MAX_ALLOWED too, but for now just don't give an error in wxiOS builds. --- configure | 4 ++++ configure.in | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configure b/configure index c4eadcb9cb..843fe1bbb5 100755 --- a/configure +++ b/configure @@ -18786,12 +18786,16 @@ int main () { + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 #error macOS versions < 10.10 are not supported. #endif #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100 #error macOS SDK version is too low, 10.11 or later is required. #endif + #elif !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + #error unrecognized platform + #endif ; return 0; diff --git a/configure.in b/configure.in index 47129cd400..620c99ba3a 100644 --- a/configure.in +++ b/configure.in @@ -1367,12 +1367,16 @@ version or omitting it entirely." #include ], [ + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 #error macOS versions < 10.10 are not supported. #endif #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101100 #error macOS SDK version is too low, 10.11 or later is required. #endif + #elif !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + #error unrecognized platform + #endif ], [AC_MSG_RESULT([yes])], [AC_MSG_FAILURE([$error_message])]