#!/bin/bash

#
# This script is used to set up the build environment for 
# building the XPort applet
#
# Use Notes:
# - Copy this file to my-env.sh
# - Set the required/optional environment variables
# - Source my-env.sh before building the XPort applet
# - It may be sourced from .bashrc for convenience
#

#
# It is required that the following environment variables
# be set
# - JAVA_DEV_ROOT
# - IS_UNIX
# - XPORT_HOST
#
# set default value of XPORT_HOST
#export DEFAULT_XPORT_HOST=<hostname or IP address of XPort hardware>
#export DEFAULT_XPORT_HOST=134.89.11.0
#export DEFAULT_XPORT_HOST=ca9173e.shore.mbari.org
#export DEFAULT_XPORT_HOST=134.89.12.211
#export DEFAULT_XPORT_HOST=134.89.11.70
export DEFAULT_XPORT_HOST=134.89.32.42

# JAVA_DEV_ROOT
# path to top XPort applet directory
#export JAVA_DEV_ROOT=<path/to/xport applet/development/directory>
#export JAVA_DEV_ROOT=z:/headley/cvs/auv-qnx/auv/altex/offboard/camera/XPortApplet
export JAVA_DEV_ROOT=`pwd`

# IS_UNIX
# set to 0 if building on Win32/Cygwin, set to 1 if compiling on Linux
export IS_UNIX=0

# XPORT_HOST
# IP address or hostname of target XPort
echo "args=$#"
if [ "$#" -ge 1 ]
then
 XPORT_HOST="$1"
else
 XPORT_HOST=$DEFAULT_XPORT_HOST
fi


#
# The environment variables below have default values 
# defined in JAVA_DEV_ROOT/make/Makefile, but may be 
# overriden here
#

# COB_FILE
# change name of COB file (this is what is loaded into XPort)
#export COB_FILE=xport.cob

# XPORT_HTML
# change html file that will be used to access the XPort Applet
# (e.g. http://XPORT_HOST/XPORT_HTML)
#export XPORT_HTML=xport.html

# XPORT_JAR
#export XPORT_JAR=xport.jar

# LED_GIF
# alternative GIF image for LED indicators
# (in JAVA_DEV_ROOT/src/img)
#export LED_GIF=CP_CTL_rbs.gif
