aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2003-01-17 19:05:32 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2003-01-17 19:05:32 +0000
commit4b6c29cebcdb48c45e47ea3539a71f5bef3735a6 (patch)
tree5693ab9d8e2cce0b997fefaa64f9d54c4151f882 /usr.sbin/sade
parentd1a079fb0d55e089f9c8c0365ff1586109b8b7e8 (diff)
Notes
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/dispatch.c2
-rw-r--r--usr.sbin/sade/install.c19
-rw-r--r--usr.sbin/sade/menus.c98
-rw-r--r--usr.sbin/sade/sade.h13
4 files changed, 91 insertions, 41 deletions
diff --git a/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c
index 7a7584a0e485..17b5e9a49d60 100644
--- a/usr.sbin/sade/dispatch.c
+++ b/usr.sbin/sade/dispatch.c
@@ -88,7 +88,7 @@ static struct _word {
{ "installExpress", installExpress },
{ "installStandard", installStandard },
{ "installUpgrade", installUpgrade },
- { "installFixupBin", installFixupBin },
+ { "installFixupBase", installFixupBase },
#ifndef X_AS_PKG
{ "installFixupXFree", installFixupXFree },
#endif
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index e1763ec8b424..359040546191 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -797,7 +797,7 @@ installConfigure(void)
}
int
-installFixupBin(dialogMenuItem *self)
+installFixupBase(dialogMenuItem *self)
{
Device **devs;
char *cp;
@@ -843,19 +843,7 @@ installFixupBin(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_RESTORE;
}
-int
-installPackage(dialogMenuItem *self, char *desc, char *package)
-{
- WINDOW *w = savescr();
- int i;
-
- dialog_clear_norefresh();
- msgNotify("Installing %s package...", desc);
- i = package_add(package);
- restorescr(w);
- return i;
-}
-
+#ifndef X_AS_PKG
/* Fix side-effects from the the XFree86 installation */
int
installFixupXFree(dialogMenuItem *self)
@@ -867,17 +855,16 @@ installFixupXFree(dialogMenuItem *self)
vsystem("chmod -R a+r /usr/X11R6");
vsystem("find /usr/X11R6 -type d | xargs chmod a+x");
-#ifndef X_AS_PKG
/* Also do bogus minimal package registration so ports don't whine */
if (file_readable("/usr/X11R6/lib/X11/pkgreg.tar.gz")) {
dialog_clear_norefresh();
msgNotify("Installing package metainfo..");
vsystem("tar xpzf /usr/X11R6/lib/X11/pkgreg.tar.gz -C / && rm /usr/X11R6/lib/X11/pkgreg.tar.gz");
}
-#endif
}
return DITEM_SUCCESS | DITEM_RESTORE;
}
+#endif
#define QUEUE_YES 1
#define QUEUE_NO 0
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index be89f05160fc..4c37d18f8fc9 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -60,7 +60,6 @@ clearSrc(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_REDRAW;
}
-#ifndef X_AS_PKG
static int
setX11Misc(dialogMenuItem *self)
{
@@ -109,7 +108,6 @@ clearX11Fonts(dialogMenuItem *self)
XF86FontDists = 0;
return DITEM_SUCCESS | DITEM_REDRAW;
}
-#endif /* !X_AS_PKG */
#define _IS_SET(dist, set) (((dist) & (set)) == (set))
@@ -166,13 +164,9 @@ checkDistEverything(dialogMenuItem *self)
{
return Dists == DIST_ALL && CRYPTODists == DIST_CRYPTO_ALL &&
_IS_SET(SrcDists, DIST_SRC_ALL) &&
-#ifndef X_AS_PKG
_IS_SET(XF86Dists, DIST_XF86_ALL) &&
_IS_SET(XF86ServerDists, DIST_XF86_SERVER_ALL) &&
_IS_SET(XF86FontDists, DIST_XF86_FONTS_ALL);
-#else
- 1;
-#endif
}
static int
@@ -228,9 +222,7 @@ 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 },
-#ifndef X_AS_PKG
{ " Distributions, XFree86","XFree86 distribution menu.", NULL, distSetXF86 },
-#endif
{ " Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
{ " Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "README" },
{ " Doc, Early Adopter's", "Early Adopter's Guide to FreeBSD 5.0.", NULL, dmenuDisplayFile, NULL, "EARLY" },
@@ -296,13 +288,11 @@ 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 },
-#ifndef X_AS_PKG
{ " XFree86, Fonts", "XFree86 Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
{ " XFree86, Server", "XFree86 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
-#if defined(__i386__) && defined(PC98)
+#if !defined(X_AS_PKG) && defined(__i386__) && defined(PC98)
{ " XFree86, PC98 Server", "XFree86 PC98 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server },
#endif
-#endif
{ NULL } },
};
@@ -1006,11 +996,7 @@ DMenu MenuSubDistributions = {
{ " perl", "The Perl distribution",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PERL },
{ " XFree86", "The XFree86 distribution",
-#ifdef X_AS_PKG
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XF86 },
-#else
x11FlagCheck, distSetXF86 },
-#endif
{ NULL } },
};
@@ -1122,7 +1108,6 @@ DMenu MenuXDesktops = {
{ NULL } },
};
-#ifndef X_AS_PKG
DMenu MenuXF86Select = {
DMENU_NORMAL_TYPE,
"XFree86 Distribution",
@@ -1137,6 +1122,87 @@ DMenu MenuXF86Select = {
{ NULL } },
};
+#ifdef X_AS_PKG
+DMenu MenuXF86SelectCore = {
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
+ "XFree86 base distribution types",
+ "Please check off the basic XFree86 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, ' ', ' ', ' ' },
+ { " bin", "Client applications",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CLIENTS },
+ { " lib", "Shared libraries and data files needed at runtime",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
+ { " man", "Manual pages",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN },
+ { " doc", "Documentation",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC },
+ { " prog", "Programming tools",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
+ { NULL } },
+};
+
+DMenu MenuXF86SelectFonts = {
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
+ "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 a server\n\
+(these are selected by default).",
+ 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, ' ', ' ', ' ' },
+ { " fnts", "Standard miscellaneous fonts",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_BITMAPS },
+ { " f75", "75 DPI fonts",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_75 },
+ { " f100", "100 DPI fonts",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 },
+ { " fcyr", "Cyrillic Fonts",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR },
+ { " fscl", "Speedo and Type scalable fonts",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE },
+ { " server", "Font server",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER },
+ { NULL } },
+};
+
+DMenu MenuXF86SelectServer = {
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
+ "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, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_FB },
+ { " nest", "Nested X Server",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_NEST },
+ { " prt", "X Print Server",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_PRINT },
+ { " vfb", "Virtual Framebuffer",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VFB },
+ { NULL } },
+};
+
+#else
DMenu MenuXF86SelectCore = {
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"XFree86 base distribution types",
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 5f19c138764e..68a16c9da046 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -413,11 +413,9 @@ extern Device *mediaDevice; /* Where we're getting our distribution from */
extern unsigned int Dists; /* Which distributions we want */
extern unsigned int CRYPTODists; /* Which naughty distributions we want */
extern unsigned int SrcDists; /* Which src distributions we want */
-#ifndef X_AS_PKG
extern unsigned int XF86Dists; /* Which XFree86 dists we want */
extern unsigned int XF86ServerDists; /* The XFree86 servers we want */
extern unsigned int XF86FontDists; /* The XFree86 fonts we want */
-#endif
extern int BootMgr; /* Which boot manager to use */
extern int StatusLine; /* Where to print our status messages */
extern DMenu MenuInitial; /* Initial installation menu */
@@ -467,13 +465,13 @@ extern DMenu MenuDiskDevices; /* Disk type devices */
extern DMenu MenuSubDistributions; /* Custom distribution menu */
extern DMenu MenuSrcDistributions; /* Source distribution menu */
extern DMenu MenuXF86; /* XFree86 main menu */
-#ifndef X_AS_PKG
extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */
extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */
extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */
+#if !defined(X_AS_PKG) && defined(__i386__) && defined(PC98)
extern DMenu MenuXF86SelectPC98Server; /* XFree86 server distribution menu */
-extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
#endif
+extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuXDesktops; /* Disk devices menu */
extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
extern DMenu MenuUsermgmt; /* User management menu */
@@ -589,9 +587,7 @@ extern int distSetXUser(dialogMenuItem *self);
extern int distSetMinimum(dialogMenuItem *self);
extern int distSetEverything(dialogMenuItem *self);
extern int distSetSrc(dialogMenuItem *self);
-#ifndef X_AS_PKG
extern int distSetXF86(dialogMenuItem *self);
-#endif
extern int distExtractAll(dialogMenuItem *self);
/* dmenu.c */
@@ -663,13 +659,14 @@ extern int installStandard(dialogMenuItem *self);
extern int installFixitHoloShell(dialogMenuItem *self);
extern int installFixitCDROM(dialogMenuItem *self);
extern int installFixitFloppy(dialogMenuItem *self);
-extern int installFixupBin(dialogMenuItem *self);
+extern int installFixupBase(dialogMenuItem *self);
+#ifndef X_AS_PKG
extern int installFixupXFree(dialogMenuItem *self);
+#endif
extern int installUpgrade(dialogMenuItem *self);
extern int installFilesystems(dialogMenuItem *self);
extern int installVarDefaults(dialogMenuItem *self);
extern void installEnvironment(void);
-extern int installPackage(dialogMenuItem *self, char *package, char *desc);
extern Boolean copySelf(void);
/* kget.c */