#!/bin/csh
#
# for running standalone, without installing, you need to set up
# the LD_LIBRARY_PATH to show freewrl where to find libraries it
# needs. Below is an example
#
# CHECK ALL PATHS!
#
# - check the path to the shell - look at the first line above. Should
#   it be /usr/bin/csh?
#
# - note that the LD_LIBRARY_PATH has two paths on it - change the
#   directories on BOTH paths.
#
# invoke it like: ./runme-standalone tests/45.wrl
#


# first, lets record where the code is located:
#
setenv dir `pwd`
# or, eg:
setenv dir "/usr/people/luigi/freewrl/FreeWRL-1.04.5"



# then, we set up the environment variable to allow dynamic library loading...
#
# This first version prepends new paths to the shell variable LD_LIBRARY_PATH
# 
#setenv LD_LIBRARY_PATH $dir/blib/arch/auto/VRML/JS:$dir/blib/arch/auto/VRML/VRMLFunc:$LD_LIBRARY_PATH
#
# this one just overwrited the LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH $dir/blib/arch/auto/VRML/JS:$dir/blib/arch/auto/VRML/VRMLFunc:

# and, finally run FreeWRL:

$dir/CFrontEnd/freewrl $1 $2 $3 $4 $5 $6
