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

📄 xconfigure

📁 开放源码实时操作系统源码.
💻
📖 第 1 页 / 共 4 页
字号:
#!/usr/bin/wish -f
#
# Microwindows configuration interface: X11 version
#
# wish is available at http://dev.scriptics.com/software/tcltck
#
# (C) Martin Jolicoeur, 1999
#
# Thu Mar 16 14:33:08 CET 2000, Fabio Parodi, <fabio.parodi@iname.com>
#       added VTSWITCH button
#
#

set configfile 0;

# Configurable options
variable arch;
variable armtoolsprefix;
variable mipstoolsprefix;
variable rtemstoolsprefix;
variable optimize;
variable debug;
variable verbose
variable microwin;
variable nanox;
variable shlibs;
variable objframe;
variable nwidget;
variable microwindemo;
variable nanoxdemo;
variable screenpixtype;
variable server;
variable sharedmem;
variable havefileio;
variable havebmp;
variable havejpg;
variable incjpg;
variable libjpg;
variable haveft;
variable incft;
variable libft;
variable havet1;
variable inct1;
variable libt1;

variable havehzk;
variable hzkdir;
variable hzkfontsize;

variable updateregions;
variable erasemove;
variable havemsfonts;
variable graypalette;
variable screenlinux;
variable vgafb;
variable portraitfb;
variable x11e15;
variable x11screenwidth;
variable x11screenheight;
variable x11screendepth;
variable mouselinux;
variable keyblinux;
variable vtswitch;
variable sa1100ltlend;
variable rtemsbuild;
variable rtemsbsp;
variable screenelks;


wm title . "Microwindows configuration"
wm geometry . +100+100

# Create main menu
frame .main
frame .main.col1
frame .main.col2
button .main.col1.compile -text "Compiling options" -command "compileoptions;"
button .main.col1.platform -text "Platform" -command "platformoptions;"
button .main.col1.lib -text "Libraries to compile" -command "liboptions;"
button .main.col2.colors -text "Color options" -command "colorsoptions;"
button .main.col2.io -text "I/O" -command "iooptions;"
button .main.col2.misc -text "Miscellaneous options" -command "miscoptions;"
pack .main.col1.compile .main.col1.platform .main.col1.lib -side top -fill x
pack .main.col2.colors .main.col2.io .main.col2.misc -side top -fill x
pack .main.col1 .main.col2 -side left

# Create ok, cancel, help buttons
frame .buttons
pack .buttons -side bottom -fill x -pady 2m
button .buttons.ok -text "Save & Exit" -command "writeconfig; destroy ."
button .buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
button .buttons.cancel -text "Cancel" -command "destroy ."
pack .buttons.cancel .buttons.help .buttons.ok -side right -expand 1

pack .main .buttons -side bottom


################################################################################
#
# Show the "compile" options dialog
#
################################################################################
proc compileoptions {} {

   toplevel .compile
   wm title .compile "Compiling options"
   wm geometry .compile +100+100

   frame .compile.buttons
   pack .compile.buttons -side bottom -fill x -pady 2m
   button .compile.buttons.ok -text "Ok" -command "destroy .compile"
   button .compile.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
   pack .compile.buttons.help .compile.buttons.ok -side right -expand 1

   frame .compile.a0
   frame .compile.a1
   frame .compile.a2
   checkbutton .compile.a0.b0 -text "Optimize" -variable optimize -relief flat
   checkbutton .compile.a1.b1 -text "Debug" -variable debug -relief flat
   checkbutton .compile.a2.b2 -text "Verbose" -variable verbose -relief flat
   pack .compile.a0.b0 -side left
   pack .compile.a1.b1 -side left
   pack .compile.a2.b2 -side left
   pack .compile.a0  -side top -pady 2 -anchor w -fill x
   pack .compile.a1  -side top -pady 2 -anchor w -fill x
   pack .compile.a2  -side top -pady 2 -anchor w -fill x
   pack .compile.a0 .compile.a1 .compile.a2 -side top -anchor e
}


################################################################################
#
# Show the "platform" options dialog
#
################################################################################
proc platformoptions {} {

   toplevel .platform
   wm title .platform "Platform options"
   wm geometry .platform +100+100

   frame .platform.buttons
   pack .platform.buttons -side bottom -fill x -pady 2m
   button .platform.buttons.ok -text "Ok" -command "destroy .platform"
   button .platform.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
   pack .platform.buttons.help .platform.buttons.ok -side right -expand 1

   frame .platform.a0
   frame .platform.a1
   frame .platform.a2
   frame .platform.a3
   frame .platform.a4
   frame .platform.a5

   radiobutton .platform.a0.b0 -text "Linux (native)" -variable arch -relief flat -value 0 -anchor w
   button .platform.a0.options -text "Options" -command {nativelinuxoptions;};
   radiobutton .platform.a1.b1 -text "Linux-ARM (x-compile)" -variable arch -relief flat -value 1 -anchor w
   button .platform.a1.options -text "Options" -command {armlinuxoptions;};
   radiobutton .platform.a2.b2 -text "Linux-MIPS (x-compile)" -variable arch -relief flat -value 2 -anchor w
   button .platform.a2.options -text "Options" -command {mipslinuxoptions;};
   radiobutton .platform.a3.b3 -text "RTEMS" -variable arch -relief flat -value 3 -anchor w
   button .platform.a3.options -text "Options" -command {rtemsoptions;};
   radiobutton .platform.a4.b4 -text "Solaris" -variable arch -relief flat -value 4 -anchor w
   button .platform.a4.options -text "Options" -command {nativelinuxoptions;};
   radiobutton .platform.a5.b5 -text "ELKS" -variable arch -relief flat -value 5 -anchor w
   button .platform.a5.options -text "Options" -command {elksoptions;};
   pack .platform.a0.b0 .platform.a0.options -side left
   pack .platform.a1.b1 .platform.a1.options -side left
   pack .platform.a2.b2 .platform.a2.options -side left
   pack .platform.a3.b3 .platform.a3.options -side left
   pack .platform.a4.b4 .platform.a4.options -side left
   pack .platform.a5.b5 .platform.a5.options -side left
   pack .platform.a0  -side top -pady 2 -anchor w -fill x
   pack .platform.a1  -side top -pady 2 -anchor w -fill x
   pack .platform.a2  -side top -pady 2 -anchor w -fill x
   pack .platform.a3  -side top -pady 2 -anchor w -fill x
   pack .platform.a4  -side top -pady 2 -anchor w -fill x
   pack .platform.a5  -side top -pady 2 -anchor w -fill x
   pack .platform.a0.options .platform.a1.options .platform.a2.options \
   .platform.a3.options .platform.a4.options .platform.a5.options -side top -anchor e
}


################################################################################
#
# Show the "libraries" options dialog
#
################################################################################
proc liboptions {} {

   toplevel .lib
   wm title .lib "Libraries to compile"
   wm geometry .lib +100+100

   frame .lib.buttons
   pack .lib.buttons -side bottom -fill x -pady 2m
   button .lib.buttons.ok -text "Ok" -command "destroy .lib"
   button .lib.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
   pack .lib.buttons.help .lib.buttons.ok -side right -expand 1

   frame .lib.a0
   frame .lib.a1
   frame .lib.a2
   frame .lib.a3
   checkbutton .lib.a0.b0 -text "NanoX" -variable nanox -relief flat
   button .lib.a0.options -text "Options" -command {nanoxoptions;};
   checkbutton .lib.a1.b1 -text "Microwindows" -variable microwin -relief flat
   button .lib.a1.options -text "Options" -command {mwinoptions;};
   checkbutton .lib.a2.b2 -text "Shared libs" -variable shlibs -relief flat
   checkbutton .lib.a3.b3 -text "C++ obj framework" -variable objframe -relief flat

   pack .lib.a0.b0 .lib.a0.options -side left
   pack .lib.a1.b1 .lib.a1.options -side left
   pack .lib.a2.b2 -side left
   pack .lib.a3.b3 -side left
   pack .lib.a0  -side top -pady 2 -anchor w -fill x
   pack .lib.a1  -side top -pady 2 -anchor w -fill x
   pack .lib.a2  -side top -pady 2 -anchor w -fill x
   pack .lib.a3  -side top -pady 2 -anchor w -fill x
   pack .lib.a0.options .lib.a1.options -side top -anchor e
}


################################################################################
#
# Show the "colors" options dialog
#
################################################################################
proc colorsoptions {} {
   global screenpixtype;

   toplevel .colors
   wm title .colors "Colors options"
   wm geometry .colors +100+100

   frame .colors.buttons
   pack .colors.buttons -side bottom -fill x -pady 2m
   button .colors.buttons.ok -text "Ok" -command "colorsoptions_ok; destroy .colors"
   button .colors.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
   pack .colors.buttons.help .colors.buttons.ok -side right -expand 1

   frame .colors.a0
   frame .colors.a1
   label .colors.a0.label -text "ScreenPixType:" -anchor e
   entry .colors.a0.pixtype -width 25 -relief sunken
   checkbutton .colors.a1.b1 -text "Gray Palette (4bpp only)" -variable graypalette -relief flat
   pack .colors.a0.label .colors.a0.pixtype -side left
   pack .colors.a1.b1 -side left
   pack .colors.a0  -side top -pady 2 -anchor w -fill x
   pack .colors.a1  -side top -pady 2 -anchor w -fill x
   pack .colors.a0 .colors.a1 -side top -anchor e
   .colors.a0.pixtype insert 0 $screenpixtype;
}

proc colorsoptions_ok {} {
   global screenpixtype;
   set screenpixtype [.colors.a0.pixtype get];
}


################################################################################
#
# Show the "I/O" options dialog
#
################################################################################
proc iooptions {} {
   global havebmp;
   global havejpg;
   global haveft;
   global havet1;

	global havehzk;

   toplevel .io
   wm title .io "I/O options"
   wm geometry .io +100+100

   frame .io.buttons
   pack .io.buttons -side bottom -fill x -pady 2m
   button .io.buttons.ok -text "Ok" -command "destroy .io"
   button .io.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
   pack .io.buttons.help .io.buttons.ok -side right -expand 1

   frame .io.a0
   frame .io.a1
   frame .io.a2
   frame .io.a3
   frame .io.a4

   frame .io.a5

   checkbutton .io.a0.b0 -text "Have File I/O" -variable havefileio -relief flat
   label .io.a0.label -text "(If the above is disabled, this will disable all the features below)" -anchor e
   checkbutton .io.a1.b0 -text "Have bmp support" -variable havebmp -relief flat
   checkbutton .io.a2.b0 -text "Have jpeg support" -variable havejpg -relief flat
   button .io.a2.options -text "Options" -command {jpegoptions;};
   checkbutton .io.a3.b0 -text "Have freetype support (truetype fonts)" -variable haveft -relief flat
   button .io.a3.options -text "Options" -command {ftoptions;};
   checkbutton .io.a4.b0 -text "Have t1lib support (type 1 fonts)" -variable havet1 -relief flat
   button .io.a4.options -text "Options" -command {t1options;};

   checkbutton .io.a5.b0 -text "Have HZK support (Bitmap(Metrix) fonts)" -variable havehzk -relief flat
   button .io.a5.options -text "Options" -command {hzkoptions;};

   pack .io.a0.b0  .io.a0.label -side top -pady 2 -anchor w
   pack .io.a1.b0  -side top -pady 2 -anchor w
   pack .io.a2.b0 .io.a2.options -side left
   pack .io.a3.b0 .io.a3.options -side left
   pack .io.a4.b0 .io.a4.options -side left
   pack .io.a5.b0 .io.a5.options -side left

   pack .io.a0  -side top -pady 2 -anchor w -fill x
   pack .io.a1  -side top -pady 2 -anchor w -fill x
   pack .io.a2  -side top -pady 2 -anchor w -fill x
   pack .io.a3  -side top -pady 2 -anchor w -fill x
   pack .io.a4  -side top -pady 2 -anchor w -fill x
   pack .io.a5  -side top -pady 2 -anchor w -fill x

   pack .io.a2.options .io.a3.options .io.a4.options .io.a5.options -side top -anchor e
}


################################################################################
#
# Show the "Miscellaneous" options dialog
#
################################################################################
proc miscoptions {} {

   toplevel .misc
   wm title .misc "Miscellaneous options"
   wm geometry .misc +100+100

   frame .misc.buttons
   pack .misc.buttons -side bottom -fill x -pady 2m
   button .misc.buttons.ok -text "Ok" -command "destroy .misc"
   button .misc.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
   pack .misc.buttons.help .misc.buttons.ok -side right -expand 1

   checkbutton .misc.b0 -text "Have MS fonts" -variable havemsfonts -relief flat
   pack .misc.b0  -side top -pady 2 -anchor w
}


################################################################################
#
# Show nanox options dialog
#
################################################################################
proc nanoxoptions {} {

   toplevel .optnanox
   wm title .optnanox "NanoX options"
   wm geometry .optnanox +100+100

   frame .optnanox.buttons
   pack .optnanox.buttons -side bottom -fill x -pady 2m
   button .optnanox.buttons.ok -text "Ok" -command "destroy .optnanox"
   button .optnanox.buttons.help -text "Help" -command "tk_dialog .help message TODO \"\" 0 ok"
   pack .optnanox.buttons.help .optnanox.buttons.ok -side right -expand 1

⌨️ 快捷键说明

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