diff --git a/.gitignore b/.gitignore index edbc60d340..645b3bf4f1 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,9 @@ wiiu/wut/elf2rpl/elf2rpl pkg/apple/iOS/build/ pkg/apple/iOS/modules/ +pkg/apple/build/ +ui/drivers/qt/moc_* +ui/drivers/moc_* obj-unix/ .vagrant/ diff --git a/Makefile.apple b/Makefile.apple new file mode 100644 index 0000000000..e7f76d96e0 --- /dev/null +++ b/Makefile.apple @@ -0,0 +1,24 @@ +include Makefile.common + +# Qt MOC generation, required for QObject-derived classes +ifneq ($(MOC_HEADERS),) + # prefix moc_ to base filename of paths and change extension from h to cpp, so a/b/foo.h becomes a/b/moc_foo.cpp + MOC_SRC := $(join $(addsuffix moc_,$(dir $(MOC_HEADERS))), $(notdir $(MOC_HEADERS:.h=.cpp))) +endif + +Q ?= $(error missing moc) + +.PHONY: generate + +$(MOC_SRC): + @$(if $(Q), $(shell echo echo MOC $<),) + $(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@)) + $(Q)$(MOC) -o $(MOC_TMP) $< + +$(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x)) + +generate: $(MOC_SRC) + @echo $(MOC_SRC) + +print-%: + @echo '$*=$($*)' \ No newline at end of file diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index c3b2bc7116..fd3673afa0 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -33,7 +33,9 @@ MENU UI ============================================================ */ #if defined(HAVE_QT) +#ifndef __APPLE__ #define HAVE_MAIN /* also requires defining in frontend.c */ +#endif #include "../ui/drivers/ui_qt.cpp" #include "../ui/drivers/qt/ui_qt_window.cpp" @@ -53,6 +55,15 @@ UI #include "../ui/drivers/qt/thumbnaildownload.cpp" #include "../ui/drivers/qt/thumbnailpackdownload.cpp" #include "../ui/drivers/qt/playlistthumbnaildownload.cpp" +#include "../ui/drivers/moc_ui_qt.cpp" +#include "../ui/drivers/qt/moc_coreinfodialog.cpp" +#include "../ui/drivers/qt/moc_coreoptionsdialog.cpp" +#include "../ui/drivers/qt/moc_filedropwidget.cpp" +#include "../ui/drivers/qt/moc_flowlayout.cpp" +#include "../ui/drivers/qt/moc_playlistentrydialog.cpp" +#include "../ui/drivers/qt/moc_shaderparamsdialog.cpp" +#include "../ui/drivers/qt/moc_ui_qt_load_core_window.cpp" +#include "../ui/drivers/qt/moc_viewoptionsdialog.cpp" #endif /*============================================================ diff --git a/pkg/apple/BaseConfig.xcconfig b/pkg/apple/BaseConfig.xcconfig index 1969463c8a..d1386170a1 100644 --- a/pkg/apple/BaseConfig.xcconfig +++ b/pkg/apple/BaseConfig.xcconfig @@ -4,24 +4,11 @@ // // Created by Stuart Carnie on 5/10/18. // -VULKAN_PACKAGE_PATH = /Volumes/Data/projects/frameworks/vulkan/moltenvk/Package -// macOS -VULKAN_FRAMEWORK_PATH[sdk=macosx*] = $(VULKAN_PACKAGE_PATH)/$(CONFIGURATION)/MoltenVK/macOS - - -// general -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(inherited) $(LOCAL_LIBRARY_DIR)/Frameworks $(VULKAN_FRAMEWORK_PATH) -LIBRARY_SEARCH_PATHS[sdk=macosx*] = $(inherited) $(VULKAN_FRAMEWORK_PATH) - -// OTHER_LDFLAGS = $(inherited) -lMoltenVK -framework MoltenVK - -OTHER_CFLAGS = $(inherited) -DHAVE_RUNAHEAD -DHAVE_GRIFFIN -DHAVE_FLAC -DHAVE_DR_FLAC -DHAVE_DR_MP3 -DHAVE_LROUND -DFLAC__HAS_OGG=0 -DHAVE_CHD -DHAVE_STB_VORBIS -DHAVE_MINIUPNPC -DHAVE_BUILTINMINIUPNPC -DHAVE_UPDATE_ASSETS -DHAVE_LANGEXTRA -DHAVE_CHEEVOS -DHAVE_IMAGEVIEWER -DHAVE_IOHIDMANAGER -DHAVE_CORETEXT -DHAVE_RGUI -DHAVE_MENU -DOSX -DHAVE_OPENGL -DHAVE_CC_RESAMPLER -DHAVE_GLSL -DINLINE=inline -D__LIBRETRO__ -DHAVE_COREAUDIO -DHAVE_DYNAMIC -DHAVE_OVERLAY -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_COCOA -DHAVE_MAIN -DHAVE_NETWORKGAMEPAD -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_THREADS -DHAVE_DYLIB -DHAVE_7ZIP -DHAVE_MATERIALUI -DHAVE_HID -DHAVE_XMB -DHAVE_SEGA -DHAVE_SHADERPIPELINE -DHAVE_MMAP -DHAVE_LIBRETRODB -DHAVE_GETOPT_LONG -DHAVE_METAL -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_SPIRV_CROSS -DWANT_GLSLANG -DENABLE_HLSL -DGLSLANG_OSINCLUDE_UNIX -DMETAL_DEBUG +OTHER_CFLAGS = $(inherited) -DHAVE_RUNAHEAD -DHAVE_GRIFFIN -DHAVE_FLAC -DHAVE_DR_FLAC -DHAVE_DR_MP3 -DHAVE_LROUND -DFLAC__HAS_OGG=0 -DHAVE_CHD -DHAVE_STB_VORBIS -DHAVE_MINIUPNPC -DHAVE_BUILTINMINIUPNPC -DHAVE_UPDATE_ASSETS -DHAVE_LANGEXTRA -DHAVE_CHEEVOS -DHAVE_IMAGEVIEWER -DHAVE_IOHIDMANAGER -DHAVE_CORETEXT -DHAVE_RGUI -DHAVE_MENU -DOSX -DHAVE_OPENGL -DHAVE_CC_RESAMPLER -DHAVE_GLSL -DINLINE=inline -D__LIBRETRO__ -DHAVE_COREAUDIO -DHAVE_DYNAMIC -DHAVE_OVERLAY -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_COCOA -DHAVE_NETWORKGAMEPAD -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_THREADS -DHAVE_DYLIB -DHAVE_7ZIP -DHAVE_MATERIALUI -DHAVE_HID -DHAVE_XMB -DHAVE_SEGA -DHAVE_SHADERPIPELINE -DHAVE_MMAP -DHAVE_LIBRETRODB -DHAVE_GETOPT_LONG -DHAVE_METAL -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_SPIRV_CROSS -DWANT_GLSLANG -DENABLE_HLSL -DGLSLANG_OSINCLUDE_UNIX -DMETAL_DEBUG SRCBASE = $(SRCROOT)/../.. DEPS_DIR = $(SRCBASE)/deps HEADER_SEARCH_PATHS = $(inherited) $(SRCBASE) $(SRCBASE)/gfx/include $(SRCBASE)/libretro-common/include $(DEPS_DIR)/libFLAC/include $(DEPS_DIR)/7zip $(DEPS_DIR)/stb $(DEPS_DIR) $(DEPS_DIR)/SPIRV-Cross $(DEPS_DIR)/glslang $(DEPS_DIR)/glslang/glslang/glslang/Public $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent $(DEPS_DIR)/glslang/glslang/SPIRV $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/Unix CLANG_CXX_LANGUAGE_STANDARD=c++11 -LD_RUNPATH_SEARCH_PATHS = @executable_path CLANG_ENABLE_OBJC_ARC=YES -//SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk diff --git a/pkg/apple/Metal.xcconfig b/pkg/apple/Metal.xcconfig new file mode 100644 index 0000000000..27d22dd265 --- /dev/null +++ b/pkg/apple/Metal.xcconfig @@ -0,0 +1,9 @@ +// +// BaseConfig.xcconfig +// RetroArch +// +// Created by Stuart Carnie on 5/10/18. +// + +OTHER_CFLAGS = $(inherited) -DHAVE_MAIN + diff --git a/pkg/apple/QTConfig.xcconfig b/pkg/apple/QTConfig.xcconfig new file mode 100644 index 0000000000..01ef9d0d01 --- /dev/null +++ b/pkg/apple/QTConfig.xcconfig @@ -0,0 +1,24 @@ +// +// RetroArch build configuration specific to Qt +// +// Created by Stuart Carnie on 5/10/18. +// + +// QT Support +QT_INSTALL = /usr/local/opt/qt +QT_FRAMEWORK_PATH = $(QT_INSTALL)/lib +QT_FRAMEWORKS = -framework QtWidgets -framework QtGui -framework QtConcurrent -framework QtNetwork -framework QtCore + +QT_HEADERS = $(QT_INSTALL)/include +QT_HEADER_SEARCH_PATHS = $(QT_HEADERS) $(QT_HEADERS)/QtWidgets $(QT_HEADERS)/QtGui $(QT_HEADERS)/QtConcurrent $(QT_HEADERS)/QtNetwork $(QT_HEADERS)/QtCore +QT_CFLAGS = -DHAVE_QT -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB + +// general +FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(inherited) $(QT_FRAMEWORK_PATH) + +OTHER_LDFLAGS = $(inherited) $(QT_FRAMEWORKS) + +OTHER_CFLAGS = $(inherited) $(QT_CFLAGS) + +HEADER_SEARCH_PATHS = $(inherited) $(QT_HEADER_SEARCH_PATHS) +LD_RUNPATH_SEARCH_PATHS = @executable_path diff --git a/pkg/apple/RetroArch copy-Info.plist b/pkg/apple/RetroArch copy-Info.plist new file mode 100644 index 0000000000..a28050a571 --- /dev/null +++ b/pkg/apple/RetroArch copy-Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + * + + CFBundleTypeName + All Files + CFBundleTypeRole + Viewer + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + retroarch + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.7.4 + CFBundleSignature + ???? + CFBundleVersion + 1.7.4 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHighResolutionCapable + + NSHumanReadableCopyright + Copyright © 2018 RetroArch. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + RApplication + + diff --git a/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj index 2b2e562f91..ff6a1ed853 100644 --- a/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj +++ b/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj @@ -8,6 +8,26 @@ /* Begin PBXBuildFile section */ 05269A6220ABF20500C29F1E /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05269A6120ABF20500C29F1E /* MetalKit.framework */; }; + 05422E3E2140C8DB00F09961 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 05422E3F2140C8DB00F09961 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; + 05422E402140C8DB00F09961 /* retroarch.icns in Resources */ = {isa = PBXBuildFile; fileRef = 84DD5EB71A89F1C7007336C1 /* retroarch.icns */; }; + 05422E432140C8DB00F09961 /* griffin_glslang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05D7753420A5678400646447 /* griffin_glslang.cpp */; }; + 05422E442140C8DB00F09961 /* menu_pipeline.metal in Sources */ = {isa = PBXBuildFile; fileRef = 05770B9820E805160013DABC /* menu_pipeline.metal */; }; + 05422E452140C8DB00F09961 /* griffin_cpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05D7753320A5678300646447 /* griffin_cpp.cpp */; }; + 05422E462140C8DB00F09961 /* griffin_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 509F0C9C1AA23AFC00619ECC /* griffin_objc.m */; }; + 05422E472140C8DB00F09961 /* griffin.c in Sources */ = {isa = PBXBuildFile; fileRef = 840222FB1A889EE2009AB261 /* griffin.c */; }; + 05422E482140C8DB00F09961 /* Shaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 05A8C74E20DB72F100FF7857 /* Shaders.metal */; }; + 05422E4A2140C8DB00F09961 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05A8E23B20A63CF50084ABDA /* QuartzCore.framework */; }; + 05422E4B2140C8DB00F09961 /* IOSurface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05A8E23920A63CED0084ABDA /* IOSurface.framework */; }; + 05422E4C2140C8DB00F09961 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05A8E23720A63CB40084ABDA /* Metal.framework */; }; + 05422E4D2140C8DB00F09961 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05269A6120ABF20500C29F1E /* MetalKit.framework */; }; + 05422E4E2140C8DB00F09961 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5061C8A31AE47E510080AE14 /* libz.dylib */; }; + 05422E4F2140C8DB00F09961 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DD5EA81A89E4BE007336C1 /* CoreAudio.framework */; }; + 05422E502140C8DB00F09961 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DD5EB21A89E6C0007336C1 /* AudioUnit.framework */; }; + 05422E512140C8DB00F09961 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DD5EAC1A89E5B4007336C1 /* OpenGL.framework */; }; + 05422E522140C8DB00F09961 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; }; + 05422E532140C8DB00F09961 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DD5E9E1A88E45B007336C1 /* CoreVideo.framework */; }; + 05422E542140C8DB00F09961 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DD5EB41A89E737007336C1 /* IOKit.framework */; }; 05770B9920E805160013DABC /* menu_pipeline.metal in Sources */ = {isa = PBXBuildFile; fileRef = 05770B9820E805160013DABC /* menu_pipeline.metal */; }; 05A8C7B420DB75A500FF7857 /* Shaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 05A8C74E20DB72F100FF7857 /* Shaders.metal */; }; 05A8E23820A63CB40084ABDA /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05A8E23720A63CB40084ABDA /* Metal.framework */; }; @@ -40,10 +60,47 @@ name = "Embed Libraries"; runOnlyForDeploymentPostprocessing = 0; }; + 05422E552140C8DB00F09961 /* Embed Libraries */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 6; + files = ( + ); + name = "Embed Libraries"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 05269A6120ABF20500C29F1E /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; }; + 05366512213F8BE5007E7EA0 /* thumbnailpackdownload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = thumbnailpackdownload.cpp; sourceTree = ""; }; + 05366513213F8BE5007E7EA0 /* ui_qt_application.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ui_qt_application.cpp; sourceTree = ""; }; + 05366514213F8BE5007E7EA0 /* coreoptionsdialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coreoptionsdialog.h; sourceTree = ""; }; + 05366515213F8BE5007E7EA0 /* viewoptionsdialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = viewoptionsdialog.h; sourceTree = ""; }; + 05366516213F8BE5007E7EA0 /* filedropwidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filedropwidget.h; sourceTree = ""; }; + 05366517213F8BE5007E7EA0 /* ui_qt_load_core_window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ui_qt_load_core_window.cpp; sourceTree = ""; }; + 05366518213F8BE5007E7EA0 /* playlistentrydialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = playlistentrydialog.cpp; sourceTree = ""; }; + 05366519213F8BE5007E7EA0 /* ui_qt_load_core_window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui_qt_load_core_window.h; sourceTree = ""; }; + 0536651A213F8BE5007E7EA0 /* shaderparamsdialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shaderparamsdialog.cpp; sourceTree = ""; }; + 0536651B213F8BE5007E7EA0 /* ui_qt_browser_window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ui_qt_browser_window.cpp; sourceTree = ""; }; + 0536651C213F8BE5007E7EA0 /* ui_qt_msg_window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ui_qt_msg_window.cpp; sourceTree = ""; }; + 0536651D213F8BE5007E7EA0 /* flowlayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = flowlayout.h; sourceTree = ""; }; + 0536651E213F8BE5007E7EA0 /* playlistthumbnaildownload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = playlistthumbnaildownload.cpp; sourceTree = ""; }; + 0536651F213F8BE5007E7EA0 /* playlistentrydialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = playlistentrydialog.h; sourceTree = ""; }; + 05366520213F8BE5007E7EA0 /* coreinfodialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coreinfodialog.cpp; sourceTree = ""; }; + 05366521213F8BE5007E7EA0 /* filedropwidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = filedropwidget.cpp; sourceTree = ""; }; + 05366522213F8BE5007E7EA0 /* thumbnaildownload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = thumbnaildownload.cpp; sourceTree = ""; }; + 05366523213F8BE5007E7EA0 /* playlist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = playlist.cpp; sourceTree = ""; }; + 05366524213F8BE5007E7EA0 /* ui_qt_themes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui_qt_themes.h; sourceTree = ""; }; + 05366525213F8BE5007E7EA0 /* shaderparamsdialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shaderparamsdialog.h; sourceTree = ""; }; + 05366526213F8BE5007E7EA0 /* flowlayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = flowlayout.cpp; sourceTree = ""; }; + 05366527213F8BE5007E7EA0 /* viewoptionsdialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = viewoptionsdialog.cpp; sourceTree = ""; }; + 05366528213F8BE5007E7EA0 /* coreoptionsdialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coreoptionsdialog.cpp; sourceTree = ""; }; + 05366529213F8BE5007E7EA0 /* ui_qt_window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ui_qt_window.cpp; sourceTree = ""; }; + 0536652A213F8BE5007E7EA0 /* invader_png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = invader_png.h; sourceTree = ""; }; + 0536652B213F8BE5007E7EA0 /* coreinfodialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coreinfodialog.h; sourceTree = ""; }; + 0536652C213F8BE5007E7EA0 /* updateretroarch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = updateretroarch.cpp; sourceTree = ""; }; 0538874D20DDD5C600769232 /* dxgi_common.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dxgi_common.c; sourceTree = ""; }; 0538874E20DDD5C600769232 /* dxgi_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dxgi_common.h; sourceTree = ""; }; 0538875120DE11D200769232 /* retro_common_api.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = retro_common_api.h; sourceTree = ""; }; @@ -55,6 +112,10 @@ 0538875720DE11D300769232 /* retro_assert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = retro_assert.h; sourceTree = ""; }; 0538875820DE11D300769232 /* retro_endianness.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = retro_endianness.h; sourceTree = ""; }; 0538875920DE11D300769232 /* libretro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libretro.h; sourceTree = ""; }; + 05422E592140C8DB00F09961 /* RetroArchQT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArchQT.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 05422E5A2140C8DC00F09961 /* RetroArch copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "RetroArch copy-Info.plist"; path = "/Volumes/Data/projects/libretro/retroarch/pkg/apple/RetroArch copy-Info.plist"; sourceTree = ""; }; + 05422E5B2140CE3500F09961 /* VulkanConfig.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = VulkanConfig.xcconfig; sourceTree = ""; }; + 05422E5C2140CFC500F09961 /* Metal.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Metal.xcconfig; sourceTree = ""; }; 0548E2B220F976E10094A083 /* driver.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = driver.c; path = ../../driver.c; sourceTree = ""; }; 0548E2B320F976E10094A083 /* dynamic.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = dynamic.c; path = ../../dynamic.c; sourceTree = ""; }; 0548E2B420F976E10094A083 /* dynamic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = dynamic.h; path = ../../dynamic.h; sourceTree = ""; }; @@ -459,7 +520,6 @@ 089C165DFE840E0CC02AAC07 /* InfoPlist.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = OSX/en.lproj/InfoPlist.strings; sourceTree = ""; }; 1DDD58150DA1D0A300B32029 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainMenu.xib; path = OSX/en.lproj/MainMenu.xib; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 5008453B1B89300700CE6073 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = /../../pkg/apple/OSX/Info.plist; sourceTree = SOURCE_ROOT; }; 5061C8A31AE47E510080AE14 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 509F0C9C1AA23AFC00619ECC /* griffin_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = griffin_objc.m; path = ../../griffin/griffin_objc.m; sourceTree = ""; }; 840222FB1A889EE2009AB261 /* griffin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = griffin.c; path = ../../griffin/griffin.c; sourceTree = SOURCE_ROOT; }; @@ -475,9 +535,28 @@ 8D1107320486CEB800E47090 /* RetroArch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArch.app; sourceTree = BUILT_PRODUCTS_DIR; }; A902040DE66D42F9EE47BFE3 /* MenuDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuDisplay.h; sourceTree = ""; }; A902070F2C43F222FD56A95A /* MenuDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuDisplay.m; sourceTree = ""; }; + A90207489289602F593626D5 /* QTConfig.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = QTConfig.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 05422E492140C8DB00F09961 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 05422E4A2140C8DB00F09961 /* QuartzCore.framework in Frameworks */, + 05422E4B2140C8DB00F09961 /* IOSurface.framework in Frameworks */, + 05422E4C2140C8DB00F09961 /* Metal.framework in Frameworks */, + 05422E4D2140C8DB00F09961 /* MetalKit.framework in Frameworks */, + 05422E4E2140C8DB00F09961 /* libz.dylib in Frameworks */, + 05422E4F2140C8DB00F09961 /* CoreAudio.framework in Frameworks */, + 05422E502140C8DB00F09961 /* AudioUnit.framework in Frameworks */, + 05422E512140C8DB00F09961 /* OpenGL.framework in Frameworks */, + 05422E522140C8DB00F09961 /* AppKit.framework in Frameworks */, + 05422E532140C8DB00F09961 /* CoreVideo.framework in Frameworks */, + 05422E542140C8DB00F09961 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8D11072E0486CEB800E47090 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -499,6 +578,40 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 05366511213F8BE5007E7EA0 /* qt */ = { + isa = PBXGroup; + children = ( + 05366520213F8BE5007E7EA0 /* coreinfodialog.cpp */, + 0536652B213F8BE5007E7EA0 /* coreinfodialog.h */, + 05366528213F8BE5007E7EA0 /* coreoptionsdialog.cpp */, + 05366514213F8BE5007E7EA0 /* coreoptionsdialog.h */, + 05366521213F8BE5007E7EA0 /* filedropwidget.cpp */, + 05366516213F8BE5007E7EA0 /* filedropwidget.h */, + 05366526213F8BE5007E7EA0 /* flowlayout.cpp */, + 0536651D213F8BE5007E7EA0 /* flowlayout.h */, + 0536652A213F8BE5007E7EA0 /* invader_png.h */, + 05366523213F8BE5007E7EA0 /* playlist.cpp */, + 05366518213F8BE5007E7EA0 /* playlistentrydialog.cpp */, + 0536651F213F8BE5007E7EA0 /* playlistentrydialog.h */, + 0536651E213F8BE5007E7EA0 /* playlistthumbnaildownload.cpp */, + 0536651A213F8BE5007E7EA0 /* shaderparamsdialog.cpp */, + 05366525213F8BE5007E7EA0 /* shaderparamsdialog.h */, + 05366522213F8BE5007E7EA0 /* thumbnaildownload.cpp */, + 05366512213F8BE5007E7EA0 /* thumbnailpackdownload.cpp */, + 05366513213F8BE5007E7EA0 /* ui_qt_application.cpp */, + 0536651B213F8BE5007E7EA0 /* ui_qt_browser_window.cpp */, + 05366517213F8BE5007E7EA0 /* ui_qt_load_core_window.cpp */, + 05366519213F8BE5007E7EA0 /* ui_qt_load_core_window.h */, + 0536651C213F8BE5007E7EA0 /* ui_qt_msg_window.cpp */, + 05366524213F8BE5007E7EA0 /* ui_qt_themes.h */, + 05366529213F8BE5007E7EA0 /* ui_qt_window.cpp */, + 0536652C213F8BE5007E7EA0 /* updateretroarch.cpp */, + 05366527213F8BE5007E7EA0 /* viewoptionsdialog.cpp */, + 05366515213F8BE5007E7EA0 /* viewoptionsdialog.h */, + ); + path = qt; + sourceTree = ""; + }; 0538874F20DE117B00769232 /* libretro-common */ = { isa = PBXGroup; children = ( @@ -797,6 +910,7 @@ isa = PBXGroup; children = ( 05A8C5BB20DB72F000FF7857 /* cocoa */, + 05366511213F8BE5007E7EA0 /* qt */, 05A8C5CE20DB72F000FF7857 /* ui_cocoa.h */, 05A8C5BA20DB72F000FF7857 /* ui_cocoa.m */, 05A8C5CF20DB72F000FF7857 /* ui_cocoatouch.m */, @@ -1283,6 +1397,7 @@ isa = PBXGroup; children = ( 8D1107320486CEB800E47090 /* RetroArch.app */, + 05422E592140C8DB00F09961 /* RetroArchQT.app */, ); name = Products; sourceTree = ""; @@ -1291,13 +1406,16 @@ isa = PBXGroup; children = ( 05D7753120A55D2700646447 /* BaseConfig.xcconfig */, + 05422E5C2140CFC500F09961 /* Metal.xcconfig */, + A90207489289602F593626D5 /* QTConfig.xcconfig */, + 05422E5B2140CE3500F09961 /* VulkanConfig.xcconfig */, 840222FA1A889EA2009AB261 /* Core */, 05A8C51920DB72C200FF7857 /* Sources */, 841CBB821A8A33810066E9F1 /* Assets */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, - 5008453B1B89300700CE6073 /* Info.plist */, + 05422E5A2140C8DC00F09961 /* RetroArch copy-Info.plist */, ); indentWidth = 3; name = RetroArch; @@ -1352,6 +1470,25 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 05422E3C2140C8DB00F09961 /* RetroArchQT */ = { + isa = PBXNativeTarget; + buildConfigurationList = 05422E562140C8DB00F09961 /* Build configuration list for PBXNativeTarget "RetroArchQT" */; + buildPhases = ( + 05422E3D2140C8DB00F09961 /* Resources */, + 05422E422140C8DB00F09961 /* Sources */, + 05422E492140C8DB00F09961 /* Frameworks */, + 05422E552140C8DB00F09961 /* Embed Libraries */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RetroArchQT; + productInstallPath = "$(HOME)/Applications"; + productName = RetroArch; + productReference = 05422E592140C8DB00F09961 /* RetroArchQT.app */; + productType = "com.apple.product-type.application"; + }; 8D1107260486CEB800E47090 /* RetroArch */ = { isa = PBXNativeTarget; buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "RetroArch" */; @@ -1391,11 +1528,22 @@ projectRoot = ""; targets = ( 8D1107260486CEB800E47090 /* RetroArch */, + 05422E3C2140C8DB00F09961 /* RetroArchQT */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 05422E3D2140C8DB00F09961 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 05422E3E2140C8DB00F09961 /* InfoPlist.strings in Resources */, + 05422E3F2140C8DB00F09961 /* MainMenu.xib in Resources */, + 05422E402140C8DB00F09961 /* retroarch.icns in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8D1107290486CEB800E47090 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -1409,6 +1557,19 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 05422E422140C8DB00F09961 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 05422E432140C8DB00F09961 /* griffin_glslang.cpp in Sources */, + 05422E442140C8DB00F09961 /* menu_pipeline.metal in Sources */, + 05422E452140C8DB00F09961 /* griffin_cpp.cpp in Sources */, + 05422E462140C8DB00F09961 /* griffin_objc.m in Sources */, + 05422E472140C8DB00F09961 /* griffin.c in Sources */, + 05422E482140C8DB00F09961 /* Shaders.metal in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8D11072C0486CEB800E47090 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1444,8 +1605,46 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 05422E572140C8DB00F09961 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A90207489289602F593626D5 /* QTConfig.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = "RetroArch copy-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES; + PRODUCT_BUNDLE_IDENTIFIER = libretro.RetroArch; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 05422E582140C8DB00F09961 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A90207489289602F593626D5 /* QTConfig.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + INFOPLIST_FILE = "RetroArch copy-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES; + PRODUCT_BUNDLE_IDENTIFIER = libretro.RetroArch; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; C01FCF4B08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 05422E5C2140CFC500F09961 /* Metal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COMBINE_HIDPI_IMAGES = YES; @@ -1465,6 +1664,7 @@ }; C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 05422E5C2140CFC500F09961 /* Metal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COMBINE_HIDPI_IMAGES = YES; @@ -1559,6 +1759,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 05422E562140C8DB00F09961 /* Build configuration list for PBXNativeTarget "RetroArchQT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 05422E572140C8DB00F09961 /* Debug */, + 05422E582140C8DB00F09961 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "RetroArch" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/pkg/apple/VulkanConfig.xcconfig b/pkg/apple/VulkanConfig.xcconfig new file mode 100644 index 0000000000..afdca6d08d --- /dev/null +++ b/pkg/apple/VulkanConfig.xcconfig @@ -0,0 +1,20 @@ +// +// BaseConfig.xcconfig +// RetroArch +// +// Created by Stuart Carnie on 5/10/18. +// +VULKAN_PACKAGE_PATH = /Volumes/Data/projects/frameworks/vulkan/moltenvk/Package + +// macOS +VULKAN_FRAMEWORK_PATH[sdk=macosx*] = $(VULKAN_PACKAGE_PATH)/$(CONFIGURATION)/MoltenVK/macOS + +// general +FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(inherited) $(LOCAL_LIBRARY_DIR)/Frameworks $(VULKAN_FRAMEWORK_PATH) +LIBRARY_SEARCH_PATHS[sdk=macosx*] = $(inherited) $(VULKAN_FRAMEWORK_PATH) + +OTHER_LDFLAGS = $(inherited) -lMoltenVK -framework MoltenVK + +OTHER_CFLAGS = $(inherited) $(QT_CFLAGS) -DHAVE_VULKAN + +LD_RUNPATH_SEARCH_PATHS = @executable_path