From ba8dfb7d04853beab94cb8be3652c6095938e978 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Sun, 10 Sep 2017 00:03:09 +0900 Subject: sdl: add osx --- sdl/osx/Info.plist | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++ sdl/osx/Makefile | 38 +++++++++++ sdl/osx/pacc-gl-inc.h | 7 +++ 3 files changed, 215 insertions(+) create mode 100644 sdl/osx/Info.plist create mode 100644 sdl/osx/Makefile create mode 100644 sdl/osx/pacc-gl-inc.h 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 @@ + + + + + CFBundleExecutable + fmplayersdl + CFBundleIdentifier + com.github.takamichih.fmplayer + CFBundleDocumentTypes + + + CFBundleTypeName + PMD music file + CFBundleTypeRole + Viewer + LSItemContentTypes + + com.github.takamichih.fmplayer.pmd + + + + CFBundleTypeName + PLAY6 music file + CFBundleTypeRole + Viewer + LSItemContentTypes + + com.github.takamichih.fmplayer.play6 + + + + CFBundleTypeName + FMP music file + CFBundleTypeRole + Viewer + LSItemContentTypes + + com.github.takamichih.fmplayer.fmp + + + + UTExportedTypeDeclarations + + + UTTypeIdentifier + com.github.takamichih.fmplayer.pmd + UTTypeDescription + PMD music file + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + m + m2 + mz + + + + + UTTypeIdentifier + com.github.takamichih.fmplayer.fmp + UTTypeDescription + FMP music file + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + opi + ovi + ozi + + + + + UTTypeIdentifier + com.github.takamichih.fmplayer.play6 + UTTypeDescription + PLAY6 music file + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + m26 + m86 + + + + + UTTypeIdentifier + com.github.takamichih.fmplayer.pmdadpcm + UTTypeDescription + PMD ADPCM file + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + ppc + + + + + UTTypeIdentifier + com.github.takamichih.fmplayer.pmdpcm + UTTypeDescription + PMD PCM file + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + p86 + + + + + UTTypeIdentifier + com.github.takamichih.fmplayer.fmpadpcm + UTTypeDescription + FMP/PPZ8 ADPCM file + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + pvi + + + + + UTTypeIdentifier + com.github.takamichih.fmplayer.ppz8pcm + UTTypeDescription + PPZ8 PCM file + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + pzi + + + + + + 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 + +bool loadgl(void) { + return true; +} + -- cgit v1.2.3