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

📄 instw32.tcl

📁 windml3.0.3
💻 TCL
📖 第 1 页 / 共 5 页
字号:
    beginWaitCursor
    if {[uninstHomeDirGet] != "" && ![info exists setupVals(diskfull)]} {

        # workaround until uninstall for LM install is available
        # Do not create uninstall icon if do floating license installation
        if {"$setupVals(lmInstType)" != "floating"} {
            uninstStop [getProdInfo name] [getProdInfo version]
                }
    } else {
        # call queueExecute here since we don't call it in uninstStop

        queueExecute

        # close uninstall files so the temp directory can be removed.

        uninstFileClose
    }

    if {[isUnix]} {
        #  do not destroy temp directory yet if TMP/patchinfo exists.
            #  The SETUP script will remove the temp directory after the
            #  patchinfo message is displayed.
        if {![file exists $env(TMP)/patchinfo]} {
            catch {tempDirectory destroy}
        }
    } else {
        catch {tempDirectory destroy}
    }

    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

⌨️ 快捷键说明

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