📄 compslct.tcl
字号:
#
# ERRORS: N/A
#
proc pageProcess(compSelect) {} {
global tornadoInstalled
global ctrlVals setupVals env
set retVal 1
if { [isTornadoProduct] } {
# initialize tornadoInstalled
set tornadoInstalled 0
set torVer "Tornado 2.x or 1.x"
}
set setupVals(licensedProdInstalled) 0
foreach prodIndex [cdInfoGet selectedProdIndexList] {
set featureID [productInfoGet featureId $prodIndex]
set productName [productInfoGet name $prodIndex]
set productDesc [productInfoGet desc $prodIndex]
if {[licensedProductCheck $featureID] && $ctrlVals(useInputScript) == 0} {
set setupVals(licensedProdInstalled) 1
dbgputs "licensed prod: $productName - $productDesc\
\(feature ID: $featureID\)"
}
}
dbgputs ""
if { [isTornadoProduct] } {
if { [isBSPcd] } {
# read BSP_ARCH.TXT - hard-coded table to
# get matching proc family for BSP and Driver
if { [readBSPArchFiles] } {
# check Driver and BSP dependency
# if BSP_ARCH.txt file exists and is valid
set retVal [checkDrvBSPDependency]
}
} else {
set retVal [checkCoreProductDependency]
}
#if dependency check fails, redisplay the page
if { !$retVal } { return 0 }
# check to see if installing over a T101 or T2 tree and prevent it.
if { [previousTornadoInstalled] } {
# don't want the user to overwrite existing t1 or t2 tree
# warn and prevent the user from proceeding with installation
if { [preventInstallation $torVer] } {
# pop the user back to the destination path screen
return [calcPage destDir]
}
}
# check for a core installation and previously installed products
checkForPreviouslyInstalledProds
if {$setupVals(dupCoreInstall)} {
# overwrite existing directory automatically in autoInstall mode
if { [isGUImode] } {
# test automation
if { $ctrlVals(useInputScript) } {
set retVal 1
} else {
messageBeep
catch {dialog base_install_warn "Setup" \
[strTableGet COMPSELECT_BASE_INSTALL_WARN] \
question 0} result
if {$result == 1 || $result == ""} {
return [calcPage destDir]
} else {
set retVal 1
}
}
} else { # TEXT MODE
puts [strTableGet COMPSELECT_BASE_INSTALL_WARN]
puts [strTableGet COMPSELECT_BASE_INSTALL_WARN_PROMPT]
while (1) {
set ret [prompt]
switch -regexp -- $ret {
"^[Yy]" { set retVal 1 ; break }
"^[Nn]" { return [calcPage destDir] }
"[eE][xX][iI][tT]" { return 0 }
default { }
}
}
}
}
set dupProds $setupVals(duplicateProducts)
if {[lindex $dupProds 0] != ""} {
# present dialog to request permission to overwrite existing products
if { [isGUImode] } {
# test automation
if { $ctrlVals(useInputScript) } {
autoSetupLog "\tAllowing overwrite of existing products."
} else {
messageBeep
if {[dupProdDlg] == 1} {
return 0
}
}
} else { # TEXT MODE
if {[dupProdDlg] == 1} {
# go back to 'Select Products' page
# did not use return 0 because that causes textmode SETUP to exit
pageCreate(compSelect)
return 0
}
}
}
# end codes for Tornado product
}
if { [isGUImode] } {
set reqSpace [controlValuesGet $ctrlVals(mainWindow).reqSpace]
set availSpace [controlValuesGet $ctrlVals(mainWindow).availSpace]
if {[llength [cdInfoGet selectedProdIndexList]] == 0} {
if { $ctrlVals(useInputScript) } {
autoSetupLog "[strTableGet COMPSELECT_WARN_1]"
autoSetupLog "Application Exit\n"
set setupVals(cancel) 1
applicationExit
return 0
} else {
messageBox [strTableGet COMPSELECT_WARN_1]
set retVal 0
return $retVal
}
}
} else { # TEXT MODE
set reqSpace $setupVals(totalSize)
set availSpace $setupVals(availDiskSpace)
# check that at least one component has been selected for installation
if {[llength [cdInfoGet selectedProdIndexList]] == 0} {
puts "Warning: [strTableGet COMPSELECT_WARN_1]"
while { [prompt "Press <Enter> to continue."] != "" } {
}
pageCreate(compSelect)
return 0
}
}
# display the warnings file for each selected product
foreach prodIndex [cdInfoGet selectedProdIndexList] {
searchAndProcessSection WarningsFile [chooseInfFile $prodIndex]
}
if {$reqSpace > $availSpace} {
if { [isGUImode] } {
# test automation
if { $ctrlVals(useInputScript) } {
autoSetupLog "\tWarning: not enough disk space."
set i 1
} else {
messageBeep
set i [dialog ok_proceed_exit "Setup" \
[strTableGet COMPSELECT_WARN_2]]
}
switch $i {
0 { set retVal [calcPage destDir] }
1 { set retVal 1 }
2 { quitCallback }
}
} else { # TEXT MODE
set msg "Warning: [strTableGet COMPSELECT_WARN_2]\n \
\[Y|N|exit\]"
set i [prompt $msg]
switch -regexp -- $i {
"^[Yy]" { set retVal [calcPage destDir] }
"^[Nn]" { set retVal 1 }
"^-$" {
backCallback
return 0
}
"exit" { return 0 }
default { set retVal [calcPage destDir] }
}
}
}
if { [isTornadoProduct] } {
# this is done now for unix since the folderSelect page
# is not used for unix
if {[isUnix]} {
foreach prodIndex [cdInfoGet selectedProdIndexList] {
set productName [productInfoGet name $prodIndex]
set productDesc [productInfoGet desc $prodIndex]
if {[tornadoProductCheck $productName $productDesc]} {
set tornadoInstalled 1
}
}
if { ![info exists tornadoInstalled] || !$tornadoInstalled } {
pageRemove remoteRegistryHost
pageRemove compatibility
pageRemove howTo
}
}
# for BSP CD installation, remove pages
if { [isBSPcd] } {
pageRemove remoteRegistryHost
pageRemove compatibility
pageRemove howTo
if { ![isUnix] } {
pageRemove folderSelect
pageRemove torRegistry
pageRemove appConfig
pageRemove regTornado
}
}
# bypass Tornado dll registration if specified
if { ![isUnix] } {
if { [bypassDllRegistration] } {
pageRemove regTornado
}
}
}
# for testing only
if { [info exists env(SETUP_SKIP_INSTALL)] &&\
$env(SETUP_SKIP_INSTALL) == 1 } {
if {[isUnix]} {
pageRemove filesCopy
pageRemove libUpdate
pageRemove systemConfig
} else {
pageRemove filesCopy
pageRemove libUpdate
pageRemove systemConfig
}
}
if { [isGUImode] } {
# re-enable the setup bitmap for next pages
controlHide wizardDialog.bitmap 0
}
return $retVal
}
#############################################################################
#
# partListDlg - create dialog box for displaying parts within each product
#
# This procedure will create dialog box for displaying parts within each
# product
#
# SYNOPSIS
# .tS
# partListDlg
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#
proc partListDlg {} {
global ctrlVals
global setupVals
dialogCreate \
-name partListDlgHnd \
-title "Select Parts" \
-width 263 -height 195 \
-helpfile $setupVals(setupHelp) \
-init partListDlgInit \
-parent $ctrlVals(mainWindow) \
-controls { \
{ button -title "Cancel" -name cancelButt \
-xpos 206 -ypos 173 -width 50 -height 14 \
-callback onPartListDlgCancel \
}
{ button -title "OK" -name okButt -default \
-xpos 150 -ypos 173 -width 50 -height 14 \
-callback onPartListDlgOk \
}
{ checklist -name optionList \
-xpos 7 -ypos 45 -width 249 -height 83 \
-callback onClickPartCheckList \
}
{ label -title "Information" -name Information \
-xpos 12 -ypos 130 -w 50 -height 8 \
}
{ frame -name frm1 \
-xpos 7 -ypos 140 -width 249 -height 27 \
}
{ label -title "Space Required:" -name spaceRequireLabel \
-xpos 16 -ypos 149 -width 170 -height 8 \
}
{ label -title "To select or clear a part for\
installation, click the item's\
checkbox." \
-name label3 \
-xpos 7 -ypos 7 -width 249 -height 18 \
}
{ label -title "Parts:" -name label2 \
-xpos 8 -ypos 31 -width 86 -height 8 \
}
}
}
#############################################################################
#
# partListDlgInit - initialize partListDlg by calling partGuiUpdate
#
# This procedure will initialize partListDlg by calling partGuiUpdate
#
# SYNOPSIS
# .tS
# partListDlgInit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#
proc partListDlgInit {} {
partGuiUpdate 0
}
#############################################################################
#
# currSelProdIndexSet - save the index of a product in a global array ctrlVals
#
# This procedure will save the index of a product in a global array ctrlVals
#
# SYNOPSIS
# .tS
# currSelProdIndexSet <index>
# .tE
#
# PARAMETERS:
# .IP index
# a indexing number to the product list
#
# RETURNS: N/A
#
# ERRORS: N/A
#
proc currSelProdIndexSet {index} {
global ctrlVals
set ctrlVals(currSelProdIndex) $index
}
#############################################################################
#
# currSelProdIndexGet - obtain the current selected product's index
#
# This procedure will obtain the current selected product's index
#
# SYNOPSIS
# .tS
# currSelProdIndexGet <info>
# .tE
#
# PARAMETERS:
# .IP info
#
# RETURNS: N/A
#
# ERRORS: N/A
#
proc currSelProdIndexGet {{info obj}} {
global objGuiMap ctrlVals
global prodToListMap
global setupVals
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -