From ea46cb19e61e2c75e9fefe380d86a013c43fd61a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 29 Sep 2024 16:15:48 -0700 Subject: [PATCH] macos: use a different bundle identifier for debug builds This is necessary to avoid conflicts with application data such as permissions and preferences. --- macos/Ghostty-Info.plist | 150 ++++++++++-------------- macos/Ghostty.xcodeproj/project.pbxproj | 41 ++++++- 2 files changed, 100 insertions(+), 91 deletions(-) diff --git a/macos/Ghostty-Info.plist b/macos/Ghostty-Info.plist index 4079669da..cde2496c7 100644 --- a/macos/Ghostty-Info.plist +++ b/macos/Ghostty-Info.plist @@ -4,23 +4,23 @@ CFBundleDocumentTypes - - CFBundleTypeExtensions - - command - tool - sh - zsh - csh - pl - - CFBundleTypeIconFile - AppIcon.icns - CFBundleTypeName - Terminal scripts - CFBundleTypeRole - Editor - + + CFBundleTypeExtensions + + command + tool + sh + zsh + csh + pl + + CFBundleTypeIconFile + AppIcon.icns + CFBundleTypeName + Terminal scripts + CFBundleTypeRole + Editor + CFBundleTypeName Folders @@ -42,87 +42,57 @@ + GhosttyCommit + LSEnvironment GHOSTTY_MAC_APP 1 - NSServices - - - NSMenuItem - - default - New Ghostty Tab Here - - NSMessage - openTab - NSRequiredContext - - NSTextContent - FilePath - - NSSendTypes - - NSFilenamesPboardType - public.plain-text - - - - NSMenuItem - - default - New Ghostty Window Here - - NSMessage - openWindow - NSRequiredContext - - NSTextContent - FilePath - - NSSendTypes - - NSFilenamesPboardType - public.plain-text - - - NSHighResolutionCapable - NSAppleEventsUsageDescription - A program in Ghostty wants to use AppleScript. - NSCalendarsUsageDescription - A program in Ghostty wants to use your calendar. - NSCameraUsageDescription - A program in Ghostty wants to use the camera. - NSContactsUsageDescription - A program in Ghostty wants to use your contacts. - NSLocalNetworkUsageDescription - A program in Ghostty wants to access the local network. - NSLocationTemporaryUsageDescriptionDictionary - A program in Ghostty wants to use your location temporarily. - NSLocationUsageDescription - A program in Ghostty wants to use your location information. - NSMicrophoneUsageDescription - A program in Ghostty wants to use your microphone. - NSMotionUsageDescription - A program in Ghostty wants to access motion data. - NSPhotoLibraryUsageDescription - A program in Ghostty wants to use your photo library. - NSRemindersUsageDescription - A program in Ghostty wants to access your reminders. - NSSpeechRecognitionUsageDescription - A program in Ghostty wants to use speech recognition. - NSSystemAdministrationUsageDescription - A program in Ghostty requires elevated privileges. + NSServices + + + NSMenuItem + + default + New Ghostty Tab Here + + NSMessage + openTab + NSRequiredContext + + NSTextContent + FilePath + + NSSendTypes + + NSFilenamesPboardType + public.plain-text + + + + NSMenuItem + + default + New Ghostty Window Here + + NSMessage + openWindow + NSRequiredContext + + NSTextContent + FilePath + + NSSendTypes + + NSFilenamesPboardType + public.plain-text + + + SUPublicEDKey wsNcGf5hirwtdXMVnYoxRIX/SqZQLMOsYlD3q3imeok= - CFBundleVersion - - CFBundleShortVersionString - - GhosttyCommit - diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index e3ad5adf3..9a693469d 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -704,8 +704,21 @@ INFOPLIST_FILE = "Ghostty-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = Ghostty; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; + INFOPLIST_KEY_NSAppleEventsUsageDescription = "A program in Ghostty wants to use AppleScript."; + INFOPLIST_KEY_NSCalendarsUsageDescription = "A program in Ghostty wants to use your calendar."; + INFOPLIST_KEY_NSCameraUsageDescription = "A program in Ghostty wants to use the camera."; + INFOPLIST_KEY_NSContactsUsageDescription = "A program in Ghostty wants to use your contacts."; INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSLocalNetworkUsageDescription = "A program in Ghostty wants to access the local network."; + INFOPLIST_KEY_NSLocationTemporaryUsageDescriptionDictionary = "A program in Ghostty wants to use your location temporarily."; + INFOPLIST_KEY_NSLocationUsageDescription = "A program in Ghostty wants to use your location information."; INFOPLIST_KEY_NSMainNibFile = MainMenu; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "A program in Ghostty wants to use your microphone."; + INFOPLIST_KEY_NSMotionUsageDescription = "A program in Ghostty wants to access motion data."; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "A program in Ghostty wants to use your photo library."; + INFOPLIST_KEY_NSRemindersUsageDescription = "A program in Ghostty wants to access your reminders."; + INFOPLIST_KEY_NSSpeechRecognitionUsageDescription = "A program in Ghostty wants to use speech recognition."; + INFOPLIST_KEY_NSSystemAdministrationUsageDescription = "A program in Ghostty requires elevated privileges."; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -858,8 +871,21 @@ INFOPLIST_FILE = "Ghostty-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = Ghostty; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; + INFOPLIST_KEY_NSAppleEventsUsageDescription = "A program in Ghostty wants to use AppleScript."; + INFOPLIST_KEY_NSCalendarsUsageDescription = "A program in Ghostty wants to use your calendar."; + INFOPLIST_KEY_NSCameraUsageDescription = "A program in Ghostty wants to use the camera."; + INFOPLIST_KEY_NSContactsUsageDescription = "A program in Ghostty wants to use your contacts."; INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSLocalNetworkUsageDescription = "A program in Ghostty wants to access the local network."; + INFOPLIST_KEY_NSLocationTemporaryUsageDescriptionDictionary = "A program in Ghostty wants to use your location temporarily."; + INFOPLIST_KEY_NSLocationUsageDescription = "A program in Ghostty wants to use your location information."; INFOPLIST_KEY_NSMainNibFile = MainMenu; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "A program in Ghostty wants to use your microphone."; + INFOPLIST_KEY_NSMotionUsageDescription = "A program in Ghostty wants to access motion data."; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "A program in Ghostty wants to use your photo library."; + INFOPLIST_KEY_NSRemindersUsageDescription = "A program in Ghostty wants to access your reminders."; + INFOPLIST_KEY_NSSpeechRecognitionUsageDescription = "A program in Ghostty wants to use speech recognition."; + INFOPLIST_KEY_NSSystemAdministrationUsageDescription = "A program in Ghostty requires elevated privileges."; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -867,7 +893,7 @@ MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 0.1; "OTHER_LDFLAGS[arch=*]" = "-lstdc++"; - PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.ghostty; + PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.ghostty.debug; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OBJC_BRIDGING_HEADER = "Sources/App/macOS/ghostty-bridging-header.h"; @@ -898,8 +924,21 @@ INFOPLIST_FILE = "Ghostty-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = Ghostty; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools"; + INFOPLIST_KEY_NSAppleEventsUsageDescription = "A program in Ghostty wants to use AppleScript."; + INFOPLIST_KEY_NSCalendarsUsageDescription = "A program in Ghostty wants to use your calendar."; + INFOPLIST_KEY_NSCameraUsageDescription = "A program in Ghostty wants to use the camera."; + INFOPLIST_KEY_NSContactsUsageDescription = "A program in Ghostty wants to use your contacts."; INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSLocalNetworkUsageDescription = "A program in Ghostty wants to access the local network."; + INFOPLIST_KEY_NSLocationTemporaryUsageDescriptionDictionary = "A program in Ghostty wants to use your location temporarily."; + INFOPLIST_KEY_NSLocationUsageDescription = "A program in Ghostty wants to use your location information."; INFOPLIST_KEY_NSMainNibFile = MainMenu; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "A program in Ghostty wants to use your microphone."; + INFOPLIST_KEY_NSMotionUsageDescription = "A program in Ghostty wants to access motion data."; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "A program in Ghostty wants to use your photo library."; + INFOPLIST_KEY_NSRemindersUsageDescription = "A program in Ghostty wants to access your reminders."; + INFOPLIST_KEY_NSSpeechRecognitionUsageDescription = "A program in Ghostty wants to use speech recognition."; + INFOPLIST_KEY_NSSystemAdministrationUsageDescription = "A program in Ghostty requires elevated privileges."; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks",