-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Builds for Intel 64-bit and Apple Arm. Combines builds into fat binaries. Packages nsfplay into app bundle. Builds icon, also compiles PNG into windows icons. Added version.txt hopefully to allow inclusion everywhere it's needed.
- Loading branch information
1 parent
f88580c
commit 21d9159
Showing
16 changed files
with
243 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
include ../makefile.common | ||
|
||
# TODO windows icons should have 16, 32, 48, 256 | ||
# make a 48 version | ||
|
||
ICON_INTDIR ?= ../$(INTDIR)/icon | ||
MAC_INTDIR ?= $(ICON_INTDIR)/nsfplay.iconset | ||
|
||
.PHONY: default rebuild mac | ||
default: rebuild | ||
|
||
ifneq ("$(wildcard magick)","") | ||
$error("magick utility not found, please install imagemagick") | ||
endif | ||
|
||
ICOS = nsfplay.ico famicom.ico | ||
ICOS_TEMP = $(addprefix $(ICON_INTDIR)/,$(ICOS)) | ||
|
||
rebuild: $(ICOS_TEMP) | ||
cp $(ICOS_TEMP) . | ||
|
||
$(ICON_INTDIR)/nsfplay.ico: nsfplay16.png nsfplay32.png | $(ICON_INTDIR)/ | ||
magick nsfplay32.png -scale 256 $(ICON_INTDIR)/nsfplay256.png | ||
magick convert nsfplay16.png nsfplay32.png $(ICON_INTDIR)/nsfplay256.png -colors 256 $@ | ||
|
||
$(ICON_INTDIR)/famicom.ico: famicom16.png famicom32.png | $(ICON_INTDIR)/ | ||
magick famicom32.png -scale 256 $(ICON_INTDIR)/famicom256.png | ||
magick convert famicom16.png famicom32.png $(ICON_INTDIR)/famicom256.png -colors 256 $@ | ||
|
||
mac: nsfplay16.png nsfplay32.png | ||
$(MKDIR) $(MAC_INTDIR) | ||
cp nsfplay16.png $(MAC_INTDIR)/icon_16x16.png | ||
cp nsfplay32.png $(MAC_INTDIR)/[email protected] | ||
cp nsfplay32.png $(MAC_INTDIR)/icon_32x32.png | ||
magick nsfplay32.png -scale 64 $(MAC_INTDIR)/[email protected] | ||
magick nsfplay32.png -scale 128 $(MAC_INTDIR)/icon_128x128.png | ||
magick nsfplay32.png -scale 256 $(MAC_INTDIR)/icon_256x256.png | ||
magick nsfplay32.png -scale 512 $(MAC_INTDIR)/icon_512x512.png | ||
magick nsfplay32.png -scale 1024 $(MAC_INTDIR)/[email protected] | ||
cp $(MAC_INTDIR)/icon_512x512.png $(MAC_INTDIR)/[email protected] | ||
cp $(MAC_INTDIR)/icon_256x256.png $(MAC_INTDIR)/[email protected] | ||
iconutil -c icns -o $(ICON_INTDIR)/nsfplay.icns $(MAC_INTDIR) | ||
|
||
$(ICON_INTDIR)/: | ||
$(MKDIR) $@ | ||
|
||
clean: | ||
rm -rf $(ICON_INTDIR) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,9 @@ endif | |
# platform settings | ||
|
||
ifeq ($(OS),Windows_NT) | ||
# Windows (MSYS2, gcc) | ||
CXXFLAGS_EXTRA ?= -municode | ||
LDFLAGS_EXTRA ?= -static -static-libgcc -static-libstdc++ | ||
LDFLAGS_EXTRA ?= -static -static-libgcc -static-libstdc++ -Wl,--fatal-warnings | ||
LDFLAGS_CMD ?= -mconsole | ||
LDFLAGS_GUI ?= | ||
LDFLAGS_NSFPLAY ?= -mwindows | ||
|
@@ -66,9 +67,23 @@ ifeq ($(OS),Windows_NT) | |
-luuid -lole32 -loleacc -loleaut32 \ | ||
-lversion -lshlwapi -luxtheme -lwinspool | ||
endif | ||
else ifeq ($(shell uname),Darwin) | ||
# MacOS (clang) | ||
CXXFLAGS_EXTRA ?= -Wno-c++11-extension | ||
LDFLAGS_EXTRA ?= | ||
LDFLAGS_CMD ?= | ||
LDFLAGS_GUI ?= | ||
LDFLAGS_NSFPLAY ?= | ||
LDFLAGS_DLL ?= -shared | ||
LIB_SUFFIX ?= .a | ||
EXE_SUFFIC ?= | ||
DLL_SUFFIX ?= .so | ||
WXL_LIBDIR ?= . | ||
WXL_CONFIG ?= $(WXL_DIR)/$(WXL_CMAKEDIR)/wx-config | ||
else | ||
# Linux / Other (gcc) | ||
CXXFLAGS_EXTRA ?= | ||
LDFLAGS_EXTRA ?= | ||
LDFLAGS_EXTRA ?= -Wl,--fatal-warnings | ||
LDFLAGS_CMD ?= | ||
LDFLAGS_GUI ?= | ||
LDFLAGS_NSFPLAY ?= | ||
|
@@ -77,7 +92,6 @@ else | |
EXE_SUFFIX ?= | ||
DLL_SUFFIX ?= .so | ||
WXL_LIBDIR ?= . | ||
# wx-config | ||
WXL_CONFIG ?= $(WXL_DIR)/$(WXL_CMAKEDIR)/wx-config | ||
endif | ||
|
||
|
@@ -94,12 +108,19 @@ endif | |
# common build flags | ||
|
||
CXXFLAGS ?= $(OPTIMIZE) -Wall -Werror -g | ||
LDFLAGS ?= -Wl,--fatal-warnings -g | ||
LDFLAGS ?= -g | ||
INC_COMMON ?= -I../include | ||
|
||
# utility to move GCC debug information outside of binaries | ||
# on MacOS we only have a limited version of strip | ||
|
||
STRIP_DEBUG = \ | ||
objcopy --only-keep-debug $@ [email protected] ; \ | ||
strip --strip-debug --strip-unneeded $@ ; \ | ||
objcopy [email protected] $@ | ||
ifneq ($(shell uname),Darwin) | ||
STRIP_DEBUG ?= \ | ||
objcopy --only-keep-debug $@ [email protected] ; \ | ||
strip --strip-debug --strip-unneeded $@ ; \ | ||
objcopy [email protected] $@ | ||
else | ||
STRIP_DEBUG ?= \ | ||
nm -a $@ > [email protected] ; \ | ||
strip $@ | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDocumentTypes</key> | ||
<array> | ||
<dict> | ||
<key>CFBundleTypeExtensions</key> | ||
<array> | ||
<string>nsf</string> | ||
</array> | ||
<key>CFBundleTypeName</key> | ||
<string>NSF sound file</string> | ||
<key>CFBundleTypeRole</key> | ||
<string>Viewer</string> | ||
<key>LSItemContentTypes</key> | ||
<array> | ||
<string>nsfplay.nsf</string> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>CFBundleTypeExtensions</key> | ||
<array> | ||
<string>nsfe</string> | ||
</array> | ||
<key>CFBundleTypeName</key> | ||
<string>NSFE sound file</string> | ||
<key>CFBundleTypeRole</key> | ||
<string>Viewer</string> | ||
<key>LSItemContentTypes</key> | ||
<array> | ||
<string>nsfplay.nsfe</string> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>nsfplay</string> | ||
<key>CFBundleIconFile</key> | ||
<string>nsfplay.icns</string> | ||
<key>CFBundleIconName</key> | ||
<string>nsfplay</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>nsfplay</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>nsfplay</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleSignature</key> | ||
<string>NSFP</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#include "resource.h" | ||
|
||
IDI_NSFPLAY_ICO ICON "nsfplay.ico" | ||
IDI_NSFPLAY_ICO ICON "../icons/nsfplay.ico" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"3.0 prototype" |