#!/bin/sh
#
# shplot: SHADOW GUI plotting front-end.
#
# ------------------------------------------------
# Mumit Khan <khan@xraylith.wisc.edu>
# Center for X-ray Lithography
# University of Wisconsin-Madison
# 3731 Schneider Dr., Stoughton, WI, 53589
# ------------------------------------------------
#
# Copyright (c) 1997 Mumit Khan
#
#

######################### Update if necessary ##############################

#
# Must change the following 2 lines if you have a binary distribution!
#     SHADOW_GUI_ROOT is where you've installed SHADOW GUI. eg., on my 
#         system, it is set to /src/shadow/shadow-gui
#     SHADOW_ROOT is where SHADOW is installed. On mine, /usr/local/shadow
#

SHADOW_ROOT=${SHADOW_ROOT-/usr/local/shadow}
SHADOW_GUI_ROOT=${SHADOW_GUI_ROOT-$SHADOW_ROOT}

#
# To avoid versioning conflicts, I supply the Tcl/Tk startup scripts with
# binary distributions. If you build from the sources, then you can safely
# comment these out.
#
TCL_LIBRARY=${SHADOW_GUI_ROOT}/lib/tcl/tcl7.6
TK_LIBRARY=${SHADOW_GUI_ROOT}/lib/tcl/tk4.2
TIX_LIBRARY=${SHADOW_GUI_ROOT}/lib/tcl/tix4.1
BLT_LIBRARY=${SHADOW_GUI_ROOT}/lib/tcl/blt2.1
export TCL_LIBRARY TK_LIBRARY TIX_LIBRARY BLT_LIBRARY

#
# This might cause problems. If so, comment out the following 2 lines.
#
SHLIB_PATH=${SHADOW_GUI_ROOT}/lib:${LD_LIBRARY_PATH}
export SHLIB_PATH

####################### DO NOT TOUCH anything below #######################

#
# Do not change the following. If the SHADOW_GUI_ROOT and SHADOW_ROOT
# are correctly set, everything else will follow.
#

SHADOW_TCL_LIBRARY=${SHADOW_GUI_ROOT}/lib/tcl/shadow
SHADOW_BIN=${SHADOW_ROOT}/bin
SHADOW_XMENU_FILE=${SHADOW_GUI_ROOT}/data/shadow.xmen
SHADOW_START_FORMAT=GFILE
SHADOW_LIBEXEC=${SHADOW_GUI_ROOT}/libexec

export SHADOW_TCL_LIBRARY SHADOW_BIN SHADOW_XMENU_FILE SHADOW_START_FORMAT
export SHADOW_GUI_ROOT SHADOW_XMENU_FILE SHADOW_LIBEXEC
export SHADOW_ROOT

#
# exec the GUI.
#

shplot_tcl_main=${SHADOW_TCL_LIBRARY}/shplot.tcl

exec ${SHADOW_LIBEXEC}/tkmenu -f $shplot_tcl_main -- $*
