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

📄 lmoption.tcl

📁 windml3.0
💻 TCL
📖 第 1 页 / 共 2 页
字号:
# 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    if {[file exists $lmVals(lmLicenseFile)] } {        set retVal 1    } else {        set retVal 0    }    return $retVal}############################################################################### NLlicFileValidCheck - validate the license file## This routine validate the existing license file# # SYNOPSIS# .tS# NLlicFileValidCheck# .tE## PARAMETERS: N/A## RETURNS: 0 if failed, non-zero if success. Return num is the setup page to#          jump to## ERRORS: N/A#proc NLlicFileValidCheck {} {    global ctrlVals setupVals lmRetVal     if { [isGUImode] } {        dialogCreate \            -name NLlicFileValidCheckDlg \            -notitle \            -parent $ctrlVals(parentDialog) \            -width 230 -height 32 \            -init {                controlPropertySet NLlicFileValidCheckDlg.message1 -bold 1; \                windowTimerCallbackSet NLlicFileValidCheckDlg \                -milliseconds 200 NLlicFileValidCheckCallback \            } \            -controls [list \                [list bitmap -name bmp -stretch \                             -title "[cdFileNameGet \                                     [file join RESOURCE BITMAPS SETUPICO.BMP]]" \                             -x 10 -y 5 -w 20 -h 20] \                [list label -name "message1" \                            -title [strTableGet LM_ANALYSIS_BANNER] \                            -x 40 -y 12 -w 180 -h 10] ]    } else { # TEXT mode               puts "[strTableGet LM_ANALYSIS_BANNER]\n"        NLlicFileValidCheckCallback    }    # lmRetVal is set in NLlicFileValidCheckCallBack    return $lmRetVal}############################################################################### NLlicFileValidCheckCallback - Call back function for NLlicFileValidCheck## This routine validate the existing license file# # SYNOPSIS# .tS# NLlicFileValidCheckCallback# .tE## PARAMETERS: N/A## RETURNS: 0 if failed, non-zero if success. Return num is the setup page to#          jump to## ERRORS: N/A#proc NLlicFileValidCheckCallback {} {    global setupVals ctrlVals lmVals lmRetVal    set retVal 1    set errMsg ""    set invalidFile 0    set invalidSyntex 0    if { [isGUImode] } {        windowTimerCallbackSet NLlicFileValidCheckDlg 0 ""        beginWaitCursor    }    # check file opening and syntex    if { [catch {open $lmVals(lmLicenseFile) r} fileId] } {         dbgputs "Cannot open license file"        set invalidFile 1        set errMsg "Cannot open license file: $lmVals(lmLicenseFile)\                    \nWould you like to replace it?"        uninstLog setup "Detected license file opening error."        if { $ctrlVals(useInputScript) } {            autoSetupLog "Cannot open license file: $lmVals(lmLicenseFile).\                          SETUP will replace the license file."        }    } else {        while { [gets $fileId line] >= 0 } {            set line [string trim $line]	    if { "$line" != "" && \		 [regexp {^%.*} $line] } {		 # found start of WR proprietary info, no more licensefile lines		 break;             }            # check if the line has correct format            if { "$line" != "" && \                 ![regexp {[SERVER|USE_SERVER|FEATURE|INCREMENT|BORROW|SIGN|VENDOR|HOSTID|DUP|PACKAGE].*} $line] } {                dbgputs "License file has an invalid format"                set invalidSyntex 1                set errMsg [strTableGet LM_FILE_INVALID]                uninstLog setup "Invalid license file detected."                if { $ctrlVals(useInputScript) } {                    autoSetupLog "SETUP has detected that your license file \                                  has an invalid format. SETUP will replace                                  the license file."                }                break            }        }        close $fileId    }    if { $invalidFile == 1 || $invalidSyntex == 1 } {        # error with license file, skip current license info page        pageRemove currLicInfo        if { [isGUImode] } {            # dialog box here            if { [dialog yes_no "Setup" $errMsg] } {                messageBox "[strTableGet LM_LIC_FILE_NOT_REPLACE]"                pageListRemove "floatLicInst"                # redisplay this page (lmOptions)                set retVal [calcPage lmOptions]            }        } else { # text mode            puts "$errMsg \[Y|N\]"            while (1) {                switch -regexp -- [prompt] {                    "^[Y|y]" {                        break                    } "^[N|n]" {                        puts [strTableGet LM_LIC_FILE_NOT_REPLACE]                        while { [prompt "Press <Enter> to continue."] != "" } {                        }                        pageListRemove "floatLicInst"                        # redisplay this page (lmOptions)                        set retVal [pageCreate(lmOptions)]                        break                    } "^-$" {                        backCallback                    } default  { }                }            }        }    }    set lmRetVal $retVal    if { [isGUImode] } {        endWaitCursor        windowClose NLlicFileValidCheckDlg    }}proc onReloadLicNL {} {    global lmVals ctrlVals    if {[isGUImode]} {        set w $ctrlVals(mainWindow)        if {[controlChecked $w.reloadCkbox]} {            set lmVals(reloadExistingLicense) 1            set lmVals(reload) 1        } else {            set lmVals(reloadExistingLicense) 0            set lmVals(reload) 0        }    } else {        puts "Do you want to recapture your existing license file? (y/n) \[n\] "        set ret [prompt]        if {$ret == "y"} {            set lmVals(reloadExistingLicense) 1            set lmVals(reload) 1        } else {            set lmVals(reloadExistingLicense) 0            set lmVals(reload) 0        }    }    dbgputs "reloadExistingLicense: $lmVals(reloadExistingLicense)"}####################################################################### Dialog Text Messages######################################################################set strTable(LM_OPTIONS_TITLE) "License Management Configuration"set strTable(LM_OPTIONS_MSG_1) \    "SETUP has detected that one or more products require\    license management configuration.\    Choose one of the license management configuration\    options listed below, then click the Next button to\    continue the installation:"set strTable(LM_OPTIONS_MSG_1_TEXT) \    "Setup has detected that one or more products require\    license management configuration.\    Choose one of the license management configuration\    options listed below to continue the installation:\n"set strTable(LM_OPTIONS_BTN_1) \    "Configure to use a floating license"set strTable(LM_OPTIONS_BTN_1_DESC) \    "Configure this machine to obtain a floating license from an\     existing license server on the network."set strTable(LM_OPTIONS_BTN_2) \    "Configure to use a node-locked license"set strTable(LM_OPTIONS_BTN_3) \        "Recapture license previously configured for this machine."set strTable(LM_OPTIONS_BTN_2_DESC) \    "Obtain a license reserved for use by this machine only."set strTable(LM_ANALYSIS_BANNER) \    "Analyzing License File. Please wait..."set strTable(LM_FILE_INVALID) \    "SETUP has detected that your license file has an invalid format.\    Would you like to replace it?"set strTable(LM_LIC_FILE_NOT_REPLACE) \    "You have choosen not to replace your license file.\nPlease select another\    License Management options."

⌨️ 快捷键说明

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