[Git][wxwidgets/wxwidgets][master] 6 commits: increase min deployment for macOS 27 SDK

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jul 2, 2026, 6:19:32 PM (3 days ago) Jul 2
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 2268c9b5
    by Stefan Csomor at 2026-06-10T18:15:43+02:00
    increase min deployment for macOS 27 SDK
    
  • 5a9bcab3
    by Vadim Zeitlin at 2026-07-02T20:48:41+02:00
    Add pseudo-test allowing to create wxFileConfig for any file
    
    This is convenient for testing problems, for example those found by
    OSS-Fuzz (see #26597).
    
  • 3ac810a2
    by Vadim Zeitlin at 2026-07-02T20:48:43+02:00
    Warn about multiple groups in wxFileConfig instead of asserting
    
    It's not clear whether we handle them correctly, and so it might be
    better to refuse input with duplicated groups entirely, but for now at
    least avoid asserting when encountering them.
    
  • 8a5360b3
    by Vadim Zeitlin at 2026-07-02T23:48:22+02:00
    Use earliest supported macOS version in configure by default
    
    Use the first value of DEPLOYMENT_TARGET_SUGGESTED_VALUES plist key
    instead of MACOSX_DEPLOYMENT_TARGET.
    
    Also drop support for using "buildSettings" key, this is something very
    old and certainly not used by any of the still supported Xcode versions.
    
    And simplify the commands used in a configure, in particular use a
    single sed command with "p" modifier instead of using grep and then sed.
    
  • b03b365a
    by Vadim Zeitlin at 2026-07-02T23:49:20+02:00
    Merge branch 'osx-macos-27'
    
    macOS 27 adaptions.
    
    Closes #26578.
    
  • 055d882e
    by Vadim Zeitlin at 2026-07-02T23:49:52+02:00
    Merge branch 'fileconfig-fixes'
    
    Fix assert on duplicate group in wxFileConfig.
    
    See #26654.
    

5 changed files:

Changes:

  • build/osx/wxcocoa.xcconfig
    ... ... @@ -5,6 +5,7 @@ WXTOOLKITUPPER = COCOA
    5 5
     
    
    6 6
     MACOSX_DEPLOYMENT_TARGET = 10.10
    
    7 7
     MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0
    
    8
    +MACOSX_DEPLOYMENT_TARGET[sdk=macosx27*] = 12.0
    
    8 9
     
    
    9 10
     GCC_VERSION =
    
    10 11
     
    

  • configure
    No preview for this file type
  • configure.ac
    ... ... @@ -1314,15 +1314,20 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then
    1314 1314
     elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then
    
    1315 1315
         if test "x$wxUSE_MACOSX_SDK" != "x"; then
    
    1316 1316
             AC_MSG_CHECKING([SDK deployment version])
    
    1317
    -dnl We need to quote the next line where we don't need macros and do need [] in the regex
    
    1318
    -[
    
    1319
    -        MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
    
    1320
    -]
    
    1321
    -        # If that failed, try again with the new key
    
    1317
    +        defaultProperties=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties`
    
    1318
    +
    
    1319
    +        dnl Take the first (earliest, because they are sorted) supported
    
    1320
    +        dnl deployment target from the SDKSettings.plist file and remove
    
    1321
    +        dnl leading spaces, quotes and trailing comma from it.
    
    1322
    +        MACOSX_SDK_PLIST_VERSION_MIN=`echo "$defaultProperties" | sed -n -e '1,/DEPLOYMENT_TARGET_SUGGESTED_VALUES/d; s/^ *//; s/"//g; s/,//p; q'`
    
    1323
    +
    
    1324
    +        dnl If DEPLOYMENT_TARGET_SUGGESTED_VALUES doesn't exist, as it was in
    
    1325
    +        dnl 10.11..10.13 SDKs, try MACOSX_DEPLOYMENT_TARGET instead.
    
    1322 1326
             if test "x$MACOSX_SDK_PLIST_VERSION_MIN" = "x"; then
    
    1323
    -[
    
    1324
    -            MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
    
    1325
    -]
    
    1327
    +            dnl We need to quote the next line where we don't need macros and do need [] in the regex
    
    1328
    +            [
    
    1329
    +                MACOSX_SDK_PLIST_VERSION_MIN=`echo "$defaultProperties" | sed -n -e 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/p'`
    
    1330
    +            ]
    
    1326 1331
             fi
    
    1327 1332
     
    
    1328 1333
             if test "x$MACOSX_SDK_PLIST_VERSION_MIN" != "x"; then
    

  • src/common/fileconf.cpp
    ... ... @@ -1514,8 +1514,15 @@ void wxFileConfigGroup::SetLine(wxFileConfigLineList *pLine)
    1514 1514
     {
    
    1515 1515
         // for a normal (i.e. not root) group this method shouldn't be called twice
    
    1516 1516
         // unless we are resetting the line
    
    1517
    -    wxASSERT_MSG( !m_pParent || !m_pLine || !pLine,
    
    1518
    -                   wxT("changing line for a non-root group?") );
    
    1517
    +    if ( m_pParent )
    
    1518
    +    {
    
    1519
    +        if ( m_pLine && pLine )
    
    1520
    +        {
    
    1521
    +            // It would be nice to give the line numbers but we don't have them
    
    1522
    +            // here easily.
    
    1523
    +            wxLogWarning(_("duplicate group '%s'"), Name());
    
    1524
    +        }
    
    1525
    +    }
    
    1519 1526
     
    
    1520 1527
         m_pLine = pLine;
    
    1521 1528
     }
    

  • tests/config/fileconf.cpp
    ... ... @@ -21,6 +21,7 @@
    21 21
     #include "wx/fileconf.h"
    
    22 22
     #include "wx/sstream.h"
    
    23 23
     #include "wx/log.h"
    
    24
    +#include "wx/wfstream.h"
    
    24 25
     
    
    25 26
     #include "testlog.h"
    
    26 27
     
    
    ... ... @@ -658,6 +659,30 @@ TEST_CASE_METHOD(LogTestCase, "wxFileConfig::Error", "[fileconfig][error]")
    658 659
     
    
    659 660
         // Check that it's the second quote which is unexpected, not the first one.
    
    660 661
         checkWarning(R"(foo="x"y)", R"(unexpected " at position 3)");
    
    662
    +
    
    663
    +    // Check that a duplicate group is detected as an error.
    
    664
    +    checkWarning(R"([foo]
    
    665
    +bar=1
    
    666
    +[foo]
    
    667
    +baz=2
    
    668
    +)", "duplicate group 'foo'");
    
    669
    +}
    
    670
    +
    
    671
    +// This test is disabled by default as it requires the environment variable
    
    672
    +// below to be defined to point to a XML file to load.
    
    673
    +TEST_CASE("wxFileConfig::Load", "[.]")
    
    674
    +{
    
    675
    +    wxString file;
    
    676
    +    REQUIRE( wxGetEnv("WX_TEST_FILECONFIG", &file) );
    
    677
    +
    
    678
    +    wxFileInputStream fis(file);
    
    679
    +    REQUIRE( fis.IsOk() );
    
    680
    +
    
    681
    +    std::unique_ptr<wxFileConfig> fc;
    
    682
    +
    
    683
    +    REQUIRE_NOTHROW( fc.reset(new wxFileConfig(fis)) );
    
    684
    +
    
    685
    +    WARN("Dump of " << file << ":\n" << Dump(*fc));
    
    661 686
     }
    
    662 687
     
    
    663 688
     #endif // wxUSE_FILECONFIG
    

Reply all
Reply to author
Forward
0 new messages