📄 instw32.tcl
字号:
endWaitCursor}############################################################################### applicationStart - create the background and main windows## This procedure will create the background and main windows## SYNOPSIS# .tS# applicationStart# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc applicationStart {} { global setupVals global ctrlVals if { $setupVals(cmdMode) != "text" } { set ctrlVals(parentDialog) $ctrlVals(backgroundWindow) if {![isUnix]} { dialogCreate -title "Setup" \ -name $ctrlVals(backgroundWindow) \ -nocontexthelp \ -init bkgndInit \ -exit bkgndExit \ -icon [cdFileNameGet \ [file join RESOURCE BITMAPS SETUP.ICO]] \ -thinframe -minibox -maxibox \ -x 0 -y 0 } elseif {![removeBackground]} { # use an icon for Unix with less colors than Windows dialogCreate -title "Setup" \ -name $ctrlVals(backgroundWindow) \ -nocontexthelp \ -init bkgndInit \ -exit bkgndExit \ -thinframe -minibox -maxibox \ -x 0 -y 0# -icon [cdFileNameGet# [file join RESOURCE BITMAPS SETUPUNX.ICO]] } else { # This is the case for when we want to remove the background. # remove the title, otherwise a small residual window appears, even # when the window size is set to 0 0 in bkgndInit. A thinframe is # also necessary. dialogCreate -notitle \ -name $ctrlVals(backgroundWindow) \ -helpfile $setupVals(setupHelp) \ -nocontexthelp \ -init bkgndInit \ -exit bkgndExit \ -thinframe \ -x 10000 -y 10000# -icon [cdFileNameGet# [file join RESOURCE BITMAPS SETUPUNX.ICO]] } } else { # TEXT mode startProg } return $setupVals(cancel)}############################################################################### startProg - callback procedure invoked when Setup window is active## This procedure is a callback procedure invoked when Setup window is active## SYNOPSIS# .tS# startProg# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc startProg {} { global ctrlVals env global setupVals set lic 0 set pageName [lindex $ctrlVals(pageList) 0] if { $setupVals(cmdMode) != "text"} { windowActivateCallbackSet $ctrlVals(backgroundWindow) "" pageCreate($pageName) if {[isUnix]} { # focus on backgroundWindow first to set correct colors # for welcome screen setupWindowFocusSet $ctrlVals(backgroundWindow) } } else { pageCreate($pageName) }}############################################################################### envPathSet - add bin directory to the PATH environment variable## This procedure will add bin directory to the PATH environment variable## SYNOPSIS# .tS# envPathSet# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc envPathSet {} { global env if {[isUnix]} { set exePath [dosToUnix [file dirname [info nameofexecutable]]] } else { set exePath [unixToDos [file dirname [info nameofexecutable]]] } foreach elem [array names env] { if {[string compare [string tolower $elem] "path"] == 0} { if {[isUnix]} { set env($elem) "[cdromBinDirGet]:$exePath:$env($elem)" } else { set env($elem) "[cdromBinDirGet];$exePath;$env($elem)" } return } } if {[isUnix]} { set env(PATH) "[cdromBinDirGet]:$exePath" } else { set env(PATH) "[cdromBinDirGet];$exePath" }}############################################################################### tempDirectory - create, destroy or return the temp directory based on option## This procedure will create, destroy or return the temp directory based# on option## SYNOPSIS# .tS# tempDirectory <option># .tE## PARAMETERS:# .IP options# create -- create the temp directory# destroy -- destroy the temp directory# get -- return the temp directory path## RETURNS: return the temp directory path if option is create or get;# nothing otherwise## ERRORS: N/A#proc tempDirectory {option} { global env if { $option == "create" } { # Determine the "temp" directory set uninstTemp "WIND_TMP[pid]" foreach elem [array names env] { if {[string compare [string tolower $elem] "tmp"] == 0} { set env(TMP) $env($elem) } if {[string compare [string tolower $elem] "temp"] == 0} { set env(TEMP) $env($elem) } if {[string compare [string tolower $elem] "tmpdir"] == 0} { set env(TMPDIR) $env($elem) } } if { ![isUnix] } { if {[info exists env(TEMP)] && [file isdir $env(TEMP)]} { set env(TMP) $env(TEMP)\\$uninstTemp } elseif {[info exists env(TMP)] && [file isdir $env(TMP)]} { set env(TMP) $env(TMP)\\$uninstTemp } elseif {[info exists env(TMPDIR)] && [file isdir $env(TMPDIR)]} { set env(TMP) $env(TMPDIR)\\$uninstTemp } else { if {[windHostTypeGet] == "x86-win32"} { set env(TMP) "C:\\$uninstTemp" } } } if { [isUnix] } { if {![info exists env(TMP)]} { set env(TMP) /tmp/$uninstTemp file mkdir $env(TMP) } else { set env(TMP) [dosToUnix $env(TMP)] } } if { ![isUnix] } { # tmp directory already exists for unix from setup wrapper file mkdir $env(TMP) } return $env(TMP) } elseif {$option == "destroy"} { if {![isUnix]} { cd c:/ } file delete -force $env(TMP) } elseif {$option == "get"} { return $env(TMP) } else { error "unknown option: $option" }}############################################################################### patchCheck - check if patches need to be applied to UNIX user systems## This procedure will check if patches need to be applied to UNIX user systems# For T2.2: Give warnings for Solaris 2.5 and 2.6 installations (not supported).## SYNOPSIS# .tS# patchCheck# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc patchCheck {} { global setupVals global ctrlVals global env if {[isUnix]} { # bypass patch checking for test automation # test automation if {$ctrlVals(useInputScript)} { autoSetupLog "Unix patch checking: Skipped" return 1 } # check OS version catch {exec /bin/uname -r} osversion dbgputs "CheckPatch: osversion = $osversion" if {$osversion == "5.6"} { set solaris26 1 set solaris "2.6" } else { set solaris26 0 } if {[regsub 5\.5 $osversion {} ignore]} { set solaris25 1 set solaris "2.5.x" } else { set solaris25 0 } if { $solaris26 || $solaris25 } { # warn user that T2.2 does not support Solaris 2.5.x and 2.6 set message "WARNING: SETUP has detected that this machine is\ running on Solaris $solaris. [cdromDescGet] does\ not officially support Solaris 2.5.x and Solaris 2.6." if { $setupVals(cmdMode) != "text" } { set msg "$message If you wish to continue with [cdromDescGet]\ products installation, please click OK.\ Otherwise, click Cancel to exit SETUP." switch -- [dialog ok_cancel "SETUP" $msg] { "0" { # proceed with installation uninstLog setupLog \ "SETUP detected the following warning, and\ installation was continued:\n\"$message\"" } "1" { uninstLog setupLog \ "SETUP detected the following warning and\ was terminated:\n\"$message\"" return 0 } } } else { set msg "$message\nIf you wish to continue with [cdromDescGet]\ products installation, please press the \<Return\>\ key. Otherwise, type \'exit\' to exit SETUP." set ret [prompt "$msg\n"] if { [regexp {[eE][xX][iI][tT]} $ret] } { uninstLog setupLog \ "SETUP detected the following warning and\ was terminated:\n\"$message\"" return 0 } else { uninstLog setupLog \ "SETUP detected the following warning, and\ installation was continued:\n\"$message\"" } } } # For supported version of UNIX, do not display warnings. # Proceed to check patches. set prod [string toupper [getProdInfo name]] searchAndProcessSection CheckPatch [cdFileNameGet \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -