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

📄 instw32.tcl

📁 windml3.0.3
💻 TCL
📖 第 1 页 / 共 5 页
字号:
            /l -
            \-L -
            /L {
                dbgputs "parsCmdLine: license management setup"
                instTypeSet licenseSetup
                parseCmdLine [lrange $switches 1 end]
            }
            \-r -
            /r -
            \-R -
            /R {
                instTypeSet registryInst
                parseCmdLine [lrange $switches 1 end]
            }
            \-t -
            /t -
            \-T -
            /T -
            /TEXT {
                if { [instTypeGet] != "icon" } {
                    set setupVals(cmdMode) "text"
                    parseCmdLine [lrange $switches 1 end]
                } else {
                    puts [strTableGet 1550_USAGE]
                    set displayedUsageError 1
                    set usageError 1
                }
            }
            \-a -
            /a -
            \-A -
            /A {
                instTypeSet fileAssociation
                parseCmdLine [lrange $switches 1 end]
            }
            \-OVERRIDE -
            /OVERRIDE {                
                set skipInstalloverCheck 1
                parseCmdLine [lrange $switches 1 end]
            }
            /? -
            /H -
            /HELP -
            default {
                set option [lindex $switches 0]
                if {[string index $option 0] == "/"  || [string index $option 0] == "-"} {
                    set option [string range $option 1 end]
                    if {[string first "PATCH" $option] == 0 && [string index $option 5] == "="} {
                        # This is a patch specification

                        set patchPath [string range $option 6 end]
                        set patchPath [string trim $patchPath]
                        instKeySet none
                        set skipInstalloverCheck 1
                    } else {
                        set usageError 1
                    }
                } else {
                    set usageError 1
                }
            }
        }
    }

    if {$usageError && $displayedUsageError == 0} {
        messageBox -ok -informationicon [strTableGet 1550_USAGE]
        set displayedUsageError 1
    }
    return $usageError
}


#############################################################################
#
# constructPages - contruct list of pages based on types of installation
#
# This procedure will construct list of pages based on types of installation
#
# SYNOPSIS
# .tS
# constructPages
# .tE
#
# PARAMETERS:
# .IP mode
# icon -- icon installation only
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc constructPages {mode} {
    global ctrlVals
    global dll

    set retVal 1
    set ctrlVals(pageList) {}

    # Initialize page list
    initPageList

    set ctrlVals(currPage) [lindex $ctrlVals(pageList) 0]
    set ctrlVals(pageListBack) $ctrlVals(pageList)
    return $retVal
}

#############################################################################
#
# initPageList - init procedure to construct the default page list
#
# This procedure is a init procedure to construct the default page list
#
# SYNOPSIS
# .tS
# initPageList
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc initPageList {} {
    global ctrlVals setupPageList

    set ctrlVals(pageList) $setupPageList(commonPages)

    if {($ctrlVals(admin) == "1") || ($ctrlVals(NT) != "1")} {
        pageRemove privilege
    }

}


#############################################################################
#
# applicationExit - close the main and background windows for Setup
#
# This procedure will close the main and background windows for Setup
#
# SYNOPSIS
# .tS
# applicationExit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc applicationExit {} {
    global ctrlVals

    closeSetupDebugLog

    set wExist [windowExists -title $ctrlVals(mainWindow)]

    if { $wExist } {
        windowClose $ctrlVals(mainWindow)
    }

    windowClose $ctrlVals(backgroundWindow)
}


#############################################################################
#
# previousPage - return to the previous wizard page
#
# This procedure will bring Setup to the previous wizard page
#
# SYNOPSIS
# .tS
# previousPage
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#
#
#proc previousPage {} {
#    global ctrlVals
#
#    set currPageIndex [lsearch $ctrlVals(pageList) $ctrlVals(currPage)]
#    set prevPageIndex [expr $currPageIndex - 1]
#
#    return [lindex $ctrlVals(pageList) $prevPageIndex]
#}


#############################################################################
#
# exitWithMessage - display exiting messages
#
# This procedure will display exiting messages
#
# SYNOPSIS
# .tS
# exitWithMessage <message>
# .tE
#
# PARAMETERS:
# .IP message
# message to be displayed
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc exitWithMessage {message} {
    global setupVals ctrlVals

    if { "$setupVals(cmdMode)" != "text" } {

        if {$message == ""} {
            if { $ctrlVals(useInputScript) } {
                autoSetupLog "[strTableGet 1213_FINISH]"
                autoSetupLog "Application Exit\n"
                set setupVals(cancel) 1
            } else {
                messageBox -ok -stopicon [strTableGet 1213_FINISH]
            }
        } else {
            if { $ctrlVals(useInputScript) } {
                autoSetupLog "$message"
                autoSetupLog "Application Exit\n"
                set setupVals(cancel) 1
            } else {
                messageBox -ok -stopicon "$message"
            }
            uninstLog setupLog "\tSetup terminated: $message"
        }
        applicationExit
        return 0

    } else { # text mode
        if {$message == ""} {
            puts [strTableGet 1213_FINISH]
        } {
            puts $message
            uninstLog setupLog "\tSetup terminated: $message"
        }
        return 0
    }   
}

#############################################################################
#
# bkgndInit - init procedure called when background window is created
#
# This procedure is an initialization procedure called when background
# window is created
#
# SYNOPSIS
# .tS
# bkgndInit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc bkgndInit {} {
    global ctrlVals
    global setupVals

    if ![catch {setupScreenDimensionsGet} dimension] {
        set dimension \
            [pixelsToDialogUnits $ctrlVals(backgroundWindow) $dimension]
        set ctrlVals(screenW) [lindex $dimension 0]
        set ctrlVals(screenH) [lindex $dimension 1]
    }

    #dbgputs "screenW = $ctrlVals(screenW)"
    #dbgputs "screenH = $ctrlVals(screenH)"

    set bkgnd [cdFileNameGet [file join RESOURCE BITMAPS BKGNDSOL.BMP]]

    set control [list bitmap -name bitmap \
                             -title $bkgnd \
                             -x 0 -y 0 -stretch \
                             -w $ctrlVals(screenW) \
                             -h $ctrlVals(screenH) \
    ]

    if {[removeBackground]} {
        # this will effectively cause the background to disappear.

        windowShow $ctrlVals(backgroundWindow) 0
    } else {
        windowSizeSet $ctrlVals(backgroundWindow) $ctrlVals(screenW) \
                              $ctrlVals(screenH)
    }

    controlCreate $ctrlVals(backgroundWindow) $control

    if {![removeBackground]} {
        setupBannerAttach [windowHandleGet $ctrlVals(backgroundWindow)] \
                [controlHandleGet $ctrlVals(backgroundWindow).bitmap] \
                [cdromBannerGet]
    }

    windowQueryCloseCallbackSet $ctrlVals(backgroundWindow) quitCallback

#   Next line commented out because it's not guaranteed to work,
#   Left in as a lesson to be learned: window managers affect program behavior.
#   windowActivateCallbackSet $ctrlVals(backgroundWindow) startProg

    startProg
}

#############################################################################
#
# bkgndExit - exit procedure invoked when background is closed
#
# This procedure is a exit procedure invoked when background is closed
#
# SYNOPSIS
# .tS
# bkgndExit
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc bkgndExit {} {
    global ctrlVals
    global setupVals
    global env

⌨️ 快捷键说明

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