forked from libretro/RetroArch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(macOS): Initial Desktop UI (Qt) support
* Adds new RetroArchQT build target to RetroArch_Metal.xcodeproj Prerequisites: * Install Qt Frameworks $ brew install qt * Build `moc` files using $ make -f Makefile.apple HAVE_QT=1 Q=/usr/local/opt/qt/bin/moc generate Limitations: * Qt frameworks are not embedded in bundle, therefore Qt must be installed via the `brew` command
- Loading branch information
1 parent
c60fdf0
commit 428f895
Showing
9 changed files
with
352 additions
and
16 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
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,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 '$*=$($*)' |
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
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,9 @@ | ||
// | ||
// BaseConfig.xcconfig | ||
// RetroArch | ||
// | ||
// Created by Stuart Carnie on 5/10/18. | ||
// | ||
|
||
OTHER_CFLAGS = $(inherited) -DHAVE_MAIN | ||
|
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,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 |
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,49 @@ | ||
<?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>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleDocumentTypes</key> | ||
<array> | ||
<dict> | ||
<key>CFBundleTypeExtensions</key> | ||
<array> | ||
<string>*</string> | ||
</array> | ||
<key>CFBundleTypeName</key> | ||
<string>All Files</string> | ||
<key>CFBundleTypeRole</key> | ||
<string>Viewer</string> | ||
</dict> | ||
</array> | ||
<key>CFBundleExecutable</key> | ||
<string>${EXECUTABLE_NAME}</string> | ||
<key>CFBundleIconFile</key> | ||
<string>retroarch</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.7.4</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.7.4</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>${MACOSX_DEPLOYMENT_TARGET}</string> | ||
<key>NSHighResolutionCapable</key> | ||
<true/> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Copyright © 2018 RetroArch. All rights reserved.</string> | ||
<key>NSMainNibFile</key> | ||
<string>MainMenu</string> | ||
<key>NSPrincipalClass</key> | ||
<string>RApplication</string> | ||
</dict> | ||
</plist> |
Oops, something went wrong.