#################################################
#Install file for PalletWare 4.0 standard 	#
#package 					#
#$Revision: 1.3 $					#
#################################################
echo -text "Installing PalletWare 4.0..."
#Check that ScreenViewer is installed
if -var 28 -value 10 -label BEGIN_INSTALL
echo -text "ScreenViewer not installed"
echo -text "Installation aborted..."
goto -label END_PALWARE
#
#BEGIN_INSTALL
#
#Engine
copy -from $BOOTPATH/pal_exe.sys -to pal_exe.sys
#Main routine
copy -from $BOOTPATH/pal_main.sys -to pal_main.sys
#Error handling
copy -from $BOOTPATH/pal_err.sys -to pal_err.sys
#Load TP as standard MMI
copy -from $BOOTPATH/tpu_mmi.sys -to tpu_mmi.sys
#Load ext MMI for manual switch
copy -from $BOOTPATH/ext_mmi.sys -to ext_mmi.sys
#Config data
copy -from $BOOTPATH/pal_cfg.sys -to pal_cfg.sys
#Communication 
copy -from $BOOTPATH/pal_com.sys -to pal_com.sys
#internal dynamic data
copy -from $BOOTPATH/pal_idyn.sys -to pal_idyn.sys
#Scheduling module
copy -from $BOOTPATH/pal_cxt.sys -to pal_cxt.sys
#Cell specific data
copy -from $BOOTPATH/pal_cdat.sys -to pal_cdat.sys
#PalletWizard dummy data modules
copy -from $BOOTPATH/pal_cyc.mod -to pal_cyc.mod
copy -from $BOOTPATH/pal_cell.mod -to pal_cell.mod
#User routine modules
copy -from $BOOTPATH/pal_usrt.sys -to pal_usrt.sys
copy -from $BOOTPATH/pal_usrr.sys -to pal_usrr.sys
#Public dynamic data
copy -from $BOOTPATH/pal_pdyn.sys -to pal_pdyn.sys
#Tool control module
copy -from $BOOTPATH/pal_tool.sys -to pal_tool.sys
fileexist -path $BOOTPATH/pal_scr.$LANG -label LOAD_SCR
echo -text "Language not available!"
echo -text "Installing English pal_scr"
copy -from $BOOTPATH/pal_scr.eng -to pal_scr.sys
goto -label NEXT
#
#LOAD_SCR
copy -from $BOOTPATH/pal_scr.$LANG -to pal_scr.sys
#NEXT
#
#CHECK_DIALTXT
#
fileexist -path $BOOTPATH/pal_dtxt.$LANG -label LOAD_DIALTXT
echo -text "Language not available!"
echo -text "Installing English dialog texts"
text -filename $BOOTPATH/pal_dtxt.eng -package 0
goto -label CHECK_ERRTXT
#LOAD_DIALTXT
echo -text "Installing dialog texts"
text -filename $BOOTPATH/pal_dtxt.$LANG -package 0
#CHECK_ERRTXT
#
fileexist -path $BOOTPATH/pal_etxt.$LANG -label LOAD_ERRTXT
echo -text "Language not available!"
echo -text "Installing English error texts"
text -filename $BOOTPATH/pal_etxt.eng -package 0
goto -label CHECK_USRSCR
#
#LOAD_ERRTXT
echo -text "Installing error texts"
text -filename $BOOTPATH/pal_etxt.$LANG -package 0
#CHECK_USRSCR
fileexist -path $BOOTPATH/pwussc.$LANG -label LOAD_USRSCR
echo -text "Language not available!"
echo -text "Installing English user screens"
copy -from $BOOTPATH/pwussc.eng -to pwussc.cfg
goto -label INIT_UWM
#LOAD_USRSCR
echo -text "Installing user screens"
copy -from $BOOTPATH/pwussc.$LANG -to pwussc.cfg
#
#INIT_UWM
echo -text "Initiating UWM"
copy -from $BOOTPATH/uwmlist.cfg -to uwmlist.cfg
invoke -entry uwm_new
delete -path pwussc.cfg
#
#NEXT_STEP
#
# CAB   : cfg (definitions & configurations)
echo -text "Installing CAB config files"
config -filename $BOOTPATH/palsysrp.cfg -domain SYS
# EIO   : cfg (definitions & configurations)
echo -text "Installing EIO config files"
config -filename $BOOTPATH/paleio.cfg -domain EIO
# MMC   : cfg (definitions & configurations)
echo -text "Installing MMC config files"
config -replace -filename $BOOTPATH/palmmc.cfg -domain MMC
#
echo -text "Installing ReaL Packet"
text -filename $BOOTPATH/rlpaler.eng -package 0
text -filename $BOOTPATH/rlpal.eng -package 0
config -filename $BOOTPATH/palsys.cfg -domain SYS -internal
#
echo -text "...PalletWare installation done"
#
#END_PALWARE
#
