?? 01ugl.win32.tcl
字號:
set uglConfigAudio(CHANNEL) "0" # Initialize miscellaneous configuration set uglConfigMisc(DEBUG_BUILD) 0 set uglConfigMisc(UGLO_BUILD) 1 set uglConfigMisc(UGLE_BUILD) 0 set uglConfigMisc(VX_POOL) 1 set uglConfigMisc(UGL_POOL) 0 set uglConfigMisc(POOL_SIZE) 0 set uglConfigMisc(BUILD_TOOL) "gnu" # Initialize BMF Font configuration set uglBmfConfig(CACHE_SIZE) "Unlimited" set uglBmfConfig(UNICODE) "0" set uglBmFontSelection {} # Initialize Agfa Font configuration set uglAgfaFontSelection {} set uglAgfaConfig(UNICODE) "0"}###################################################################### uglConfigApply - generate the data file for a configuration#proc uglConfigApply {} { set configname [controlValuesGet UglConfig.uglFileList -edit] if {$configname == ""} { messageBox "Need to specify a configuration file" return } beginWaitCursor set dateInfo "[lindex [date] 1]/[lindex [date] 3]/[lindex [date] 0] [lindex [date] 4]:[lindex [date] 5]:[lindex [date] 6]" uglWriteConfigH $configname $dateInfo endWaitCursor}###################################################################### uglConfigBuild - process the "build" button to build the ugl# system#proc uglConfigBuild {} { global uglArchType global uglGraphics global uglGraphicsChipDB global uglToolDB global uglToolAllList global uglConfigModify global uglConfigChange global uglConfigMisc global agfaInConfig global bmfInConfigset 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. " if { [isBuildActive] } { messageBox "A previous build is still active. You must wait until \ that build completes before another build is started." return } # if configuration changed then force a modified config file if { $uglConfigChange == 1 } { set uglConfigModify 1 } # Generate source code if { $uglConfigModify == 1 } { uglConfigApply } if {$agfaInConfig == 1 && $bmfInConfig == 1} { set answer [messageBox -ok $fontWarningMsg ] return } set uglConfigModify 0 # split out the processor type/BSP set archType [split $uglArchType - ] set cpuType [lindex $archType 0] # check for debug set debugMode "" if {[controlChecked UglConfig.bDebug]} { controlCheckSet UglConfig.bDebug 1 set debugMode "\\\"ADDED_CFLAGS=-g -O0\\\"" } # 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 "\\\"" append buildMode "ugl " if {[controlChecked UglConfig.uglO]} { append buildMode "uglobj " } if {[controlChecked UglConfig.bDemo]} { append buildMode "ugldemo " } append buildMode "\\\"" set defines "\\\"EXTRA_DEFINE=-DCONFIG_TOOL -DVXWORKS\\\"" if {$agfaInConfig == 1} { append defines " AGFA=TRUE" } buildLaunch "Build WindML" "make.exe CPU=$cpuType TOOL=$tool DRIVER=$grvDir BLD_MODE=$buildMode $debugMode $defines windml" [wtxPath target src]ugl }###################################################################### uglConfigClean - process the "clean" button to execute the # clean target in make file#proc uglConfigClean {} { 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?" # split out the processor type/BSP set archType [split $uglArchType - ] set cpuType [lindex $archType 0] # get the tool to use for build set tool $uglToolDB($uglConfigMisc(BUILD_TOOL),TOOL) # get clean targets set cleanMode "\\\"" append cleanMode "uglrclean " if {[controlChecked UglConfig.uglO]} { append cleanMode "uglobjclean " } if {[controlChecked UglConfig.bDemo]} { append cleanMode "demorclean " } append cleanMode "\\\"" set answer [messageBox -yesno $uglCleanWarningMsg ] if {[string match $answer no]} { return } buildLaunch "Clean UGL" "make.exe CPU=$cpuType TOOL=$tool CLEAN_MODE=$cleanMode windmlclean" [wtxPath target src]ugl}###################################################################### uglExit - process the "quit" button to exit the ugl-Windows # configuration program#proc uglExit {} { global uglConfigChange global debugFd # check if miscellenous options changed uglMiscCheck # check if input changed uglInputCheck # check if audio changed uglAudioCheck # check if graphics changed uglGraphicsCheck # check if BMF fonts changed uglBmFontCheck if { $uglConfigChange == 1 } { set answer [messageBox -yesnocancel "UGL configuration has changed,\n save configuration?" ] if {[string match $answer cancel]} { return } if {[string match $answer yes]} { uglConfigSave } } close $debugFd windowClose UglConfig}###################################################################### uglMiscConfig - set up configuration for miscellaneous#proc uglMiscConfig {} { global uglConfigMisc global uglToolDB global uglArchType global uglOldArchType global uglToolAllList controlCheckSet UglConfig.bDebug $uglConfigMisc(DEBUG_BUILD) controlCheckSet UglConfig.uglO $uglConfigMisc(UGLO_BUILD) controlCheckSet UglConfig.bDemo $uglConfigMisc(UGLE_BUILD) controlCheckSet UglConfig.cVxPool $uglConfigMisc(VX_POOL) controlCheckSet UglConfig.cUglPool $uglConfigMisc(UGL_POOL) controlValuesSet UglConfig.memPool $uglConfigMisc(POOL_SIZE) # Set up tool list for architecture set toolList {} foreach tool $uglToolAllList { foreach arch $uglToolDB($tool,ARCH) { if {$arch == $uglArchType} { lappend toolList $tool } } } if { [lsearch $toolList $uglConfigMisc(BUILD_TOOL)] == -1 } { set uglConfigMisc(BUILD_TOOL) [lindex $toolList 0] set uglConfigChange 1 } controlValuesSet UglConfig.toolList $toolList controlSelectionSet UglConfig.toolList -string $uglConfigMisc(BUILD_TOOL)}###################################################################### uglMiscCheck - check configuration for miscellaneous#proc uglMiscCheck {} { global uglConfigMisc global uglConfigChange if { $uglConfigMisc(DEBUG_BUILD) != [controlChecked UglConfig.bDebug] } { set uglConfigChange 1 } if { $uglConfigMisc(UGLO_BUILD) != [controlChecked UglConfig.uglO] } { set uglConfigChange 1 } if { $uglConfigMisc(UGLE_BUILD) != [controlChecked UglConfig.bDemo] } { set uglConfigChange 1 } if { $uglConfigMisc(VX_POOL) != [controlChecked UglConfig.cVxPool] } { set uglConfigChange 1 } if { $uglConfigMisc(UGL_POOL) != [controlChecked UglConfig.cUglPool] } { set uglConfigChange 1 } if { $uglConfigMisc(POOL_SIZE) != [controlValuesGet UglConfig.memPool] } { set uglConfigChange 1 }}############################################################################### Procedures for Graphics configuration dialog (UglGraphics)##################################################################################################################################################### uglGraphicsOptSet - set state for graphics option#proc uglGraphicsOptSet {control hide state} { controlEnable UglConfig.$control $hide controlCheckSet UglConfig.$control $state}###################################################################### uglGraphicsDepthSet - set available depth#proc uglGraphicsDepthSet {args} { global uglGraphics global uglGraphicsChipDB set device [controlSelectionGet UglConfig.chipList -string] # 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 } } controlValuesSet UglConfig.colorDepthList $graphicsDepthList set depthNum [lsearch $graphicsDepthList $uglGraphics(DEPTH)] if { $depthNum == -1 } { set depthNum 0 } controlSelectionSet UglConfig.colorDepthList $depthNum}###################################################################### uglGraphicsResolutionSet - set available resolutions#proc uglGraphicsResolutionSet {} { global uglGraphics global uglGraphicsChipDB set device [controlSelectionGet UglConfig.chipList -string] # Parse modes to get resolutions set graphicsResList {} set currentDepth [controlSelectionGet UglConfig.colorDepthList -string ] 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 } } } controlValuesSet UglConfig.resolutionList $graphicsResList set resNum [lsearch $graphicsResList $uglGraphics(RESOLUTION)] if { $resNum == -1 } { set resNum 0 } controlSelectionSet UglConfig.resolutionList $resNum}###################################################################### uglGraphicsRefreshSet - set available refresh rates#proc uglGraphicsRefreshSet {} { global uglGraphics global uglGraphicsChipDB set device [controlSelectionGet UglConfig.chipList -string] # Parse modes to get resolutions set graphicsRefreshList {} set currentDepth [controlSelectionGet UglConfig.colorDepthList -string ] set currentRes [controlSelectionGet UglConfig.resolutionList -string ] 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] if { [ string compare $currentRes $resolution ] == 0 } { set refresh [lindex $modeList 2] set refreshNum [lsearch $graphicsRefreshList $refresh]
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -