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

📄 licmanual.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 2 页
字号:
# LICMANUAL.TCL - Setup procedures for implementing license configuration page#                 for manual LM Installation (Email and Phone/Fax)## Copyright 1999 Wind River Systems, Inc## modification history# --------------------# 02c,05mar02,bwd  Modified SETUP to be non-tornado centric# 02b,04feb02,bwd  Fixed problem: license info not displayed on phone/email#                  page on windows 2000# 02a,12jun01,j_w  Added for Tornado 2.2# 01l,30oct00,j_w  SPR 35775: read setup.log for CD description if no DISK_ID #                  found when running setup /L from an installed tree# 01k,08jun00,bwd  SPR 31613: added codes to populate lmVals values using info#                  from setup.log if SETUP is not running from the CD# 01j,02jun00,bwd  Changed all "dialog ok" to use "dialog ok_with_title"# 01i,26may00,bwd  SPR 31386 - display warning if user selects 0 license for#                  all the products. Do not display this page if reload#                  existing license file# 01h,23may00,bwd  Fixed message# 01g,16may00,bwd  SPR 31030 - modified configuration page to display Node#                  Locked licensing differently# 01f,14feb00,wmd  Change all references to prodCode to featureId.# 01e,03feb00,bwd  Fixed codes to display only the licensed products that#                  belong to this host only# 01d,02feb00,bwd  Changed setupVals(cmdMode) to use isGUImode# 01c,20jan00,bwd  Corrected error message# 01b,14jan00,bwd  Added codes to display this page for TEXT MODE# 01a,04jan00,bwd  written############################################################################### pageCreate(licManual) - Configure licenses on current host## This procedure will configure license on current host## SYNOPSIS# .tS# pageCreate(licManual)# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc pageCreate(licManual) {} {    global ctrlVals setupVals lmVals    global valuesReset    # initialize arrays if needed    if { $valuesReset } {        set lmVals(lmLicensedProductNames) {}        set lmVals(lmLicensedFeatureIds) {}        set lmVals(lmFeaturesRequested) {}           lmValsRequestInit    }    if { $lmVals(reload) } {        nextCallback        return 0    }    if { [isGUImode] } {                    # hide the setup bitmap to allow more space on the page        controlHide wizardDialog.bitmap 1        # set up constants to be used for control dimensions and spacing        set XCOL1 10        set XCOL2 90        set XCOL3 234        set Y     45          set WIDTH 75        set HTHDR 20        set HT    14        if { $setupVals(lmInstType) == "nodeLocked" } {            set COL3_HEAD [strTableGet LICMANUAL_NODELOCK]            set topMSG [strTableGet LICMANUAL_NODELOCK1]            set bottomMSG [strTableGet LICMANUAL_NODELOCK2]        } else { # update            set COL3_HEAD [strTableGet LICMANUAL_COL3]            set topMSG [strTableGet LICMANUAL_UPDATE1]            set bottomMSG [strTableGet LICMANUAL_UPDATE2]        }        set ctrlVals(volatileFrm) [list \                [list label -name label_1 \                            -title $topMSG \                            -x $XCOL1 -y 15 -w 300 -h 30] \                [list label -name label_2 \                            -title $bottomMSG \                            -x $XCOL1 -y 160 -w 300 -h 15] ]        lappend ctrlVals(volatileFrm) \                [list label -name col1 \                            -title [strTableGet LICMANUAL_COL1] \                            -x $XCOL1 -y $Y -w $WIDTH -h $HTHDR] \                [list label -name col2 \                            -title [strTableGet LICMANUAL_COL2] \                            -x $XCOL2 -y $Y -w $WIDTH -h $HTHDR] \                [list label -name col3 \                            -title $COL3_HEAD\                            -x $XCOL3 -y $Y -w $WIDTH -h $HTHDR] \                [list frame -name frm -gray \                            -x 10 -y 65 -w 285 -h 2]        # Add the edit box controls	    set newY [expr $Y + $HTHDR + 7]        for {set ix 0} {$ix < [llength $lmVals(lmLicensedProductNames)]} {incr ix} {            set feature [lindex $lmVals(lmLicensedProductNames) $ix]            set featureId [lindex $lmVals(lmLicensedFeatureIds) $ix]            if { $setupVals(lmInstType) == "nodeLocked" } {                lappend ctrlVals(volatileFrm) \                            [list label -name ${feature}LicProd -title $feature \                                        -x $XCOL1 -y $newY -w $WIDTH -h $HT] \                            [list label -name ${feature}LicFeatureId -title $featureId \                                        -x [expr $XCOL2 + 10] -y $newY -w $WIDTH -h $HT] \                            [list boolean -name ${ix}Boolean -auto \                                          -callback "manualNodelockBooleanCB $ix" \                                          -x [expr $XCOL3 + 10] -y $newY -w 22 -h 12]            } else {                lappend ctrlVals(volatileFrm) \                            [list label -name ${feature}LicProd -title $feature \                                        -x $XCOL1 -y $newY -w $WIDTH -h $HT] \                            [list label -name ${feature}LicFeatureId -title $featureId \                                        -x [expr $XCOL2 + 10] -y $newY -w $WIDTH -h $HT] \                            [list text -name ${ix}Requested \                                       -callback "manualLicRequestedUpdate $ix" \                                       -x [expr $XCOL3 + 10] -y $newY -w 22 -h 12]            }            set newY [expr $newY + $HT]        }        # Set title        if { $setupVals(lmInstOptions) == "onEmail" } {            set w [dlgFrmCreate [strTableGet LICMANUAL_TITLE_EMAIL]]        } else {            set w [dlgFrmCreate [strTableGet LICMANUAL_TITLE_PHONE]]        }        for {set ix 0} {$ix < [llength $lmVals(lmLicensedProductNames)]} {incr ix} {            if { $setupVals(lmInstType) == "nodeLocked" } {                if { [lindex $lmVals(lmFeaturesRequested) $ix] == 1 } {                    controlCheckSet $w.${ix}Boolean 1                } else {                    controlCheckSet $w.${ix}Boolean 0                }            } else {                controlValuesSet $w.${ix}Requested [lindex $lmVals(lmFeaturesRequested) $ix]            }        }        controlValuesSet $w.nextButt "&Next >"        controlEnable $w.backButt 1        controlEnable $w.nextButt 1        controlEnable $w.cancelButt 1    } else { # TEXT MODE        # Set title        if { $setupVals(lmInstOptions) == "onEmail" } {            printPageTitle [strTableGet LICMANUAL_TITLE_EMAIL]        } else {            printPageTitle [strTableGet LICMANUAL_TITLE_PHONE]        }        puts "[strTableGet LICMANUAL_UPDATE1]\n\n"        # Set header column 3        if { $setupVals(lmInstType) == "nodeLocked" } {            set COL3_L1 "Check to request"            set COL3_L2 "a license"        } else {            set COL3_L1 "No. of licenses"            set COL3_L2 "to be allocated"        }        # print column label        puts [format "%-6s %-25s %-25s %20s" \              "item" "Licensed Product" "Feature ID" $COL3_L1]        puts [format "%-6s %-25s %-25s %20s" "" "" "" $COL3_L2]        for { set i 0 } { $i < 80 } { incr i } {            puts -nonewline "-"        }        puts "\n"         # print product names and codes        for {set ix 0} {$ix < [llength $lmVals(lmLicensedProductNames)]} {incr ix} {            set name [lindex $lmVals(lmLicensedProductNames) $ix]            set code [lindex $lmVals(lmLicensedFeatureIds) $ix]            if { $setupVals(lmInstType) == "nodeLocked" } {                if { $valuesReset } {                    # set default values                    set lmVals(lmFeaturesRequested) \                            [lreplace $lmVals(lmFeaturesRequested) $ix $ix 1]                }            }            set license [lindex $lmVals(lmFeaturesRequested) $ix]            if { $setupVals(lmInstType) == "nodeLocked" } {                if { $license == 1 } {                     set license "x"                 } else {                     set license ""                 }            }                    puts [format "%-6s %-25s %-25s %20s" \                  "[expr $ix + 1]" "$name" "$code" "$license"]        }        puts "\n\n[strTableGet LICMANUAL_TEXT]\n"  	    set totalProd [llength $lmVals(lmLicensedProductNames)]        set ret [prompt]        switch -regexp -- $ret {            "^$"  {  nextCallback ; return 0  }            "^-$" {  backCallback ; return 0  }            "^[eE][xX][iI][tT]$"   {  return 0  }            "[ ]+" {                puts "Error: please select only one item"                while {[prompt "Press <Enter> to continue."] != "" } {                }                pageCreate(licManual)            }            "^[1-9]+" {                if { $ret > $totalProd } {                    puts [strTableGet 3145_COMP_SELECT_CHANGE_INVALID]                    while {[prompt "Press <Enter> to continue."] != "" } {                    }                    pageCreate(licManual)                } else {                    if { $setupVals(lmInstType) == "nodeLocked" } {                        manualNodelockBooleanCB [expr $ret - 1]                    } else {                        manualLicRequestedUpdate [expr $ret - 1]                    }                    set valuesReset 0                    pageCreate(licManual)                }            }            default {                puts "Error: Invalid input."                while {[prompt "Press <Enter> to continue."] != "" } {                }                pageCreate(licManual)            }        }    }}############################################################################### pageProcess(licManual) - process inputs from the licManual page## This procedure will process inputs from the licManual page## SYNOPSIS# .tS# pageProcess(licManual)# .tE## PARAMETERS: N/A## RETURNS:  1 if successful## ERRORS: N/A#proc pageProcess(licManual) {} {    global setupVals lmVals ctrVals    global valuesReset     if { $lmVals(reload) == 0 } { # update        set isAllZero 1        foreach req $lmVals(lmFeaturesRequested) {            if { $req != 0 } {                set isAllZero 0            }        }        if { $isAllZero } {            if { [isGUImode] } {                dialog ok_with_title "ERROR: License Request" \                                     [strTableGet LICMANUAL_ZERO_ERROR]                return 0            } else {                puts "\n[strTableGet LICMANUAL_ZERO_ERROR]"                while {[prompt "Press <Enter> to continue."] != "" } {                }                pageCreate(licManual)            }        }    }    dbgputs "feature: $lmVals(lmLicensedProductNames)"    dbgputs "code: $lmVals(lmLicensedFeatureIds)"    dbgputs "request: $lmVals(lmFeaturesRequested)"    if { [isGUImode] } {                    # re-enable the setup bitmap for next pages        controlHide wizardDialog.bitmap 0    }    # save user's selection    set valuesReset 0    return 1}############################################################################### lmValsRequestInit - initialize lmVals value for license request## This procedure initializes the values in the lmVals data structure. # The data that is populated are:#       lmLicensedProductNames#       lmLicensedFeatureIds#       lmFeaturesRequested## SYNOPSIS# .tS# lmValsRequestInit

⌨️ 快捷键说明

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