diff options
Diffstat (limited to 'macosx')
-rwxr-xr-x | macosx/install-fail-tool | 25 | ||||
-rw-r--r-- | macosx/make-app-bundle.sh | 22 | ||||
-rw-r--r-- | macosx/opentrack.app/Contents/Info.plist | 20 | ||||
-rw-r--r-- | macosx/opentrack.app/Contents/PkgInfo | 1 | ||||
-rw-r--r-- | macosx/qt.conf | 2 |
5 files changed, 52 insertions, 18 deletions
diff --git a/macosx/install-fail-tool b/macosx/install-fail-tool new file mode 100755 index 00000000..0f34c3a1 --- /dev/null +++ b/macosx/install-fail-tool @@ -0,0 +1,25 @@ +#!/bin/sh + +test -n "$1" || exit 1 + +dir="$1" + +for i in "$dir"/* "$dir"/*/*; do + { test -x "$i" && test -f "$i"; } || continue + case "$i" in + *.dll|*.exe) continue ;; + *) : ;; + esac + case "$i" in + *.dylib|*.bin) strip -x "$i" ;; esac + echo ---- $i ---- + install_name_tool -id "@executable_path/$(basename -- "$i")" "$i" + + otool -L "$i" | awk '{ print $1 }' | + while read l; do + j="$(basename -- "$l")" + if test -e "$dir/$j"; then + install_name_tool -change "$l" "@executable_path/$j" "$i" + fi + done +done diff --git a/macosx/make-app-bundle.sh b/macosx/make-app-bundle.sh index 390f7af1..7e79d6db 100644 --- a/macosx/make-app-bundle.sh +++ b/macosx/make-app-bundle.sh @@ -4,7 +4,7 @@ APPNAME=opentrack dir="$1" test -n "$dir" || exit 1 -install="$1" +install="$2" test -n "$install" || exit 1 output_dir="$3" test -n "$output_dir" || exit 1 @@ -14,12 +14,16 @@ test -n "$version" || exit 1 tmp="$(mktemp -d "/tmp/$APPNAME-tmp.XXXXXXX")" test $? -eq 0 || exit 1 -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 +"$dir/install-fail-tool" "$install" -rm -rf "$tmp/$APPNAME.iconset" -mkdir "$tmp/$APPNAME.iconset" +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 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 @@ -31,5 +35,7 @@ iconutil -c icns -o "$tmp/$APPNAME.app/Contents/Resources/$APPNAME.icns" "$tmp/$ rm -r "$tmp/$APPNAME.iconset" cd "$tmp" || exit 1 -zip -9 "$output_dir/$APPNAME-$version.zip" "$APPNAME.app" || exit 1 -ls -lh "$output_dir/$APPNAME-$version.zip"
\ No newline at end of file +rm -f "$output_dir/$APPNAME-$version.zip" +zip -9r "$output_dir/$APPNAME-$version.zip" "$APPNAME.app" || exit 1 +rm -rf "$tmp" +ls -lh "$output_dir/$APPNAME-$version.zip" diff --git a/macosx/opentrack.app/Contents/Info.plist b/macosx/opentrack.app/Contents/Info.plist index 60791ba9..ed4b0b05 100644 --- a/macosx/opentrack.app/Contents/Info.plist +++ b/macosx/opentrack.app/Contents/Info.plist @@ -1,9 +1,9 @@ <?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"> +<!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>CFBundleGetInfoString</key> - <string>@OPENTRACK-VERSION@</string> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> <key>CFBundleExecutable</key> <string>opentrack.bin</string> <key>CFBundleIdentifier</key> @@ -12,15 +12,15 @@ <string>opentrack</string> <key>CFBundleIconFile</key> <string>opentrack.icns</string> - <key>CFBundleShortVersionString</key> - <string>0.01</string> + <key>CFBundleVersion</key> + <string>@OPENTRACK-VERSION@</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> - <key>IFMajorVersion</key> - <integer>0</integer> - <key>IFMinorVersion</key> - <integer>1</integer> + <key>CFBundleDisplayName</key> + <string>opentrack</string> + <key>CFBundleSignature</key> + <string>????</string> </dict> -</plist>
\ No newline at end of file +</plist> diff --git a/macosx/opentrack.app/Contents/PkgInfo b/macosx/opentrack.app/Contents/PkgInfo new file mode 100644 index 00000000..b18f8c6c --- /dev/null +++ b/macosx/opentrack.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPLopentrack diff --git a/macosx/qt.conf b/macosx/qt.conf new file mode 100644 index 00000000..e69f24eb --- /dev/null +++ b/macosx/qt.conf @@ -0,0 +1,2 @@ +[Paths] +Plugins = . |