#!@SHELL@
#---------------------------------------------------------
#
#---------------------------------------------------------

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

LIB_DIR=@prefix@/share/java;	    export LIB_DIR
APP_DIR=@prefix@/share/java;	    export APP_DIR

#--------------------------------------------------------------------------
#       Set the Class Path for Tango, ATK and Simple Synoptic Appli in ATK
#--------------------------------------------------------------------------


TANGO=$LIB_DIR/JTango.jar

TANGOATK=$LIB_DIR/ATKCore.jar:$LIB_DIR/ATKWidget.jar
ATKPANEL=$APP_DIR/ATKPanel.jar

APPLI_PACKAGE=fr.esrf.tangoatk.widget.jdraw;	export APPLI_PACKAGE
APPLI_MAIN_CLASS=SimpleSynopticAppli; export APPLI_MAIN_CLASS

CLASSPATH=$TACO:$TANGO:$TANGOATK:$ATKPANEL
export CLASSPATH
echo "CLASSPATH=$CLASSPATH"

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

#---------------------------------------------------------
#       Start the synoptic appli process
#---------------------------------------------------------
#

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