Add Icon Composer based icon for macOS 26

This commit is contained in:
Lior Halphon 2025-06-13 22:54:10 +03:00
parent bfb1092cbb
commit 9d6f378d21
4 changed files with 11 additions and 4 deletions

BIN
Cocoa/Assets.car Normal file

Binary file not shown.

View File

@ -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++) {

View File

@ -113,7 +113,9 @@
<key>CFBundleExecutable</key>
<string>SameBoy</string>
<key>CFBundleIconFile</key>
<string>AppIcon.icns</string>
<string>AppIcon</string>
<key>CFBundleIconName</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>com.github.liji32.sameboy</string>
<key>LSApplicationCategoryType</key>

View File

@ -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