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

📄 flexcopy.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 2 页
字号:
                autoSetupLog "Application Exit\n"                set setupVals(cancel) 1                                applicationExit                return 0            } else {                messageBox "Error: No FlexLM files are copied"            }        } else {            puts "Error: No FlexLM files are copied"            while { [prompt "Press <Enter> to continue."] != "" } {            }        }    } else {        set binDir [file join \                       [dosToUnix [destDirGet]] host [windHostTypeGet] bin]        uninstLog setup "Installed License Management Files:"        foreach file "$fileList" {            set f [file tail $file]            set destFile [file join $binDir $f]                                    # copy the file to windHostType/bin            fileDup $file $destFile update            dbgputs $destFile            uninstLog setup "\t$destFile"            if {![isUnix]} {                file attributes $destFile -readonly 0            }        }    }    # Copy FLEXlm File Manager files onto NT system32 directory    if {![isUnix]} {        set ntSysDir [dosToUnix [sysDirGet]]                set fileList [glob -nocomplain \                         [dosToUnix [cdromBinDirGet]]/lmgr*.dll \                         [dosToUnix [cdromBinDirGet]]/flexlm.cpl ]        foreach file "$fileList" {            set f [file tail $file]            set destFile [file join $ntSysDir $f]            set doCopy 0            # validate time stamp            if {[file exists $destFile]} {                if {[file mtime $file] > [file mtime $destFile]} {                    # src file newer then current file                    set doCopy 1                }            } else {                set doCopy 1            }                    # copy the file to NT system32            if {$doCopy} {                if {[catch {file copy -force $file $destFile} err]} {                    if { $ctrlVals(useInputScript) } {                        autoSetupLog "$err"                        autoSetupLog "Application Exit\n"                        set setupVals(cancel) 1                                        applicationExit                        return 0                    } else {                        dialog ok_with_title "Copy Error" "$err"                        uninstLog setup "Copy Error: $err"                    }                }                dbgputs $destFile                uninstLog setup "\t$destFile"                file attributes $destFile -readonly 0            }        }    }    if { [isGUImode] } {            endWaitCursor        windowClose flexlmFilesCopyDlg    }}############################################################################### licFileExists - Check if an license file exists## This routine check if an license file exists # # SYNOPSIS# .tS# licFileExists# .tE## PARAMETERS: N/A## RETURNS: 1 if exists, 0 if not## ERRORS: N/A#proc licFileExists {} {    global lmVals    if {[file exists $lmVals(lmLicenseFile)] } {        set retVal 1    } else {        set retVal 0    }    return $retVal}############################################################################### licFileValidCheck - validate the license file## This routine validate the existing license file# # SYNOPSIS# .tS# licFileValidCheck# .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 licFileValidCheck {} {    global ctrlVals setupVals lmRetVal env    if { [isGUImode] } {        if { [windHostTypeGet] == "x86-linux2"} {            dialogCreate \                -name licFileValidCheckDlg \                -notitle \                -parent $ctrlVals(parentDialog) \                -width 230 -height 32 \                -init {                    controlPropertySet licFileValidCheckDlg.message1 -bold 1; \                    windowTimerCallbackSet licFileValidCheckDlg \                    -milliseconds 200 licFileValidCheckCallback \                } \                -controls [list \                    [list label -name "message1" \                                -title [strTableGet LM_ANALYSIS_BANNER] \                                -x 40 -y 12 -w 180 -h 10] ]        } else {            dialogCreate \                -name licFileValidCheckDlg \                -notitle \                -parent $ctrlVals(parentDialog) \                -width 230 -height 32 \                -init {                    controlPropertySet licFileValidCheckDlg.message1 -bold 1; \                    windowTimerCallbackSet licFileValidCheckDlg \                    -milliseconds 200 licFileValidCheckCallback \                } \                -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"        licFileValidCheckCallback    }    # lmRetVal is set in licFileValidCheckCallBack    return $lmRetVal}############################################################################### licFileValidCheckCallback - Call back function for licFileValidCheck## This routine validate the existing license file# # SYNOPSIS# .tS# licFileValidCheckCallback# .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 licFileValidCheckCallback {} {    global setupVals ctrlVals lmVals lmRetVal    set retVal 1    set errMsg ""    set cannotOpen 0    if { [isGUImode] } {        windowTimerCallbackSet licFileValidCheckDlg 0 ""        beginWaitCursor    }    # check file opening and syntex    if { [catch {open $lmVals(lmLicenseFile) r} fileId] } {         dbgputs "FLEXCOPY: Cannot open license file"        set cannotOpen 1        set errMsg "Cannot open license file: $lmVals(lmLicenseFile)\                    \nfor analysis."        uninstLog setup "FLEXCOPY: Detected license file opening error."    } 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|VENDOR|HOSTID|DUP|BORROW|PACKAGE|SIGN].*} $line] } {                dbgputs "FLEXCOPY: License file can be opened and has a key word."                uninstLog setup "FLEXCOPY: Setup has detected that your license \			file can be opened for analysis."                if { $ctrlVals(useInputScript) } {                    autoSetupLog "FLEXCOPY - SETUP has detected that your\                                  license file can be opened for analysis."                }                break            }        }        close $fileId    }    if { $cannotOpen == 1 } {        # error with license file, skip current license info page        pageRemove currLicInfo    }    set lmRetVal $retVal    if { [isGUImode] } {        endWaitCursor        windowClose licFileValidCheckDlg    }}####################################################################### Dialog Text Messages######################################################################set strTable(FLEXCOPY_LM_FILE_INVALID) \	"SETUP has detected that your license file has an invalid format.\     SETUP will overwrite the file."set strTable(LM_FILESCOPY_BANNER) \    "Copying License Management Files. Please wait..."set strTable(LM_ANALYSIS_BANNER) \    "Analyzing License File. Please wait..."

⌨️ 快捷键说明

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