* remove outdated Apple Java bundler and replace with Oracle Java bundle

* fix various OSX bundle issues
This commit is contained in:
Reinhard Pointner 2014-04-22 06:17:21 +00:00
parent fb884c017a
commit 86ad52b696
6 changed files with 40 additions and 37 deletions

View File

@ -219,38 +219,38 @@
<target name="appbundle" depends="fatjar" description="Build an OSX application bundle">
<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler" classpath="${dir.lib}/build/jarbundler.jar" />
<copy tofile="${dir.dist}/appbundle/FileBot.jar" file="${path.fatjar}" />
<!-- build app bundle folder and add native libs -->
<jarbundler dir="${dir.dist}" name="${title}" version="${version}" build="${svn.revision}" icon="${dir.installer}/appbundle/icon.icns" bundleid="net.filebot" jar="${dir.dist}/appbundle/FileBot.jar" stubfile="${dir.installer}/appbundle/JavaApplicationStub" workingdirectory="$JAVAROOT" mainclass="net.filebot.Main" jvmversion="1.7+" vmoptions="-XX:+TieredCompilation">
<javaproperty name="application.deployment" value="app" />
<javaproperty name="unixfs" value="false" />
<javaproperty name="useExtendedFileAttributes" value="true" />
<javaproperty name="useCreationDate" value="false" />
<javaproperty name="net.filebot.AcoustID.fpcalc" value="$JAVAROOT/fpcalc" />
<javaproperty name="jna.library.path" value="$JAVAROOT" />
<javaproperty name="java.library.path" value="$JAVAROOT" />
<javaproperty name="java.net.useSystemProxies" value="true" />
<javaproperty name="sun.net.client.defaultConnectTimeout" value="10000" />
<javaproperty name="sun.net.client.defaultReadTimeout" value="60000" />
</jarbundler>
<!-- shell scripts -->
<copy todir="${dir.dist}/${title}.app/Contents/MacOS" file="${dir.installer}/appbundle/filebot" />
<copy todir="${dir.dist}/${title}.app/Contents/MacOS" file="${dir.installer}/appbundle/install.sh" />
<copy todir="${dir.dist}/${title}.app/Contents/Resources/Java">
<fileset dir="${dir.lib}/native/mac-x86_64" includes="*.dylib" />
</copy>
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${dir.lib}/build/appbundler.jar" />
<bundleapp description="" outputdirectory="${dir.dist}" name="${title}" displayname="${title}" shortversion="${version}" identifier="net.filebot" mainclassname="net.filebot.Main">
<classpath file="${path.fatjar}" />
<librarypath dir="${dir.lib}/native/mac-x86_64" />
<option value="-Dapplication.deployment=app" />
<option value="-Dunixfs=false" />
<option value="-DuseExtendedFileAttributes=true" />
<option value="-DuseCreationDate=false" />
<option value="-Djava.net.useSystemProxies=true" />
<option value="-Dsun.net.client.defaultConnectTimeout=10000" />
<option value="-Dsun.net.client.defaultReadTimeout=60000" />
<option value="-Djna.nosys=true" />
<option value="-Djna.library.path=$APP_ROOT/Contents/MacOS" />
<option value="-Djava.library.path=$APP_ROOT/Contents/MacOS" />
<option value="-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/Contents/MacOS/fpcalc" />
<option value="-XX:+TieredCompilation" />
</bundleapp>
<!-- application bundle folder as .tar.gz -->
<tar destfile="${path.appbundle.tar.gz}" compression="gzip">
<tarfileset dir="${dir.dist}" includes="${title}.app/**" excludes="**/MacOS/**" />
<tarfileset dir="${dir.dist}" includes="${title}.app/**/*.dylib" />
<!-- IMPORTANT application stub must be executable!! -->
<tarfileset dir="${dir.dist}" includes="${title}.app/**/MacOS/**" filemode="755" />
<tarfileset dir="${dir.lib}/native/mac-x86_64" includes="fpcalc" filemode="755" prefix="${title}.app/Contents/Resources/Java" />
<tarfileset dir="${dir.dist}" includes="${title}.app/**/JavaAppLauncher" filemode="755" />
<tarfileset dir="${dir.dist}" includes="${title}.app/**/fpcalc" filemode="755" />
<tarfileset prefix="${title}.app/Contents/MacOS" dir="${dir.installer}/appbundle" includes="*.sh" filemode="755" />
</tar>
<delete dir="${dir.dist}/${title}.app" />
</target>

View File

@ -1,7 +0,0 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
JAVAROOT=$BIN_DIR/../Resources/Java
java -XX:+TieredCompilation -Djava.awt.headless=true -Dunixfs=false -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=app "-Djna.library.path=$JAVAROOT" "-Djava.library.path=$JAVAROOT" "-Dnet.sourceforge.filebot.AcoustID.fpcalc=$JAVAROOT/fpcalc" -jar "$JAVAROOT/FileBot.jar" "$@"

View File

@ -0,0 +1,8 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SOURCE="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
APP_ROOT="$SOURCE/../.."
java -XX:+TieredCompilation -Djava.awt.headless=true -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=app "-Djna.library.path=$APP_ROOT/Contents/MacOS" "-Djava.library.path=$APP_ROOT/Contents/MacOS" "-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/Contents/MacOS/fpcalc" -jar "$APP_ROOT"/Contents/Java/* "$@"

View File

@ -1,4 +1,6 @@
#!/bin/bash
dir_bin=`dirname $0`
path_cmd=$dir_bin/filebot
sudo ln -s "$path_cmd" /usr/bin/filebot
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SOURCE="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
sudo ln -s -f "$SOURCE/filebot.sh" "/usr/bin/filebot"

BIN
lib/build/appbundler.jar Normal file

Binary file not shown.

Binary file not shown.