diff --git a/Makefile b/Makefile index 0fc235b8e..1d0a7231f 100644 --- a/Makefile +++ b/Makefile @@ -1575,12 +1575,12 @@ endif # with no prerequisites, .SECONDARY causes no intermediate target to be removed .SECONDARY: +# Handle end of macOS compilation APP_DIR = ./sm64coopdx.app APP_CONTENTS_DIR = $(APP_DIR)/Contents APP_MACOS_DIR = $(APP_CONTENTS_DIR)/MacOS APP_RESOURCES_DIR = $(APP_CONTENTS_DIR)/Resources - ifeq ($(OSX_BUILD),1) GLEW_LIB := $(shell find $(BREW_PREFIX)/Cellar/glew | grep libGLEW.2.2.0 | sort -n | uniq) SDL2_LIB := $(shell find $(BREW_PREFIX)/Cellar/sdl2 | grep libSDL2- | sort -n | uniq) @@ -1612,7 +1612,11 @@ all: install_name_tool -change $(BREW_PREFIX)/opt/glew/lib/libGLEW.2.2.dylib @executable_path/libGLEW.dylib $(APP_MACOS_DIR)/sm64coopdx; > /dev/null 2>&1 \ install_name_tool -id @executable_path/libGLEW.dylib $(APP_MACOS_DIR)/libGLEW.dylib; > /dev/null 2>&1 \ codesign --force --deep --sign - $(APP_MACOS_DIR)/libGLEW.dylib; \ - cp res/icon.icns $(APP_RESOURCES_DIR)/icon.icns; \ + mkdir res/build; \ + xcrun actool res/icon.icon --compile res/build --app-icon icon --output-partial-info-plist res/build/Info.plist --minimum-deployment-target 26.0 --platform macosx > /dev/null 2>&1; \ + mv res/build/Assets.car $(APP_RESOURCES_DIR)/; \ + mv res/build/icon.icns $(APP_RESOURCES_DIR)/; \ + rm -rf res/build; \ echo "APPL????" > $(APP_CONTENTS_DIR)/PkgInfo; \ echo '' > $(APP_CONTENTS_DIR)/Info.plist; \ echo '' >> $(APP_CONTENTS_DIR)/Info.plist; \ @@ -1623,7 +1627,7 @@ all: echo ' CFBundleIconFile' >> $(APP_CONTENTS_DIR)/Info.plist; \ echo ' icon' >> $(APP_CONTENTS_DIR)/Info.plist; \ echo ' CFBundleIconName' >> $(APP_CONTENTS_DIR)/Info.plist; \ - echo ' AppIcon' >> $(APP_CONTENTS_DIR)/Info.plist; \ + echo ' icon' >> $(APP_CONTENTS_DIR)/Info.plist; \ echo ' CFBundleDisplayName' >> $(APP_CONTENTS_DIR)/Info.plist; \ echo ' sm64coopdx' >> $(APP_CONTENTS_DIR)/Info.plist; \ echo ' ' >> $(APP_CONTENTS_DIR)/Info.plist; \ diff --git a/res/icon.icns b/res/icon.icns deleted file mode 100644 index 1f20f4d2e..000000000 Binary files a/res/icon.icns and /dev/null differ diff --git a/res/icon.icon/Assets/icon.png b/res/icon.icon/Assets/icon.png new file mode 100644 index 000000000..3846e675a Binary files /dev/null and b/res/icon.icon/Assets/icon.png differ diff --git a/res/icon.icon/icon.json b/res/icon.icon/icon.json new file mode 100644 index 000000000..3a112c289 --- /dev/null +++ b/res/icon.icon/icon.json @@ -0,0 +1,35 @@ +{ + "fill" : "automatic", + "groups" : [ + { + "layers" : [ + { + "image-name" : "icon.png", + "name" : "icon", + "position" : { + "scale" : 3.5, + "translation-in-points" : [ + 0, + 0 + ] + } + } + ], + "shadow" : { + "kind" : "neutral", + "opacity" : 0.5 + }, + "specular" : false, + "translucency" : { + "enabled" : false, + "value" : 0.5 + } + } + ], + "supported-platforms" : { + "circles" : [ + "watchOS" + ], + "squares" : "shared" + } +} \ No newline at end of file