#!@SHELL@

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

#---------------------------------------------------------
#       Set the Class Path for Tango, ATK and AtkMoni usage
#---------------------------------------------------------
LIB_DIR=@CMAKE_INSTALL_PREFIX@/share/java;   		export LIB_DIR
APP_DIR=@CMAKE_INSTALL_PREFIX@/share/java;	   	export APP_DIR


TANGO=$LIB_DIR/JTango.jar
TANGOATK=$LIB_DIR/ATKCore.jar:$LIB_DIR/ATKWidget.jar

APPLI_PACKAGE=fr.esrf.tangoatk.widget.attribute;	export APPLI_PACKAGE
APPLI_MAIN_CLASS=Trend; export APPLI_MAIN_CLASS

CLASSPATH=$TANGO:$TACO:$TANGOATK
export CLASSPATH
echo "CLASSPATH=$CLASSPATH"
LOGBACK=${TANGO_LOGBACK:-@CMAKE_INSTALL_PREFIX@/share/tango/logback.xml}

#---------------------------------------------------------
#       Start the atkmoni process
#---------------------------------------------------------
#

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