#!/bin/csh -f
#*****************************************************************************
#                                                                            *
#            Copyright (C) 1993, Alias Research, Inc.                        *
#                                                                            *
#    These coded instructions,  statements and  computer programs contain    *
#    unpublished information proprietary to Alias Research, Inc.  and are    *
#    protected by the Canadian and US Federal copyright law. They may not    *
#    be disclosed to third parties  or copied  or duplicated, in whole or    *
#    in part,  without the prior written consent of Alias Research,  Inc.    *
#                                                                            *
# Unpublished-rights reserved under the Copyright Laws of the United States. *
#                                                                            *
#****************************************************************************/
#
#       $Source: /tmp_mnt/repo/root/v/alias3.2.2/src/Gifts/bin/RCS/drender.csh.sgi,v $
#       $Author: psantan $ $Date: 93/06/21 15:21:41 $
#
#

#
# Make sure env variables are set
#
if (! $?ALIAS_LOCATION ) then
    echo "ALIAS_LOCATION environment variable must be set to run drender"
    exit -1
endif

if (! $?ALIAS_WORKENV ) then
    echo "ALIAS_WORKENV environment variable must be set to run drender"
    exit -1
endif

#
# Make sure that path includes Gifts/bin directory
#
set pathset=false
foreach file ( $path )
    if (-e $file/drender_driver ) then
        set pathset=true
    endif
end

if ( "$pathset" == "false" ) then
    echo "${ALIAS_LOCATION}/Gifts/bin must be included in path to run drender"
    exit -1
endif

if (! -e ${ALIAS_WORKENV}/user_data/demo/misc_data/drender.pst ) then
    if (! -e ${ALIAS_LOCATION}/Gifts/data/drender.pst ) then
        aliasWarning -s"Alias Gifts software not installed." -b"Ok" > /dev/null
        exit -2
    else
        set AN=`aliasWarning -s"Install user drender files in ${ALIAS_WORKENV}/user_data/demo/misc_data" -b"Yes" -b"No"`
        if ( "${AN}" == "Yes" ) then
           #
           # Make a local copy of the UI files
           #
           cp ${ALIAS_LOCATION}/Gifts/data/d*.pst ${ALIAS_WORKENV}/user_data/demo/misc_data
           #
           # Make sure they are writable
           #
           chmod +w ${ALIAS_WORKENV}/user_data/demo/misc_data/d*.pst
        else
           exit -3
        endif
    endif
endif

xwsh -geometry 76x19+414+29 -fn "-adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1" -title "Drender output" -icontitle "Drender output" -nomenu -nosend -nokeyboard -nopgrp -sl 4094 -bg "sgiteal"  -fg white -e drender_driver &







