diff options
-rw-r--r-- | usr.sbin/sysinstall/dist.c | 40 | ||||
-rw-r--r-- | usr.sbin/sysinstall/dist.h | 28 | ||||
-rw-r--r-- | usr.sbin/sysinstall/menus.c | 197 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 8 |
4 files changed, 5 insertions, 268 deletions
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c index c76d2bc..61c7c23 100644 --- a/usr.sbin/sysinstall/dist.c +++ b/usr.sbin/sysinstall/dist.c @@ -92,7 +92,7 @@ static Distribution DistTable[] = { DTE_SUBDIST("src", &Dists, SRC, SrcDistTable), DTE_TARBALL("ports", &Dists, PORTS, "/usr"), DTE_TARBALL("local", &Dists, LOCAL, "/"), - DTE_SUBDIST("X.Org", &Dists, XORG, XOrgDistTable), + DTE_PACKAGE("X.Org", &Dists, XORG, "xorg"), DTE_END, }; @@ -132,28 +132,6 @@ static Distribution SrcDistTable[] = { DTE_END, }; -/* The X.Org distribution */ -static Distribution XOrgDistTable[] = { - DTE_PACKAGE("Xbin", &XOrgDists, XORG_APPS, "xorg-apps"), - DTE_PACKAGE("Xlib", &XOrgDists, XORG_LIB, "xorg-libraries"), - DTE_PACKAGE("Xdoc", &XOrgDists, XORG_DOC, "xorg-docs"), - DTE_PACKAGE("Xprog", &XOrgDists, XORG_IMAKE, "imake"), - - DTE_PACKAGE("Xsrv", &XOrgDists, XORG_SERVER, "xorg-server"), - DTE_PACKAGE("Xdrv", &XOrgDists, XORG_DRIVERS, "xorg-drivers"), - DTE_PACKAGE("Xnest", &XOrgDists, XORG_NESTSERVER, "xorg-nestserver"), - DTE_PACKAGE("Xvfb", &XOrgDists, XORG_VFBSERVER, "xorg-vfbserver"), - - DTE_PACKAGE("Xfmsc", &XOrgDists, XORG_FONTS_MISC, "xorg-fonts-miscbitmaps"), - DTE_PACKAGE("Xf75", &XOrgDists, XORG_FONTS_75, "xorg-fonts-75dpi"), - DTE_PACKAGE("Xf100", &XOrgDists, XORG_FONTS_100, "xorg-fonts-100dpi"), - DTE_PACKAGE("Xfcyr", &XOrgDists, XORG_FONTS_CYR, "xorg-fonts-cyrillic"), - DTE_PACKAGE("Xft1", &XOrgDists, XORG_FONTS_T1, "xorg-fonts-type1"), - DTE_PACKAGE("Xftt", &XOrgDists, XORG_FONTS_TT, "xorg-fonts-truetype"), - DTE_PACKAGE("Xfali", &XOrgDists, XORG_FONTS_ALIAS, "font-alias"), - DTE_END, -}; - static int distMaybeSetPorts(dialogMenuItem *self); static void @@ -209,8 +187,8 @@ static int distSetX(void) { Dists |= DIST_XORG; - XOrgDists = DIST_XORG_MISC_ALL | DIST_XORG_SERVER | _DIST_XORG_FONTS_BASE; - return distSetXOrg(NULL); + XOrgDists = DIST_XORG_ALL; + return DITEM_SUCCESS; } int @@ -459,18 +437,6 @@ distSetSrc(dialogMenuItem *self) } int -distSetXOrg(dialogMenuItem *self) -{ - int i = DITEM_SUCCESS; - - dialog_clear_norefresh(); - if (!dmenuOpenSimple(&MenuXOrgSelect, FALSE)) - i = DITEM_FAILURE; - distVerifyFlags(); - return i | DITEM_RESTORE; -} - -int distSetKernel(dialogMenuItem *self) { int i; diff --git a/usr.sbin/sysinstall/dist.h b/usr.sbin/sysinstall/dist.h index f8e0f8a..8fbe925 100644 --- a/usr.sbin/sysinstall/dist.h +++ b/usr.sbin/sysinstall/dist.h @@ -48,29 +48,7 @@ #define DIST_SRC_ALL 0x3FFFFF /* Subtypes for X.Org packages */ -#define DIST_XORG_APPS 0x000001 -#define DIST_XORG_LIB 0x000002 -#define DIST_XORG_DOC 0x000008 -#define DIST_XORG_IMAKE 0x000010 - -#define DIST_XORG_SERVER 0x000100 -#define DIST_XORG_DRIVERS 0x000200 -#define DIST_XORG_NESTSERVER 0x000400 -#define DIST_XORG_VFBSERVER 0x000800 - -#define DIST_XORG_FONTS_MISC 0x010000 -#define DIST_XORG_FONTS_75 0x020000 -#define DIST_XORG_FONTS_100 0x040000 -#define DIST_XORG_FONTS_CYR 0x080000 -#define DIST_XORG_FONTS_T1 0x100000 -#define DIST_XORG_FONTS_TT 0x200000 -#define DIST_XORG_FONTS_ALIAS 0x400000 - -#define DIST_XORG_MISC_ALL 0x00001f -#define DIST_XORG_SERVER_ALL 0x000f00 -#define DIST_XORG_FONTS_ALL 0x7f0000 -#define DIST_XORG_ALL \ - (DIST_XORG_MISC_ALL | DIST_XORG_SERVER_ALL | DIST_XORG_FONTS_ALL) +#define DIST_XORG_ALL 0xFFFFF /* Subtypes for KERNEL distribution */ #define DIST_KERNEL_GENERIC 0x00001 @@ -79,10 +57,6 @@ /* Canned distribution sets */ -#define _DIST_XORG_FONTS_BASE \ - (DIST_XORG_FONTS_MISC | DIST_XORG_FONTS_75 | DIST_XORG_FONTS_100 | \ - DIST_XORG_FONTS_TT | DIST_XORG_FONTS_ALIAS) - #define _DIST_USER \ ( DIST_BASE | DIST_KERNEL | DIST_DOC | DIST_MANPAGES | DIST_DICT ) diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index d77ca4e..af9cf6c 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -72,55 +72,6 @@ clearKernel(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_REDRAW; } -static int -setX11Misc(dialogMenuItem *self) -{ - XOrgDists |= DIST_XORG_MISC_ALL; - Dists |= DIST_XORG; - return DITEM_SUCCESS | DITEM_REDRAW; -} - -static int -clearX11Misc(dialogMenuItem *self) -{ - XOrgDists &= ~DIST_XORG_MISC_ALL; - if (!XOrgDists) - Dists &= ~DIST_XORG; - return DITEM_SUCCESS | DITEM_REDRAW; -} - -static int -setX11Servers(dialogMenuItem *self) -{ - XOrgDists |= DIST_XORG_SERVER_ALL; - return DITEM_SUCCESS | DITEM_REDRAW; -} - -static int -clearX11Servers(dialogMenuItem *self) -{ - XOrgDists &= ~DIST_XORG_SERVER_ALL; - if (!XOrgDists) - Dists &= ~DIST_XORG; - return DITEM_SUCCESS | DITEM_REDRAW; -} - -static int -setX11Fonts(dialogMenuItem *self) -{ - XOrgDists |= DIST_XORG_FONTS_ALL; - return DITEM_SUCCESS | DITEM_REDRAW; -} - -static int -clearX11Fonts(dialogMenuItem *self) -{ - XOrgDists &= ~DIST_XORG_FONTS_ALL; - if (!XOrgDists) - Dists &= ~DIST_XORG; - return DITEM_SUCCESS | DITEM_REDRAW; -} - #define _IS_SET(dist, set) (((dist) & (set)) == (set)) #define IS_DEVELOPER(dist, extra) (_IS_SET(dist, _DIST_DEVELOPER | extra) || \ @@ -245,7 +196,6 @@ DMenu MenuIndex = { { " Dists, User", "Select average user distribution.", checkDistUser, distSetUser }, { " Dists, X User", "Select average X user distribution.", checkDistXUser, distSetXUser }, { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll }, - { " Distributions, X.Org","X.Org distribution menu.", NULL, distSetXOrg }, { " Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, { " Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "README" }, { " Doc, Errata", "The distribution errata.", NULL, dmenuDisplayFile, NULL, "ERRATA" }, @@ -309,8 +259,6 @@ DMenu MenuIndex = { { " Upgrade", "Upgrade an existing system.", NULL, installUpgrade }, { " Usage", "Quick start - How to use this menu system.", NULL, dmenuDisplayFile, NULL, "usage" }, { " User Management", "Add user and group information.", NULL, dmenuSubmenu, NULL, &MenuUsermgmt }, - { " X.Org, Fonts", "X.Org Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectFonts }, - { " X.Org, Server", "X.Org Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectServer }, { NULL } }, }; @@ -1024,7 +972,7 @@ DMenu MenuSubDistributions = { { " local", "Local additions collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL}, { " X.Org", "The X.Org distribution", - x11FlagCheck, distSetXOrg }, + dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XORG }, { NULL } }, }; @@ -1109,149 +1057,6 @@ DMenu MenuSrcDistributions = { { NULL } }, }; -DMenu MenuXOrgConfig = { - DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, - "Please select the X.Org configuration tool you want to use.", - "The first option, xorgcfg, is fully graphical.\n" - "The second option provides a menu-based interface similar to\n" - "what you are currently using. " - "The third option, xorgconfig, is\n" - "a more simplistic shell-script based tool and less friendly to\n" - "new users, but it may work in situations where the other options\n" - "do not.", - NULL, - NULL, - { { "X Exit", "Exit this menu (returning to previous)", - NULL, dmenuExit }, - { "2 xorgcfg", "Fully graphical X.Org configuration tool.", - NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg" }, - { "3 xorgcfg -textmode", "ncurses-based X.Org configuration tool.", - NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg -textmode" }, - { "4 xorgconfig", "Shell-script based X.Org configuration tool.", - NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgconfig" }, - { "D XDesktop", "X already set up, just do desktop configuration.", - NULL, dmenuSubmenu, NULL, &MenuXDesktops }, - { NULL } }, -}; - -DMenu MenuXDesktops = { - DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, - "Please select the default X desktop to use.", - "By default, X.Org comes with a fairly vanilla desktop which\n" - "is based around the twm(1) window manager and does not offer\n" - "much in the way of features. It does have the advantage of\n" - "being a standard part of X so you don't need to load anything\n" - "extra in order to use it. If, however, you have access to a\n" - "reasonably full packages collection on your installation media,\n" - "you can choose any one of the following desktops as alternatives.", - NULL, - NULL, - { { "X Exit", "Exit this menu (returning to previous)", - NULL, dmenuExit }, - { "2 KDE", "The K Desktop Environment (Lite Edition)", - NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" }, - { "3 GNOME 2", "The GNOME 2 Desktop Environment (Lite Edition)", - NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome2" }, - { "4 Afterstep", "The Afterstep window manager", - NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" }, - { "5 Windowmaker", "The Windowmaker window manager", - NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" }, - { "6 fvwm", "The fvwm window manager", - NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm2" }, - { NULL } }, -}; - -DMenu MenuXOrgSelect = { - DMENU_NORMAL_TYPE, - "X.Org Distribution", - "Please select the components you need from the X.Org\n" - "distribution sets.", - NULL, - NULL, - { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, - { "Basic", "Basic component menu (required)", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectCore }, - { "Server", "X server menu", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectServer }, - { "Fonts", "Font set menu", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectFonts }, - { NULL } }, -}; - -DMenu MenuXOrgSelectCore = { - DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, - "X.Org base distribution types", - "Please check off the basic X.Org components you wish to install.\n" - "Bin, lib, and set are recommended for a minimum installaion.", - NULL, - NULL, - { { "X Exit", "Exit this menu (returning to previous)", - checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, - { "All", "Select all below", - NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' }, - { "Reset", "Reset all below", - NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' }, - { " lib", "Shared libraries and data files needed at runtime", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_LIB }, - { " bin", "Client applications", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_APPS }, - { " doc", "Documentation", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_DOC }, - { " prog", "Programming tools", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_IMAKE }, - { NULL } }, -}; - -DMenu MenuXOrgSelectFonts = { - DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, - "X.Org Font distribution selection.", - "Please check off the individual font distributions you wish to\n\ -install. At the minimum, you should install the standard\n\ -75 DPI and misc fonts if you're also installing an X server\n\ -(these are selected by default). The TrueType set is also \n\ -highly recommended. The font server is unnecessary in most\n\ -configurations.", - NULL, - NULL, - { { "X Exit", "Exit this menu (returning to previous)", - checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, - { "All", "All fonts", - NULL, setX11Fonts, NULL, NULL, ' ', ' ', ' ' }, - { "Reset", "Reset font selections", - NULL, clearX11Fonts, NULL, NULL, ' ', ' ', ' ' }, - { " fmsc", "Standard miscellaneous fonts", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_MISC }, - { " f75", "75 DPI fonts", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_75 }, - { " f100", "100 DPI fonts", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_100 }, - { " fcyr", "Cyrillic Fonts", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_CYR }, - { " ft1", "Type1 scalable fonts", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_T1 }, - { " ftt", "TrueType scalable fonts", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_TT }, - { NULL } }, -}; - -DMenu MenuXOrgSelectServer = { - DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, - "X.Org X Server selection.", - "Please check off the types of X servers you wish to install.\n", - NULL, - NULL, - { { "X Exit", "Exit this menu (returning to previous)", - checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, - { "All", "Select all of the above", - NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' }, - { "Reset", "Reset all of the above", - NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' }, - { " srv", "Standard Graphics Framebuffer", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_SERVER }, - { " nest", "Nested X Server", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_NESTSERVER }, - { " vfb", "Virtual Framebuffer", - dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_VFBSERVER }, - { NULL } }, -}; - DMenu MenuDiskDevices = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select Drive(s)", diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 0263bf6..64ee7a7 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -474,16 +474,9 @@ extern DMenu MenuDiskDevices; /* Disk type devices */ extern DMenu MenuSubDistributions; /* Custom distribution menu */ extern DMenu MenuSrcDistributions; /* Source distribution menu */ extern DMenu MenuKernelDistributions;/* Kernel distribution menu */ -extern DMenu MenuXOrg; /* X.Org main menu */ -extern DMenu MenuXOrgSelect; /* X.Org distribution selection menu */ -extern DMenu MenuXOrgSelectCore; /* X.Org core distribution menu */ -extern DMenu MenuXOrgSelectServer; /* X.Org server distribution menu */ -extern DMenu MenuXOrgSelectFonts; /* X.Org font selection menu */ -extern DMenu MenuXDesktops; /* X Desktops menu */ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */ extern DMenu MenuUsermgmt; /* User management menu */ extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ -extern DMenu MenuXOrgConfig; /* Select X.Org configuration tool */ extern int FixItMode; /* FixItMode starts shell on current device (ie Serial port) */ extern const char * StartName; /* Which name we were started as */ extern int NCpus; /* # cpus on machine */ @@ -613,7 +606,6 @@ extern int distSetXUser(dialogMenuItem *self); extern int distSetMinimum(dialogMenuItem *self); extern int distSetEverything(dialogMenuItem *self); extern int distSetSrc(dialogMenuItem *self); -extern int distSetXOrg(dialogMenuItem *self); extern int distSetKernel(dialogMenuItem *self); extern int distExtractAll(dialogMenuItem *self); extern int selectKernel(void); |