From 8b6ecf92cfdf0e6df4fd803e2c9ac672e08fff3c Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 23 May 1997 18:54:29 +0000 Subject: [PATCH] Merge from 2.2 - XiG support updates. --- release/sysinstall/config.c | 66 ++++++++++++++++++------------------ release/sysinstall/menus.c | 7 ++-- usr.sbin/sade/config.c | 66 ++++++++++++++++++------------------ usr.sbin/sade/menus.c | 7 ++-- usr.sbin/sysinstall/config.c | 66 ++++++++++++++++++------------------ usr.sbin/sysinstall/menus.c | 7 ++-- 6 files changed, 114 insertions(+), 105 deletions(-) diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 6be5aa94203c..bdc5bb38d051 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.91 1997/05/05 06:32:43 jkh Exp $ + * $Id: config.c,v 1.92 1997/05/22 21:26:09 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -496,9 +496,35 @@ configXFree86(dialogMenuItem *self) dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; -#endif systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); -#ifdef USE_XIG_ENVIRONMENT + config = variable_get(VAR_XF86_CONFIG); + if (!config) + return DITEM_FAILURE | DITEM_RESTORE; + execfile = string_concat("/usr/X11R6/bin/", config); + if (file_executable(execfile)) { + dialog_clear_norefresh(); + if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) + dmenuOpenSimple(&MenuMouse, FALSE); + dialog_clear(); + systemExecute(execfile); + return DITEM_SUCCESS | DITEM_RESTORE; + } + else { + dialog_clear_norefresh(); + msgConfirm("XFree86 does not appear to be installed! Please install\n" + "The XFree86 distribution before attempting to configure it."); + return DITEM_FAILURE | DITEM_RESTORE; + } + +#else /* USE_XIG_ENVIRONMENT */ + + /* Pre-extract base sets in kludge to work around chicken-and-egg problem with CDE and Xaccel */ + if (directory_exists("/dist/CDE") && !file_readable("/usr/X11R6/bin/xterm")) { + msgNotify("Installing bootstrap X11 tools from CDE distribution."); + systemExecute("tar xpf /dist/CDE/FreeBSD/packages/X11-RUN/archive -C /"); + systemExecute("tar xpf /dist/CDE/FreeBSD/packages/X11-PRG/archive -C /"); + } + systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); if (!file_readable("/usr/X11R6/lib/X11/AcceleratedX/bin/Xinstall") || !file_readable("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup")) { dialog_clear_norefresh(); @@ -522,6 +548,10 @@ configXFree86(dialogMenuItem *self) "to support@cdrom.com or call +1 510 603 1234). Thank you!", i); return DITEM_FAILURE | DITEM_RESTORE; } + else { + dialog_clear(); + systemExecute("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup"); + } if (directory_exists("/dist/CDE")) { dialog_clear_norefresh(); msgNotify("Running CDE installation - please wait (this may take awhile!)."); @@ -537,38 +567,8 @@ configXFree86(dialogMenuItem *self) "to it will actually be /cdrom/CDE/dtinstall when you run it later).\n"); } } - if ((i = vsystem("/usr/X11R6/lib/X11/AcceleratedX/bin/Xinstall"))) { - dialog_clear_norefresh(); - msgConfirm("Installation procedure failed, error code %d! Please report\n" - "error to Walnut Creek CDROM tech support (either send email\n" - "to support@cdrom.com or call +1 510 603 1234). Thank you!", i); - return DITEM_FAILURE | DITEM_RESTORE; - } - dialog_clear(); - systemExecute("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup"); return DITEM_SUCCESS | DITEM_RESTORE; } - -#else /* !USE_XIG_ENVIRONMENT */ - - config = variable_get(VAR_XF86_CONFIG); - if (!config) - return DITEM_FAILURE | DITEM_RESTORE; - execfile = string_concat("/usr/X11R6/bin/", config); - if (file_executable(execfile)) { - dialog_clear_norefresh(); - if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) - dmenuOpenSimple(&MenuMouse, FALSE); - dialog_clear(); - systemExecute(execfile); - return DITEM_SUCCESS | DITEM_RESTORE; - } - else { - dialog_clear_norefresh(); - msgConfirm("XFree86 does not appear to be installed! Please install\n" - "The XFree86 distribution before attempting to configure it."); - return DITEM_FAILURE | DITEM_RESTORE; - } #endif /* USE_XIG_ENVIRONMENT */ } diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index 431807d2f2ea..ca6dc60f0379 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.133 1997/05/22 00:17:10 jkh Exp $ + * $Id: menus.c,v 1.134 1997/05/22 21:26:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -732,7 +732,10 @@ DMenu MenuSubDistributions = { srcFlagCheck, distSetSrc }, { "ports", "The FreeBSD Ports collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS }, -#ifndef USE_XIG_ENVIRONMENT +#ifdef USE_XIG_ENVIRONMENT + { "Xaccel", "The XiG AcceleratedX 3.1 distribution", + dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XIG_SERVER }, +#else { "XFree86", "The XFree86 3.2 distribution", x11FlagCheck, distSetXF86 }, #endif diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 6be5aa94203c..bdc5bb38d051 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.91 1997/05/05 06:32:43 jkh Exp $ + * $Id: config.c,v 1.92 1997/05/22 21:26:09 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -496,9 +496,35 @@ configXFree86(dialogMenuItem *self) dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; -#endif systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); -#ifdef USE_XIG_ENVIRONMENT + config = variable_get(VAR_XF86_CONFIG); + if (!config) + return DITEM_FAILURE | DITEM_RESTORE; + execfile = string_concat("/usr/X11R6/bin/", config); + if (file_executable(execfile)) { + dialog_clear_norefresh(); + if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) + dmenuOpenSimple(&MenuMouse, FALSE); + dialog_clear(); + systemExecute(execfile); + return DITEM_SUCCESS | DITEM_RESTORE; + } + else { + dialog_clear_norefresh(); + msgConfirm("XFree86 does not appear to be installed! Please install\n" + "The XFree86 distribution before attempting to configure it."); + return DITEM_FAILURE | DITEM_RESTORE; + } + +#else /* USE_XIG_ENVIRONMENT */ + + /* Pre-extract base sets in kludge to work around chicken-and-egg problem with CDE and Xaccel */ + if (directory_exists("/dist/CDE") && !file_readable("/usr/X11R6/bin/xterm")) { + msgNotify("Installing bootstrap X11 tools from CDE distribution."); + systemExecute("tar xpf /dist/CDE/FreeBSD/packages/X11-RUN/archive -C /"); + systemExecute("tar xpf /dist/CDE/FreeBSD/packages/X11-PRG/archive -C /"); + } + systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); if (!file_readable("/usr/X11R6/lib/X11/AcceleratedX/bin/Xinstall") || !file_readable("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup")) { dialog_clear_norefresh(); @@ -522,6 +548,10 @@ configXFree86(dialogMenuItem *self) "to support@cdrom.com or call +1 510 603 1234). Thank you!", i); return DITEM_FAILURE | DITEM_RESTORE; } + else { + dialog_clear(); + systemExecute("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup"); + } if (directory_exists("/dist/CDE")) { dialog_clear_norefresh(); msgNotify("Running CDE installation - please wait (this may take awhile!)."); @@ -537,38 +567,8 @@ configXFree86(dialogMenuItem *self) "to it will actually be /cdrom/CDE/dtinstall when you run it later).\n"); } } - if ((i = vsystem("/usr/X11R6/lib/X11/AcceleratedX/bin/Xinstall"))) { - dialog_clear_norefresh(); - msgConfirm("Installation procedure failed, error code %d! Please report\n" - "error to Walnut Creek CDROM tech support (either send email\n" - "to support@cdrom.com or call +1 510 603 1234). Thank you!", i); - return DITEM_FAILURE | DITEM_RESTORE; - } - dialog_clear(); - systemExecute("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup"); return DITEM_SUCCESS | DITEM_RESTORE; } - -#else /* !USE_XIG_ENVIRONMENT */ - - config = variable_get(VAR_XF86_CONFIG); - if (!config) - return DITEM_FAILURE | DITEM_RESTORE; - execfile = string_concat("/usr/X11R6/bin/", config); - if (file_executable(execfile)) { - dialog_clear_norefresh(); - if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) - dmenuOpenSimple(&MenuMouse, FALSE); - dialog_clear(); - systemExecute(execfile); - return DITEM_SUCCESS | DITEM_RESTORE; - } - else { - dialog_clear_norefresh(); - msgConfirm("XFree86 does not appear to be installed! Please install\n" - "The XFree86 distribution before attempting to configure it."); - return DITEM_FAILURE | DITEM_RESTORE; - } #endif /* USE_XIG_ENVIRONMENT */ } diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index 431807d2f2ea..ca6dc60f0379 100644 --- a/usr.sbin/sade/menus.c +++ b/usr.sbin/sade/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.133 1997/05/22 00:17:10 jkh Exp $ + * $Id: menus.c,v 1.134 1997/05/22 21:26:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -732,7 +732,10 @@ DMenu MenuSubDistributions = { srcFlagCheck, distSetSrc }, { "ports", "The FreeBSD Ports collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS }, -#ifndef USE_XIG_ENVIRONMENT +#ifdef USE_XIG_ENVIRONMENT + { "Xaccel", "The XiG AcceleratedX 3.1 distribution", + dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XIG_SERVER }, +#else { "XFree86", "The XFree86 3.2 distribution", x11FlagCheck, distSetXF86 }, #endif diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 6be5aa94203c..bdc5bb38d051 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.91 1997/05/05 06:32:43 jkh Exp $ + * $Id: config.c,v 1.92 1997/05/22 21:26:09 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -496,9 +496,35 @@ configXFree86(dialogMenuItem *self) dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; -#endif systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); -#ifdef USE_XIG_ENVIRONMENT + config = variable_get(VAR_XF86_CONFIG); + if (!config) + return DITEM_FAILURE | DITEM_RESTORE; + execfile = string_concat("/usr/X11R6/bin/", config); + if (file_executable(execfile)) { + dialog_clear_norefresh(); + if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) + dmenuOpenSimple(&MenuMouse, FALSE); + dialog_clear(); + systemExecute(execfile); + return DITEM_SUCCESS | DITEM_RESTORE; + } + else { + dialog_clear_norefresh(); + msgConfirm("XFree86 does not appear to be installed! Please install\n" + "The XFree86 distribution before attempting to configure it."); + return DITEM_FAILURE | DITEM_RESTORE; + } + +#else /* USE_XIG_ENVIRONMENT */ + + /* Pre-extract base sets in kludge to work around chicken-and-egg problem with CDE and Xaccel */ + if (directory_exists("/dist/CDE") && !file_readable("/usr/X11R6/bin/xterm")) { + msgNotify("Installing bootstrap X11 tools from CDE distribution."); + systemExecute("tar xpf /dist/CDE/FreeBSD/packages/X11-RUN/archive -C /"); + systemExecute("tar xpf /dist/CDE/FreeBSD/packages/X11-PRG/archive -C /"); + } + systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); if (!file_readable("/usr/X11R6/lib/X11/AcceleratedX/bin/Xinstall") || !file_readable("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup")) { dialog_clear_norefresh(); @@ -522,6 +548,10 @@ configXFree86(dialogMenuItem *self) "to support@cdrom.com or call +1 510 603 1234). Thank you!", i); return DITEM_FAILURE | DITEM_RESTORE; } + else { + dialog_clear(); + systemExecute("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup"); + } if (directory_exists("/dist/CDE")) { dialog_clear_norefresh(); msgNotify("Running CDE installation - please wait (this may take awhile!)."); @@ -537,38 +567,8 @@ configXFree86(dialogMenuItem *self) "to it will actually be /cdrom/CDE/dtinstall when you run it later).\n"); } } - if ((i = vsystem("/usr/X11R6/lib/X11/AcceleratedX/bin/Xinstall"))) { - dialog_clear_norefresh(); - msgConfirm("Installation procedure failed, error code %d! Please report\n" - "error to Walnut Creek CDROM tech support (either send email\n" - "to support@cdrom.com or call +1 510 603 1234). Thank you!", i); - return DITEM_FAILURE | DITEM_RESTORE; - } - dialog_clear(); - systemExecute("/usr/X11R6/lib/X11/AcceleratedX/bin/Xsetup"); return DITEM_SUCCESS | DITEM_RESTORE; } - -#else /* !USE_XIG_ENVIRONMENT */ - - config = variable_get(VAR_XF86_CONFIG); - if (!config) - return DITEM_FAILURE | DITEM_RESTORE; - execfile = string_concat("/usr/X11R6/bin/", config); - if (file_executable(execfile)) { - dialog_clear_norefresh(); - if (!file_readable("/dev/mouse") && !msgYesNo("Does this system have a mouse attached to it?")) - dmenuOpenSimple(&MenuMouse, FALSE); - dialog_clear(); - systemExecute(execfile); - return DITEM_SUCCESS | DITEM_RESTORE; - } - else { - dialog_clear_norefresh(); - msgConfirm("XFree86 does not appear to be installed! Please install\n" - "The XFree86 distribution before attempting to configure it."); - return DITEM_FAILURE | DITEM_RESTORE; - } #endif /* USE_XIG_ENVIRONMENT */ } diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index 431807d2f2ea..ca6dc60f0379 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.133 1997/05/22 00:17:10 jkh Exp $ + * $Id: menus.c,v 1.134 1997/05/22 21:26:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -732,7 +732,10 @@ DMenu MenuSubDistributions = { srcFlagCheck, distSetSrc }, { "ports", "The FreeBSD Ports collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS }, -#ifndef USE_XIG_ENVIRONMENT +#ifdef USE_XIG_ENVIRONMENT + { "Xaccel", "The XiG AcceleratedX 3.1 distribution", + dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XIG_SERVER }, +#else { "XFree86", "The XFree86 3.2 distribution", x11FlagCheck, distSetXF86 }, #endif