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

📄 instw32.tcl

📁 windml3.0
💻 TCL
📖 第 1 页 / 共 5 页
字号:
            append patchText [strTableGet 5008_PATCHES_UPDATE]            append patchinfoText [strTableGet 5009_PATCHES_UPDATE_FORMATTED]                       # write patch info to TMP/patchinfo to be printed to the            # console later.  This will allow the user to cut and            # paste information since cut and paste is not allowed from            # a messagebox.            set patchfile "$env(TMP)/patchinfo"            set patchfileId [open $patchfile w]            puts $patchfileId $patchinfoText            close $patchfileId                        append patchText "\nNote: This message will also be reprinted to\                              your shell when you exit."            append patchText "\n\nWould you prefer to continue with SETUP?\n\n\                              If you click the Yes button, SETUP will proceed\                              with installation.  However, this may cause\                              SETUP and/or your system to become unstable, and\                              we strongly recommend that you install the\                              patches before proceeding.  (If you know that\                              you have installed patches that supercede or\                              are equal to those listed above, it should be\                              safe to continue.)  SETUP will exit if\                              you click the No button."            set result [messageBox -yesno -stopicon $patchText]            if {$result == "no"} {                return 0            }        } elseif {$setupVals(uninstalledPatches_recommended) != ""} {            set patchText [strTableGet 5002_PATCHES_RECOMMENDED_TEXT]            append patchText $setupVals(uninstalledPatches_recommended)            set patchinfoText \                [strTableGet 5005_PATCHES_RECOMMENDED_FORMATTED_TEXT]            append patchinfoText $setupVals(uninstalledPatches_recommended)                        if {$env(WIND_HOST_TYPE)=="sun4-solaris2"} {                append patchText [strTableGet 5006_PATCHES_SUN_LOCATION]                append patchinfoText [strTableGet 5006_PATCHES_SUN_LOCATION]            } elseif {$env(WIND_HOST_TYPE)=="parisc-hpux10"} {                append patchText [strTableGet 5007_PATCHES_HP_LOCATION]                append patchinfoText [strTableGet 5007_PATCHES_HP_LOCATION]            }            append patchText [strTableGet 5008_PATCHES_UPDATE]            append patchinfoText [strTableGet 5009_PATCHES_UPDATE_FORMATTED]                        # write patch info to TMP/patchinfo to be printed to the            # console later.  This will allow the user to cut and            # paste information since cut and paste is not allowed from            # a messagebox.            set patchfile "$env(TMP)/patchinfo"            set patchfileId [open $patchfile w]            puts $patchfileId $patchinfoText            close $patchfileId            append patchText "\nNote: This message will also be reprinted to\                              your shell when you exit SETUP."            messageBox $patchText        }    } elseif {![windowsSystemCheck]} {        return 0    }     return 1}############################################################################### printPageTitle - prints header for command-line setup pages## SYNOPSIS# .tS# printPageTitle# .tE## PARAMETERS:# .IP msg# title message to be displayed## RETURNS: N/A## ERRORS: N/A#proc printPageTitle {msg} {    for {set i 0} {$i < 2} {incr i} {        puts ""    }    for {set i 0} {$i < 80} {incr i} {        puts -nonewline "="    }    puts ""    set space [expr (80 - [string length $msg]) / 2 ]    for {set i 0} {$i < $space} {incr i} {        puts -nonewline " "    }    puts -nonewline "$msg"    puts ""    for {set i 0} {$i < 80} {incr i} {        puts -nonewline "="    }    puts ""}############################################################################### prompt - prints a message and prompt for input## This procedure will print a message if provided and display a prompt for# input## SYNOPSIS# .tS# prompt# .tE## PARAMETERS:# .IP msg# message to be displayed## RETURNS: user input at prompt## ERRORS: N/A#proc prompt {{msg ""}} {    global setupVals    if { "$msg" != "" } {        puts $msg    }    puts -nonewline "-> "    flush stdout    set ans [gets stdin]    set ans [string trim $ans " " ]    puts ""    if { [regexp {[eE][xX][iI][tT]} $ans] } {        catch {            uninstLog setup "\tUser aborted!"            if {[uninstHomeDirGet] != "" && ![info exists setupVals(diskfull)]} {                uninstStop [getProdInfo name] [getProdInfo version]            }        }    }    return $ans}############################################################################### autoSetupLog - put message in setup log file for test automation## This procedure will put message in setup log file for test automation## SYNOPSIS# .tS# autoSetupLog <msg># .tE## PARAMETERS:# .IP msg# message to be inserted in setup log file for test automation## RETURNS: N/A## ERRORS: -1 if unsuccessful#proc autoSetupLog {msg} {    global autoSetupLogFile    if [catch {open $autoSetupLogFile a+} file] {        puts "Error in writing $autoSetupLogFile"        return -1    }    puts $file "[getDate]: $msg"    close $file}############################################################################### checkBSPcd - check for BSP CD## This procedure will set internal variable to indicate this is a BSB CD## SYNOPSIS# .tS# checkBSPcd# .tE## PARAMETERS: None# ## RETURNS: N/A## ERRORS: None#proc checkBSPcd {} {    global env    global setupVals    if ![catch {open [file join $env(CD_ROOT) DISK_ID] r} fId] {        # get the 2nd line (pool desc)        gets $fId line        gets $fId line          if [regexp {BSPs*} $line] {            set setupVals(BSPcd) 1        }        close $fId    }}############################################################################### globalInit - initialize all global variables## This procedure will initialize all global variables## SYNOPSIS# .tS# globalInit# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc globalInit {} {    global setupVals ctrlVals env dll argv cdObj    global autoSetupLogFile    global projLic    global projName    global projLicUsers    global lmVals lmTotalRecs lmHostFeaturesNum lmHostRecs lmHostRecsLen    global cancelDBQUERY patchPath    # Get the CD root directory    if {![isUnix]} {        # change slashes for win32        regsub -all {/} [lindex $argv 0] {\\} env(CD_ROOT)        if {![info exists env(HOME)]} {            set env(HOME) "C:"        }    } else {        set env(CD_ROOT) [lindex $argv 0]        if {![info exists env(HOME)]} {            set env(HOME) "~"        }    }    # make sure we can read the filename on the CD    # INCLUDE.TCL - procedures sourced by INSTW32.TCL and INCLUDE.TCL    # GLOBAL.TCL  - procedures sourced by INSTW32.TCL only    set sourceList "GLOBAL INCLUDE"        foreach includeFile $sourceList {        set fileName [file join RESOURCE TCL $includeFile.TCL]        set fn [string toupper $fileName]        if {[file exists [file join $env(CD_ROOT) $fn]]} {            set globFile [file join $env(CD_ROOT) $fn]        }        set fn [string tolower $fileName]        if {[file exists  [file join $env(CD_ROOT) $fn]]} {            set globFile [file join $env(CD_ROOT) $fn]        }        source $globFile    }    # set env(CD_BIN)    if {[isUnix]} {        if {$env(WIND_HOST_TYPE) == "sun4-solaris2"} {            set env(CD_BIN) "$env(CD_ROOT)/SUN4/SOLARIS2"        } elseif {$env(WIND_HOST_TYPE) == "x86-linux2"} {            set env(CD_BIN) "$env(CD_ROOT)/X86/LINUX2"        } elseif {$env(WIND_HOST_TYPE) == "parisc-hpux10"} {            set env(CD_BIN) "$env(CD_ROOT)/PARISC/HPUX10"        }    } else {        set env(CD_BIN) "$env(CD_ROOT)\\X86\\WIN32"    }        # load setuptcl.dll or setuptcl.so    load [cdromBinDirGet]/SETUPTCL[string toupper [info sharedlibextension]]    # load dll for email    if { ![isUnix] } {        # Load the Support.dll which contains the mail API        if [catch {dllLoad [cdromBinDirGet]\\SUPPORT.DLL} dll(1)] {            messageBox -ok -stopicon $dll(1)            return 0        }                        # Load the TGensock.dll which contains the socket API        if [catch {dllLoad "[cdromBinDirGet]\\TGENSOCK.DLL"} dll(2)] {            messageBox -ok -stopicon $dll(2)            return 0        }    }            # Detect the version of windows/UNIX we are running    # if unix, setupWinVerGet will return "WIN31s"    set ctrlVals(version) [setupWinVerGet]    if {$ctrlVals(version) == "NT4x" || $ctrlVals(version) == "NT5x" \        || $ctrlVals(version) == "XP" } {        set ctrlVals(NT) 1    } elseif {$ctrlVals(version) == "WIN95" || $ctrlVals(version) == "WIN98" } {        set ctrlVals(NT) 0        # exit if not a valid windows platfrom        if { ![isUnix] } {            set msg "Unsupported windows Platform detected. The supported\                    platforms are Windows NT 4.0, Windows 2000, and Windows XP.\n"            messageBox -ok -stopicon $msg            return 0        }    } else {        set ctrlVals(NT) 0        # WARN if unrecognized platform        if { ![isUnix] } {            set msg "The windows platform you are running on is unrecognized\                     by SETUP. The supported platforms are Windows NT 4.0, Windows\                     2000, and Windows XP. However, you may proceed to install at\                     your own risk. Would you like to continue?\n"            switch [messageBox -yesno -questionicon $msg] {                no { return 0 }            }        }    }    # add bin directory to PATH    envPathSet    # Work around for the case sensitivity clash of the environment vars    # between Windows and TCL.    foreach elem [array names env] {       if {[string compare [string tolower $elem] "tmp"] == 0} {           regsub -all {/} $env($elem) {\\} env(TMP)           break       }    }    if [isUnix] {        windHostTypeSet $env(WIND_HOST_TYPE)    } else {        windHostTypeSet "x86-win32"    }    # Create the "temp" directory (destroyed in "bkgnd

⌨️ 快捷键说明

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