From 57c74a3c92db4ad8ca0d04112c2a15abbd152c3b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 28 Mar 2015 18:37:38 +0000 Subject: [PATCH] * clean up some launcher files and add default options for using the 7z executable --- installer/deb/filebot.sh | 16 ++++++++++++++-- installer/portable/filebot.cmd | 2 +- installer/ubuntu/filebot.sh | 17 +++++++++++++++-- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/installer/deb/filebot.sh b/installer/deb/filebot.sh index ac1b1e6c..93e349b0 100644 --- a/installer/deb/filebot.sh +++ b/installer/deb/filebot.sh @@ -1,2 +1,14 @@ -#!/bin/bash -java -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=deb -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -Dnet.filebot.AcoustID.fpcalc=/usr/share/filebot/fpcalc -jar /usr/share/filebot/FileBot.jar "$@" +#!/bin/sh + +APP_ROOT="/usr/share/filebot" +APP_DATA="$HOME/.filebot" + +# add APP_ROOT to LD_LIBRARY_PATH +if [ ! -z "$LD_LIBRARY_PATH" ] +then + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APP_ROOT" +else + export LD_LIBRARY_PATH="$APP_ROOT" +fi + +java -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=deb "-Dapplication.dir=$APP_DATA" "-Djava.io.tmpdir=$APP_DATA/temp" "-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/fpcalc" -jar "$APP_ROOT/FileBot.jar" "$@" diff --git a/installer/portable/filebot.cmd b/installer/portable/filebot.cmd index c028b06d..3089f2f5 100644 --- a/installer/portable/filebot.cmd +++ b/installer/portable/filebot.cmd @@ -1,2 +1,2 @@ @ECHO OFF -java -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=portable -Dapplication.analytics=true "-Dapplication.dir=%~dp0." "-Duser.home=%~dp0." "-Djava.io.tmpdir=%~dp0temp" "-Djna.library.path=%~dp0" "-Djava.library.path=%~dp0" -Dnet.filebot.AcoustID.fpcalc="%~dp0fpcalc.exe" -Djava.util.prefs.PreferencesFactory=net.filebot.util.prefs.FilePreferencesFactory "-Dnet.filebot.util.prefs.file=%~dp0prefs.properties" -jar "%~dp0FileBot.jar" %* \ No newline at end of file +java -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=portable "-Dapplication.dir=%~dp0." "-Duser.home=%~dp0." "-Djava.io.tmpdir=%~dp0temp" "-Djna.library.path=%~dp0" "-Djava.library.path=%~dp0" "-Dnet.filebot.AcoustID.fpcalc=%~dp0fpcalc.exe" -Djava.util.prefs.PreferencesFactory=net.filebot.util.prefs.FilePreferencesFactory "-Dnet.filebot.util.prefs.file=%~dp0prefs.properties" -jar "%~dp0FileBot.jar" %* diff --git a/installer/ubuntu/filebot.sh b/installer/ubuntu/filebot.sh index f377ff34..059d03d8 100644 --- a/installer/ubuntu/filebot.sh +++ b/installer/ubuntu/filebot.sh @@ -1,5 +1,18 @@ -#!/bin/bash +#!/bin/sh + APP_ROOT="/opt/filebot" +APP_DATA="$HOME/.config/FileBot" +APP_CACHE="$HOME/.cache/FileBot" + +# use embedded JRE JAVA_CMD="$APP_ROOT/jre/bin/java" -$JAVA_CMD -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dsun.java2d.xrender=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.update=skip -Dapplication.deployment=usc -Dnet.filebot.UserFiles.fileChooser=JavaFX "-Dapplication.dir=$HOME/.config/FileBot" "-Dapplication.cache=$HOME/.cache/FileBot/ehcache.disk.store" "-Djava.io.tmpdir=$HOME/.cache/FileBot/java.io.tmpdir" "-Djna.library.path=$APP_ROOT" "-Djava.library.path=$APP_ROOT" "-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/fpcalc" -jar "$APP_ROOT/FileBot.jar" "$@" +# add APP_ROOT to LD_LIBRARY_PATH +if [ ! -z "$LD_LIBRARY_PATH" ] +then + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APP_ROOT" +else + export LD_LIBRARY_PATH="$APP_ROOT" +fi + +"$JAVA_CMD" -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dsun.java2d.xrender=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.update=skip -Dapplication.deployment=usc -Dnet.filebot.UserFiles.fileChooser=JavaFX "-Dapplication.dir=$APP_DATA" "-Dapplication.cache=$APP_CACHE/ehcache.disk.store" "-Djava.io.tmpdir=$APP_CACHE/java.io.tmpdir" "-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/fpcalc" -jar "$APP_ROOT/FileBot.jar" "$@"