2015-05-29 15:33:47 +02:00
|
|
|
#!/usr/bin/env bash
|
2013-10-28 10:10:14 +01:00
|
|
|
|
2012-11-03 17:37:50 +01:00
|
|
|
APPDIR="$(dirname -- "$(readlink -f -- "${0}")" )"
|
2010-01-29 21:53:21 +01:00
|
|
|
|
2009-05-31 17:53:33 +02:00
|
|
|
for LIB in \
|
2015-10-13 14:10:43 +02:00
|
|
|
"$APPDIR"/java/lib/rt.jar \
|
|
|
|
"$APPDIR"/java/lib/tools.jar \
|
|
|
|
"$APPDIR"/lib/*.jar \
|
2009-05-31 17:53:33 +02:00
|
|
|
;
|
|
|
|
do
|
2010-11-27 19:50:33 +01:00
|
|
|
CLASSPATH="${CLASSPATH}:${LIB}"
|
2009-05-31 17:53:33 +02:00
|
|
|
done
|
|
|
|
export CLASSPATH
|
|
|
|
|
2015-06-30 09:07:02 +02:00
|
|
|
LD_LIBRARY_PATH=$APPDIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
2009-08-03 22:57:46 +02:00
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
|
2009-05-31 17:53:33 +02:00
|
|
|
export PATH="${APPDIR}/java/bin:${PATH}"
|
|
|
|
|
2015-05-12 10:48:53 +02:00
|
|
|
export JAVA_TOOL_OPTIONS=`echo $JAVA_TOOL_OPTIONS | sed 's|-javaagent:/usr/share/java/jayatanaag.jar||g'`
|
|
|
|
|
2015-06-09 17:38:09 +02:00
|
|
|
JAVA=java
|
2015-10-13 14:10:43 +02:00
|
|
|
if [ -x "$APPDIR/java/bin/java" ]; then
|
2015-06-30 09:07:02 +02:00
|
|
|
JAVA=$APPDIR/java/bin/java
|
2015-06-09 17:38:09 +02:00
|
|
|
fi
|
2013-10-28 10:10:14 +01:00
|
|
|
|
2015-10-13 14:10:43 +02:00
|
|
|
# Collect options to java in an array, to properly handle whitespace in options
|
2015-12-16 10:02:37 +01:00
|
|
|
JAVA_OPTIONS=("-DAPP_DIR=$APPDIR" "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel")
|
2015-10-13 14:10:43 +02:00
|
|
|
|
2016-07-14 02:00:12 +02:00
|
|
|
# Only show the splash screen when no options are present
|
|
|
|
if [[ "$@" != *"--"* ]] ; then
|
2015-10-13 14:10:43 +02:00
|
|
|
JAVA_OPTIONS+=("-splash:$APPDIR/lib/splash.png")
|
|
|
|
fi
|
|
|
|
|
2015-10-14 21:42:20 +02:00
|
|
|
"$JAVA" "${JAVA_OPTIONS[@]}" processing.app.Base "$@"
|
2015-06-26 08:57:51 +02:00
|
|
|
|