aboutsummaryrefslogtreecommitdiff
path: root/sdl/osx
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2017-09-10 00:03:09 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2017-09-10 00:03:09 +0900
commitba8dfb7d04853beab94cb8be3652c6095938e978 (patch)
treea1def13a8ba091f425b65ad8d814ece4b7ba21fb /sdl/osx
parentb814490d33cac8a91fd2b2f72e743fd4ddc9632e (diff)
sdl: add osx
Diffstat (limited to 'sdl/osx')
-rw-r--r--sdl/osx/Info.plist170
-rw-r--r--sdl/osx/Makefile38
-rw-r--r--sdl/osx/pacc-gl-inc.h7
3 files changed, 215 insertions, 0 deletions
diff --git a/sdl/osx/Info.plist b/sdl/osx/Info.plist
new file mode 100644
index 0000000..408d17f
--- /dev/null
+++ b/sdl/osx/Info.plist
@@ -0,0 +1,170 @@
+<?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>CFBundleExecutable</key>
+ <string>fmplayersdl</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.github.takamichih.fmplayer</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>PMD music file</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.github.takamichih.fmplayer.pmd</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>PLAY6 music file</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.github.takamichih.fmplayer.play6</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>FMP music file</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.github.takamichih.fmplayer.fmp</string>
+ </array>
+ </dict>
+ </array>
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.github.takamichih.fmplayer.pmd</string>
+ <key>UTTypeDescription</key>
+ <string>PMD music file</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>m</string>
+ <string>m2</string>
+ <string>mz</string>
+ </array>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.github.takamichih.fmplayer.fmp</string>
+ <key>UTTypeDescription</key>
+ <string>FMP music file</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>opi</string>
+ <string>ovi</string>
+ <string>ozi</string>
+ </array>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.github.takamichih.fmplayer.play6</string>
+ <key>UTTypeDescription</key>
+ <string>PLAY6 music file</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>m26</string>
+ <string>m86</string>
+ </array>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.github.takamichih.fmplayer.pmdadpcm</string>
+ <key>UTTypeDescription</key>
+ <string>PMD ADPCM file</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>ppc</string>
+ </array>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.github.takamichih.fmplayer.pmdpcm</string>
+ <key>UTTypeDescription</key>
+ <string>PMD PCM file</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>p86</string>
+ </array>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.github.takamichih.fmplayer.fmpadpcm</string>
+ <key>UTTypeDescription</key>
+ <string>FMP/PPZ8 ADPCM file</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>pvi</string>
+ </array>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.github.takamichih.fmplayer.ppz8pcm</string>
+ <key>UTTypeDescription</key>
+ <string>PPZ8 PCM file</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>pzi</string>
+ </array>
+ </dict>
+ </dict>
+ </array>
+ </dict>
+</plist>
diff --git a/sdl/osx/Makefile b/sdl/osx/Makefile
new file mode 100644
index 0000000..e52fb78
--- /dev/null
+++ b/sdl/osx/Makefile
@@ -0,0 +1,38 @@
+vpath %.c ..
+vpath %.c ../../pacc
+vpath %.c ../../fmdsp
+vpath %.c ../../libopna
+vpath %.c ../../common
+vpath %.c ../../fmdriver
+XCRUN:=xcrun --sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
+CC:=$(XCRUN) cc
+OBJS:=main.o
+OBJS+=pacc-gl.o
+OBJS+=fmdsp-pacc.o font_fmdsp_small.o
+OBJS+=opna.o opnafm.o opnassg.o opnadrum.o opnaadpcm.o opnatimer.o opnassg-sinc-c.o opnassg-sinc-sse2.o
+OBJS+=fmdriver_pmd.o fmdriver_fmp.o ppz8.o fmdriver_common.o
+OBJS+=fmplayer_file.o fmplayer_work_opna.o fmplayer_file_unix.o fmplayer_drumrom_unix.o
+TARGET:=fmplayersdl
+CFLAGS:=-Wall -Wextra -O2 -g
+CFLAGS+=-DPACC_GL_3
+#CFLAGS+=-DPACC_GL_ES
+#CFLAGS+=-DPACC_GL_ES -DPACC_GL_3
+CFLAGS+=-I. -I.. -I../..
+SDLFW:=/Library/Frameworks/SDL2.framework
+CFLAGS+=-I$(SDLFW)/Headers
+LIBS:=-framework SDL2 -framework OpenGL
+LIBS+=-F/Library/Frameworks
+
+$(TARGET): $(OBJS)
+ $(CC) -o $@ $^ $(LIBS)
+
+clean:
+ rm -f $(TARGET) $(OBJS)
+
+bundle: $(TARGET)
+ rm -rf $(TARGET).app
+ mkdir -p $(TARGET).app/Contents/MacOS
+ cp Info.plist $(TARGET).app/Contents
+ cp $(TARGET) $(TARGET).app/Contents/MacOS
+ mkdir $(TARGET).app/Contents/Frameworks
+ cp -r $(SDLFW) $(TARGET).app/Contents/Frameworks
diff --git a/sdl/osx/pacc-gl-inc.h b/sdl/osx/pacc-gl-inc.h
new file mode 100644
index 0000000..51bb6bf
--- /dev/null
+++ b/sdl/osx/pacc-gl-inc.h
@@ -0,0 +1,7 @@
+
+#include <OpenGL/gl3.h>
+
+bool loadgl(void) {
+ return true;
+}
+