⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compslct.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 5 页
字号:
# COMPSELCT.TCL - Setup procedures for implementing component-selection#                 wizard page## Copyright 1999-2003 Wind River Systems, Inc## modification history# --------------------# 04t,27feb03,bjl  moved lunique to GLOBAL.TCL.# 04s,22oct02,wmd  Add condition for Unix to remove remote Reg and compatiblity#                  pages.# 04r,03oct02,bjl  display error dialog if BSP_ARCH.TXT is missing for#                  bsp cd only (spr 82811), allow install over tree with#                  SETUP-1.x patch (spr 82815).  # 04q,14jun02,wmd  Fix SPR# 78583, add text to say documentation and Setup#                  files will take up xxx MBytes"# 04p,17may02,wmd  Fix text formatting, grammatical problems.# 04o,09may02,wmd  Fix SPR 77138, allow setupVals(compList) = {ALL} to mean#                  install everything for test automation.# 04o,07may02,bwd  Added message to Driver install warning# 04n,05mar02,bwd  Modified SETUP to be non-tornado centric# 04m,05feb02,bwd  Changed driver-obj-check to a warning, not hard-stop# 04l,17jan02,wmd  Add test automation logic to avoid dialog popups# 04k,15jan02,bwd  Skip DLL registration for BSP cd# 04j,08jan02,bwd  Modified warning message when BSP_ARCH.txt file or its#                  entries are not found# 04i,03jan02,bwd  Removed folderSelect and appConfig pages if BSP CD.#                  Spec changes on product-dependency checking.# 04h,03jan02,bwd  Minor changes on product-dependency checking.# 04g,02jan02,bwd  Added checks to disallow installing non-tornado products#                  into an empty tree.# 04f,21dec01,bwd  Added codes to check dependencies for core and#                  Drv/BSP installation# 04e,05dec01,j_w  Fixed hostVerGet{} not to break down specific OS for#                  windows; Fixed prodHostTypeGet{} to add a generic #                  windows type# 04d,30oct01,bwd  SPR 62997: fixed bitmap problem when user selects no#                  products# 04c,27sep01,j_w  Fixed the previousTornadoInstalled procedure# 04b,18jun01,j_w  Returned the correct value in prodHostTypeGet() and #                  hostVerGet() # 04a,12jun01,j_w  Modified for Tornado 2.2# 03x,19apr01,j_w  Fixed a typo# 03w,21mar01,j_w  Added BSP/toolchain checking (spr 65277)# 03v,08mar01,j_w  remove checking for simulator# 03u,20dec00,bwd  Changed product name: VxWorks PAL to VxWorks AE PAL# 03t,15dec00,wmd  Fix choice of words.# 03s,08dec00,bwd  SPR 62832: fixed proc lunique to return list in original#                  order# 03r,27nov00,bwd  SPR 34811: to prevent TCL errors, disable "Next" to allow#                  page creation to finish before letting user click "Next"# 03q,20nov00,bwd  Fixed TEXT mode in checkProductDependency# 03p,20nov00,bwd  Fixed isCoreTorSelected due to part name change# 03o,31oct00,bwd  Add check for PAL dependency check for MIPS CD. Change name#                  isTornadoSelected to isCoreTorSelected. Modified the proc.# 03n,20oct00,j_w  Unchecked Tornado Intergated Simulator if linux (spr 35410)# 03m,04oct00,bwd  Fixed messageBox option# 03l,25sep00,bwd  Changed check for description "Tornado Target" to "VxWorks#                  AE"# 03k,18sep00,j_w  renamed libExtract to libUpdate# 03j,18aug00,bwd  Re-enable Next button if grayed out in FOLDER page# 03i,21jul00,bwd  Fixed typo - to display $msg not msg# 03h,22jun00,bwd  Moved writing to setup.log the list of licensed products to#                  FILECOPY page# 03g,09jun00,bwd  Added another host type check for x86-linux2# 03f,08jun00,bwd  SPR 31050: hide SETUP bitmap and enlarge the product#                  selection box# 03e,07jun00,bwd  SPR 31613: add additional line in setup.log that contain#                  info about licensed products# 03d,02jun00,bwd  Changed all "dialog ok" to use "dialog ok_with_title"# 03c,24apr00,bwd  Fixed bugs in checkProductDependency to correctly#                  check/skip checking for architecture# 03b,19apr00,bwd  Modified the call to licensedProductCheck to take in#                  featureID of the product# 03a,13apr00,bwd  Added codes to make sure the Tornado target and Drv Obj are#                  selected if Tornado Host is selected, and warn user if#                  different archs are selected for each of them. Removed#                  drvCheck and modified checkProductDependency for T3 products# 02z,20mar00,bwd  Modified the message/error message for TEXT mode to clarify#                  how user can select/deselect components of a product# 02y,17mar00,j_w  Fixed typo# 02x,14mar00,bwd  Fixed codes to correctly check only the native products and#                  prompt warning when non-native products are selected# 02w,10mar00,bwd  Added codes to check that at least one driver object is#                  selected if Tornado product is selected. Removed calls to#                  drvCheck and checkProductDependency. Removed temporary #                  solutions for EAR2 release.# 02v,09feb00,bwd  Removed the string trimright for product descriptions since#                  this is done in REGISTER.TCL# 02u,08feb00,wmd  Disable check for driver/objects for EAR2. FIX for BETA/FCS# 02t,07feb00,bwd  Fixed error message for test automation# 02s,31jan00,bwd  Fixed error handling for test automation. Deleted redundant#                  codes. Replaced setupVals(cmdMode) with isGUImode# 02r,27jan00,wmd  Add code to check correctly for windows2000.# 02q,25jan00,wmd  Use tornadoProductCheck to check if product is Tornado#                  object in isTornadoSelected.# 02p,20jan00,j_w  Remove remoteRegistryHost reference# 02o,11jan00,bwd  TEXT MODE: fixed prompt to force users to make selection#                  (To continue or To select products)# 02n,11jan00,bwd  TEXT MODE: fixed codes to correctly handle duplicate core#                  installation# 02m,06jan00,bwd  No test automation for command line SETUP# 02l,17dec99,clc  change  switch patterns# 02k,17dec99,clc  edit message for duplicate products# 02j,06dec99,j_w  Added licensedProductCheck# 02i,23nov99,clc  prompt user of COMPSELECT_WARN_1 warning# 02h,02nov99,clc  add text mode# 02g,29oct99,wmd  To skip to finish page for testing if env var#                  SETUP_SKIP_INSTALL is set.# 02f,22oct99,j_w  Fixed typo# 02e,22oct99,j_w  Added previousTornadoInstalled procedure# 02d,21oct99,bjl  removed parisc-hpux support.# 02c,13oct99,bjl  replaced tornado productName checks with tornadoProductCheck.# 02b,06oct99,j_w  move calcPage to UTILW32.TCL# 02a,30Sep99,j_w  Modified for T3# 01u,23jul99,j_w  added text messages# 01t,21apr99,wmd  Fix spr #26372 - Unselecting "non-native" products should#                  not display the warning message.# 01s,12apr99,wmd  Need to make sure that "Tornado Simulator" product installs#                  the drivers product as well.# 01r,31mar99,wmd  Add another name to check for arch wise: SIMHPPA.# 01q,25mar99,wmd  Fix cpu identification for simulator products.# 01p,24mar99,wmd  Try to fix so that x86-winXX products are recognized as#                  such.# 01o,22mar99,bjl  remove compatibility page for Unix if tornado not#                  installed, added endWaitCursor.# 01n,19mar99,wmd  Output to a file any debug messages.# 01m,18mar99,tcy  added further checking for deselecting non-native products# 01m,17mar99,wmd  Fix the width of the line to display "Grey box..."#                  completely.# 01l,11mar99,wmd  Move the tristate checkbox before the code to uncheck#                  non-native hosts. Fix prodHostTypeGet.# 01k,11mar99,wmd  For single part products, indicate 1/1 selected, and add#                  check to 'foreign' hosts into part select OK proc.# 01j,10mar99,wmd  Use the tri-state check box for the selected products.# 01i,08mar99,tcy  fixed bug with code filtering non-native hostnames# 01h,03mar99,tcy  Show correct size SETUP/ takes based on platform#                  (fix for SPR 25228)# 01g,22feb99,wmd  Fix so that unselected products show 0 out of XXX products.# 01f,17feb99,tcy  Added proc installedProdDescGet() to return a list#                  of products (fix for SPR 24897)#                  fix bug in installedProdGet() when checking dest. directory# 01e,11feb99,wmd  Remove the apostrophes around the '*' so that it is more#                  visible.# 01d,29jan99,wmd  Fix spr #24559, show which products have components.# 01c,28jan99,wmd  Fix spr # 24523, warn users of non-native installations,#                  and initially uncheck those products not meant for the host.# 01b,29jan99,tcy  moved byteToMbyte() and kbyteToMbyte() from INSTALL.TCL# 01a,26jan99,tcy  extracted from INSTW32.TCL.################################################################################ pageCreate(compSelect) - display products for users to install## This procedure will display products for users to install## SYNOPSIS# .tS# pageCreate(compSelect)# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#global bspArchValsproc pageCreate(compSelect) {} {    global ctrlVals    global setupVals    global indexList    if { [isTornadoProduct] } {                  if { [isBSPcd] } {            readBSPArchFiles          }    }    if { [isGUImode] } {        endWaitCursor                     # hide the setup bitmap to allow more space on the page        controlHide wizardDialog.bitmap 1        set ctrlVals(volatileFrm) [list \            [list label -name msg \                        -title [strTableGet COMPSELECT_LABEL_1]\                        -x 10 -y 9 -w 295 -h 26] \            [list label -name message2 \                        -title [strTableGet COMPSELECT_LABEL_2]\                        -x 10 -y 37 -w 295 -h 8] \            [list checklist -name optionList \                        -callback onClickProdCheckList \                        -x 10 -y 46 -w 295 -h 80] \            [list label -name reqText \                        -title "Space Required:" \                        -x 18 -y 124 -w 55 -h 8] \            [list label -name reqSpace \                        -title "Unknown" \                        -x 256 -y 124 -w 43 -h 8] \            [list label -name availText \                        -title "Space Available:" \                        -x 18 -y 134 -w 55 -h 8] \            [list label -name availSpace \                        -title "Unknown" \                        -x 256 -y 134 -w 43 -h 8] \            [list frame -name frm1 \                        -xpos 10 -ypos 148 -width 295 -height 25] \            [list label -name compSelected \                        -x 18 -y 153 -w 150 -h 18] \            [list button -title "&Details..." -name partDetailButt  \                        -xpos 245 -ypos 153 -width 50 -height 14  \                        -callback partListDlg] \        ]        set w [dlgFrmCreate [strTableGet COMPSELECT_TITLE]]        # First, disable "Next" until all info on the page is updated        # to prevent TCL errors caused by user clicking "Next" too fast        controlEnable $ctrlVals(mainWindow).nextButt 0        productGuiChkLstCreate        productGuiSizeUpdate        # re-enable "Next" button        controlEnable $ctrlVals(mainWindow).nextButt 1        controlFocusSet $ctrlVals(mainWindow).nextButt        # test automation        if { $ctrlVals(useInputScript) } {            autoSetupLog "Products Selection page:"            autoSetupLog "\tInstalled products specified by the key"            nextCallback        }    } else { # TEXT mode        set indexList ""        while (1) {            printPageTitle [strTableGet COMPSELECT_TITLE]            puts "[strTableGet COMPSELECT_LABEL_1_TEXT]\n"            productTextListUpdate            productTextSizeUpdate               set ret [prompt [strTableGet 3145_COMP_SELECT_CHANGE]]            switch -regexp -- $ret {                "^-$"   { backCallback                           return 0 }                "^$"    { nextCallback                          return 0 }                "[eE][xX][iI][tT]"  { return 0 }                "^[0-9]+([ ][0-9]+)*$" {                     productChange $ret                 }                default { }            }        }    }}############################################################################### preventInstallation - prevents users from continuing with installation## This procedure will invoke a dialog box to stop users from continuing# will installation## SYNOPSIS# .tS# preventInstallation <ver># .tE## PARAMETERS:# .IP ver# version of Tornado## RETURNS: N/A## ERRORS: N/A#proc preventInstallation {ver} {    global setupVals ctrlVals    if { [isGUImode] } {        if { $ctrlVals(useInputScript) } {            autoSetupLog "Error: attempting to install over an existing\                          $ver tree. Please choose a new installation path."            autoSetupLog "Application Exit\n"            set setupVals(cancel) 1                            applicationExit            return 0        } else {            set message "You are attempting to install over an existing $ver\n\                        tree.  This is not recommended and will cause \                    incompatibilities\nwhich will render the product unusable.\                    \n\nPlease push \"OK\" to choose a new installation path."            dialog stop Setup $message        }    } else { # TEXT mode        set msg "You are attempting to install over an existing $ver tree.\n\                This is not recommended and will cause incompatibilities\                which will render the product unusable.\n\                Press <Enter> to choose a new installation path."                while { [prompt $msg] != "" } {        }    }}############################################################################### installedProdDescGet - return a list of installed product descriptions#                   that were installed irrespective of the pool Id## This procedure returns a list of installed product descriptions that were# installed irrespective of the pool Id## SYNOPSIS# .tS# installedProdDescGet <pool># .tE## PARAMETERS:## RETURNS:# The variable setupVals(instProdDescList) will be set after invoking# the procedure. The variable will be set to NULL if Setup does not detect any# products in the destination directory## ERRORS: N/A#proc installedProdDescGet {} {    global setupVals    # open the setup.log file and determine if there are any installed products    # from the specified CD pool    set logfile [file join [destDirGet] setup.log]    if [catch {open $logfile r} logfd] {        return ""    } else {        set text [split [read $logfd] \n]        set nlines [llength $text]        close $logfd        for {set ix 0} {$ix < $nlines} {incr ix} {            # iterate each line and search for the pool ID passed in            set textLine [split [lindex $text $ix ]]            # check to see if destination dir is same            set instDir [lindex $textLine 3]            # make sure case is not an issue when doing comparison            if {[string tolower $instDir] == [string tolower [destDirGet]]} {                incr ix                # accumulate product numbers that are in this group                set line [split [lindex $text $ix]]                while {$ix < $nlines} {                    if {[string range [lindex $line 1] 0 3] == "100-"} {                        lappend prodDescList "[lrange $line 2 end]"                    }                    incr ix                    set line [split [lindex $text $ix]]                    if {[lsearch -regexp $line "TDK-"] == 1} {                        break                    }                }            }        }   }   set setupVals(instProdDescList) $prodDescList   dbgputs "Products installed: $setupVals(instProdDescList)"}############################################################################### installedProdGet - return a list of installed products that were installed#                    from the same pool## This procedure returns a list of installed products that were installed# from the same pool## SYNOPSIS# .tS# installedProdGet <pool># .tE## PARAMETERS:# .IP pool# pool ID in the form of TDK-XXXXX-XX-XX## RETURNS: N/A## ERRORS: N/A#proc installedProdGet {pool} {    global setupVals    set prodList ""    set poolID [string range $pool 0 [expr [string first "ZC" $pool] -1]]    if {$poolID == ""} {        set poolID $pool    }    # open the setup.log file and determine if there are any installed products    # from the specified CD pool    set logfile [file join [destDirGet] setup.log]    if [catch {open $logfile r} logfd] {        return ""    } else {        set text [split [read $logfd] \n]        set nlines [llength $text]        close $logfd        for {set ix 0} {$ix < $nlines} {incr ix} {            # iterate each line and search for the pool ID passed in            set textLine [split [lindex $text $ix ]]            if {[lsearch $textLine $poolID*] != -1} {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -