From 71d8892c19b6a1dbfac7d40a3bb6717316e872b9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 19 Jul 2015 12:26:58 +0200 Subject: app bundle finally works --- macosx/install-fail-tool | 4 ++-- macosx/make-app-bundle.sh | 5 ++--- macosx/opentrack.app/Contents/Info.plist | 2 +- macosx/opentrack.sh | 4 ++++ macosx/qt.conf | 2 -- 5 files changed, 9 insertions(+), 8 deletions(-) mode change 100755 => 100644 macosx/install-fail-tool create mode 100755 macosx/opentrack.sh delete mode 100644 macosx/qt.conf (limited to 'macosx') diff --git a/macosx/install-fail-tool b/macosx/install-fail-tool old mode 100755 new mode 100644 index 0f34c3a1..a5464c18 --- a/macosx/install-fail-tool +++ b/macosx/install-fail-tool @@ -4,7 +4,7 @@ test -n "$1" || exit 1 dir="$1" -for i in "$dir"/* "$dir"/*/*; do +for i in "$dir"/* "$dir"/*/* "$dir"/*/*/*; do { test -x "$i" && test -f "$i"; } || continue case "$i" in *.dll|*.exe) continue ;; @@ -13,7 +13,7 @@ for i in "$dir"/* "$dir"/*/*; do case "$i" in *.dylib|*.bin) strip -x "$i" ;; esac echo ---- $i ---- - install_name_tool -id "@executable_path/$(basename -- "$i")" "$i" + install_name_tool -id "@executable_path/$(echo "$i" | sed -e "s,^$dir/,,")" "$i" otool -L "$i" | awk '{ print $1 }' | while read l; do diff --git a/macosx/make-app-bundle.sh b/macosx/make-app-bundle.sh index 7e79d6db..d0588ae2 100644 --- a/macosx/make-app-bundle.sh +++ b/macosx/make-app-bundle.sh @@ -14,16 +14,15 @@ test -n "$version" || exit 1 tmp="$(mktemp -d "/tmp/$APPNAME-tmp.XXXXXXX")" test $? -eq 0 || exit 1 -"$dir/install-fail-tool" "$install" +sh "$dir/install-fail-tool" "$install" cp -R "$dir/opentrack.app" "$tmp/" || exit 1 cp -R "$install" "$tmp/$APPNAME.app/Contents/MacOS" || exit 1 sed -i '' -e "s#@OPENTRACK-VERSION@#$version#g" "$tmp/$APPNAME.app/Contents/Info.plist" || exit 1 -#cp "$dir/qt.conf" "$tmp/$APPNAME.app/Contents/MacOS" || exit 1 - mkdir "$tmp/$APPNAME.iconset" || exit 1 mkdir "$tmp/$APPNAME.app/Contents/Resources" || exit 1 +cp "$dir"/opentrack.sh "$tmp/$APPNAME.app/Contents/MacOS" || exit 1 sips -z 16 16 "$dir/../facetracknoir/images/facetracknoir.png" --out "$tmp/$APPNAME.iconset/icon_16x16.png" || exit 1 sips -z 32 32 "$dir/../facetracknoir/images/facetracknoir.png" --out "$tmp/$APPNAME.iconset/icon_16x16@2x.png" || exit 1 diff --git a/macosx/opentrack.app/Contents/Info.plist b/macosx/opentrack.app/Contents/Info.plist index ed4b0b05..41ca402a 100644 --- a/macosx/opentrack.app/Contents/Info.plist +++ b/macosx/opentrack.app/Contents/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion en CFBundleExecutable - opentrack.bin + opentrack.sh CFBundleIdentifier com.github.opentrack CFBundleName diff --git a/macosx/opentrack.sh b/macosx/opentrack.sh new file mode 100755 index 00000000..62ad01a5 --- /dev/null +++ b/macosx/opentrack.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +dir="$(dirname -- "$0")" +exec "$dir"/opentrack.bin -platformpluginpath "$dir" "$@" diff --git a/macosx/qt.conf b/macosx/qt.conf deleted file mode 100644 index e69f24eb..00000000 --- a/macosx/qt.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Paths] -Plugins = . -- cgit v1.2.3