diff --git a/Cocoa/Assets.car b/Cocoa/Assets.car new file mode 100644 index 0000000..0bff592 Binary files /dev/null and b/Cocoa/Assets.car differ diff --git a/Cocoa/GBApp.m b/Cocoa/GBApp.m index e251346..3a9f4bf 100644 --- a/Cocoa/GBApp.m +++ b/Cocoa/GBApp.m @@ -40,7 +40,12 @@ static uint32_t color_to_int(NSColor *color) - (void) applicationDidFinishLaunching:(NSNotification *)notification { // Refresh icon if launched via a software update - [NSApplication sharedApplication].applicationIconImage = [NSImage imageNamed:@"AppIcon"]; + if (@available(macOS 16.0, *)) { + // Can this be done without breaking Icon Composer-based icons? + } + else { + [NSApplication sharedApplication].applicationIconImage = [NSImage imageNamed:@"AppIcon"]; + } NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; for (unsigned i = 0; i < GBKeyboardButtonCount; i++) { diff --git a/Cocoa/Info.plist b/Cocoa/Info.plist index 920e667..6e91b3b 100644 --- a/Cocoa/Info.plist +++ b/Cocoa/Info.plist @@ -113,7 +113,9 @@ CFBundleExecutable SameBoy CFBundleIconFile - AppIcon.icns + AppIcon + CFBundleIconName + AppIcon CFBundleIdentifier com.github.liji32.sameboy LSApplicationCategoryType diff --git a/Makefile b/Makefile index cf4006b..17cd55e 100644 --- a/Makefile +++ b/Makefile @@ -543,7 +543,7 @@ $(OBJ)/installer: iOS/installer.m # Cocoa Port $(BIN)/SameBoy.app: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy \ - $(shell ls Cocoa/*.icns Cocoa/*.png) \ + $(shell ls Cocoa/*.icns Cocoa/*.png Cocoa/*.car) \ Cocoa/License.html \ Cocoa/Info.plist \ Misc/registers.sym \ @@ -560,7 +560,7 @@ $(BIN)/SameBoy.app: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy \ $(BIN)/SameBoy.app/Contents/PlugIns/Previewer.appex \ Shaders $(MKDIR) -p $(BIN)/SameBoy.app/Contents/Resources - cp Cocoa/*.icns Cocoa/*.png Misc/registers.sym $(BIN)/SameBoy.app/Contents/Resources/ + cp Cocoa/*.icns Cocoa/*.png Cocoa/*.car Misc/registers.sym $(BIN)/SameBoy.app/Contents/Resources/ sed "s/@VERSION/$(VERSION)/;s/@COPYRIGHT_YEAR/$(COPYRIGHT_YEAR)/" < Cocoa/Info.plist > $(BIN)/SameBoy.app/Contents/Info.plist sed "s/@COPYRIGHT_YEAR/$(COPYRIGHT_YEAR)/" < Cocoa/License.html > $(BIN)/SameBoy.app/Contents/Resources/Credits.html $(MKDIR) -p $(BIN)/SameBoy.app/Contents/Resources/Shaders