git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 9d6f378d21c119b2547fec54c3b2ac37961bfa9d
parent bfb1092cbb2a1cd15a0257f093581353c7918855
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Fri, 13 Jun 2025 22:54:10 +0300

Add Icon Composer based icon for macOS 26

Diffstat:
ACocoa/Assets.car0
MCocoa/GBApp.m7++++++-
MCocoa/Info.plist4+++-
MMakefile4++--
4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Cocoa/Assets.car b/Cocoa/Assets.car Binary files differ. diff --git 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 @@ -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> diff --git 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

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.