[Midnightbsd-cvs] src: usr.sbin/sysinstall: Make changes for X.org 7.x.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Jan 21 11:06:31 EST 2008


Log Message:
-----------
Make changes for X.org 7.x.  Assume users want a full X install.

Modified Files:
--------------
    src/usr.sbin/sysinstall:
        dist.c (r1.3 -> r1.4)
        dist.h (r1.2 -> r1.3)
        menus.c (r1.8 -> r1.9)
        sysinstall.h (r1.5 -> r1.6)

-------------- next part --------------
Index: dist.h
===================================================================
RCS file: /home/cvs/src/usr.sbin/sysinstall/dist.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -L usr.sbin/sysinstall/dist.h -L usr.sbin/sysinstall/dist.h -u -r1.2 -r1.3
--- usr.sbin/sysinstall/dist.h
+++ usr.sbin/sysinstall/dist.h
@@ -1,6 +1,6 @@
 /* $FreeBSD: src/usr.sbin/sysinstall/dist.h,v 1.65 2005/06/16 18:16:13 ru Exp $ 
  * $MidnightBSD$
- */
+/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/usr.sbin/sysinstall/dist.h,v 1.67.2.4.2.1 2008/01/14 19:28:43 kensmith Exp $  */
 
 #ifndef _DIST_H_INCLUDE
 #define _DIST_H_INCLUDE
@@ -44,40 +44,10 @@
 #define DIST_SRC_SSECURE	0x20000
 #define DIST_SRC_SKERBEROS5	0x40000
 #define DIST_SRC_RESCUE		0x80000
-#define DIST_SRC_ALL		0xFFFFF
-
-/* Subtypes for X.Org packages */
-#define	DIST_XORG_CLIENTS	0x000001
-#define	DIST_XORG_LIB		0x000002
-#define DIST_XORG_MAN		0x000004
-#define DIST_XORG_DOC		0x000008
-#define DIST_XORG_IMAKE		0x000010
-
-#define	DIST_XORG_SERVER	0x000100
-#define	DIST_XORG_NESTSERVER	0x000200
-#define	DIST_XORG_PRINTSERVER	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_FONTSERVER	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_SRC_ALL		0x3FFFF
+#define DIST_XORG_ALL		0xFFFFF
 /* Canned distribution sets */
 
-#define _DIST_XORG_FONTS_BASE \
-	(DIST_XORG_FONTS_MISC | DIST_XORG_FONTS_75 | DIST_XORG_FONTS_100 | \
-	 DIST_XORG_FONTS_TT)
-
 #define _DIST_USER \
 	( DIST_BASE | DIST_DOC | DIST_MANPAGES | DIST_DICT )
 
Index: dist.c
===================================================================
RCS file: /home/cvs/src/usr.sbin/sysinstall/dist.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -L usr.sbin/sysinstall/dist.c -L usr.sbin/sysinstall/dist.c -u -r1.3 -r1.4
--- usr.sbin/sysinstall/dist.c
+++ usr.sbin/sysinstall/dist.c
@@ -86,9 +86,9 @@
     DTE_TARBALL("lib32",    &Dists, LIB32,    "/"),
 #endif
     DTE_SUBDIST("src",	    &Dists, SRC,      SrcDistTable),
-    DTE_TARBALL("mports",    &Dists, PORTS,    "/usr"),
+    DTE_TARBALL("mports",   &Dists, PORTS,    "/usr"),
     DTE_TARBALL("local",    &Dists, LOCAL,    "/"),
-    DTE_SUBDIST("X.Org",    &Dists, XORG,     XOrgDistTable),
+    DTE_PACKAGE("X.Org",    &Dists, XORG,     "xorg"),
     { NULL },
 };
 
@@ -117,29 +117,6 @@
     { NULL },
 };
 
-/* The X.Org distribution */
-static Distribution XOrgDistTable[] = {
-    DTE_PACKAGE("Xbin",	 &XOrgDists, XORG_CLIENTS,	 "xorg-clients"),
-    DTE_PACKAGE("Xlib",	 &XOrgDists, XORG_LIB,		 "xorg-libraries"),
-    DTE_PACKAGE("Xman",	 &XOrgDists, XORG_MAN,		 "xorg-manpages"),
-    DTE_PACKAGE("Xdoc",  &XOrgDists, XORG_DOC,		 "xorg-documents"),
-    DTE_PACKAGE("Xprog", &XOrgDists, XORG_IMAKE,	 "imake"),
-
-    DTE_PACKAGE("Xsrv",  &XOrgDists, XORG_SERVER,	 "xorg-server"),
-    DTE_PACKAGE("Xnest", &XOrgDists, XORG_NESTSERVER,	 "xorg-nestserver"),
-    DTE_PACKAGE("Xprt",  &XOrgDists, XORG_PRINTSERVER,	 "xorg-printserver"),
-    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("Xfs",   &XOrgDists, XORG_FONTSERVER,	 "xorg-fontserver"),
-    { NULL },
-};
-
 static int	distMaybeSetPorts(dialogMenuItem *self);
 
 static void
@@ -189,8 +166,8 @@
 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
@@ -422,18 +399,6 @@
     return i | DITEM_RESTORE;
 }
 
-int
-distSetXOrg(dialogMenuItem *self)
-{
-    int i = DITEM_SUCCESS;
-
-    dialog_clear_norefresh();
-    if (!dmenuOpenSimple(&MenuXOrgSelect, FALSE))
-	i = DITEM_FAILURE;
-    distVerifyFlags();
-    return i | DITEM_RESTORE;
-}
-
 static Boolean got_intr = FALSE;
 
 /* timeout handler */
Index: menus.c
===================================================================
RCS file: /home/cvs/src/usr.sbin/sysinstall/menus.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -L usr.sbin/sysinstall/menus.c -L usr.sbin/sysinstall/menus.c -u -r1.8 -r1.9
--- usr.sbin/sysinstall/menus.c
+++ usr.sbin/sysinstall/menus.c
@@ -57,55 +57,6 @@
     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) || \
@@ -222,7 +173,6 @@
       { " 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",	"Copyright, Shortcuts", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
       { " Doc, Copyright",	"The distribution copyright notices.",	NULL, dmenuDisplayFile,	NULL, "COPYRIGHT" },
       { " Dump Vars",		"(debugging) dump out internal variables.", NULL, dump_variables },
@@ -281,8 +231,6 @@
       { " 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 } },
 };
 
@@ -651,7 +599,7 @@
       { " 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 } },
 };
 
@@ -711,155 +659,6 @@
       { 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_CLIENTS },
-      { " man",         "Manual pages",
-	dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_MAN },
-      { " 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 },
-      { " fs",		"Font server",
-	dmenuFlagCheck,	dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTSERVER },
-      { 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 },
-      { " prt", 	"X Print Server",
-	dmenuFlagCheck,	dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_PRINTSERVER },
-      { " vfb",		"Virtual Framebuffer",
-	dmenuFlagCheck,	dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_VFBSERVER },
-      { NULL } },
-};
-
 DMenu MenuDiskDevices = {
     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
     "Select Drive(s)",
Index: sysinstall.h
===================================================================
RCS file: /home/cvs/src/usr.sbin/sysinstall/sysinstall.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -L usr.sbin/sysinstall/sysinstall.h -L usr.sbin/sysinstall/sysinstall.h -u -r1.5 -r1.6
--- usr.sbin/sysinstall/sysinstall.h
+++ usr.sbin/sysinstall/sysinstall.h
@@ -461,16 +461,9 @@
 extern DMenu		MenuDiskDevices;	/* Disk type devices				*/
 extern DMenu		MenuSubDistributions;	/* Custom distribution menu			*/
 extern DMenu		MenuSrcDistributions;	/* Source 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 onc urrent device (ie Serial port) */
 extern const char *	StartName;		/* Which name we were started as */
 
@@ -592,7 +585,6 @@
 extern int	distSetMinimum(dialogMenuItem *self);
 extern int	distSetEverything(dialogMenuItem *self);
 extern int	distSetSrc(dialogMenuItem *self);
-extern int	distSetXOrg(dialogMenuItem *self);
 extern int	distExtractAll(dialogMenuItem *self);
 
 /* dmenu.c */


More information about the Midnightbsd-cvs mailing list