?? 01ugl.tcl
字號(hào):
if { $page == "Miscellaneous" } { dialogPost "Miscellaneous Configuration" uglMiscConfig } }########################################################### uglConfigSave - process the "save" button.#proc uglConfigSave {} { global uglConfigToolDir global uglArchType global uglConfigMisc global uglConfigInput global uglGraphics global uglConfigAudio global uglBmFontSelection global uglBmfConfig global uglAgfaFontSelection global uglAgfaConfig global uglConfigChange global uglBuildTgtChange global uglConfigModify set configname [dialogGetValue "WindML Configuration" "Configuration"] set uglConfig(ARCH) [dialogGetValue "WindML Configuration" "Processor"] if {$configname == ""} { noticePost error "Need to specify a configuation file" return } set fd [open $uglConfigToolDir/$configname.cfg w] set dateInfo [exec date] set fstr "%-30s : %s" puts $fd "# DO NOT MODIFY THIS FILE - GENERATED AUTOMATICALLY" puts $fd [format "# File: %s.cfg" $configname] puts $fd [format "# Creation date: %s" $dateInfo] puts $fd [format $fstr "ARCHITECTURE" $uglArchType ] # Output general configuration values puts $fd [format $fstr "BUILD_DEBUG" $uglConfigMisc(DEBUG_BUILD)] puts $fd [format $fstr "BUILD_UGLO" $uglConfigMisc(UGLO_BUILD)] puts $fd [format $fstr "BUILD_UGLE" $uglConfigMisc(UGLE_BUILD)] puts $fd [format $fstr "BUILD_TOOL" $uglConfigMisc(BUILD_TOOL)] puts $fd [format $fstr "SYS_POOL" $uglConfigMisc(VX_POOL)] puts $fd [format $fstr "UGL_POOL" $uglConfigMisc(UGL_POOL)] puts $fd [format $fstr "UGL_PSIZE" $uglConfigMisc(POOL_SIZE)] # Output Pointer Configuration Parameters puts $fd [format $fstr "PTR_TYPE" $uglConfigInput(PTR_TYPE)] puts $fd [format $fstr "PTR_DEVNAME" $uglConfigInput(PTR_DEVICE) ] # Output Keyboard Configuration Parameters puts $fd [format $fstr "KBD_TYPE" $uglConfigInput(KBD_TYPE)] puts $fd [format $fstr "KBD_DEVNAME" $uglConfigInput(KBD_DEVICE) ] puts $fd [format $fstr "KBD_MAP" $uglConfigInput(KBD_MAP)] # Output Graphics Configuration Parameters puts $fd [format $fstr "GRAPHICS CHIP" $uglGraphics(CHIP)] foreach opt $uglGraphics(OPTS) { puts $fd [format $fstr "GDOPTION" $opt] } puts $fd [format $fstr "GOUTPUT" $uglGraphics(OUTPUT)] puts $fd [format $fstr "GDEPTH" $uglGraphics(DEPTH)] puts $fd [format $fstr "GRES" $uglGraphics(RESOLUTION)] puts $fd [format $fstr "GREF" $uglGraphics(REFRESH)] # Save audio config puts $fd [format $fstr "AUDIO_TYPE" $uglConfigAudio(TYPE)] puts $fd [format $fstr "AUDIO_DEV" $uglConfigAudio(DEVNAME)] puts $fd [format $fstr "AUDIO_CHAN" $uglConfigAudio(CHANNEL)] # Output Bitmap Font Configuration Parameters foreach font $uglBmFontSelection { puts $fd [format $fstr "BMF_FONT" $font] } puts $fd [format $fstr "BMF_CSIZE" $uglBmfConfig(CACHE_SIZE)] puts $fd [format $fstr "BMF_UNICODE" $uglBmfConfig(UNICODE)] # Output Agfa Font Configuration Parameters foreach font $uglAgfaFontSelection { puts $fd [format $fstr "AF_FONT" $font] } puts $fd [format $fstr "AF_PATH" $uglAgfaConfig(FONTPATH)] puts $fd [format $fstr "AF_TYPEPATH" $uglAgfaConfig(TYPEPATH)] puts $fd [format $fstr "AF_FILENAME" $uglAgfaConfig(FILENAME)] puts $fd [format $fstr "AF_PLUGINNAME" $uglAgfaConfig(PLUGINNAME)] puts $fd [format $fstr "AF_UNICODE" $uglAgfaConfig(UNICODE)] puts $fd "" close $fd if {$uglConfigChange == 1} { set uglConfigModify 1 } set uglConfigChange 0 set uglBuildTgtChange 0}########################################################### uglConfigDelete - process the "delete" button. Delete the currently # selected configuration file#proc uglConfigDelete {} { global uglConfigToolDir set configname [dialogGetValue "WindML Configuration" "Configuration"] if {$configname == ""} { noticePost error "Need to specify a configuation file" return } set answer [noticePost question "Do you want to remove the configuration $configname?" Yes No] if {$answer != 1} { return } # Remove the configuration files set configname [dialogGetValue "WindML Configuration" Configuration] exec rm -f $uglConfigToolDir/$configname.cfg uglSetFileList}########################################################### uglConfigBuild - process the "build" button#proc uglConfigBuild {} { global uglHome global uglArchType global uglConfigMisc global uglConfigChange global uglConfigModify global uglBuildTgtChange global uglGraphics global uglGraphicsChipDB global uglToolDB global uglToolAllList global agfaInConfig global bmfInConfig global env set fontWarningMsg \"A WindML configuration can not contain more than one font engine.To remove a font engine specification, remove all selected fontsfor the font engine that is not desired." set configname [dialogGetValue "WindML Configuration" "Configuration"] if {$configname == ""} { noticePost error "Need to specify a configuation file" return } set dateInfo [exec date] if {$uglConfigChange == 1} { set uglConfigModify 1 } # Create the output files for compilation if {$uglConfigModify == 1} { uglWriteConfigH $configname $dateInfo } # Allow only one font engine if {$agfaInConfig == 1 && $bmfInConfig == 1} { noticePost error $fontWarningMsg return } cd $uglHome/target/src/ugl # split out the processor type/BSP set archType [split $uglArchType - ] set cpuType [lindex $archType 0] # get the graphics device driver to build set grvDir $uglGraphicsChipDB($uglGraphics(CHIP),DIR) # get the tool to use for build set tool $uglToolDB($uglConfigMisc(BUILD_TOOL),TOOL) # get build targets set buildMode "\"BLD_MODE=" set buildType 0 set buildMode [concat $buildMode "ugl "] set buildType 1 if {$uglConfigMisc(UGLO_BUILD)} { set buildMode [concat $buildMode "uglobj "] set buildType 2 } if {$uglConfigMisc(UGLE_BUILD)} { set buildMode [concat $buildMode "ugldemo "] set buildType 3 } set buildMode [concat $buildMode "\""] set defines "EXTRA_DEFINE= -DCONFIG_TOOL -DVXWORKS" set cmd {runTerminal "Build WindML" 0 shwait \ $env(WIND_BASE)/host/[wtxHostType]/bin/make CPU=$cpuType TOOL=$tool DRIVER=$grvDir $defines } # set build targets set cmd [concat $cmd $buildMode] # check for debug if {$uglConfigMisc(DEBUG_BUILD)} { set cmd [concat $cmd "\"ADDED_CFLAGS=-g -O0\"" ] } # if agfa present then build if {$agfaInConfig == 1} { set cmd [concat $cmd " AGFA=TRUE"] } # set build target set cmd [concat $cmd windml] # Evaluate build command eval $cmd set uglConfigModify 0}########################################################### uglConfigClean - process the "clean" button#proc uglConfigClean {} { global env global uglHome global uglArchType global uglConfigMisc global uglToolDBset uglCleanWarningMsg \" Performing a clean operation will remove all object files.Continuing will require a rebuild of all multimedia components.Do you want to continue?" set configname [dialogGetValue "WindML Configuration" "Configuration"] if {$configname == ""} { noticePost error "Need to specify a configuation file" return } # split out the processor type/BSP set archType [split $uglArchType - ] set cpuType [lindex $archType 0] set tool $uglToolDB($uglConfigMisc(BUILD_TOOL),TOOL) cd $uglHome/target/src/ugl set cmd {runTerminal "Clean WindML" 0 shwait \ $env(WIND_BASE)/host/[wtxHostType]/bin/make CPU=$cpuType TOOL=$tool EXTRA_DEFINE=-DCONFIG_TOOL } # get build targets for clean set cleanMode "\"CLEAN_MODE=" set cleanMode [concat $cleanMode "uglrclean "] set warnMsg 1 if {$uglConfigMisc(UGLO_BUILD)} { set cleanMode [concat $cleanMode "uglobjclean "] } if {$uglConfigMisc(UGLE_BUILD)} { set cleanMode [concat $cleanMode "demorclean "] } set cleanMode [concat $cleanMode "\""] # set clean targets set cmd [concat $cmd $cleanMode] # set clean target set cmd [concat $cmd windmlclean] if {$warnMsg == 1} { set answer [noticePost question $uglCleanWarningMsg Yes No] if {$answer != 1} { return } } # Issue the command eval $cmd}########################################################### uglConfigQuit - process the ugl-Windows "quit" button#proc uglConfigQuit {} { global uglConfigChange global debugFd if {$uglConfigChange == 1} { set answer [noticePost question "Your Configuration has changed.\nDo you really want to Quit?" Yes No] if {$answer == 0} {return} } close $debugFd uglUnpostAll dialogUnpost "WindML Configuration"}################################################################################ GRAPHICS DIALOG PROCEDURES##################################################################################################################################################### uglGraphicsDepthSet - set available depth#proc uglGraphicsDepthSet {args} { global uglGraphics global uglGraphicsChipDB set device [dialogGetValue "Graphics Configuration" "Device"] # Parse modes to get color depths set graphicsDepthList {} foreach mode $uglGraphicsChipDB($device,MODES) { set modeList [split $mode , ] set depth [lindex $modeList 0] set depthNum [lsearch $graphicsDepthList $depth] if { $depthNum == -1 } { lappend graphicsDepthList $depth } } dialogSetValue "Graphics Configuration" "Color Depth" $graphicsDepthList if { [lsearch $graphicsDepthList $uglGraphics(DEPTH)] == -1} { set uglGraphics(DEPTH) [lindex $graphicsDepthList 0] } listSelectionChange "Graphics Configuration" "Color Depth" $uglGraphics(DEPTH)}###################################################################### uglGraphicsResolutionSet - set available resolutions#proc uglGraphicsResolutionSet {} { global uglGraphics global uglGraphicsChipDB set device [dialogGetValue "Graphics Configuration" "Device"] # Parse modes to get resolutions set graphicsResList {} set currentDepth [dialogGetValue "Graphics Configuration" "Color Depth"] foreach mode $uglGraphicsChipDB($device,MODES) { set modeList [split $mode , ] set depth [lindex $modeList 0] if { [ string compare $currentDepth $depth ] == 0 } { set resolution [lindex $modeList 1] set resNum [lsearch $graphicsResList $resolution] if { $resNum == -1 } { lappend graphicsResList $resolution } } } dialogSetValue "Graphics Configuration" "Resolution" $graphicsResList if { [lsearch $graphicsResList $uglGraphics(RESOLUTION)] == -1} { set uglGraphics(RESOLUTION) [lindex $graphicsResList 0] } listSelectionChange "Graphics Configuration" "Resolution" $uglGraphics(RESOLUTION)}###################################################################### uglGraphicsRefreshSet - set available refresh rates#proc uglGraphicsRefreshSet {} { global uglGraphics global uglGraphicsChipDB set device [dialogGetValue "Graphics Configuration" "Device"]
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -