📄 registry.tcl
字号:
# REGISTRY.TCL - Setup procedures for implementing tornado registry wizard # page## Copyright 1999 Wind River Systems, Inc## modification history# --------------------# 03e,25jul02,wmd Change Installation Guide to Getting Started Guide.# 03d,15jul02,wmd Modify instructions to remove NT when talking about service.# 03c,17may02,wmd Fix text formatting, grammatical problems.# 03b,13may02,j_w Fixed default option to NT service# 03a,12jun01,j_w Modified for Tornado 2.2# 02i,15mar01,j_w Added manual tornado registry configuration for Setup /R# option# 02h,14mar01,j_w Added description for each choice (spr 63960)# 02g,30oct00,j_w Added manually startup option for Tornado Registry # (spr 35781)# 02f,09oct00,bwd If user has no ADMIN privileges, default choice to Startup# Group# 02e,10may00,j_w Fixed typo# 02d,01feb00,j_w Fixed typo# 02c,20jan00,j_w Remove remoteRegistryHost, torRegManual and torRegNTServ# references # 02b,24nov99,bwd Added default value for auto setup# 02a,30Sep99,j_w Modified for T3# 01f,11aug99,j_w Added messages# 01e,31mar99,bjl set infVals(torRegManual) for manual registry. # 01d,24mar99,bjl turn off inf write to registry after queueExecute.# 01c,10feb99,tcy modified for backward compatibility pages# 01b,26jan99,tcy added missing procedure regOptionRegValueRead().# 01a,26jan99,tcy extracted from INSTW32.TCL.################################################################################ pageCreate(torRegistry) - display options to run tornado registry## This procedure will display options to run tornado registry. Options are:# torRegStartup - runs tornado registry when user logs on# torRegRemote - uses a remote server to run tornado registry# torRegManual - runs tornado registry manually (nothing is done by Setup)# torRegNTServ - runs tornado registry as a service## SYNOPSIS# .tS# pageCreate(torRegistry)# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc pageCreate(torRegistry) {} { global ctrlVals global setupVals set msg0 [strTableGet TORREGISTRY_OPTION_SELECT] set msgRegDesc [strTableGet TORREGISTRY_DESC] set ctrlVals(torRegStartup) [strTableGet TORREGISTRY_OPTION_STARTUP] set ctrlVals(torRegRemote) [strTableGet TORREGISTRY_OPTION_REMOTE] set ctrlVals(torRegManual) [strTableGet TORREGISTRY_OPTION_MANUAL] set ctrlVals(torRegNTServ) [strTableGet TORREGISTRY_OPTION_SERVICE] set msg0Ctrl [list label -name msg0 -title $msg0 \ -x 100 -y 40 -w 205 -h 20] set msgRegDescCtrl [list label -name msg0 \ -title $msgRegDesc \ -x 100 -y 10 -w 205 -h 24] set radio1_ypos 65 set radio2_ypos 78 set radio3_ypos 91 set radio4_ypos 104 # NT Service choice set torRegNTServCtrl [list choice \ -name torRegNTServ \ -title $ctrlVals(torRegNTServ) \ -newgroup \ -callback {onTorRegOptSel torRegNTServ} \ -auto \ -x 100 -y $radio1_ypos -w 205 -h 10] # Startup choice set torRegStartupCtrl [list choice \ -name torRegStartup \ -title $ctrlVals(torRegStartup) \ -auto \ -callback {onTorRegOptSel torRegStartup} \ -x 100 -y $radio2_ypos -w 205 -h 10] # manually startup choice set torRegManualCtrl [list choice \ -name torRegManual \ -title $ctrlVals(torRegManual) \ -callback {onTorRegOptSel torRegManual} \ -auto \ -x 100 -y $radio3_ypos -w 205 -h 10] # remote choice set torRegRemoteCtrl [list choice \ -name torRegRemote \ -title $ctrlVals(torRegRemote) \ -callback {onTorRegOptSel torRegRemote} \ -auto \ -x 100 -y $radio4_ypos -w 205 -h 10] # create the controls set ctrlVals(volatileFrm) \ [list $msg0Ctrl $msgRegDescCtrl \ $torRegNTServCtrl $torRegStartupCtrl \ $torRegManualCtrl $torRegRemoteCtrl] # display NT service info if {![isUnix] && $ctrlVals(admin) == 1} { set msg1Ctrl [list label -name msg1 \ -title [strTableGet TORREGISTRY_MSG1] \ -x 100 -y 125 -w 205 -h 50] lappend ctrlVals(volatileFrm) $msg1Ctrl } set w [dlgFrmCreate [strTableGet TORREGISTRY_TITLE]] # test automation if { $ctrlVals(useInputScript) } { autoSetupLog "Tornado Registry Page: skipped" # if user does not have admin privileges, default to Startup if { ($ctrlVals(NT) == "1") && ($ctrlVals(admin) != "1") } { set setupVals(torRegAction) "torRegStartup" } if {![info exists setupVals(torRegAction)]} { set setupVals(torRegAction) "torRegStartup" autoSetupLog \ "\tRegistry Process: unspecified. Default process used." } onTorRegOptSel $setupVals(torRegAction) switch $ctrlVals(torRegAction) { torRegStartup { autoSetupLog "\t$ctrlVals(torRegStartup)" } torRegNTServ { autoSetupLog "\t$ctrlVals(torRegNTServ)" } torRegManual { autoSetupLog "\t$ctrlVals(torRegManual)" } orRegRemote { autoSetupLog "\t$ctrlVals(torRegRemote)" } default { autoSetupLog \ "\tRegistry process unknown: $setupVals(torRegAction)" set setupVals(torRegAction) "torRegStartup" onTorRegOptSel $setupVals(torRegAction) autoSetupLog "\tDefault process used: $ctrlVals(torRegStartup)" } } nextCallback } else { if { ($ctrlVals(NT) == "1") && ($ctrlVals(admin) != "1") } { # if user does not have admin privileges, do not allow # installation of Registry as a service. controlEnable $w.torRegNTServ 0 controlCheckSet $w.torRegNTServ 0 controlCheckSet $w.torRegStartup 1 controlFocusSet $w.torRegStartup set setupVals(torRegOption) "torRegStartup" onTorRegOptSel $setupVals(torRegOption) dbgputs "You are not admin -- torRegNTServ is not enabled" } else { if {[regOptionRegValueRead] == ""} { set setupVals(torRegOption) "torRegNTServ" } controlCheckSet $w.$setupVals(torRegOption) 1 controlFocusSet $w.$setupVals(torRegOption) onTorRegOptSel $setupVals(torRegOption) } controlEnable $w.backButt 1 controlEnable $w.nextButt 1 if {[instTypeGet] == "registryInst"} { controlEnable $w.backButt 0 controlValuesSet $w.nextButt "Finish" controlEnable $w.nextButt 1 } }}############################################################################### pageProcess(torRegistry) - process inputs from torRegistry page## This procedure will process input from torRegisry page## SYNOPSIS# .tS# pageProcess(torRegistry)# .tE## PARAMETERS: N/A## RETURNS: 1 when successful## ERRORS: N/A#proc pageProcess(torRegistry) {} { global ctrlVals global setupVals global infVals env if {"[windRegValueRead]" == ""} { set setupVals(registry) localhost } beginWaitCursor switch $ctrlVals(torRegAction) { torRegStartup { set infVals(torRegStartup) 1 pageRemove remoteRegistryHost set ctrlVals(isRemoteRegHostPageRemoved) 1 } torRegRemote { # user selected to configure a remote registry set infVals(torRegRemote) 1 set ctrlVals(isRemoteRegHostPageRemoved) 0 } torRegManual { # user wants to install the registry # manually set infVals(torRegManual) 1 pageRemove remoteRegistryHost set ctrlVals(isRemoteRegHostPageRemoved) 1 } torRegNTServ { set infVals(torRegNTServ) 1 pageRemove remoteRegistryHost set ctrlVals(isRemoteRegHostPageRemoved) 1 } default { puts "tor registry process: unknown option: \ $ctrlVals(torRegAction)" } } set infVals(addRegOption) 1 # added this because we would like to come back to the registry # and remember what we selected set setupVals(torRegOption) $ctrlVals(torRegAction) searchAndProcessSection AddRegistry [cdFileNameGet [file join RESOURCE \ INF TORNADO.INF]] queueExecute set infVals(addRegOption) 0 ## for Setup /R option -- Tornado Registry configuration ## if {[instTypeGet] == "registryInst"} { # get WIND_BASE windBaseReadFromRegistry switch $ctrlVals(torRegAction) { torRegStartup { # install tornado registry as NT service and remove startup # icon if {[torRegistryStartupIconAdd]} { torRegistryServiceRemove "$setupVals(torRegServName)" } } torRegNTServ { # install startup icon and remove NT service if {[torRegistryServiceAdd "$setupVals(torRegServName)"]} { torRegistryStartupIconRemove } } torRegManual { # remove startup icon and service torRegistryStartupIconRemove torRegistryServiceRemove "$setupVals(torRegServName)" messageBox "Tornado registry service has been removed.\ \nTornado registry icon in the Startup Group has been\ removed." } } } ## end ## endWaitCursor return 1}############################################################################### onTorRegOptSel - set the variable in ctrlVals when option is changed## This procedure will set the variable in ctrlVals when option is changed## SYNOPSIS# .tS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -