From 6c6f69d4e59563be2675c65ec4cc90c913f711af Mon Sep 17 00:00:00 2001 From: Michael Bach Date: Tue, 1 Nov 2022 18:04:21 +0100 Subject: [PATCH 01/11] =?UTF-8?q?CPView.j,=20fix=20typo:=20=5FephereralSub?= =?UTF-8?q?views=20=E2=86=92=20=5FephemeralSubviews?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This typo occurs only once, line #3462 references the correct spelling. --- AppKit/CPView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 9c4eaef0c..78cb496f4 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -232,7 +232,7 @@ var CPViewHighDPIDrawingEnabled = YES; JSObject _ephemeralSubviews; JSObject _ephemeralSubviewsForNames; - CPSet _ephereralSubviews; + CPSet _ephemeralSubviews; // Key View Support CPView _nextKeyView; From fb9223c6c3fe0e9d70c313ea28129b1208e110f5 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 25 Feb 2023 21:30:42 +0100 Subject: [PATCH 02/11] fixed: poor user experience when entering dates that are too high for the current month --- AppKit/CPDatePicker/_CPDatePickerElementTextField.j | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/AppKit/CPDatePicker/_CPDatePickerElementTextField.j b/AppKit/CPDatePicker/_CPDatePickerElementTextField.j index 012a7a81a..e5f20a711 100644 --- a/AppKit/CPDatePicker/_CPDatePickerElementTextField.j +++ b/AppKit/CPDatePicker/_CPDatePickerElementTextField.j @@ -385,6 +385,18 @@ CPAMPMDateType = 6; return; } + // if we enter a day that is too high for the current month + // we need to increase the month by one + // if we do not do this, the user input woul be silently reset + // very poor user experience + + if (parseInt(anObjectValue, 10) > [dateValue _daysInMonth]) + { + [_datePickerElementView._textFieldMonth setIntValue:(dateValue.getMonth() + 2)]; + [super setObjectValue:objectValue]; + return; + } + [super setObjectValue:objectValue]; break; From 3a164c8080bf8b556cb31531fb2c321c39a14792 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 5 Mar 2023 21:37:50 +0100 Subject: [PATCH 03/11] fixed: CPString did not have containsString: --- Foundation/CPString.j | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Foundation/CPString.j b/Foundation/CPString.j index e9331e000..eeccf81b5 100644 --- a/Foundation/CPString.j +++ b/Foundation/CPString.j @@ -570,6 +570,16 @@ var CPStringNull = [CPNull null]; return aString && aString != "" && self.indexOf(aString) == 0; } +/*! + Returns \c YES if the receiver contains + the specified string. If \c aString + is empty, the method will return \c NO. + */ +- (BOOL)containsString:(CPString)aString +{ + return aString && aString != "" && self.indexOf(aString) >= 0; +} + /*! Returns \c YES if the receiver ends with the specified string. If \c aString From 29502d10ebbff252ed015f687c23d369771e85a3 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Thu, 21 Dec 2023 19:59:38 +0100 Subject: [PATCH 04/11] formatting --- AppKit/CPDatePicker/_CPDatePickerElementTextField.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPDatePicker/_CPDatePickerElementTextField.j b/AppKit/CPDatePicker/_CPDatePickerElementTextField.j index e5f20a711..8bdb0b1ac 100644 --- a/AppKit/CPDatePicker/_CPDatePickerElementTextField.j +++ b/AppKit/CPDatePicker/_CPDatePickerElementTextField.j @@ -387,7 +387,7 @@ CPAMPMDateType = 6; // if we enter a day that is too high for the current month // we need to increase the month by one - // if we do not do this, the user input woul be silently reset + // if we do not do this, the user input would be silently reset // very poor user experience if (parseInt(anObjectValue, 10) > [dateValue _daysInMonth]) From f6423303066fe812e15ab283f3e1381ced26d8e8 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 23 Dec 2023 19:08:38 +0100 Subject: [PATCH 05/11] new: support for releasedWhenClosed in CPWindow --- AppKit/CPView.j | 11 +++++++++++ AppKit/CPWindow/CPWindow.j | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 78cb496f4..df06eb78b 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -44,6 +44,7 @@ @class CPClipView @class CPScrollView @class CALayer +@class CPBinder @global appkit_tag_dom_elements @@ -3732,6 +3733,16 @@ var CPAppearanceVibrantDark = [CPAppearance appearanceNamed:CPAppearanceNameVibr [owners[i] updateTrackingAreas]; } +// needed by CPWindow's releasedWhenClosed property +- (void)_releaseRecursively +{ + [_subviews makeObjectsPerformSelector:@selector(_releaseRecursively)]; + + [self _removeObservers]; + [CPBinder unbindAllForObject:self]; + [self removeFromSuperview]; +} + @end var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 438ec9865..85cf1ea50 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -186,6 +186,7 @@ var CPWindowActionMessageKeys = [ BOOL _constrainsToUsableScreen; unsigned _shadowStyle; BOOL _showsResizeIndicator; + BOOL _releasedWhenClosed @accessors(property=releasedWhenClosed); int _positioningMask; CGRect _positioningScreenRect; @@ -2534,6 +2535,9 @@ CPTexturedBackgroundWindowMask [_parentWindow removeChildWindow:self]; [self _orderOutRecursively:NO]; [self _detachFromChildrenClosing:!_parentWindow]; + + if (_releasedWhenClosed) + [_contentView _releaseRecursively]; } - (void)_detachFromChildrenClosing:(BOOL)shouldCloseChildren From 72a85d11df2475f5dd6139bd4429255551b3aa6d Mon Sep 17 00:00:00 2001 From: David Richardson Date: Mon, 18 Mar 2024 09:13:32 -0600 Subject: [PATCH 06/11] Fix narwhal-jsc build under Sonoma Remove newly-unsupported linker flag --- bootstrap.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index af1e1b0d1..223ae0031 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -381,7 +381,21 @@ if [ `uname` = "Darwin" ]; then check_build_environment # The narwhal-jsc package is already installed within the base kit. - + + # Xcode 15's version of the 'ld' linker no longer supports + # the '-force_cpusubtype_ALL' flag. + # Although not documented, this may have been included to support PowerPC compilation. + # Removing the flag has been successfully tested on High Sierra/Xcode 10.1 + # Testing on all intermediate operating systems and Xcode versions isn't practical, + # or beneficial, given the imminent move to NodeJS. + # We apply the patch here for expediency, rather than in the 'cappuccino-base' repository. + # If a full final release of the narwhal branch is undertaken, + # the change will be applied to cappuccino-base at that time. + # Note: Rosetta2 is still available in macOS Sonoma. + # Compiling for both Intel and Apple Silicon targets requires a testing program + # which is, again, neither practical nor justified at this stage of Narwhal's lifecycle. + sed -i .orig 's/-force_cpusubtype_ALL//g' $install_directory/packages/narwhal-jsc/Makefile + # This autoreconf command improves compatibility with MacPorts, but only works with autoconf 2.65+. needed_autoconf_major=2 needed_autoconf_minor=65 From ae333ecb77a02e6c35d422f998d221c883090aec Mon Sep 17 00:00:00 2001 From: David Richardson Date: Mon, 31 Oct 2022 16:30:33 -0600 Subject: [PATCH 07/11] Allow building XcodeCapp under any version greater than Sierra Individual new OS releases had support added individually until now. --- Tools/XcodeCapp/Jakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/XcodeCapp/Jakefile b/Tools/XcodeCapp/Jakefile index 43f80b51c..d9c12d998 100644 --- a/Tools/XcodeCapp/Jakefile +++ b/Tools/XcodeCapp/Jakefile @@ -24,7 +24,7 @@ task ("build", function() minorVersion = parseInt(versions[1], 10), buildVersion = parseInt(versions[2], 10); - if (!((majorVersion == 11) || (majorVersion == 10 && minorVersion >= 12))) + if (!((majorVersion >= 11) || (majorVersion == 10 && minorVersion >= 12))) { colorPrint("XcodeCapp requires at least macOS Sierra.", "red"); From 10e33298a937ad20590c3b3c773c61f1e934684d Mon Sep 17 00:00:00 2001 From: David Richardson Date: Wed, 20 Mar 2024 09:23:11 -0600 Subject: [PATCH 08/11] Fixes to allow successful building under Xcode 15 Manually remove DSTROOT occurrences from project.pbxproj. Their presence causes Xcode build process to believe a reference cycle exists - preventing compilation. Update minimum installation target to macOS 10.15 Earlier targets require presence of 'libarclite' - no longer included with Xcode 15. --- Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj index 583ebc8c8..ddd886df3 100644 --- a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj +++ b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj @@ -444,7 +444,6 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; DEPLOYMENT_LOCATION = YES; - DSTROOT = /; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -463,7 +462,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = $USER_APPS_DIR; - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -494,7 +493,6 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_LOCATION = YES; - DSTROOT = /; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -506,7 +504,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = $USER_APPS_DIR; - MACOSX_DEPLOYMENT_TARGET = 10.8; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; }; @@ -518,11 +516,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; - DSTROOT = /; INFOPLIST_FILE = XcodeCapp/Info.plist; INSTALL_PATH = "$(LOCAL_APPS_DIR)"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = org.cappuccino.xcodecapp; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -534,11 +531,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; - DSTROOT = /; INFOPLIST_FILE = XcodeCapp/Info.plist; INSTALL_PATH = "$(LOCAL_APPS_DIR)"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = org.cappuccino.xcodecapp; PRODUCT_NAME = "$(TARGET_NAME)"; }; From c2d62b7a1386fd63d990c1cf7bdc2b285f7c2402 Mon Sep 17 00:00:00 2001 From: David Richardson Date: Wed, 20 Mar 2024 09:25:16 -0600 Subject: [PATCH 09/11] Update Info.plist Set Display Name property to 'XcodeCapp'. Set App Category to 'Developer Tools'. --- Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj index ddd886df3..f92ae6775 100644 --- a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj +++ b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj @@ -517,6 +517,7 @@ CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = XcodeCapp/Info.plist; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; INSTALL_PATH = "$(LOCAL_APPS_DIR)"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.15; @@ -532,6 +533,7 @@ CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = XcodeCapp/Info.plist; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; INSTALL_PATH = "$(LOCAL_APPS_DIR)"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.15; From 767d9378e3b254744790a88142287d9fe5f79df5 Mon Sep 17 00:00:00 2001 From: David Richardson Date: Wed, 20 Mar 2024 09:48:09 -0600 Subject: [PATCH 10/11] Move deployment target back from macOS 10.15 to 10.13, the earliest version on-hand for testing. --- Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj index f92ae6775..6a0cf87f4 100644 --- a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj +++ b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj @@ -462,7 +462,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = $USER_APPS_DIR; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -504,7 +504,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = $USER_APPS_DIR; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; }; @@ -517,10 +517,11 @@ CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = XcodeCapp/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = XcodeCapp; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; INSTALL_PATH = "$(LOCAL_APPS_DIR)"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = org.cappuccino.xcodecapp; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -533,10 +534,11 @@ CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = XcodeCapp/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = XcodeCapp; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; INSTALL_PATH = "$(LOCAL_APPS_DIR)"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = org.cappuccino.xcodecapp; PRODUCT_NAME = "$(TARGET_NAME)"; }; From 0669ce06f229b3a3f95f266dd3b587733739d128 Mon Sep 17 00:00:00 2001 From: David Richardson Date: Wed, 20 Mar 2024 10:07:25 -0600 Subject: [PATCH 11/11] Update version check in XcodeCapp Jakefile Match deployment version set in XcodeCapp project file - macOS 10.13. --- Tools/XcodeCapp/Jakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/XcodeCapp/Jakefile b/Tools/XcodeCapp/Jakefile index d9c12d998..f7b86cf74 100644 --- a/Tools/XcodeCapp/Jakefile +++ b/Tools/XcodeCapp/Jakefile @@ -24,9 +24,9 @@ task ("build", function() minorVersion = parseInt(versions[1], 10), buildVersion = parseInt(versions[2], 10); - if (!((majorVersion >= 11) || (majorVersion == 10 && minorVersion >= 12))) + if (!((majorVersion >= 11) || (majorVersion == 10 && minorVersion >= 13))) { - colorPrint("XcodeCapp requires at least macOS Sierra.", "red"); + colorPrint("XcodeCapp requires at least macOS High Sierra.", "red"); p.stdin.close(); p.stdout.close();