mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-13 23:48:46 +01:00
1b95b439a1
This ensures now splash-screen is shown when preferences are changed or CLI-mode is used. More information in #5131. However this does NOT fix #5131, since the Arduino IDE in CLI-mode still requires X11 (according to #1981).
37 lines
946 B
Bash
Executable File
37 lines
946 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
APPDIR="$(dirname -- "$(readlink -f -- "${0}")" )"
|
|
|
|
for LIB in \
|
|
"$APPDIR"/java/lib/rt.jar \
|
|
"$APPDIR"/java/lib/tools.jar \
|
|
"$APPDIR"/lib/*.jar \
|
|
;
|
|
do
|
|
CLASSPATH="${CLASSPATH}:${LIB}"
|
|
done
|
|
export CLASSPATH
|
|
|
|
LD_LIBRARY_PATH=$APPDIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
export LD_LIBRARY_PATH
|
|
|
|
export PATH="${APPDIR}/java/bin:${PATH}"
|
|
|
|
export JAVA_TOOL_OPTIONS=`echo $JAVA_TOOL_OPTIONS | sed 's|-javaagent:/usr/share/java/jayatanaag.jar||g'`
|
|
|
|
JAVA=java
|
|
if [ -x "$APPDIR/java/bin/java" ]; then
|
|
JAVA=$APPDIR/java/bin/java
|
|
fi
|
|
|
|
# Collect options to java in an array, to properly handle whitespace in options
|
|
JAVA_OPTIONS=("-DAPP_DIR=$APPDIR" "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel")
|
|
|
|
# Only show the splash screen when no options are present
|
|
if [[ "$@" != *"--"* ]] ; then
|
|
JAVA_OPTIONS+=("-splash:$APPDIR/lib/splash.png")
|
|
fi
|
|
|
|
"$JAVA" "${JAVA_OPTIONS[@]}" processing.app.Base "$@"
|
|
|