#!/bin/sh

# Syuhitu is able to run on X window system only.
if [ "${DISPLAY}" = "" ]; then
	echo "Can't open display."
	exit 1
fi

# Please modify following path if you need.
INSTALL_PATH=/opt/NBKTtaed

# Specify the path of a syuhitu community directory.
SYUHITU_COMMUNITY=${HOME}/.TaEdit_com
export SYUHITU_COMMUNITY

if [ ! -d ${SYUHITU_COMMUNITY} ] ; then
	mkdir ${SYUHITU_COMMUNITY}
fi

# Specify the path of a syuhitu client promgram
SYUHITU_CLIENT=${INSTALL_PATH}/TaEditClient
export SYUHITU_CLIENT

# Specify the path of a TaEdit program
SYUHITU_TAEDIT=${INSTALL_PATH}/TaEdit
export SYUHITU_TAEDIT

# Specify the path of a syuhitu server program
SYUHITU_SERVER=${INSTALL_PATH}/TaEditSvr
export SYUHITU_SERVER

# Specify the path of a syuhitu encode converter program
SYUHITU_CONV=${INSTALL_PATH}/TaEditConv
export SYUHITU_CONV

# PostScript generator program
SYUHITU_PDLGEN=${INSTALL_PATH}/TaEditPdlgen
export SYUHITU_PDLGEN

# LPR command path name
SYUHITU_LPR=/usr/ucb/lpr
export SYUHITU_LPR

# Specify the Alias file used by iconv.
# If you need, You can specify the file of two or more pieces by delimiting it by the colon.
ICONV_ALIAS_FILE=/usr/lib/iconv/alias
export ICONV_ALIAS_FILE

# Specify the path of a string table file
SYUHITU_STRINGTABLE_PATH=${INSTALL_PATH}/resource/syuhitu_${LANG}.ST
export SYUHITU_STRINGTABLE_PATH

# Add paths of libraries syuhitu plugins and what you need.
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/dt/lib/sparcv9:${INSTALL_PATH}/plugin
export LD_LIBRARY_PATH

# Specify the path of a resource file.
XFILESEARCHPATH=${XFILESEARCHPATH}:${INSTALL_PATH}/resource/syuhitu_${LANG}.res
export XFILESEARCHPATH

${SYUHITU_CLIENT} "$@"

