#!/bin/tcsh
# The line above needs to contain the location of csh (usually /bin or /usr/bin)
# preceded by # and an exclamation mark 

# Set at qsas installation
setenv QSAS_HOME /Applications/QSAS_3_1

# To display through an ssh tunnel comment out the DISPLAY
# environment below
# connect to remote host running QSAS using 
# ssh -lusername -X remotehost
#  where -l is required if your user name is different on remotehost
#  and -X is only required if X-forwarding is not available by default.
# Across slow networks the -C option (compression) helps, but will slow
# the process on a fast network
# ssh -C -lusername -X remotehost


# edit hostname for display
#if($1 != "") then
#  setenv DISPLAY $1":0.0"               
#else
#  setenv DISPLAY :0.0
#endif

setenv QSAS_LIB_DIR ${QSAS_HOME}/lib

# plot device options
setenv PLPLOT_LIB "${QSAS_HOME}/lib"

# close window without asking
setenv EXIT_MODE "QSAS_FAST_EXIT"

# Mac OSX binary Qt path to libqcocoa.dylib
#setenv QT_PLUGIN_PATH "/Applications/QSAS_3_1/bin/QSAS_OSX.app/Contents/MacOS"
#setenv QT_DEBUG_PLUGINS 1

# Set the path for local libraries - this overrides the users own DYLD_LIBRARY_PATH
# to avoid conflicts   

#setenv DYLD_LIBRARY_PATH ${QSAS_LIB_DIR}:/usr/local/lib:/usr/lib:/lib
#setenv MallocStackLogging yes

# To change qsas user interface choices ( -style macintosh)
# add "-style cleanlooks" or "-style macintosh" or "-style plastique" etc to the launch command below
# Note that styles 'cleanlooks' and 'plastique' will cause QPainter warnings on startup, but are safe.

open -n $QSAS_HOME/bin/QSAS_OSX.app
