################################################################################
#
#  Install subject: dap - Discrete Application
#  $Revision: 1.15 $
#
#
#
################################################################################
# Install.cmd script for installation of the Discrete Application add-on package.
#
# Use:
#      this file will be included by the root to the main installation script
#      with the specific 'include' command.
#      Used variables:
#		var 50: Value 1 if this install has already been done
#
################################################################################

#############
# Beginning #
#############

if -var 50 -value 1 -label NO_INSTALL
setvar -var 50 -value 1

echo -text " "
echo -text "Installing Discrete Application option"

#
#################################################
# Base national Language Dependent files (text) #
#################################################
echo -text "Install text files"
text -filename $BOOTPATH/daper.$LANG -package 0
text -filename $BOOTPATH/rldada.eng -package 0
text -filename $BOOTPATH/rldap.eng -package 0
text -filename $BOOTPATH/rldaper.$LANG -package 0

#
#########################################################
# Rapid national Language Independent files (Rapid sys) #
#########################################################
echo -text "Install Rapid files"

fileexist -path dap -label NO_NEW_DIR
mkdir -path dap
#NO_NEW_DIR

#
#######################################
# National Language Independent files #
#######################################
echo -text "Setup system configuration"

# Rapid : cfg (Rapid programming rules)
config -filename $BOOTPATH/rldada.cfg -domain MMC -internal
config -filename $BOOTPATH/rldap.cfg -domain MMC -internal
config -filename $BOOTPATH/dap.cfg -domain MMC -internal

# EIO   : cfg (definitions & configurations)
config -filename $BOOTPATH/dapeio_i.cfg -domain EIO -internal

# CAB   : cfg (definitions & configurations)
getkey -id "SWE" -var 10 -strvar $ANSWER -errlabel STD
goto -label SWE

#STD
config -filename $BOOTPATH/dapsysrp.cfg -domain SYS -internal
goto -label NEXT

#SWE
config -filename $BOOTPATH/dapsysrp_eq.cfg -domain SYS -internal

#NEXT
config -filename $BOOTPATH/dapsys.cfg -domain SYS -internal

append -from $BOOTPATH/opt_dap.cmd -to option.cmd
append -from $BOOTPATH/opt2_dap.cmd -to opt_l2.cmd

echo -text "...done"

#
# The following has to be done afterwards in the base install.cmd script:
#
#    new -resource cab
#    # Make System WarmStart (use startup.cmd):
#    restart
#
#NO_INSTALL
