diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c13d92..bc32bd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -428,6 +428,10 @@ foreach(TIC80_OUTPUT ${TIC80_OUTPUTS}) if(WIN32) set(TIC80_SRC ${TIC80_SRC} build/windows/tic80.rc) add_executable(${TIC80_OUTPUT} WIN32 ${TIC80_SRC}) + elseif(APPLE) + add_executable(${TIC80_OUTPUT} MACOSX_BUNDLE ${TIC80_SRC} build/macosx/tic80.icns) + set_source_files_properties(build/macosx/tic80.icns PROPERTIES MACOSX_PACKAGE_LOCATION RESOURCES) + set_target_properties(${TIC80_OUTPUT} PROPERTIES MACOSX_BUNDLE_INFO_PLIST build/macosx/${TIC80_OUTPUT}.plist) else() add_executable(${TIC80_OUTPUT} ${TIC80_SRC}) endif() diff --git a/build/macosx/makefile b/build/macosx/makefile deleted file mode 100644 index 758466f..0000000 --- a/build/macosx/makefile +++ /dev/null @@ -1,37 +0,0 @@ -APPNAME=tic80 -APPBUNDLE=$(APPNAME).app -APPBUNDLECONTENTS=$(APPBUNDLE)/Contents -APPBUNDLEEXE=$(APPBUNDLECONTENTS)/MacOS -APPBUNDLEICON=$(APPBUNDLECONTENTS)/Resources - -all: dmg - -dmg: appbundle - hdiutil create -volname $(APPNAME) -srcfolder $(APPNAME).app -ov -format UDZO $(APPNAME).dmg - -appbundle: $(APPNAME).icns - rm -rf $(APPBUNDLE) - mkdir $(APPBUNDLE) - mkdir $(APPBUNDLE)/Contents - mkdir $(APPBUNDLE)/Contents/MacOS - mkdir $(APPBUNDLE)/Contents/Resources - cp Info.plist $(APPBUNDLECONTENTS)/ - echo "APPL????" > $(APPBUNDLECONTENTS)/PkgInfo - cp $(APPNAME).icns $(APPBUNDLEICON)/ - cp ../../bin/$(APPNAME) $(APPBUNDLEEXE)/$(APPNAME) - -$(APPNAME).icns: $(APPNAME)Icon.png - rm -rf $(APPNAME).iconset - mkdir $(APPNAME).iconset - sips -z 16 16 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_16x16.png - sips -z 32 32 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_16x16@2x.png - sips -z 32 32 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_32x32.png - sips -z 64 64 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_32x32@2x.png - sips -z 128 128 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_128x128.png - sips -z 256 256 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_128x128@2x.png - sips -z 256 256 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_256x256.png - sips -z 512 512 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_256x256@2x.png - sips -z 512 512 $(APPNAME)Icon.png --out $(APPNAME).iconset/icon_512x512.png - cp $(APPNAME)Icon.png $(APPNAME).iconset/icon_512x512@2x.png - iconutil -c icns -o $(APPNAME).icns $(APPNAME).iconset - rm -r $(APPNAME).iconset \ No newline at end of file diff --git a/build/macosx/Info.plist b/build/macosx/tic80.plist similarity index 100% rename from build/macosx/Info.plist rename to build/macosx/tic80.plist diff --git a/build/macosx/tic80Icon.png b/build/macosx/tic80Icon.png deleted file mode 100644 index 0d6f30d..0000000 Binary files a/build/macosx/tic80Icon.png and /dev/null differ diff --git a/build/macosx/tic80pro.plist b/build/macosx/tic80pro.plist new file mode 100644 index 0000000..ae2aeb3 --- /dev/null +++ b/build/macosx/tic80pro.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + TIC-80 Pro + CFBundleExecutable + tic80pro + CFBundleIconFile + tic80.icns + CFBundleIdentifier + com.nesbox.tic + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + TIC-80 Pro + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.70.6 + CFBundleVersion + 0.70.6 + NSHumanReadableCopyright + http://tic.computer © 2017 + NSHighResolutionCapable + + +