Build self-contained APP bundle (non-MAS)

This commit is contained in:
Reinhard Pointner 2018-06-12 02:23:04 +07:00
parent a824f361d7
commit ae3b2e171c
1 changed files with 20 additions and 0 deletions

20
installer/app/filebot.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
PRG="$0"
# resolve relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
# get canonical path
BIN=`dirname "$PRG"`
APP_ROOT=`cd "$BIN/.." && pwd`
# launch filebot
"$APP_ROOT"/PlugIns/*.jre/Contents/Home/bin/java @{java.application.options} -Dapplication.deployment=app -Djava.awt.headless=true -Dapple.awt.UIElement=true -Djna.boot.library.path="$APP_ROOT/MacOS" -Djna.library.path="$APP_ROOT/MacOS" -Djava.library.path="$APP_ROOT/MacOS" -Dnet.filebot.AcoustID.fpcalc="$APP_ROOT/MacOS/fpcalc" $JAVA_OPTS -classpath "$APP_ROOT/Java/*" net.filebot.Main "$@"