#!@SHELL@
applet_name=fr.esrf.logviewer.Main

if [ ! $TANGO_HOST ] && [ -f @TSD_RC_FILE@ ]; then
   . @TSD_RC_FILE@
fi

#
# Define the CLASSPATH
#
JAVALIB=@CMAKE_INSTALL_PREFIX@/share/java;
JAVABIN=@CMAKE_INSTALL_PREFIX@/share/java;
ATKBIN=@CMAKE_INSTALL_PREFIX@/share/java;
TLVBIN=@CMAKE_INSTALL_PREFIX@/share/java;

ATKJAR=$ATKBIN/ATKCore.jar:$ATKBIN/ATKWidget.jar:$ATKBIN/log4j.jar

CLASSPATH=$JAVALIB/JTango.jar:$TLVBIN/LogViewer.jar:$ATKJAR:.
export CLASSPATH

LOGBACK=${TANGO_LOGBACK:-@CMAKE_INSTALL_PREFIX@/share/tango/logback.xml}

@TSD_JAVA_EXEC@ \
    -DTANGO_HOST=$TANGO_HOST \
    -Dlogback.configurationFile="$LOGBACK" \
    $applet_name \
    "$@"
