diff --git a/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9 1.png b/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9 1.png new file mode 100644 index 000000000..3c572d267 Binary files /dev/null and b/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9 1.png differ diff --git a/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9 2.png b/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9 2.png new file mode 100644 index 000000000..3c572d267 Binary files /dev/null and b/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9 2.png differ diff --git a/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9.png b/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9.png new file mode 100644 index 000000000..3c572d267 Binary files /dev/null and b/macos/Assets.xcassets/AppIconImage.imageset/199110421-9ff5fc30-a244-441e-9882-26070662adf9.png differ diff --git a/macos/Assets.xcassets/AppIconImage.imageset/Contents.json b/macos/Assets.xcassets/AppIconImage.imageset/Contents.json new file mode 100644 index 000000000..8a7f27f4f --- /dev/null +++ b/macos/Assets.xcassets/AppIconImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "199110421-9ff5fc30-a244-441e-9882-26070662adf9.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "199110421-9ff5fc30-a244-441e-9882-26070662adf9 1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "199110421-9ff5fc30-a244-441e-9882-26070662adf9 2.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index f9a804993..4dff2ce65 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + A535B9DA299C569B0017E2E4 /* ErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A535B9D9299C569B0017E2E4 /* ErrorView.swift */; }; A5B30535299BEAAA0047F10C /* GhosttyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5B30534299BEAAA0047F10C /* GhosttyApp.swift */; }; A5B30537299BEAAA0047F10C /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5B30536299BEAAA0047F10C /* ContentView.swift */; }; A5B30539299BEAAB0047F10C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A5B30538299BEAAB0047F10C /* Assets.xcassets */; }; @@ -14,6 +15,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + A535B9D9299C569B0017E2E4 /* ErrorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorView.swift; sourceTree = ""; }; A5B30531299BEAAA0047F10C /* Ghostty.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Ghostty.app; sourceTree = BUILT_PRODUCTS_DIR; }; A5B30534299BEAAA0047F10C /* GhosttyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GhosttyApp.swift; sourceTree = ""; }; A5B30536299BEAAA0047F10C /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -40,6 +42,7 @@ A5D495A0299BEC2200DD1313 /* Preview Content */, A5B30534299BEAAA0047F10C /* GhosttyApp.swift */, A5B30536299BEAAA0047F10C /* ContentView.swift */, + A535B9D9299C569B0017E2E4 /* ErrorView.swift */, ); path = Sources; sourceTree = ""; @@ -148,6 +151,7 @@ buildActionMask = 2147483647; files = ( A5B30537299BEAAA0047F10C /* ContentView.swift in Sources */, + A535B9DA299C569B0017E2E4 /* ErrorView.swift in Sources */, A5B30535299BEAAA0047F10C /* GhosttyApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -275,12 +279,12 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = Ghostty.entitlements; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Sources/Preview Content\""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = GK79KXBF4F; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -307,12 +311,12 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_ENTITLEMENTS = Ghostty.entitlements; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Sources/Preview Content\""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = GK79KXBF4F; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; diff --git a/macos/Sources/ErrorView.swift b/macos/Sources/ErrorView.swift new file mode 100644 index 000000000..3a921667d --- /dev/null +++ b/macos/Sources/ErrorView.swift @@ -0,0 +1,24 @@ +import SwiftUI + +struct ErrorView: View { + var body: some View { + HStack { + Image("AppIconImage") + .resizable() + .scaledToFit() + .frame(width: 128, height: 128) + + VStack(alignment: .leading) { + Text("Oh, no. 😭").font(.title) + Text("Something went fatally wrong.\nCheck the logs and restart Ghostty.") + } + } + .padding() + } +} + +struct ErrorView_Previews: PreviewProvider { + static var previews: some View { + ErrorView() + } +} diff --git a/macos/Sources/GhosttyApp.swift b/macos/Sources/GhosttyApp.swift index 2373ea0a3..819c6f1eb 100644 --- a/macos/Sources/GhosttyApp.swift +++ b/macos/Sources/GhosttyApp.swift @@ -16,9 +16,9 @@ struct GhosttyApp: App { WindowGroup { switch ghostty.readiness { case .error: - Text("Error") + ErrorView() case .ready: - Text("Hello!").font(.largeTitle) + ContentView() } } }