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

📄 lmoption.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 2 页
字号:
# LMOPTION.TCL - Setup procedures for selecting license management options #                    for end users ## Copyright 1999-2003 Wind River Systems, Inc## modification history# --------------------# 02m,14feb03,bjl  modified for manual and ELM page sequences, modified#                  license wording for ELM.  # 02l,13Jan03,wmd  Fix SPR# 85621, make valid license file always pass.# 02k,07jun02,wmd  Fix SPR# 78461, need to prepare for ALI 2.0- analyze license#                  file and skip proprietary info.# 02j,18may02,wmd  Fix SPR#77292, make node-locked the default choice, per#                  Sean Hogan.# 02i,17may02,wmd  Fix text formatting, grammatical problems.# 02h,08may02,j_w  Wording change# 02g,25apr02,j_w  Revised the wording in the floating choice# 02f,23apr02,wmd  Need to add new FLEXlm key words to check, spr 76185.# 02e,05mar02,bwd  Modified SETUP to be non-tornado centric# 02d,04feb02,bwd  Modifying wordings# 02c,24jan02,wmd  Add check for evaluation, if so disable end-user choice,#                  only nodelocked available.# 02b,17sep01,bwd  Fixed spr 69435 and 69699# 02a,12jun01,j_w  Modified for Tornado 2.2# 01t,30oct00,j_w  Enabled the back button for setup /L# 01s,25oct00,bwd  SPR 35597: add HELP button back# 01r,02oct00,bwd  Changed to update LMHelpPath variable upon clicking on a#                  choice# 01q,21sep00,bwd  Modified the wordings/descriptions of each choice. Set #                  LMHelpPath global variable to "float" or "nodelock" to #                  identify which help IDs set to use# 01p,11jul00,j_w  Added lic file reload option for nodelocked# 01o,31may00,bwd  SPR 31564: remove currLicInfo page if license file already#                  exists. Added new procedures to check if a license file#                  exists and is valid.# 01n,17may00,bwd  SPR 31030 - add lmInstOptions page on nodelock to allow#                  users email/phone options# 01m,01may00,j_w  Renamed "nodeLock" to "nodeLocked" for#                  setupVals(lmInstType)# 01l,20mar00,bwd  Fixed TEXT mode to default a choice to EndUser# 01k,17mar00,j_w  Fixed typo and re-wording displayed messages# 01j,08feb00,j_w  Rename page title# 01i,03feb00,j_w  Replace nodelock with nodeLock# 01h,03feb00,j_w  Remove the pageListAdd call# 01g,27jan00,j_w  Rename OK to Next# 01f,11jan00,bwd  Fixed "exit" option for text mode# 01e,06jan00,bwd  No test automation for command line SETUP# 01d,17dec99,clc  testing# 01c,30nov99,j_w  Update LM_OPTIONS_BTN_1_DESC message# 01c,23nov99,clc  add text mode# 01b,11nov99,bwd  Added sections for automatic setup installation# 01a,29oct99,wmd  created.################################################################################ pageCreate(lmOptions) - displays choices for LM installation## This procedure will display choices for LM installation such as:#  End User License Management - for floating license end user configuration #  Node Locked - to configure the software to be accessible only on this host.## SYNOPSIS# .tS# pageCreate(lmOptions)# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc pageCreate(lmOptions) {} {    global ctrlVals env setupVals lmVals    set lmVals(lmLicenseFile) "[destDirGet]/.wind/license/WRSLicense.lic"    set lmVals(lmLicenseFile) [dosToUnix $lmVals(lmLicenseFile)]    if { [isGUImode] } {        # unhide the setup bitmap        controlHide $ctrlVals(mainWindow).bitmap 0        if {$setupVals(lmManual) == 0} {            set ctrlVals(volatileFrm) [list \                [list label -name message1 \                    -title [strTableGet LM_OPTIONS_MSG_1] \                    -x 100 -y 10 -w 190 -h 41] \                [list choice -name endUserChoice -newgroup -auto \                    -title [strTableGet LM_OPTIONS_BTN_1] \                    -x 102 -y 54 -w 190 -h 15 \                    -callback onEndUser] \                [list label -name endUserLabel \                    -title \                    [strTableGet LM_OPTIONS_BTN_1_DESC] \                    -x 114 -y 68 -w 180 -h 25] \                [list choice -name nodeLockChoice -auto \                    -title [strTableGet LM_OPTIONS_BTN_2] \                    -x 102 -y 96 -w 190 -h 15 \                    -callback onNodeLock] \                [list label -name nodeLockLabel  \                    -title \                     [strTableGet LM_OPTIONS_BTN_2_DESC] \                    -x 114 -y 111 -w 180 -h 20] \                [list boolean -name reloadCkbox -newgroup -auto \                    -title [strTableGet LM_OPTIONS_BTN_3] \                    -x 102 -y 140 -w 200 -h 15 \                    -callback onReloadLicNL] \                ]        } else {            set ctrlVals(volatileFrm) [list \                [list label -name message1 \                    -title [strTableGet LM_OPTIONS_MSG_1_MANUAL] \                    -x 100 -y 10 -w 190 -h 41] \                [list choice -name endUserChoice -newgroup -auto \                    -title [strTableGet LM_OPTIONS_BTN_1_MANUAL] \                    -x 102 -y 50 -w 190 -h 15 \                    -callback onEndUser] \                [list label -name endUserLabel \                    -title \                    [strTableGet LM_OPTIONS_BTN_1_DESC_MANUAL] \                    -x 114 -y 64 -w 180 -h 25] \                [list choice -name nodeLockChoice -auto \                    -title [strTableGet LM_OPTIONS_BTN_2_MANUAL] \                    -x 102 -y 100 -w 190 -h 15 \                    -callback onNodeLock] \                [list label -name nodeLockLabel  \                    -title \                     [strTableGet LM_OPTIONS_BTN_2_DESC_MANUAL] \                    -x 114 -y 115 -w 180 -h 20] \                [list boolean -name reloadCkbox -newgroup -auto \                    -title [strTableGet LM_OPTIONS_BTN_3] \                    -x 102 -y 140 -w 200 -h 15 \                    -callback onReloadLicNL] \                ]        }        set w [dlgFrmCreate [strTableGet LM_OPTIONS_TITLE]]        if { $setupVals(evaluation) == 1 } {            controlEnable $w.endUserChoice 0            controlCheckSet $w.nodeLockChoice 1            controlEnable $w.reloadCkbox 0            controlHide $w.reloadCkbox 1        }        # unhide the help button - no use during copying        controlEnable $w.helpButt 1        if { [isTornadoProduct] } {            controlEnable $w.helpButt 1        } else {            controlEnable $w.helpButt 0        }        switch $setupVals(lmOptions) {            onEndUser   { controlCheckSet $w.endUserChoice 1 }            onNodeLock  { controlCheckSet $w.nodeLockChoice 1 }            default     { controlCheckSet $w.nodeLockChoice 1 }        }                if {$lmVals(reloadExistingLicense) == 1} {                        controlCheckSet $w.reloadCkbox 1                } else {                        controlCheckSet $w.reloadCkbox 0                }                                controlValuesSet $w.nextButt "&Next >"                controlEnable $w.nextButt 1        controlEnable $w.backButt 1        controlEnable $w.cancelButt 1        # test automation        if { $ctrlVals(useInputScript) } {            autoSetupLog "LM Option page: Skipped"            autoSetupLog "\tLM Option: $setupVals(lmOptions)"            nextCallback        }    } else { # TEXT mode        printPageTitle [strTableGet LM_OPTIONS_TITLE]        puts [strTableGet LM_OPTIONS_MSG_1_TEXT]        puts "1 - [strTableGet LM_OPTIONS_BTN_1]"        puts "[strTableGet LM_OPTIONS_BTN_1_DESC]\n"        puts "2 - [strTableGet LM_OPTIONS_BTN_2]"        puts "[strTableGet LM_OPTIONS_BTN_2_DESC]\n"        while (1) {            puts "Please enter the number of your selection. \[1\]"            set ret [prompt]            switch -regexp -- $ret {                "^$" -                "^1$" {                     onEndUser                    nextCallback                    return 0                }                "^2$" {                     onNodeLock                                onReloadLicNL                    nextCallback                    return 0                }                "^[eE][xX][iI][tT]$" {                    return 0                }                default {                     puts "Error: Invalid input."                }            }        }    }}############################################################################### pageProcess(lmOptions) - process inputs from lmOptions page if any## This procedure will process inputs from lmOptions page if any## SYNOPSIS# .tS# pageProcess(lmOptions)# .tE## PARAMETERS: N/A## RETURNS: 1 when successful## ERRORS: N/A#proc pageProcess(lmOptions) {} {    global setupPageList setupVals ctrlVals lmVals    set retVal 1    switch $setupVals(lmOptions) {        onEndUser {            #pageListRemove lmInstOptions            set setupVals(lmInstType) "endUser"            if {$setupVals(lmManual) == 0} {                pageListAdd endUser            } else {                if {[isUnix]} {                    pageListAdd endUserManualUnix                               } else {                    pageListAdd endUserManual                }                return [licServerDialog]            }                                           }        onNodeLock {            if {$setupVals(lmManual) == 1} {                pageListAdd lmInstOptions            } else {                pageListAdd nodeLock            }                        # check if license file exists            if { ![NLlicFileExists] } {                # lic file not exists, skip current license info page                pageRemove currLicInfo                dbgputs "\npageRemove currLicInfo"                set retVal 1            } else {                 dbgputs "license file exists!"                set retVal [NLlicFileValidCheck]             }                        set setupVals(lmInstType) "nodeLocked"            if { $lmVals(reloadExistingLicense) == 1 } {                set lmVals(reload) 1                set setupVals(licUpdateAction) "onReload"            } else {                set lmVals(reload) 0                set setupVals(licUpdateAction) "onUpdate"            }                        # clear old value if one exists                        if { [info exists setupVals(lmInstOptions)] } {                set setupVals(lmInstOptions) ""            }        }    }        dbgputs "lmOption: $ctrlVals(pageList)"    return $retVal}############################################################################### onEndUser - set up to configure user to use floating licenses## This procedure is a callback which allows the user to configure tornado for# floating licensing## SYNOPSIS# .tS# onEndUser# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onEndUser {} {    global setupVals ctrlVals    global LMHelpPath    set setupVals(lmOptions) onEndUser    set lmVals(reloadExistingLicense) 0    set LMHelpPath "float"    if {[isGUImode]} {        set w $ctrlVals(mainWindow)        controlEnable $w.reloadCkbox 0        controlCheckSet $w.reloadCkbox 0    }}############################################################################### onNodeLock - setup to configure user for node locked licensing## This procedure is a callback which allows the user to configure tornado for# node locked licensing.## SYNOPSIS# .tS# onNodeLock# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onNodeLock {} {    global setupVals ctrlVals    global LMHelpPath    set setupVals(lmOptions) onNodeLock    set LMHelpPath "nodelock"    if {[isGUImode]} {        set w $ctrlVals(mainWindow)        controlEnable $w.reloadCkbox 1        #controlCheckSet $w.reloadCkbox 1    }}############################################################################### NLlicFileExists - Check if an license file exists## This routine check if an license file exists # # SYNOPSIS# .tS# NLlicFileExists# .tE## PARAMETERS: N/A## RETURNS: 1 if exists, 0 if not## ERRORS: N/A#proc NLlicFileExists {} {    global lmVals

⌨️ 快捷键说明

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