-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2225 Create and release CKAN.app for Mac OS X
- Loading branch information
Showing
7 changed files
with
116 additions
and
0 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
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
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,23 @@ | ||
#!/bin/sh | ||
|
||
# Check El Capitan's mono install location | ||
PATH="$PATH":/usr/local/bin | ||
export PATH | ||
|
||
MONO=$(which mono) | ||
|
||
if [ -z "$MONO" -o ! -x "$MONO" ] | ||
then | ||
# We could not find mono. The wiki explains how to install. | ||
open 'https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-OSX' | ||
else | ||
# Mono found, so we can run CKAN. | ||
# Fetch the path relative to the launch point where this shell script exists. (taken from Tasque & macpack) | ||
APP_PATH=$(echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }') | ||
ASSEMBLY=ckan.exe | ||
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current | ||
export DYLD_FALLBACK_LIBRARY_PATH=$APP_PATH/Contents/MacOS:$MONO_FRAMEWORK_PATH/lib:/lib:/usr/lib | ||
|
||
cd "$APP_PATH/Contents/MacOS" | ||
exec -a "CKAN" "$MONO" --debug $ASSEMBLY $@ | ||
fi |
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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>CKAN</string> | ||
<key>CFBundleIconFile</key> | ||
<string>CKAN.icns</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>org.ksp-ckan.ckan</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>1.0</string> | ||
<key>CFBundleName</key> | ||
<string>CKAN</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>@VERSION@</string> | ||
<key>CFBundleSignature</key> | ||
<string>xmmd</string> | ||
<key>CFBundleVersion</key> | ||
<string>@VERSION@</string> | ||
<key>NSAppleScriptEnabled</key> | ||
<string>NO</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,46 @@ | ||
.PHONY: clean | ||
|
||
NAME:=CKAN | ||
APPNAME:=$(NAME).app | ||
OUTDIR:=../_build/osx | ||
DMGROOT:=$(OUTDIR)/dmg | ||
APPROOT=$(DMGROOT)/$(APPNAME) | ||
DMG:=$(OUTDIR)/$(NAME).dmg | ||
SCRIPTSRC:=CKAN | ||
SCRIPTDEST:=$(APPROOT)/Contents/MacOS/CKAN | ||
EXESRC:=../_build/repack/Release/ckan.exe | ||
EXEDEST:=$(APPROOT)/Contents/MacOS/ckan.exe | ||
ICNSSRC:=../assets/ckan.icns | ||
ICNSDEST:=$(APPROOT)/Contents/Resources/CKAN.icns | ||
PLISTSRC:=Info.plist.in | ||
PLISTTMP:=$(OUTDIR)/Info.plist | ||
PLISTDEST:=$(APPROOT)/Contents/Info.plist | ||
CHANGELOGSRC:=../CHANGELOG.md | ||
VERSION:=$(shell egrep '^\s*\#\#\s+v.*$$' $(CHANGELOGSRC) | head -1 | sed -e 's/^\s*\#\#\s\+v//' ) | ||
|
||
$(DMG): $(EXEDEST) $(SCRIPTDEST) $(ICNSDEST) $(PLISTDEST) | ||
mkdir -p $(OUTDIR) | ||
genisoimage -V $(NAME) -D -R -apple -no-pad -o $@ $(DMGROOT) | ||
|
||
$(EXEDEST): $(EXESRC) | ||
mkdir -p $(shell dirname $@) | ||
cp -l $< $@ | ||
|
||
$(EXESRC): | ||
cd .. && ./build --configuration=Release | ||
|
||
$(SCRIPTDEST): $(SCRIPTSRC) | ||
mkdir -p $(shell dirname $@) | ||
cp -l $< $@ | ||
|
||
$(ICNSDEST): $(ICNSSRC) | ||
mkdir -p $(shell dirname $@) | ||
cp -l $< $@ | ||
|
||
$(PLISTDEST): $(PLISTSRC) | ||
mkdir -p $(shell dirname $@) | ||
sed -e 's/@VERSION@/$(VERSION)/' $< > $(PLISTTMP) | ||
plistutil -i $(PLISTTMP) -o $@ | ||
|
||
clean: | ||
rm -rf $(OUTDIR) |