: $Workfile:   sunstart.sh  $ $Revision:   1.0  $
#**********************************************************************#
#*                                                                    *#
#* Copyright (c) 2001 by Sun Microsystems, Inc.                       *#
#* All rights reserved.                                               *#
#*                                                                    *#
#**********************************************************************#


# sunstart
# start Sun MTP system in development mode

# params:  4    Model 4 window (43x80)
#          5    Model 5 window (27x132)


LINES=25
COLUMNS=80
set -- `getopt 45 $*`

#while options to process
while test  "$1" != "--"
do
    case $1 in
        -4)
            LINES=43
            COLUMNS=80
            ;;
        -5)
            LINES=27
            COLUMNS=132
            ;;
    esac
    shift
done


# default COBSW for MicroFocus runtime system.
COBSW=${COBSW}-F
export COBSW

# remove any temporary files hanging around
cd $KIXSYS
/bin/rm -f core *.out *.log *.dbg *.err

# start system. Options are as follows:
#	-f	display log messages in window
#	-F	run unikixmain in foreground - required by animator
#	-w	create window for animator

unikixmain -f -F -w

# start additional windows for terminals
# All Sun MTP terminal windows must be at least 25 x 80.  The 25th line
# provides room for the 3270 status indicator

export LINES COLUMNS

# first start process window - this shows the active processes
cmdtool -Wf 0 0 255 -Wb 250 250 255 -Wg -Ww 70 -Wh 16 -Wp 550 0 \
	-WL "Processes" sunproc &
sleep 1

# next start terminal window
if test $LINES -eq 25
then
    sununikix unikix "0 100"
elif test $LINES -eq 43
then
    sununikix -4 unikix "0 100"
else
    sununikix -5 unikix "0 100"
fi

sleep 1

# finally, start configuration window
sununikix kixmenu "500 300"

exit 0
