3 # Microwindows configuration interface: X11 version
5 # wish is available at http://dev.scriptics.com/software/tcltck
7 # (C) Martin Jolicoeur, 1999
9 # Thu Mar 16 14:33:08 CET 2000, Fabio Parodi, <fabio.parodi@iname.com>
10 # added VTSWITCH button
16 # Configurable options
18 variable armtoolsprefix;
19 variable mipstoolsprefix;
20 variable rtemstoolsprefix;
29 variable microwindemo;
31 variable screenpixtype;
50 variable updateregions;
58 variable x11screenwidth;
59 variable x11screenheight;
60 variable x11screendepth;
64 variable sa1100ltlend;
70 wm title . "Microwindows configuration"
71 wm geometry . +100+100
77 button .main.col1.compile -text "Compiling options" -command "compileoptions;"
78 button .main.col1.platform -text "Platform" -command "platformoptions;"
79 button .main.col1.lib -text "Libraries to compile" -command "liboptions;"
80 button .main.col2.colors -text "Color options" -command "colorsoptions;"
81 button .main.col2.io -text "I/O" -command "iooptions;"
82 button .main.col2.misc -text "Miscellaneous options" -command "miscoptions;"
83 pack .main.col1.compile .main.col1.platform .main.col1.lib -side top -fill x
84 pack .main.col2.colors .main.col2.io .main.col2.misc -side top -fill x
85 pack .main.col1 .main.col2 -side left
87 # Create ok, cancel, help buttons
89 pack .buttons -side bottom -fill x -pady 2m
90 button .buttons.ok -text "Save & Exit" -command "writeconfig; destroy ."
91 button .buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
92 button .buttons.cancel -text "Cancel" -command "destroy ."
93 pack .buttons.cancel .buttons.help .buttons.ok -side right -expand 1
95 pack .main .buttons -side bottom
98 ################################################################################
100 # Show the "compile" options dialog
102 ################################################################################
103 proc compileoptions {} {
106 wm title .compile "Compiling options"
107 wm geometry .compile +100+100
109 frame .compile.buttons
110 pack .compile.buttons -side bottom -fill x -pady 2m
111 button .compile.buttons.ok -text "Ok" -command "destroy .compile"
112 button .compile.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
113 pack .compile.buttons.help .compile.buttons.ok -side right -expand 1
118 checkbutton .compile.a0.b0 -text "Optimize" -variable optimize -relief flat
119 checkbutton .compile.a1.b1 -text "Debug" -variable debug -relief flat
120 checkbutton .compile.a2.b2 -text "Verbose" -variable verbose -relief flat
121 pack .compile.a0.b0 -side left
122 pack .compile.a1.b1 -side left
123 pack .compile.a2.b2 -side left
124 pack .compile.a0 -side top -pady 2 -anchor w -fill x
125 pack .compile.a1 -side top -pady 2 -anchor w -fill x
126 pack .compile.a2 -side top -pady 2 -anchor w -fill x
127 pack .compile.a0 .compile.a1 .compile.a2 -side top -anchor e
131 ################################################################################
133 # Show the "platform" options dialog
135 ################################################################################
136 proc platformoptions {} {
139 wm title .platform "Platform options"
140 wm geometry .platform +100+100
142 frame .platform.buttons
143 pack .platform.buttons -side bottom -fill x -pady 2m
144 button .platform.buttons.ok -text "Ok" -command "destroy .platform"
145 button .platform.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
146 pack .platform.buttons.help .platform.buttons.ok -side right -expand 1
155 radiobutton .platform.a0.b0 -text "Linux (native)" -variable arch -relief flat -value 0 -anchor w
156 button .platform.a0.options -text "Options" -command {nativelinuxoptions;};
157 radiobutton .platform.a1.b1 -text "Linux-ARM (x-compile)" -variable arch -relief flat -value 1 -anchor w
158 button .platform.a1.options -text "Options" -command {armlinuxoptions;};
159 radiobutton .platform.a2.b2 -text "Linux-MIPS (x-compile)" -variable arch -relief flat -value 2 -anchor w
160 button .platform.a2.options -text "Options" -command {mipslinuxoptions;};
161 radiobutton .platform.a3.b3 -text "RTEMS" -variable arch -relief flat -value 3 -anchor w
162 button .platform.a3.options -text "Options" -command {rtemsoptions;};
163 radiobutton .platform.a4.b4 -text "Solaris" -variable arch -relief flat -value 4 -anchor w
164 button .platform.a4.options -text "Options" -command {nativelinuxoptions;};
165 radiobutton .platform.a5.b5 -text "ELKS" -variable arch -relief flat -value 5 -anchor w
166 button .platform.a5.options -text "Options" -command {elksoptions;};
167 pack .platform.a0.b0 .platform.a0.options -side left
168 pack .platform.a1.b1 .platform.a1.options -side left
169 pack .platform.a2.b2 .platform.a2.options -side left
170 pack .platform.a3.b3 .platform.a3.options -side left
171 pack .platform.a4.b4 .platform.a4.options -side left
172 pack .platform.a5.b5 .platform.a5.options -side left
173 pack .platform.a0 -side top -pady 2 -anchor w -fill x
174 pack .platform.a1 -side top -pady 2 -anchor w -fill x
175 pack .platform.a2 -side top -pady 2 -anchor w -fill x
176 pack .platform.a3 -side top -pady 2 -anchor w -fill x
177 pack .platform.a4 -side top -pady 2 -anchor w -fill x
178 pack .platform.a5 -side top -pady 2 -anchor w -fill x
179 pack .platform.a0.options .platform.a1.options .platform.a2.options \
180 .platform.a3.options .platform.a4.options .platform.a5.options -side top -anchor e
184 ################################################################################
186 # Show the "libraries" options dialog
188 ################################################################################
192 wm title .lib "Libraries to compile"
193 wm geometry .lib +100+100
196 pack .lib.buttons -side bottom -fill x -pady 2m
197 button .lib.buttons.ok -text "Ok" -command "destroy .lib"
198 button .lib.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
199 pack .lib.buttons.help .lib.buttons.ok -side right -expand 1
205 checkbutton .lib.a0.b0 -text "NanoX" -variable nanox -relief flat
206 button .lib.a0.options -text "Options" -command {nanoxoptions;};
207 checkbutton .lib.a1.b1 -text "Microwindows" -variable microwin -relief flat
208 button .lib.a1.options -text "Options" -command {mwinoptions;};
209 checkbutton .lib.a2.b2 -text "Shared libs" -variable shlibs -relief flat
210 checkbutton .lib.a3.b3 -text "C++ obj framework" -variable objframe -relief flat
212 pack .lib.a0.b0 .lib.a0.options -side left
213 pack .lib.a1.b1 .lib.a1.options -side left
214 pack .lib.a2.b2 -side left
215 pack .lib.a3.b3 -side left
216 pack .lib.a0 -side top -pady 2 -anchor w -fill x
217 pack .lib.a1 -side top -pady 2 -anchor w -fill x
218 pack .lib.a2 -side top -pady 2 -anchor w -fill x
219 pack .lib.a3 -side top -pady 2 -anchor w -fill x
220 pack .lib.a0.options .lib.a1.options -side top -anchor e
224 ################################################################################
226 # Show the "colors" options dialog
228 ################################################################################
229 proc colorsoptions {} {
230 global screenpixtype;
233 wm title .colors "Colors options"
234 wm geometry .colors +100+100
236 frame .colors.buttons
237 pack .colors.buttons -side bottom -fill x -pady 2m
238 button .colors.buttons.ok -text "Ok" -command "colorsoptions_ok; destroy .colors"
239 button .colors.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
240 pack .colors.buttons.help .colors.buttons.ok -side right -expand 1
244 label .colors.a0.label -text "ScreenPixType:" -anchor e
245 entry .colors.a0.pixtype -width 25 -relief sunken
246 checkbutton .colors.a1.b1 -text "Gray Palette (4bpp only)" -variable graypalette -relief flat
247 pack .colors.a0.label .colors.a0.pixtype -side left
248 pack .colors.a1.b1 -side left
249 pack .colors.a0 -side top -pady 2 -anchor w -fill x
250 pack .colors.a1 -side top -pady 2 -anchor w -fill x
251 pack .colors.a0 .colors.a1 -side top -anchor e
252 .colors.a0.pixtype insert 0 $screenpixtype;
255 proc colorsoptions_ok {} {
256 global screenpixtype;
257 set screenpixtype [.colors.a0.pixtype get];
261 ################################################################################
263 # Show the "I/O" options dialog
265 ################################################################################
275 wm title .io "I/O options"
276 wm geometry .io +100+100
279 pack .io.buttons -side bottom -fill x -pady 2m
280 button .io.buttons.ok -text "Ok" -command "destroy .io"
281 button .io.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
282 pack .io.buttons.help .io.buttons.ok -side right -expand 1
292 checkbutton .io.a0.b0 -text "Have File I/O" -variable havefileio -relief flat
293 label .io.a0.label -text "(If the above is disabled, this will disable all the features below)" -anchor e
294 checkbutton .io.a1.b0 -text "Have bmp support" -variable havebmp -relief flat
295 checkbutton .io.a2.b0 -text "Have jpeg support" -variable havejpg -relief flat
296 button .io.a2.options -text "Options" -command {jpegoptions;};
297 checkbutton .io.a3.b0 -text "Have freetype support (truetype fonts)" -variable haveft -relief flat
298 button .io.a3.options -text "Options" -command {ftoptions;};
299 checkbutton .io.a4.b0 -text "Have t1lib support (type 1 fonts)" -variable havet1 -relief flat
300 button .io.a4.options -text "Options" -command {t1options;};
302 checkbutton .io.a5.b0 -text "Have HZK support (Bitmap(Metrix) fonts)" -variable havehzk -relief flat
303 button .io.a5.options -text "Options" -command {hzkoptions;};
305 pack .io.a0.b0 .io.a0.label -side top -pady 2 -anchor w
306 pack .io.a1.b0 -side top -pady 2 -anchor w
307 pack .io.a2.b0 .io.a2.options -side left
308 pack .io.a3.b0 .io.a3.options -side left
309 pack .io.a4.b0 .io.a4.options -side left
310 pack .io.a5.b0 .io.a5.options -side left
312 pack .io.a0 -side top -pady 2 -anchor w -fill x
313 pack .io.a1 -side top -pady 2 -anchor w -fill x
314 pack .io.a2 -side top -pady 2 -anchor w -fill x
315 pack .io.a3 -side top -pady 2 -anchor w -fill x
316 pack .io.a4 -side top -pady 2 -anchor w -fill x
317 pack .io.a5 -side top -pady 2 -anchor w -fill x
319 pack .io.a2.options .io.a3.options .io.a4.options .io.a5.options -side top -anchor e
323 ################################################################################
325 # Show the "Miscellaneous" options dialog
327 ################################################################################
328 proc miscoptions {} {
331 wm title .misc "Miscellaneous options"
332 wm geometry .misc +100+100
335 pack .misc.buttons -side bottom -fill x -pady 2m
336 button .misc.buttons.ok -text "Ok" -command "destroy .misc"
337 button .misc.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
338 pack .misc.buttons.help .misc.buttons.ok -side right -expand 1
340 checkbutton .misc.b0 -text "Have MS fonts" -variable havemsfonts -relief flat
341 pack .misc.b0 -side top -pady 2 -anchor w
345 ################################################################################
347 # Show nanox options dialog
349 ################################################################################
350 proc nanoxoptions {} {
353 wm title .optnanox "NanoX options"
354 wm geometry .optnanox +100+100
356 frame .optnanox.buttons
357 pack .optnanox.buttons -side bottom -fill x -pady 2m
358 button .optnanox.buttons.ok -text "Ok" -command "destroy .optnanox"
359 button .optnanox.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
360 pack .optnanox.buttons.help .optnanox.buttons.ok -side right -expand 1
363 checkbutton .optnanox.a0.server -text "Link app into server" -variable server -relief flat
364 checkbutton .optnanox.a0.sharedmem -text "Enable shared mem support (app/server only)" -variable sharedmem -relief flat
365 checkbutton .optnanox.a0.nwidget -text "Compile Nwidget library" -variable nwidget -relief flat
366 checkbutton .optnanox.a0.demo -text "Compile demos" -variable nanoxdemo -relief flat
367 pack .optnanox.a0.server -side top -pady 2 -anchor w
368 pack .optnanox.a0.sharedmem -side top -pady 2 -anchor w
369 pack .optnanox.a0.nwidget -side top -pady 2 -anchor w
370 pack .optnanox.a0.demo -side top -pady 2 -anchor w
371 pack .optnanox.a0 -side top -pady 2 -anchor w -fill x
375 ################################################################################
377 # Show microwindows options dialog
379 ################################################################################
380 proc mwinoptions {} {
383 wm title .optmwin "MicroWindows options"
384 wm geometry .optmwin +100+100
386 frame .optmwin.buttons
387 pack .optmwin.buttons -side bottom -fill x -pady 2m
388 button .optmwin.buttons.ok -text "Ok" -command "destroy .optmwin"
389 button .optmwin.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
390 pack .optmwin.buttons.help .optmwin.buttons.ok -side right -expand 1
392 frame .optmwin.algo -borderwidth 1 -relief solid
393 frame .optmwin.demo -borderwidth 1 -relief solid
394 pack .optmwin.algo .optmwin.demo -side top -fill x -pady .5c -padx .5c
396 frame .optmwin.algo.a0
397 frame .optmwin.algo.a1
398 label .optmwin.algo.label -text "Window move agorithm options"
399 pack .optmwin.algo.label -side top
400 checkbutton .optmwin.algo.a0.b0 -text "Update regions" -variable updateregions -relief flat
401 checkbutton .optmwin.algo.a1.b1 -text "Erase Move" -variable erasemove -relief flat
402 pack .optmwin.algo.a0.b0 -side top -pady 2 -anchor w
403 pack .optmwin.algo.a1.b1 -side top -pady 2 -anchor w
404 pack .optmwin.algo.a0 -side top -pady 2 -anchor w -fill x
405 pack .optmwin.algo.a1 -side top -pady 2 -anchor w -fill x
407 frame .optmwin.demo.a0
408 label .optmwin.demo.label -text "Other options"
409 pack .optmwin.demo.label -side top
410 checkbutton .optmwin.demo.a0.b0 -text "Compile demos" -variable microwindemo -relief flat
411 pack .optmwin.demo.a0.b0 -side top -pady 2 -anchor w
412 pack .optmwin.demo.a0 -side top -pady 2 -anchor w -fill x
416 ################################################################################
418 # Show native linux/Solaris options dialog
420 ################################################################################
421 proc nativelinuxoptions {} {
423 toplevel .optnatlinux
424 wm title .optnatlinux "Native Linux/Solaris options"
425 wm geometry .optnatlinux +100+100
427 frame .optnatlinux.buttons
428 pack .optnatlinux.buttons -side bottom -fill x -pady 2m
429 button .optnatlinux.buttons.ok -text "Ok" -command "destroy .optnatlinux"
430 button .optnatlinux.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
431 pack .optnatlinux.buttons.help .optnatlinux.buttons.ok -side right -expand 1
433 button .optnatlinux.screen -text "Screen driver" -command "screenoptions;"
434 button .optnatlinux.mouse -text "Mouse driver" -command "mouseoptions;"
435 button .optnatlinux.kbd -text "Keyboard driver" -command "kbdoptions;"
436 pack .optnatlinux.screen .optnatlinux.mouse .optnatlinux.kbd -side top -fill x
440 ################################################################################
442 # Show arm linux options dialog
444 ################################################################################
445 proc armlinuxoptions {} {
447 global armtoolsprefix;
449 toplevel .optarmlinux
450 wm title .optarmlinux "ARM Linux options"
451 wm geometry .optarmlinux +100+100
453 frame .optarmlinux.buttons
454 pack .optarmlinux.buttons -side bottom -fill x -pady 2m
455 button .optarmlinux.buttons.ok -text "Ok" -command "armlinuxoptions_ok; destroy .optarmlinux"
456 button .optarmlinux.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
457 pack .optarmlinux.buttons.help .optarmlinux.buttons.ok -side right -expand 1
459 frame .optarmlinux.comp -borderwidth 1 -relief solid
460 pack .optarmlinux.comp -side top -fill x -pady .5c -padx .5c
462 frame .optarmlinux.comp.a0
463 label .optarmlinux.comp.label -text "Compiler options"
464 pack .optarmlinux.comp.label -side top
465 label .optarmlinux.comp.a0.label -text "Tools Prefix:" -anchor e
466 entry .optarmlinux.comp.a0.prefix -width 25 -relief sunken
467 checkbutton .optarmlinux.comp.a0.sa1100ltlend \
468 -text "SA1100 Little endian option (for 4 bpp only)" -variable sa1100ltlend -relief flat
469 pack .optarmlinux.comp.a0.label -side top -pady 2 -anchor w
470 pack .optarmlinux.comp.a0.prefix -side top -pady 2 -anchor c
471 pack .optarmlinux.comp.a0.sa1100ltlend -side top -pady 2 -anchor c
472 pack .optarmlinux.comp.a0 -side top -pady 2 -anchor w -fill x
473 .optarmlinux.comp.a0.prefix insert 0 $armtoolsprefix;
475 button .optarmlinux.screen -text "Screen driver" -command "screenoptions;"
476 button .optarmlinux.mouse -text "Mouse driver" -command "mouseoptions;"
477 button .optarmlinux.kbd -text "Keyboard driver" -command "kbdoptions;"
478 pack .optarmlinux.comp .optarmlinux.screen .optarmlinux.mouse .optarmlinux.kbd -side top -fill x
481 proc armlinuxoptions_ok {} {
482 global armtoolsprefix;
483 set armtoolsprefix [.optarmlinux.comp.a0.prefix get];
487 ################################################################################
489 # Show mips linux options dialog
491 ################################################################################
492 proc mipslinuxoptions {} {
494 global mipstoolsprefix;
496 toplevel .optmipslinux
497 wm title .optmipslinux "MIPS Linux options"
498 wm geometry .optmipslinux +100+100
500 frame .optmipslinux.buttons
501 pack .optmipslinux.buttons -side bottom -fill x -pady 2m
502 button .optmipslinux.buttons.ok -text "Ok" -command "mipslinuxoptions_ok; destroy .optmipslinux"
503 button .optmipslinux.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
504 pack .optmipslinux.buttons.help .optmipslinux.buttons.ok -side right -expand 1
506 frame .optmipslinux.comp -borderwidth 1 -relief solid
507 pack .optmipslinux.comp -side top -fill x -pady .5c -padx .5c
509 frame .optmipslinux.comp.a0
510 label .optmipslinux.comp.label -text "Compiler options"
511 pack .optmipslinux.comp.label -side top
512 label .optmipslinux.comp.a0.label -text "Tools Prefix:" -anchor e
513 entry .optmipslinux.comp.a0.prefix -width 25 -relief sunken
514 pack .optmipslinux.comp.a0.label -side top -pady 2 -anchor w
515 pack .optmipslinux.comp.a0.prefix -side top -pady 2 -anchor c
516 pack .optmipslinux.comp.a0 -side top -pady 2 -anchor w -fill x
517 .optmipslinux.comp.a0.prefix insert 0 $mipstoolsprefix;
519 button .optmipslinux.screen -text "Screen driver" -command "screenoptions;"
520 button .optmipslinux.mouse -text "Mouse driver" -command "mouseoptions;"
521 button .optmipslinux.kbd -text "Keyboard driver" -command "kbdoptions;"
522 pack .optmipslinux.comp .optmipslinux.screen .optmipslinux.mouse .optmipslinux.kbd -side top -fill x
525 proc mipslinuxoptions_ok {} {
526 global mipstoolsprefix;
527 set mipstoolsprefix [.optmipslinux.comp.a0.prefix get];
531 ################################################################################
533 # Show rtems options dialog
535 ################################################################################
536 proc rtemsoptions {} {
537 global rtemstoolsprefix;
542 wm title .optrtems "RTEMS options"
543 wm geometry .optrtems +100+100
545 frame .optrtems.buttons
546 pack .optrtems.buttons -side bottom -fill x -pady 2m
547 button .optrtems.buttons.ok -text "Ok" -command "rtemsoptions_ok; destroy .optrtems"
548 button .optrtems.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
549 pack .optrtems.buttons.help .optrtems.buttons.ok -side right -expand 1
551 frame .optrtems.comp -borderwidth 1 -relief solid
552 pack .optrtems.comp -side top -fill x -pady .5c -padx .5c
554 frame .optrtems.comp.a0
555 frame .optrtems.comp.a1
556 frame .optrtems.comp.a2
557 label .optrtems.comp.label -text "Compiler options"
558 pack .optrtems.comp.label -side top
559 label .optrtems.comp.a0.label -text "Tools Prefix:" -anchor e
560 entry .optrtems.comp.a0.prefix -width 25 -relief sunken
561 label .optrtems.comp.a1.label -text "Build:" -anchor e
562 entry .optrtems.comp.a1.build -width 25 -relief sunken
563 label .optrtems.comp.a2.label -text "BSP:" -anchor e
564 entry .optrtems.comp.a2.bsp -width 25 -relief sunken
565 pack .optrtems.comp.a0.label -side top -pady 2 -anchor w
566 pack .optrtems.comp.a0.prefix -side top -pady 2 -anchor c
567 pack .optrtems.comp.a1.label .optrtems.comp.a1.build -side top -pady 2 -anchor w
568 pack .optrtems.comp.a2.label .optrtems.comp.a2.bsp -side top -pady 2 -anchor w
569 pack .optrtems.comp.a0 -side top -pady 2 -anchor w -fill x
570 pack .optrtems.comp.a1 -side top -pady 2 -anchor w -fill x
571 pack .optrtems.comp.a2 -side top -pady 2 -anchor w -fill x
572 pack .optrtems.comp.a0.prefix .optrtems.comp.a1.build .optrtems.comp.a2.bsp -side top -anchor e
573 .optrtems.comp.a0.prefix insert 0 $rtemstoolsprefix;
574 .optrtems.comp.a1.build insert 0 $rtemsbuild;
575 .optrtems.comp.a2.bsp insert 0 $rtemsbsp;
577 button .optrtems.screen -text "Screen driver" -command "screenoptions;"
578 button .optrtems.mouse -text "Mouse driver" -command "mouseoptions;"
579 button .optrtems.kbd -text "Keyboard driver" -command "kbdoptions;"
580 pack .optrtems.comp .optrtems.screen .optrtems.mouse .optrtems.kbd -side top -fill x
583 proc rtemsoptions_ok {} {
584 global rtemstoolsprefix;
587 set rtemstoolsprefix [.optrtems.comp.a0.prefix get];
588 set rtemsbuild [.optrtems.comp.a1.build get];
589 set rtemsbsp [.optrtems.comp.a2.bsp get];
593 ################################################################################
595 # Show jpeg options dialog
597 ################################################################################
598 proc jpegoptions {} {
603 wm title .optjpeg "JPEG support options"
604 wm geometry .optjpeg +100+100
606 frame .optjpeg.buttons
607 pack .optjpeg.buttons -side bottom -fill x -pady 2m
608 button .optjpeg.buttons.ok -text "Ok" -command "jpegoptions_ok; destroy .optjpeg"
609 button .optjpeg.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
610 pack .optjpeg.buttons.help .optjpeg.buttons.ok -side right -expand 1
614 label .optjpeg.a0.label -text "Libjpeg include dir:" -anchor e
615 entry .optjpeg.a0.incjpg -width 40 -relief sunken
616 label .optjpeg.a1.label -text "Libjpeg path:" -anchor e
617 entry .optjpeg.a1.libjpg -width 40 -relief sunken
618 pack .optjpeg.a0.label -side top -pady 2 -anchor w
619 pack .optjpeg.a0.incjpg -side top -pady 2 -anchor w
620 pack .optjpeg.a1.label -side top -pady 2 -anchor w
621 pack .optjpeg.a1.libjpg -side top -pady 2 -anchor w
622 pack .optjpeg.a0 -side top -pady 2 -anchor w -fill x
623 pack .optjpeg.a1 -side top -pady 2 -anchor w -fill x
625 pack .optjpeg.a0.incjpg .optjpeg.a1.libjpg -side top -anchor e
627 .optjpeg.a0.incjpg insert 0 $incjpg;
628 .optjpeg.a1.libjpg insert 0 $libjpg;
632 proc jpegoptions_ok {} {
635 set incjpg [.optjpeg.a0.incjpg get];
636 set libjpg [.optjpeg.a1.libjpg get];
640 ################################################################################
642 # Show freetype options dialog
644 ################################################################################
650 wm title .optft "Freetype support options"
651 wm geometry .optft +100+100
654 pack .optft.buttons -side bottom -fill x -pady 2m
655 button .optft.buttons.ok -text "Ok" -command "ftoptions_ok; destroy .optft"
656 button .optft.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
657 pack .optft.buttons.help .optft.buttons.ok -side right -expand 1
661 label .optft.a0.label -text "Freetype include dir:" -anchor e
662 entry .optft.a0.incft -width 40 -relief sunken
663 label .optft.a1.label -text "Freetype lib path:" -anchor e
664 entry .optft.a1.libft -width 40 -relief sunken
665 pack .optft.a0.label -side top -pady 2 -anchor w
666 pack .optft.a0.incft -side top -pady 2 -anchor w
667 pack .optft.a1.label -side top -pady 2 -anchor w
668 pack .optft.a1.libft -side top -pady 2 -anchor w
669 pack .optft.a0 -side top -pady 2 -anchor w -fill x
670 pack .optft.a1 -side top -pady 2 -anchor w -fill x
672 pack .optft.a0.incft .optft.a1.libft -side top -anchor e
674 .optft.a0.incft insert 0 $incft;
675 .optft.a1.libft insert 0 $libft;
679 proc ftoptions_ok {} {
682 set incft [.optft.a0.incft get];
683 set libft [.optft.a1.libft get];
687 ################################################################################
689 # Show t1lib options dialog
691 ################################################################################
697 wm title .optt1 "T1Lib support options"
698 wm geometry .optt1 +100+100
701 pack .optt1.buttons -side bottom -fill x -pady 2m
702 button .optt1.buttons.ok -text "Ok" -command "t1options_ok; destroy .optt1"
703 button .optt1.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
704 pack .optt1.buttons.help .optt1.buttons.ok -side right -expand 1
708 label .optt1.a0.label -text "T1lib include dir:" -anchor e
709 entry .optt1.a0.inct1 -width 40 -relief sunken
710 label .optt1.a1.label -text "T1lib path:" -anchor e
711 entry .optt1.a1.libt1 -width 40 -relief sunken
712 pack .optt1.a0.label -side top -pady 2 -anchor w
713 pack .optt1.a0.inct1 -side top -pady 2 -anchor w
714 pack .optt1.a1.label -side top -pady 2 -anchor w
715 pack .optt1.a1.libt1 -side top -pady 2 -anchor w
716 pack .optt1.a0 -side top -pady 2 -anchor w -fill x
717 pack .optt1.a1 -side top -pady 2 -anchor w -fill x
719 pack .optt1.a0.inct1 .optt1.a1.libt1 -side top -anchor e
721 .optt1.a0.inct1 insert 0 $inct1;
722 .optt1.a1.libt1 insert 0 $libt1;
726 proc t1options_ok {} {
729 set inct1 [.optt1.a0.inct1 get];
730 set libt1 [.optt1.a1.libt1 get];
733 ################################################################################
735 # Show hzk dir options dialog
737 ################################################################################
743 wm title .opthzk "HZK support options"
744 wm geometry .opthzk +100+100
746 frame .opthzk.buttons
747 pack .opthzk.buttons -side bottom -fill x -pady 2m
748 button .opthzk.buttons.ok -text "Ok" -command "hzkoptions_ok; destroy .opthzk"
749 button .opthzk.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
750 pack .opthzk.buttons.help .opthzk.buttons.ok -side right -expand 1
754 label .opthzk.a0.label -text "HZK fonts dir:" -anchor e
755 entry .opthzk.a0.hzkdir -width 40 -relief sunken
756 label .opthzk.a1.label -text "HZK fonts Size:(16 or 12 ,now)" -anchor e
757 entry .opthzk.a1.hzksize -width 40 -relief sunken
758 pack .opthzk.a0.label -side top -pady 2 -anchor w
759 pack .opthzk.a0.hzkdir -side top -pady 2 -anchor w
760 pack .opthzk.a1.label -side top -pady 2 -anchor w
761 pack .opthzk.a1.hzksize -side top -pady 2 -anchor w
762 pack .opthzk.a0 -side top -pady 2 -anchor w -fill x
763 pack .opthzk.a1 -side top -pady 2 -anchor w -fill x
765 pack .opthzk.a0.hzkdir .opthzk.a1.hzksize -side top -anchor e
767 .opthzk.a0.hzkdir insert 0 $hzkdir;
768 .opthzk.a1.hzksize insert 0 $hzkfontsize;
772 proc hzkoptions_ok {} {
775 set hzkdir [.opthzk.a0.hzkdir get];
776 set hzkfontsize [.opthzk.a1.hzksize get];
781 ################################################################################
783 # Show screen driver options dialog
785 ################################################################################
786 proc screenoptions {} {
789 wm title .optscreen "Screen driver options"
790 wm geometry .optscreen +100+100
792 frame .optscreen.buttons
793 pack .optscreen.buttons -side bottom -fill x -pady 2m
794 button .optscreen.buttons.ok -text "Ok" -command "destroy .optscreen"
795 button .optscreen.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
796 pack .optscreen.buttons.help .optscreen.buttons.ok -side right -expand 1
802 radiobutton .optscreen.a0.b0 -text "Framebuffer" -variable screenlinux -relief flat -value 0 -anchor w
803 button .optscreen.a0.options -text "Options" -command {fboptions;};
804 radiobutton .optscreen.a1.b1 -text "X11" -variable screenlinux -relief flat -value 1 -anchor w
805 button .optscreen.a1.options -text "Options" -command {x11options;};
806 radiobutton .optscreen.a2.b2 -text "VgaLib" -variable screenlinux -relief flat -value 2 -anchor w
807 radiobutton .optscreen.a3.b3 -text "HW Vga" -variable screenlinux -relief flat -value 3 -anchor w
808 pack .optscreen.a0.b0 .optscreen.a0.options -side left
809 pack .optscreen.a1.b1 .optscreen.a1.options -side left
810 pack .optscreen.a2.b2 -side top -pady 2 -anchor w
811 pack .optscreen.a3.b3 -side top -pady 2 -anchor w
812 pack .optscreen.a0 -side top -pady 2 -anchor w -fill x
813 pack .optscreen.a1 -side top -pady 2 -anchor w -fill x
814 pack .optscreen.a2 -side top -pady 2 -anchor w -fill x
815 pack .optscreen.a3 -side top -pady 2 -anchor w -fill x
816 pack .optscreen.a0.options .optscreen.a1.options -side top -anchor e
820 ################################################################################
822 # Show mouse options dialog
824 ################################################################################
825 proc mouseoptions {} {
828 wm title .optmouse "Mouse driver options"
829 wm geometry .optmouse +100+100
831 frame .optmouse.buttons
832 pack .optmouse.buttons -side bottom -fill x -pady 2m
833 button .optmouse.buttons.ok -text "Ok" -command "destroy .optmouse"
834 button .optmouse.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
835 pack .optmouse.buttons.help .optmouse.buttons.ok -side right -expand 1
842 radiobutton .optmouse.a0.b0 -text "GPM mouse" -variable mouselinux -relief flat -value 0 -anchor w
843 radiobutton .optmouse.a1.b1 -text "Serial mouse" -variable mouselinux -relief flat -value 1 -anchor w
844 radiobutton .optmouse.a2.b2 -text "Touch Pad" -variable mouselinux -relief flat -value 2 -anchor w
845 radiobutton .optmouse.a3.b3 -text "Touch screen" -variable mouselinux -relief flat -value 3 -anchor w
846 radiobutton .optmouse.a4.b4 -text "No Mouse" -variable mouselinux -relief flat -value 4 -anchor w
847 pack .optmouse.a0.b0 -side top -pady 2 -anchor w
848 pack .optmouse.a1.b1 -side top -pady 2 -anchor w
849 pack .optmouse.a2.b2 -side top -pady 2 -anchor w
850 pack .optmouse.a3.b3 -side top -pady 2 -anchor w
851 pack .optmouse.a4.b4 -side top -pady 2 -anchor w
852 pack .optmouse.a0 -side top -pady 2 -anchor w -fill x
853 pack .optmouse.a1 -side top -pady 2 -anchor w -fill x
854 pack .optmouse.a2 -side top -pady 2 -anchor w -fill x
855 pack .optmouse.a3 -side top -pady 2 -anchor w -fill x
856 pack .optmouse.a4 -side top -pady 2 -anchor w -fill x
860 ################################################################################
862 # Show keyboard options dialog
864 ################################################################################
868 wm title .optkbd "Keyboard driver options"
869 wm geometry .optkbd +100+100
871 frame .optkbd.buttons
872 pack .optkbd.buttons -side bottom -fill x -pady 2m
873 button .optkbd.buttons.ok -text "Ok" -command "destroy .optkbd"
874 button .optkbd.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
875 pack .optkbd.buttons.help .optkbd.buttons.ok -side right -expand 1
879 radiobutton .optkbd.a0.b0 -text "TTY" -variable keyblinux -relief flat -value 0 -anchor w
880 radiobutton .optkbd.a1.b0 -text "No keyboard" -variable keyblinux -relief flat -value 1 -anchor w
881 pack .optkbd.a0.b0 -side top -pady 2 -anchor w
882 pack .optkbd.a1.b0 -side top -pady 2 -anchor w
883 pack .optkbd.a0 -side top -pady 2 -anchor w -fill x
884 pack .optkbd.a1 -side top -pady 2 -anchor w -fill x
888 ################################################################################
890 # Show framebuffer options dialog
892 ################################################################################
896 wm title .optfb "Framebuffer options"
897 wm geometry .optfb +100+100
900 pack .optfb.buttons -side bottom -fill x -pady 2m
901 button .optfb.buttons.ok -text "Ok" -command "destroy .optfb"
902 button .optfb.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
903 pack .optfb.buttons.help .optfb.buttons.ok -side right -expand 1
908 checkbutton .optfb.a0.vgafb -text "VGA fb" -variable vgafb -relief flat
909 checkbutton .optfb.a1.portrait -text "Portrait mode" -variable portraitfb -relief flat
910 checkbutton .optfb.a2.vt -text "VTerm Switch code included" -variable vtswitch -relief flat
911 pack .optfb.a0.vgafb -side top -pady 2 -anchor w
912 pack .optfb.a1.portrait -side top -pady 2 -anchor w
913 pack .optfb.a2.vt -side top -pady 2 -anchor w
914 pack .optfb.a0 .optfb.a1 .optfb.a2 -side top -pady 2 -anchor w -fill x
918 ################################################################################
920 # Show X11 options dialog
922 ################################################################################
924 global x11screenwidth;
925 global x11screenheight;
926 global x11screendepth;
930 wm title .optx11 "X11 options"
931 wm geometry .optx11 +100+100
933 frame .optx11.buttons
934 pack .optx11.buttons -side bottom -fill x -pady 2m
935 button .optx11.buttons.ok -text "Ok" -command "x11options_ok; destroy .optx11"
936 button .optx11.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
937 pack .optx11.buttons.help .optx11.buttons.ok -side right -expand 1
943 label .optx11.a0.label -text "Screen width:" -anchor e
944 entry .optx11.a0.width -width 5 -relief sunken
945 label .optx11.a1.label -text "Screen height:" -anchor e
946 entry .optx11.a1.height -width 5 -relief sunken
947 label .optx11.a2.label -text "Screen depth:" -anchor e
948 entry .optx11.a2.depth -width 5 -relief sunken
949 checkbutton .optx11.a3.x11e15 -text "Use predefined model E15" -variable x11e15 -relief flat
950 pack .optx11.a0.label .optx11.a0.width -side left
951 pack .optx11.a1.label .optx11.a1.height -side left
952 pack .optx11.a2.label .optx11.a2.depth -side left
953 pack .optx11.a3.x11e15 -side top -pady 2 -anchor w
954 pack .optx11.a0 -side top -pady 2 -anchor w -fill x
955 pack .optx11.a1 -side top -pady 2 -anchor w -fill x
956 pack .optx11.a2 -side top -pady 2 -anchor w -fill x
957 pack .optx11.a3 -side top -pady 2 -anchor w -fill x
958 pack .optx11.a0.width .optx11.a1.height .optx11.a2.depth -side top -anchor e
959 .optx11.a0.width insert 0 $x11screenwidth;
960 .optx11.a1.height insert 0 $x11screenheight;
961 .optx11.a2.depth insert 0 $x11screendepth;
964 proc x11options_ok {} {
965 global x11screenwidth;
966 global x11screenheight;
967 global x11screendepth;
968 set x11screenwidth [.optx11.a0.width get];
969 set x11screenheight [.optx11.a1.height get];
970 set x11screendepth [.optx11.a2.depth get];
974 ################################################################################
976 # Show elks options dialog
978 ################################################################################
979 proc elksoptions {} {
983 wm title .optelks "ELKS options"
984 wm geometry .optelks +100+100
986 frame .optelks.buttons
987 pack .optelks.buttons -side bottom -fill x -pady 2m
988 button .optelks.buttons.ok -text "Ok" -command "destroy .optelks"
989 button .optelks.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
990 pack .optelks.buttons.help .optelks.buttons.ok -side right -expand 1
992 frame .optelks.sd -borderwidth 1 -relief solid
993 pack .optelks.sd -side top -fill x -pady .5c -padx .5c
998 label .optelks.sd.label -text "Screen driver"
999 pack .optelks.sd.label -side top
1000 radiobutton .optelks.sd.a0.b0 -text "ASM VGA (faster)" -variable screenelks -relief flat -value 0 -anchor w
1001 radiobutton .optelks.sd.a1.b1 -text "C VGA " -variable screenelks -relief flat -value 1 -anchor w
1002 radiobutton .optelks.sd.a2.b2 -text "Hercule" -variable screenelks -relief flat -value 2 -anchor w
1003 pack .optelks.sd.a0.b0 -side top -pady 2 -anchor w
1004 pack .optelks.sd.a1.b1 -side top -pady 2 -anchor w
1005 pack .optelks.sd.a2.b2 -side top -pady 2 -anchor w
1006 pack .optelks.sd.a0 -side top -pady 2 -anchor w -fill x
1007 pack .optelks.sd.a1 -side top -pady 2 -anchor w -fill x
1008 pack .optelks.sd.a2 -side top -pady 2 -anchor w -fill x
1012 ################################################################################
1014 # Read data from the configuration file
1016 ################################################################################
1017 proc readconfig {} {
1021 global armtoolsprefix;
1022 global mipstoolsprefix;
1023 global rtemstoolsprefix;
1032 global microwindemo;
1034 global screenpixtype;
1051 global updateregions;
1059 global x11screenwidth;
1060 global x11screenheight;
1061 global x11screendepth;
1065 global sa1100ltlend;
1070 set configfile [open "config" r+]
1072 set armtoolsprefix [getvalue "ARMTOOLSPREFIX" 0];
1073 set mipstoolsprefix [getvalue "MIPSTOOLSPREFIX" 0];
1074 set rtemstoolsprefix [getvalue "RTEMSTOOLSPREFIX" 0];
1076 set arch [getvalue "ARCH" 0];
1077 switch -exact $arch {
1078 LINUX-NATIVE {set arch 0;}
1079 LINUX-ARM {set arch 1;}
1080 LINUX-MIPS {set arch 2;}
1082 SOLARIS {set arch 4;}
1084 default {set arch 0}
1087 set optimize [getvalue "OPTIMIZE" 1];
1088 set debug [getvalue "DEBUG" 1];
1089 set verbose [getvalue "VERBOSE" 1];
1091 set vtswitch [getvalue "VTSWITCH" 1];
1093 set microwin [getvalue "MICROWIN" 1];
1094 set nanox [getvalue "NANOX" 1];
1095 set shlibs [getvalue "SHAREDLIBS" 1];
1096 set objframe [getvalue "OBJFRAMEWORK" 1];
1097 set nwidget [getvalue "NWIDGET" 1];
1099 set microwindemo [getvalue "MICROWINDEMO" 1]
1100 set nanoxdemo [getvalue "NANOXDEMO" 1];
1102 set screenpixtype [getvalue "SCREEN_PIXTYPE" 0]
1103 set server [getvalue "LINK_APP_INTO_SERVER" 1];
1104 set sharedmem [getvalue "HAVE_SHAREDMEM_SUPPORT" 1];
1106 set havefileio [getvalue "HAVE_FILEIO" 1];
1107 set havebmp [getvalue "HAVE_BMP_SUPPORT" 1];
1108 set havejpg [getvalue "HAVE_JPEG_SUPPORT" 1];
1109 set incjpg [getvalue "INCJPEG" 0];
1110 set libjpg [getvalue "LIBJPEG" 0];
1111 set haveft [getvalue "HAVE_FREETYPE_SUPPORT" 1];
1112 set incft [getvalue "INCFTLIB" 0];
1113 set libft [getvalue "LIBFTLIB" 0];
1114 set havet1 [getvalue "HAVE_T1LIB_SUPPORT" 1];
1115 set inct1 [getvalue "INCT1LIB" 0];
1116 set libt1 [getvalue "LIBT1LIB" 0];
1118 set havehzk [getvalue "HAVE_HZK_SUPPORT" 1];
1119 set hzkdir [getvalue "HZK_FONT_DIR" 0];
1120 set hzkfontsize [getvalue "HZK_FONT_SIZE" 0];
1122 set updateregions [getvalue "UPDATEREGIONS" 1]
1123 set erasemove [getvalue "ERASEMOVE" 1]
1125 set havemsfonts [getvalue "HAVEMSFONTS" 1];
1127 set graypalette [getvalue "GRAYPALETTE" 1];
1129 set vgafb [getvalue "FBVGA" 1]
1130 set portraitfb [getvalue "PORTRAIT_MODE" 1]
1132 set x11e15 [getvalue "SCREEN_E15 1" 1]
1133 set x11screenwidth [getvalue "SCREEN_WIDTH" 0]
1134 set x11screenheight [getvalue "SCREEN_HEIGHT" 0]
1135 set x11screendepth [getvalue "SCREEN_DEPTH" 0]
1137 set sa1100ltlend [getvalue "SA1100_LCD_LTLEND" 1]
1138 set rtemsbuild [getvalue "RTEMS_BUILD" 0]
1139 set rtemsbsp [getvalue "RTEMS_BSP" 0]
1141 if {[getvalue "FRAMEBUFFER" 1] == 1} {set screenlinux 0;}
1142 if {[getvalue "X11" 1] == 1} {set screenlinux 1}
1143 if {[getvalue "VGALIB" 1] == 1} {set screenlinux 2}
1144 if {[getvalue "HWVGA" 1] == 1} {set screenlinux 3}
1146 if {[getvalue "GPMMOUSE" 1] == 1} {set mouselinux 0;}
1147 if {[getvalue "SERMOUSE" 1] == 1} {set mouselinux 1}
1148 if {[getvalue "TPMOUSE" 1] == 1} {set mouselinux 2}
1149 if {[getvalue "TSMOUSE" 1] == 1} {set mouselinux 3}
1150 if {[getvalue "NOMOUSE" 1] == 1} {set mouselinux 4}
1152 if {[getvalue "TTYKBD" 1] == 1} {set keyblinux 0;}
1153 if {[getvalue "NOKBD" 1] == 1} {set keyblinux 1;}
1155 if {[getvalue "ASMVGADRIVER" 1] == 1} {set screenelks 0;}
1156 if {[getvalue "CVGADRIVER" 1] == 1} {set screenelks 1}
1157 if {[getvalue "HERCDRIVER" 1] == 1} {set screenelks 2}
1163 ################################################################################
1165 # Get a value from the config file
1167 ################################################################################
1168 proc getvalue {name isyesorno} {
1173 seek $configfile 0 start;
1175 while {[eof $configfile] == 0} {
1176 set line [gets $configfile];
1178 if {[regexp ($name)(\ |\t)*(=)(\ |\t)*(.*) $line all a b c d e] == 1} {
1179 set $e [string trim $e]
1181 if {$isyesorno == 1} {
1195 ################################################################################
1197 # Write data to the configuration file
1199 ################################################################################
1200 proc writeconfig {} {
1202 global armtoolsprefix;
1203 global mipstoolsprefix;
1204 global rtemstoolsprefix;
1213 global microwindemo;
1215 global screenpixtype;
1232 global updateregions;
1240 global x11screenwidth;
1241 global x11screenheight;
1242 global x11screendepth;
1246 global sa1100ltlend;
1251 if {$arch == 0} {putvalue "ARCH" "LINUX-NATIVE"
1252 } elseif {$arch == 1} {putvalue "ARCH" "LINUX-ARM"
1253 } elseif {$arch == 2} {putvalue "ARCH" "LINUX-MIPS"
1254 } elseif {$arch == 3} {putvalue "ARCH" "RTEMS"
1255 } elseif {$arch == 4} {putvalue "ARCH" "SOLARIS"
1256 } elseif {$arch == 5} {putvalue "ARCH" "ELKS"}
1258 putvalue "ARMTOOLSPREFIX" $armtoolsprefix;
1259 putvalue "MIPSTOOLSPREFIX" $mipstoolsprefix;
1260 putvalue "RTEMSTOOLSPREFIX" $rtemstoolsprefix;
1261 putvalue "OPTIMIZE" $optimize;
1262 putvalue "DEBUG" $debug;
1263 putvalue "VERBOSE" $verbose;
1264 putvalue "MICROWIN" $microwin
1265 putvalue "NANOX" $nanox;
1266 putvalue "SHAREDLIBS" $shlibs;
1267 putvalue "OBJFRAMEWORK" $objframe;
1268 putvalue "NWIDGET" $nwidget;
1269 putvalue "MICROWINDEMO" $microwindemo;
1270 putvalue "NANOXDEMO" $nanoxdemo;
1271 putvalue "SCREEN_PIXTYPE" $screenpixtype;
1272 putvalue "LINK_APP_INTO_SERVER" $server;
1273 putvalue "HAVE_SHAREDMEM_SUPPORT" $sharedmem;
1274 putvalue "HAVE_FILEIO" $havefileio;
1275 putvalue "HAVE_BMP_SUPPORT" $havebmp;
1276 putvalue "HAVE_JPEG_SUPPORT" $havejpg;
1277 putvalue "INCJPEG" $incjpg;
1278 putvalue "LIBJPEG" $libjpg;
1279 putvalue "HAVE_FREETYPE_SUPPORT" $haveft;
1280 putvalue "INCFTLIB" $incft;
1281 putvalue "LIBFTLIB" $libft;
1282 putvalue "HAVE_T1LIB_SUPPORT" $havet1;
1283 putvalue "INCT1LIB" $inct1;
1284 putvalue "LIBT1LIB" $libt1;
1285 putvalue "HAVE_HZK_SUPPORT" $havehzk;
1286 putvalue "HZK_FONT_DIR" $hzkdir;
1287 putvalue "HZK_FONT_SIZE" $hzkfontsize;
1289 putvalue "UPDATEREGIONS" $updateregions;
1290 putvalue "ERASEMOVE" $erasemove;
1291 putvalue "HAVEMSFONTS" $havemsfonts;
1292 putvalue "GRAYPALETTE" $graypalette;
1293 putvalue "PORTRAIT_MODE" $portraitfb;
1294 putvalue "FBVGA" $vgafb;
1295 putvalue "SCREEN_E15" $x11e15;
1296 putvalue "SCREEN_WIDTH" $x11screenwidth;
1297 putvalue "SCREEN_HEIGHT" $x11screenheight;
1298 putvalue "SCREEN_DEPTH" $x11screendepth;
1299 putvalue "RTEMS_BUILD" $rtemsbuild;
1300 putvalue "RTEMS_BSP" $rtemsbsp;
1301 putvalue "SA1100_LCD_LTLEND" $sa1100ltlend;
1303 if {$screenlinux == 0} {
1304 putvalue "FRAMEBUFFER" 1;
1306 putvalue "VGALIB" 0;
1308 } elseif {$screenlinux == 1} {
1309 putvalue "FRAMEBUFFER" 0;
1311 putvalue "VGALIB" 0;
1313 } elseif {$screenlinux == 2} {
1314 putvalue "FRAMEBUFFER" 0;
1316 putvalue "VGALIB" 1;
1318 } elseif {$screenlinux == 2} {
1319 putvalue "FRAMEBUFFER" 0;
1321 putvalue "VGALIB" 0;
1325 if {$mouselinux == 0} {
1326 putvalue "GPMMOUSE" 1;
1327 putvalue "SERMOUSE" 0;
1328 putvalue "TPMOUSE" 0;
1329 putvalue "TSMOUSE" 0;
1330 putvalue "NOMOUSE" 0;
1331 } elseif {$mouselinux == 1} {
1332 putvalue "GPMMOUSE" 0;
1333 putvalue "SERMOUSE" 1;
1334 putvalue "TPMOUSE" 0;
1335 putvalue "TSMOUSE" 0;
1336 putvalue "NOMOUSE" 0;
1337 } elseif {$mouselinux == 2} {
1338 putvalue "GPMMOUSE" 0;
1339 putvalue "SERMOUSE" 0;
1340 putvalue "TPMOUSE" 1;
1341 putvalue "TSMOUSE" 0;
1342 putvalue "NOMOUSE" 0;
1343 } elseif {$mouselinux == 3} {
1344 putvalue "GPMMOUSE" 0;
1345 putvalue "SERMOUSE" 0;
1346 putvalue "TPMOUSE" 0;
1347 putvalue "TSMOUSE" 1;
1348 putvalue "NOMOUSE" 0;
1349 } elseif {$mouselinux == 4} {
1350 putvalue "GPMMOUSE" 0;
1351 putvalue "SERMOUSE" 0;
1352 putvalue "TPMOUSE" 0;
1353 putvalue "TSMOUSE" 0;
1354 putvalue "NOMOUSE" 1;
1357 if {$keyblinux == 0} {
1358 putvalue "TTYKBD" 1;
1360 } elseif {$keyblinux == 1} {
1361 putvalue "TTYKBD" 0;
1365 putvalue "VTSWITCH" $vtswitch;
1367 if {$screenelks == 0} {
1368 putvalue "ASMVGADRIVER" 1;
1369 putvalue "CVGADRIVER" 0;
1370 putvalue "HERCDRIVER" 0;
1371 } elseif {$screenelks == 1} {
1372 putvalue "ASMVGADRIVER" 0;
1373 putvalue "CVGADRIVER" 1;
1374 putvalue "HERCDRIVER" 0;
1375 } elseif {$screenelks == 2} {
1376 putvalue "ASMVGADRIVER" 0;
1377 putvalue "CVGADRIVER" 0;
1378 putvalue "HERCDRIVER" 1;
1381 puts "Now type `make` ... Enjoy"
1385 ################################################################################
1387 # Write a value to the configuration file
1389 ################################################################################
1390 proc putvalue {name value} {
1394 set configfile [open "config" r+]
1395 set tempconfigfile [open "config~" w+]
1397 if {$value == "0"} {set value "N"} elseif {$value == "1"} {set value "Y"}
1399 seek $configfile 0 start;
1400 seek $tempconfigfile 0 start;
1402 while {[eof $configfile] == 0} {
1403 set linelength [gets $configfile line];
1405 if {[regexp ($name)(\ |\t)*(=)(\ |\t)*(.*) $line all a b c d e] == 1 && $found == 0} {
1406 set $e [string trim $e]
1408 puts -nonewline $tempconfigfile $name
1410 set padding [expr 25 - [string length $name]]
1412 for {set i 0} {$i < $padding} {incr i} {
1413 puts -nonewline $tempconfigfile " "
1416 puts $tempconfigfile "= $value"
1420 if {[eof $configfile] == 0} {
1421 puts $tempconfigfile $line
1423 puts -nonewline $tempconfigfile $line
1429 close $tempconfigfile;
1432 file rename -force "config~" "config"
1435 # Initialization ...