-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
139 additions
and
73 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,7 @@ | ||
include ../shared/desktop/Makefile.sources | ||
|
||
SOURCES_CXX += $(DESKTOP_SRC_DIR)/nfd/nfd_gtk.cpp | ||
CPPFLAGS += `pkg-config --cflags gtk+-3.0` | ||
LDFLAGS += `pkg-config --libs gtk+-3.0` | ||
|
||
include ../shared/desktop/Makefile.common |
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 @@ | ||
<?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>run.sh</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>me.ignaciosanchez.Geargrafx</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>Geargrafx</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleIconFile</key> | ||
<string>iconfile</string> | ||
<key>NSHighResolutionCapable</key> | ||
<string>True</string> | ||
<key>CFBundleVersion</key> | ||
<string>@version@</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>@version@</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
include ../shared/desktop/Makefile.sources | ||
|
||
SOURCES_MM += $(DESKTOP_SRC_DIR)/nfd/nfd_cocoa.mm | ||
OBJECTS += $(SOURCES_MM:.mm=.o) | ||
LDFLAGS += -framework AppKit -framework UniformTypeIdentifiers | ||
|
||
include ../shared/desktop/Makefile.common | ||
|
||
# Brew use a different path on Apple Silicon as on Intel | ||
UNAME_P := $(shell uname -m) | ||
ifneq ($(filter arm64%,$(UNAME_P)),) | ||
DYLIB_PATH=/opt/homebrew/lib/ | ||
else | ||
DYLIB_PATH=/usr/local/opt/sdl2/lib | ||
endif | ||
|
||
SDL_DYLIB=libSDL2-2.0.0.dylib | ||
APP_NAME=Geargrafx | ||
|
||
bundle: | ||
rm -rf $(APP_NAME).app | ||
mkdir -p $(APP_NAME).app/Contents/{MacOS,Resources,Frameworks} | ||
sed -e "s/@version@/$(GIT_VERSION)/g" Info.plist > $(APP_NAME).app/Contents/Info.plist | ||
cp $(DYLIB_PATH)/$(SDL_DYLIB) $(APP_NAME).app/Contents/Frameworks/ | ||
cp iconfile.icns $(APP_NAME).app/Contents/Resources/ | ||
cp $(TARGET) $(APP_NAME).app/Contents/MacOS/ | ||
cp run.sh $(APP_NAME).app/Contents/MacOS/ | ||
cp ../gamecontrollerdb.txt $(APP_NAME).app/Contents/MacOS/ | ||
install_name_tool -change $(DYLIB_PATH)/$(SDL_DYLIB) @$(APP_NAME).app/Contents/MacOS/$(SDL_DYLIB) $(APP_NAME).app/Contents/MacOS/$(APP_NAME) | ||
|
||
dist: clean all bundle | ||
@echo Success!! |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
cd "${0%/*}" | ||
./geargrafx |