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

📄 sysconfg.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 2 页
字号:
# SYSCONFG.TCL  - Setup procedures for implementing system-configuration#                 wizard page## Copyright 1999 Wind River Systems, Inc## modification history# --------------------# 03j,14jan03,wmd  Fix SPR #85387 - do not reset WIND_BASE if it already#                  exists.# 03i,17may02,j_w  Fixed error in torRegNTServ# 03h,13may02,j_w  SPR 74991 - Replaced the Tornado Registry service only if#                  the user selects the NT service option# 03h,09may02,bwd  SPR 76374: fixed to use tcl command to search for files# 03g,11apr02,bwd  SPR 75292: backed out the change done for spr 72382 to fix#                  multiple windows flashing# 03f,02apr02,bwd  SPR 72382: more fixes to generate toolchain info file# 03e,01apr02,bwd  SPR 72910: backward compatibility for T2.0.x archiving#                  SPR 72382: Added codes to regenerate toolchain info files# 03d,05mar02,bwd  Modified SETUP to be non-tornado centric# 03c,07dec01,j_w  Added procedure torVarsCreateDiab# 03b,20sep01,bwd  SPR 70287: invoke windxRegen.tcl to rebuild windex #                  database.# 03a,12jun01,j_w  Modified for Tornado 2.2# 01v,01nov00,bwd  SPR 35597: Remove HELP button# 01u,18oct00,j_w  Do not update html help viewer if it is win2000 and the#                  user has not admin privilege# 01t,17oct00,j_w  Update hh.exe on user's winnt directory for windows#                  installation (to version 1.32)# 01s,28jun00,wmd  Fix spr # 32228, torVars fixes.# 01r,16jun00,wmd  Modify so that htmlBook.tcl doesn't run for Windows.# 01q,12jun00,wmd  Add SETUP/X86/WIN32 to the PATH env. var. for ZIP/UNZIP# 01p,09jun00,bwd  Added another host type check for x86-linux2# 01o,31may00,j_w  Stopped any running Tornado Registry Service before#                  installing a new one (SPR 31616)# 01n,19apr00,bwd  Comment out codes that update hh. SETUP now uses HTML pages#                  for HELP# 01m,02feb00,bwd  Changed setupVals(cmdMode) to use isGUImode# 01l,06jan00,bwd  No test automation for command line SETUP# 01k,06dec99,j_w  Update hh.exe on user's winnt directory for windows#                  installation# 01k,23nov99,clc  add text mode# 01j,21oct99,bjl  removed parisc-hpux support.# 01i,20apr99,wmd  Modify to add $WIND_BASE/host/$WIND_HOST_TYPE/lib/to#                  LD_LIBRARY_PATH, etc.# 01h,24mar99,tcy  moved code for opening program folder to FINISH page# 01g,19mar99,wmd  Output to a file any debug messages.# 01f,10feb99,bjl  added LD_LIBRARY_PATH for solaris hosts.# 01e,10feb99,tcy  fixed USER condition# 01d,02feb99,tcy  added USER line torVars.csh/sh (fix for SPR 24724)# 01c,01feb99,tcy  moved torVarsCreate() from INSTALL.TCL;#                  redo messages# 01b,28jan99,tcy  made the meter blue.# 01a,26jan99,tcy  extracted from FINISH.TCL.################################################################################ pageCreate(systemConfig) - configure user system for Tornado## This procedure will display a wizard page showing what Setup is doing# to configure the system:# - Updating the Windows registry for Tornado (Windows only)# - Installing Tornado program group icons (Windows only)# - Creating torVars.bat/csh# - Configuring on-line HTML help# - rebuild windex database (invoke tcl script)# - Create make files under target/h/make for backward compatibility# - Re-generate toolchain info files for Project Facility## SYNOPSIS# .tS# pageCreate(systemConfig)# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc pageCreate(systemConfig) {} {    global ctrlVals    global tornadoInstalled    global env    global setupVals    set msg "SETUP is performing final steps to finish installation."    if { [isTornadoProduct] } {        if {[isUnix]} {            set torVarsFiles "torVars.csh and torVars.sh"        } else {            set torVarsFiles torVars.bat        }    }    if { [isGUImode] } {            set ctrlVals(numBbrd) 0        meterCreate $msg        set w [dlgFrmCreate "System configuration"]         controlPropertySet $ctrlVals(meterWindow).$ctrlVals(meterWg) \                                -background Blue -foreground Black        controlHide $w.helpButt 1        controlEnable $w.backButt 0        controlEnable $w.nextButt 0        controlEnable $w.cancelButt 1        controlFocusSet $w.cancelButt    } else { # TEXT       printPageTitle "System configuration"    }                if { ![isUnix] && [isTornadoProduct] } {        meterUpdate 0 "Updating the Windows registry for Tornado"    } else {        meterUpdate 0 ""    }    # write Registry values from <$productName>.INF.  This is required to update    # the user name, company, keydata, folder, etc. each time the user runs    # the setup program.    set prod [string toupper [getProdInfo name]]    searchAndProcessSection AddRegistry [cdFileNameGet [file join RESOURCE \                                                                  INF $prod.INF]]    # process INF files for all selected products    selectedProductsProcessInfFile FilesCopy         if { [isTornadoProduct] &&          [info exists setupVals(torRegOption)] &&         $setupVals(torRegOption) == "torRegNTServ"} {        if {![isUnix]} {            # stop any Tornado Registry running service if tornado object            # is selected for installation and only if the user has selected            # the NT service option            if { [info exists tornadoInstalled] && $tornadoInstalled } {                if {![catch {setupServiceStop $setupVals(torRegServName)} err]} {                    if {[isGUImode]} {                                            messageBox -ok -information [strTableGet TOR_REG_WARN]                    } else {                        puts "Tornado Registry Service:"                         puts "[strTableGet TOR_REG_WARN]"                    }                }            }        }    }    # Add service    if {![isUnix]} {        selectedProductsProcessInfFile AddService    }    selectedProductsProcessInfFile AddRegistry    if { [isTornadoProduct] } {  set infVals(torRegNTServ) 0  }    if {![isUnix]} {        # make sure we have a folder if tornado is not installed        # before we add icons         if { [isTornadoProduct] } {            if { ![info exists tornadoInstalled] || !$tornadoInstalled } {                folderCreateLog [defGroupGet] $ctrlVals(admin)            }        } else {            folderCreateLog [defGroupGet] $ctrlVals(admin)            set prod [getProdInfo name]            searchAndProcessSection AddIcon [cdFileNameGet [file join \                                                     RESOURCE INF $prod.INF]]        }        selectedProductsProcessInfFile AddIcon    }            queueExecute    if { [isTornadoProduct] } {        meterUpdate 22 "Creating make fragments for backward compatibility"        set oldMakeDir [file join [destDirGet] target h make]        set srcDir [file join [destDirGet] target h tool]        foreach tool {gnu diab} {            set toolDir [file join $srcDir $tool]            set isSuccess 0            set fileList ""            if [isUnix] {                if { ![catch { exec ls $toolDir } fileList] } {                    set isSuccess 1                }            } else {                regsub -all {/} $toolDir {\\} toolDir                if { ![catch { exec cmd /c dir /w $toolDir } fileList] } {                    set isSuccess 1                }            }            if { $isSuccess == 1 } {                foreach mFile $fileList {                    if { [regexp {^make\.*} $mFile] } {                        set Makefile [file join $oldMakeDir $mFile]                        if { [file exists $Makefile] } {                            file delete -force $Makefile                        }                        oldMakefileCreate $Makefile                    }                }            }        }        meterUpdate 44 "Creating $torVarsFiles"        if { [info exists tornadoInstalled] && $tornadoInstalled } {            torVarsCreate        }        meterUpdate 66 "Configuring on-line HTML help. Please wait..."        set htmlBookPath \            [file join [destDirGet] host resource doctools htmlBook.tcl]                if [isUnix] {            set wtxtcl [file join [destDirGet] host [windHostTypeGet] bin wtxtcl.ex]        } else {            set wtxtcl [file join [destDirGet] host [windHostTypeGet] bin wtxtcl.exe]                    # turn off use of htmlBook for Windows, set wtx to nonexistent file            #    set wtxtcl xyxfoobar        }        if {[isGUImode]} {             # use wait cursor here to let users know this step may step a while ...            beginWaitCursor        }        # sets WIND_BASE so the spawned shell can pick up the env. variable        set env(WIND_BASE) [destDirGet]        if {[file exists $htmlBookPath] && [file exists $wtxtcl]} {            if [catch {exec $wtxtcl $htmlBookPath \                   [file join [destDirGet] docs]} error] {                dbgputs "Cannot run html tool: $error"            } else {                dbgputs "Html tool runs successfully"            }         }        if {[isGUImode]} {  endWaitCursor  }            if {[isUnix]} {            set windexFile [file join [destDirGet] host resource \                                  doctools windexRegen.tcl]            if { [file exist $windexFile] } {                # Source windexRegen.tcl to rebuild windex database                meterUpdate 77 "Rebuild windex database"                if { [catch {source $windexFile} err] } {                    if { [isGUImode] } {                        messageBox "Error: $err\                                    SETUP cannot rebuild windex database"                    } else {                        puts "Error: $err\nSETUP cannot rebuild windex database\n"                        while { [prompt "Press <Enter> to continue."] != "" } {                        }                    }                }            }        }        # comment out these lines to fix multiple windows flashing (spr 75292)        #meterUpdate 88 "Re-generating toolchain info files. Please wait..."        #generateToolchain        meterUpdate 100 ""    } else {        # non-tornado product        meterUpdate 100 ""    }        if { [isGUImode] } {        meterDestroy $ctrlVals(meterWindow)        # test automation        if { $ctrlVals(useInputScript) } {            autoSetupLog "System configuration page"        }        nextCallback    } else {        nextCallback        return 0    }}############################################################################### pageProcess(systemConfig) - process inputs from system configuration#                             page if any## This procedure will process inputs from system configuration page if any## SYNOPSIS# .tS# pageProcess(systemConfig)# .tE## PARAMETERS: N/A## RETURNS: 1 when successful## ERRORS: N/A#proc pageProcess(systemConfig) {} {    return 1}################################################################################ generateToolchain - regenerates toolchain info files for Project Facility.## This procedure regenerates toolchain info files for Project Facility.# This is done in SETUP to avoid this task being performed when launching# Tornado for the first time, as this process takes a very long time.## SYNOPSIS# generateToolchain## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc generateToolchain {} {    global env    # set environment variables    set env(WIND_BASE) [destDirGet]    set env(WIND_HOST_TYPE) [windHostTypeGet]    dbgputs "$env(WIND_BASE)\n$env(WIND_HOST_TYPE)\n"    foreach envVar {PATH LD_LIBRARY_PATH TCL_LIBRARY} {        switch $envVar {            PATH {                set pathToAdd [file join [destDirGet] host [windHostTypeGet] bin]            }            LD_LIBRARY_PATH {                if { [isUnix] } {

⌨️ 快捷键说明

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