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

📄 instw32.tcl

📁 这是vxworks 的图形界面开发软件windML2.0和另一个CP2可以构成完整的界面开发。
💻 TCL
📖 第 1 页 / 共 5 页
字号:

    lappend setupVals(commandQueue) \
        [list regKeyCreateLogHelper $rootKey $subKey $key $log]  
}

#############################################################################
#
# regKeyCreateLogHelper - helper procedure to create registry key and
#                         save the actions
#
# This procedure is a helper procedure to create registry key and save the
# actions
#
# SYNOPSIS
# .tS
# regKeyCreateLogHelper <rootKey> <subKey> <key> [log]
# .tE
#
# PARAMETERS:
# .IP rootKey 
# root of registry key hierarchy; eg HKEY_LOCAL_MACHINE
# .IP subKey  
# path to the registry key; eg SOFTWARE\\Microsoft\\Windows\\CurrentVersion
# .IP key
# key name; eg "Uninstall", "TornadoV2.0"
# .IP log 
# true -- log the actions (default)
# false -- do not log the actions
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc regKeyCreateLogHelper {rootKey subKey key log} {

    if {[catch {setupRegKeyExists $rootKey "$subKey\\$key"} error] &&
       ![catch {sysRegistryKeyCreate $rootKey $subKey $key} error] && 
       "$log" == "true"} {
         uninstLog resource "regkey\t$rootKey\t$subKey\\$key"
    }
}

#############################################################################
#
# regValueExists - test if registry key exists
#
# This procedure will test if registry key exists
#
# SYNOPSIS
# .tS
# regValueExists <rootKey> <subKey> <value>
# .tE
#
# PARAMETERS:
# .IP rootKey 
# root of registry key hierarchy; eg HKEY_LOCAL_MACHINE
# .IP subKey 
# path to the registry key; eg SOFTWARE\\Microsoft\\Windows\\CurrentVersion
# .IP key     
# key name; eg "Uninstall", "TornadoV2.0"
#
# RETURNS: retVal - 0 -- registry key does not exist
#                 - 1 -- registry key exists
#
# ERRORS: N/A
#

proc regValueExists {rootKey subKey value} {
    set retVal 0
    if {[lsearch [setupRegValueEnum $rootKey $subKey] $value] != -1} {
        set retVal 1
    }
    return $retVal
}

#############################################################################
#
# regValueWriteLog - write registry key to the Windows registry and save
#                    the actions for uninstall use later
#
# This procedure will write registry key to the Windows registry and save
# the actions for uninstall use later
#
# SYNOPSIS
# .tS
# regValueWriteLog <rootKey> <key> <valueName> <value> [log]
# .tE
#
# PARAMETERS:
# .IP rootKey   
# root of registry key hierarchy; eg HKEY_LOCAL_MACHINE
# .IP key       
# path to the registry key; eg SOFTWARE\\Microsoft\\Windows\\CurrentVersion
# .IP valueName 
# key name; eg "Uninstall", "TornadoV2.0"
# .IP value
# value associated with the key
# .IP log 
# true -- log the actions (default)
# false -- do not log the actions
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc regValueWriteLog {rootKey key valueName value {log true}} {
    global setupVals

    lappend setupVals(commandQueue) \
        [list regValueWriteLogHelper $rootKey $key $valueName $value $log]  
}

#############################################################################
#
# regValueWriteLogHelper - helper procedure to regValueWriteLog
#
# This procedure is a helper procedure to regValueWriteLog
#
# SYNOPSIS
# .tS
# regValueWriteLogHelper <rootKey> <key> <valueName> <value> [log]
# .tE
#
# PARAMETERS: 
# .IP rootKey   
# root of registry key hierarchy; eg HKEY_LOCAL_MACHINE
# .IP key       
# path to the registry key; eg SOFTWARE\\Microsoft\\Windows\\CurrentVersion
# .IP valueName 
# key name; eg "Uninstall", "TornadoV2.0"
# .IP value     
# value associated with the key
# .IP log       
# true -- log the actions (default)
# false -- do not log the actions
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc regValueWriteLogHelper {rootKey key valueName value log} {

    if {[catch {sysRegistryValueWrite $rootKey $key $valueName $value} error]} {
        puts "error when writing value $valueName: $error"

    } elseif {"$log" == "true" && ![regValueExists $rootKey $key $valueName]} {
        uninstLog resource "regValue\t$rootKey\t$key\t$valueName"
    } 
}

#############################################################################
#
# queueExecute - execute commands in the queue
#
# This procedure will execute commands in the queue. The purpose is to store
# a list of commands in case if users decide to exit the setup program, these
# commands can all be executed at once.
#
# SYNOPSIS
# .tS
# queueExecute
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc queueExecute {} {
    global setupVals

    foreach command $setupVals(commandQueue) {
        eval $command
    }    
}

#############################################################################
#
# windRegValueRead - load WIND_REGISTRY registry value from the previous 
#                    installation if any
#
# This procedure will load WIND_REGISTRY registry value from the previous 
# installation if any
#
# SYNOPSIS
# .tS
# windRegValueRead
# .tE
#
# PARAMETERS: N/A
#
# RETURNS: WIND_REGISTRY value
#
# ERRORS: N/A
#

proc windRegValueRead {} {
    global setupVals
    global ctrlVals

    # Load WIND_REGISTRY from the previous installation if any

    if ![info exists setupVals(registry)] { 
        set setupVals(registry) ""

        if {![catch {sysRegistryValueRead HKEY_CURRENT_USER \
                "Software\\$setupVals(WRS)\\$setupVals(prodRegEntry)" \
                WIND_REGISTRY} retVal]} { 

            set setupVals(registry) $retVal

        } elseif {![catch {sysRegistryValueRead HKEY_LOCAL_MACHINE \
                "SOFTWARE\\$setupVals(WRS)\\$setupVals(prodRegEntry)" \
                WIND_REGISTRY} retVal]} {

            set setupVals(registry) $retVal
        }
    }

    return $setupVals(registry)
}

#############################################################################
#
# 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) {}

    switch $mode {
    
        icon {
	    if {[isUnix]} {
	    	# do not select folder, display only remote registry host page
                set ctrlVals(pageList) {welcome destDir \
	      			        remoteRegistryHost iconFinish}
	    } else {
                set ctrlVals(pageList) {welcome destDir folderSelect \
		                        torRegistry remoteRegistryHost \
					iconFinish}
	    }
            cdromDescSet "Remote Icons"
        }
    
        default {
            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

    if {[isUnix]} {
        # do not select folder, display only remote registry host page
        set ctrlVals(pageList) {welcome readme licAgreement \
                                        privilege registration projectInfo \
                                        destDir compSelect permission \
                                        remoteRegistryHost compatibility howTo \
                                        filesCopy libUpdate systemConfig finish}
    } else {
        set ctrlVals(pageList) {welcome readme licAgreement \
                                privilege registration installChoice}
    }

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

#############################################################################
#
# dlgFrmCreate - create wizard page
#
# This procedure will create wizard page
#
# SYNOPSIS
# .tS
# dlgFrmCreate <title>
# .tE
#
# PARAMETERS:
# .IP title 
# name of the wizard page
#
# RETURNS: N/A
#
# ERRORS: N/A
#

proc dlgFrmCreate {title} {
    global ctrlVals
    global setupVals
    global env

    if {[removeBackground]} {
        set title "Setup -- $title"
    }

    if {[windHostTypeGet]=="x86-win32"} {
        set backButtXPos 147
    } else {
        set backButtXPos 143
    }

    if {[windowExists $ctrlVals(mainWindow)] != 1 } {
        set controls [list \
                [list bitmap -name bitmap \
                             -title $ctrlVals(dlgImage) -stretch \
                             -x 10 -y 10 -w 80 -h 160] \
                [list frame -gray -name frm2 -x 10 -y 178 -w 295 -h 2] \
                [list button -name backButt -title "< &Back" \
                             -callback backCallback \
                             -disable -x $backButtXPos -y 185 -w 50 -h 14] \
                [list button -name nextButt -title "&Next >" \
                             -default -callback nextCallback \
                              -x 197 -y 185 -w 50 -h 14] \
                [list button -name cancelButt -title "&Cancel" \
                             -callback quitCallback \
                              -x 255 -y 185 -w 50 -h 14] \
        ]
        if {[removeBackground] && ![info exists env(SETUP_USEKDE)]} {
	    # add a minimize box to the dialog form since
	    # there is no background to minimize.  

	    # create the dialog with initial size of 1 1, then
	    # resize and reposition the dialog after.  This is
	    # to workaround a UITclSh bug which does not allow
	    # the window to shrink below its original size for
	    # the billboard dialogs.

            dialogCreate -name $ctrlVals(mainWindow) \
                         -title $title \
                         -parent $ctrlVals(parentDialog) \
                         -helpfile $setupVals(setupHelp) \
                         -modeless \
                         -controls $controls 

⌨️ 快捷键说明

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