#!/sbin/sh
#
########
#  Product: VIDEOOUT
#  Fileset: VIDEOOUT
#  VIDEOOUT configure
#  @(#) $Revision: 1.3 $
########
# configure munges files in /opt/, /etc/, /var/
# Look in postinstall for other stuff
########
#
# (c) Copyright Hewlett-Packard Company, 1995
#
########
#
# This script will:
#   - create a link for the videoout help volume file
#   - create a link for the videoout help family file
#   - run helpgen so videoout help volume can be browsed using 
#     the VUE help viewer invoked from the front panel control
#   - create symbolic links to integrate VideoOut with HPVUE
#

	# Get the utilities I'll need
PROD_UTILS=${SW_ROOT_DIRECTORY}usr/lbin/sw/control_utils
if [[ ! -f $PROD_UTILS ]]
then
   echo "ERROR:  Cannot find $PROD_UTILS"
   exit 1
fi

. $PROD_UTILS

mod_pathfile -a MP /opt/videoout/share/man

CWD="$SW_ROOT_DIRECTORY"
PATH=$SWPATH:$PATH:/usr/sbin/:/usr/bin/X11

VODIR=$SW_ROOT_DIRECTORY/opt/videoout

VIDEOOUT_HELP_VOLUME=$VODIR/help/C/video_out.hv
VIDEOOUT_HELP_LINK=$CWD/etc/vhelp/volumes/C/video_out.hv

VIDEOOUT_FAMILY=$VODIR/help/C/videoout.hf
VIDEOOUT_FAMILY_LINK=$CWD/etc/vhelp/families/C/videoout.hf

ln -sf ${VIDEOOUT_HELP_VOLUME} ${VIDEOOUT_HELP_LINK} > /dev/null 2>&1
ln -sf ${VIDEOOUT_FAMILY} ${VIDEOOUT_FAMILY_LINK} > /dev/null 2>&1

#
# Run helpgen after creating links, this enables browsing of videoout help 
# volume from the front panel help control.
#
if [ -f /usr/vue/bin/helpgen ]; then
   /usr/vue/bin/helpgen > /dev/null 2>&1
fi



#
# Bitonal icons
#
ln -sf $VODIR/vue/icons/videoout.l.bm   $CWD/etc/vue/icons/videoout.l.bm > /dev/null 2>&1
ln -sf $VODIR/vue/icons/videoout.l_m.bm $CWD/etc/vue/icons/videoout.l_m.bm > /dev/null 2>&1
ln -sf $VODIR/vue/icons/videoout.s.bm   $CWD/etc/vue/icons/videoout.m.bm > /dev/null 2>&1
ln -sf $VODIR/vue/icons/videoout.s_m.bm $CWD/etc/vue/icons/videoout.m_m.bm > /dev/null 2>&1
ln -sf $VODIR/vue/icons/videoout.s.bm   $CWD/etc/vue/icons/videoout.s.bm > /dev/null 2>&1
ln -sf $VODIR/vue/icons/videoout.s_m.bm $CWD/etc/vue/icons/videoout.s_m.bm > /dev/null 2>&1

#
# Color icons
#
ln -sf $VODIR/vue/icons/Color/videoout.l.pm $CWD/etc/vue/icons/Color/videoout.l.pm > /dev/null 2>&1
ln -sf $VODIR/vue/icons/Color/videoout.m.pm $CWD/etc/vue/icons/Color/videoout.m.pm > /dev/null 2>&1
ln -sf $VODIR/vue/icons/Color/videoout.s.pm $CWD/etc/vue/icons/Color/videoout.s.pm > /dev/null 2>&1

#
# Application
#
ln -sf $VODIR/lib/X11/app-defaults/VideoOut		 $CWD/usr/lib/X11/app-defaults/VideoOut > /dev/null 2>&1
ln -sf $VODIR/vue/config/types/tools/Utilities/VideoOut  $CWD/etc/vue/config/types/tools/Utilities/VideoOut > /dev/null 2>&1
ln -sf $VODIR/vue/config/types/videoout.vf		 $CWD/etc/vue/config/types/videoout.vf > /dev/null 2>&1
ln -sf $VODIR/lib/nls/msg/C/videoout.cat		 $CWD/usr/lib/nls/msg/C/videoout.cat > /dev/null 2>&1
ln -sf $VODIR/man/man1.Z/videoout.1			 $CWD/usr/share/man/man1.Z/videoout.1 > /dev/null 2>&1


#
# CDE Application integration
#
if [ -x /usr/dt/bin/dtappintegrate ]
then
    /usr/dt/bin/dtappintegrate -s /opt/videoout > /dev/null 2>&1
fi

exit 0
