1995-04-27 12:50:35 +00:00
|
|
|
/*
|
|
|
|
* The new sysinstall program.
|
|
|
|
*
|
|
|
|
* This is probably the last program in the `sysinstall' line - the next
|
|
|
|
* generation being essentially a complete rewrite.
|
|
|
|
*
|
1995-05-04 03:51:22 +00:00
|
|
|
* $Id: menus.c,v 1.4 1995/05/01 21:56:25 jkh Exp $
|
1995-04-27 12:50:35 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 1995
|
|
|
|
* Jordan Hubbard. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer,
|
|
|
|
* verbatim and that no modifications are made prior to this
|
|
|
|
* point in the file.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by Jordan Hubbard
|
|
|
|
* for the FreeBSD Project.
|
|
|
|
* 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
|
|
|
|
* endorse or promote products derived from this software without specific
|
|
|
|
* prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "sysinstall.h"
|
|
|
|
|
|
|
|
/* All the system menus go here.
|
|
|
|
*
|
|
|
|
* Hardcoded things like version number strings will disappear from
|
|
|
|
* these menus just as soon as I add the code for doing inline variable
|
|
|
|
* expansion.
|
|
|
|
*/
|
|
|
|
|
1995-05-01 21:56:32 +00:00
|
|
|
/* Forward decls for submenus */
|
1995-04-27 18:03:55 +00:00
|
|
|
extern DMenu MenuDocumentation;
|
|
|
|
extern DMenu MenuMedia;
|
|
|
|
extern DMenu MenuInstallType;
|
|
|
|
extern DMenu MenuInstallOptions;
|
1995-05-01 21:56:32 +00:00
|
|
|
extern DMenu MenuDistributions;
|
1995-04-27 18:03:55 +00:00
|
|
|
|
1995-04-29 19:33:06 +00:00
|
|
|
/* The initial installation menu */
|
1995-04-27 12:50:35 +00:00
|
|
|
DMenu MenuInitial = {
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_NORMAL_TYPE,
|
1995-04-27 18:03:55 +00:00
|
|
|
"Welcome to FreeBSD 2.0.5!", /* title */
|
|
|
|
"This is the main menu of the FreeBSD installation system. Please\n\
|
1995-04-27 12:50:35 +00:00
|
|
|
select one of the options below by using the arrow keys or typing the\n\
|
|
|
|
first character of the option name you're interested in. Invoke an\n\
|
1995-04-27 18:03:55 +00:00
|
|
|
option by pressing enter.", /* prompt */
|
1995-05-01 21:56:32 +00:00
|
|
|
"Press F1 for usage instructions", /* help line */
|
|
|
|
"usage.hlp", /* help file */
|
1995-04-29 19:33:06 +00:00
|
|
|
{ { "Usage", "Quick start - How to use this menu system.", /* U */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_DISPLAY_FILE, (void *)"usage.hlp", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "Doc", "More detailed documentation on FreeBSD.", /* D */
|
|
|
|
DMENU_SUBMENU, (void *)&MenuDocumentation, 0 },
|
|
|
|
{ "Lang", "Select natural language options.", /* L */
|
|
|
|
DMENU_SUBMENU, (void *)&MenuLanguage, 0 },
|
1995-05-04 03:51:22 +00:00
|
|
|
{ "Install", "Begin installation", /* I */
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_CALL, (void *)installCustom, 0 },
|
1995-05-01 21:56:32 +00:00
|
|
|
{ "Bootmsg", "Read the boot messages again.", /* B */
|
|
|
|
DMENU_SYSTEM_COMMAND_BOX, (void *)"dmesg", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ NULL } },
|
1995-04-27 18:03:55 +00:00
|
|
|
};
|
|
|
|
|
1995-04-29 19:33:06 +00:00
|
|
|
/* The main documentation menu */
|
1995-04-27 18:03:55 +00:00
|
|
|
DMenu MenuDocumentation = {
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_NORMAL_TYPE,
|
1995-04-27 18:03:55 +00:00
|
|
|
"Documentation for FreeBSD 2.0.5", /* Title */
|
1995-04-29 19:33:06 +00:00
|
|
|
"If you are at all unsure about the configuration of your hardware\n\
|
1995-04-27 18:03:55 +00:00
|
|
|
or are looking to build a system specifically for FreeBSD, read the\n\
|
|
|
|
Hardware guide! New users should also read the Install document for\n\
|
|
|
|
a step-by-step tutorial on installing FreeBSD. For general information,\n\
|
|
|
|
consult the README file. If you're having other problems, you may find\n\
|
|
|
|
answers in the FAQ.",
|
1995-05-01 21:56:32 +00:00
|
|
|
"Confused? Press F1 for help.",
|
|
|
|
"usage.hlp", /* help file */
|
1995-04-29 19:33:06 +00:00
|
|
|
{ { "README", "Read this for a general description of FreeBSD", /* R */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_DISPLAY_FILE, (void *)"readme.hlp", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "Hardware", "The FreeBSD survival guide for PC hardware.", /* H */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_DISPLAY_FILE, (void *)"hardware.hlp", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "Install", "A step-by-step guide to installing FreeBSD.", /* I */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_DISPLAY_FILE, (void *)"install.hlp", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_DISPLAY_FILE, (void *)"faq.hlp", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ NULL } },
|
1995-04-27 18:03:55 +00:00
|
|
|
};
|
|
|
|
|
1995-04-29 19:33:06 +00:00
|
|
|
/* The language selection menu */
|
|
|
|
/*
|
|
|
|
* Note: The RADIO menus use a slightly different syntax. If an item
|
|
|
|
* name starts with `*', it's considered to be "ON" by default,
|
|
|
|
* otherwise off.
|
|
|
|
*/
|
1995-04-27 18:03:55 +00:00
|
|
|
DMenu MenuLanguage = {
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
|
1995-04-27 18:03:55 +00:00
|
|
|
"Natural language selection", /* title */
|
1995-04-29 19:33:06 +00:00
|
|
|
"Please specify the language you'd like to use by default.\n\n\
|
1995-05-01 21:56:32 +00:00
|
|
|
While almost all of the system's documentation is still written\n\
|
|
|
|
in english (and may never be translated), there are a few guides\n\
|
|
|
|
and types of system documentation that may be written in your\n\
|
1995-04-27 18:03:55 +00:00
|
|
|
preferred language. When such are found, they will be used instead\n\
|
|
|
|
of the english versions.", /* prompt */
|
|
|
|
"Press F1 for more information", /* help line */
|
1995-05-01 21:56:32 +00:00
|
|
|
"language.hlp", /* help file */
|
1995-04-29 19:33:06 +00:00
|
|
|
{ { "Danish", "Danish language and character set (ISO-8859-1)", /* D */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=da_DK.ISO8859-1", 0 },
|
|
|
|
{ "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */
|
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=nl_NL.ISO8859-1", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "*English", "English language (system default)", /* E */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=en_US.ISO8859-1", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "French", "French language and character set (ISO-8859-1)", /* F */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=fr_FR.ISO8859-1", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "German", "German language and character set (ISO-8859-1)", /* G */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=de_DE.ISO8859-1", 0 },
|
|
|
|
{ "Italian", "Italian language and character set (ISO-8859-1)", /* I */
|
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=it_IT.ISO8859-1", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "Japanese", "Japanese language and character set (JIS?)", /* J */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=ja_JP.EUC", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ "Russian", "Russian language and character set (cp866-8x14)", /* R */
|
1995-05-01 21:56:32 +00:00
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=ru_SU.KOI8-R", 0 },
|
|
|
|
{ "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */
|
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=es_ES.ISO8859-1", 0 },
|
1995-05-04 03:51:22 +00:00
|
|
|
{ "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */
|
|
|
|
DMENU_SET_VARIABLE, (void *)"LANG=sv_SV.ISO8859-1", 0 },
|
1995-04-29 19:33:06 +00:00
|
|
|
{ NULL } },
|
1995-04-27 12:50:35 +00:00
|
|
|
};
|
1995-04-27 18:03:55 +00:00
|
|
|
|
1995-04-29 19:33:06 +00:00
|
|
|
/* The media selection menu */
|
1995-04-27 18:03:55 +00:00
|
|
|
DMenu MenuMedia = {
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_NORMAL_TYPE,
|
1995-04-27 18:03:55 +00:00
|
|
|
"Choose Installation Media",
|
|
|
|
"FreeBSD can be installed from a variety of different installation\n\
|
1995-05-01 21:56:32 +00:00
|
|
|
media, ranging from floppies to the Internet. If you're installing\n\
|
|
|
|
FreeBSD from a supported CDROM drive then this is generally the best\n\
|
|
|
|
method to use unless you have some overriding reason for using another\n\
|
|
|
|
method. Please also note that the DES distribution is NOT available on \n\
|
|
|
|
CDROM due to U.S. export restrictions.",
|
1995-04-29 19:33:06 +00:00
|
|
|
"Press F1 for more information on the various media types",
|
1995-05-01 21:56:32 +00:00
|
|
|
"media.hlp",
|
1995-04-29 19:33:06 +00:00
|
|
|
{ { "CDROM", "Install from a FreeBSD CDROM",
|
|
|
|
DMENU_CALL, (void *)mediaSetCDROM, 0 },
|
|
|
|
{ "FLOPPY", "Install from a floppy disk set",
|
|
|
|
DMENU_CALL, (void *)mediaSetFloppy, 0 },
|
|
|
|
{ "DOS", "Install from a DOS partition",
|
|
|
|
DMENU_CALL, (void *)mediaSetDOS, 0 },
|
|
|
|
{ "TAPE", "Install from SCSI or QIC tape",
|
|
|
|
DMENU_CALL, (void *)mediaSetTape, 0 },
|
|
|
|
{ "FTP", "Install from an Internet FTP server",
|
|
|
|
DMENU_CALL, (void *)mediaSetFTP, 0 },
|
|
|
|
{ "FILESYSTEM", "Install from a UFS or NFS mounted distribution",
|
|
|
|
DMENU_CALL, (void *)mediaSetFS, 0 },
|
|
|
|
{ NULL } },
|
1995-04-27 18:03:55 +00:00
|
|
|
};
|
|
|
|
|
1995-04-29 19:33:06 +00:00
|
|
|
/* The installation type menu */
|
1995-04-27 18:03:55 +00:00
|
|
|
DMenu MenuInstallType = {
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_NORMAL_TYPE,
|
1995-04-27 18:03:55 +00:00
|
|
|
"Choose Installation Type",
|
1995-05-01 21:56:32 +00:00
|
|
|
"As a convenience, we provide several `canned' installation types. \
|
|
|
|
These pick what we consider to be the most reasonable defaults for the \
|
|
|
|
type of system in question. If you would prefer to pick and choose \
|
|
|
|
the list of distributions yourself, simply select `custom'.",
|
|
|
|
"Press F1 for more information on the various distributions",
|
|
|
|
"install_types.hlp",
|
|
|
|
{ { "Developer", "Includes full sources, binaries and doc but no games.",
|
|
|
|
DMENU_CALL, (void *)installSetDeveloper, 0 },
|
|
|
|
{ "X-Developer", "Same as above, but includes XFree86.",
|
|
|
|
DMENU_CALL, (void *)installSetXDeveloper, 0 },
|
|
|
|
{ "User", "General user. Binaries and doc but no sources.",
|
|
|
|
DMENU_CALL, (void *)installSetUser, 0 },
|
|
|
|
{ "X-User", "Same as above, but includes XFree86.",
|
|
|
|
DMENU_CALL, (void *)installSetXUser, 0 },
|
|
|
|
{ "Minimal", "The smallest configuration possible.",
|
|
|
|
DMENU_CALL, (void *)installSetMinimum, 0 },
|
|
|
|
{ "Everything", "The entire kitchen sink, plus bedroom suite.",
|
|
|
|
DMENU_CALL, (void *)installSetEverything, 0 },
|
|
|
|
{ "Custom", "I don't want it canned! I want to drive!",
|
|
|
|
DMENU_SUBMENU, (void *)&MenuDistributions, 0 },
|
|
|
|
{ NULL } },
|
|
|
|
};
|
|
|
|
|
|
|
|
DMenu MenuDistributions = {
|
|
|
|
DMENU_MULTIPLE_TYPE,
|
|
|
|
"Select the distributions you wish to install.",
|
|
|
|
"Please check off the distributions you wish to install.",
|
|
|
|
"Press F1 for a more complete description of these distributions.",
|
|
|
|
"distribution_types.hlp",
|
|
|
|
{ { "*bin", "Binary base distribution (required)",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "commercial", "Commercial demos and shareware",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "compat1x", "FreeBSD 1.x binary compatability package",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "DES", "DES encryption code and sources",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "dict", "Spelling checker disctionary files",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "games", "Games and other amusements (non-commercial)",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "info", "GNU info files",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "man", "System manual pages - strongly recommended",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "proflibs", "Profiled versions of the libraries",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "src", "Sources for everything but DES",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ "XFree86", "The XFree86 3.1.1 distribution",
|
|
|
|
DMENU_NOP, NULL, 0 },
|
|
|
|
{ NULL } },
|
1995-04-27 18:03:55 +00:00
|
|
|
};
|
|
|
|
|
1995-04-29 19:33:06 +00:00
|
|
|
/* The installation options menu */
|
1995-04-27 18:03:55 +00:00
|
|
|
DMenu MenuInstallOptions = {
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_NORMAL_TYPE,
|
1995-04-27 18:03:55 +00:00
|
|
|
"Choose Installation Options",
|
|
|
|
"blah blah",
|
|
|
|
NULL,
|
|
|
|
NULL,
|
1995-04-29 19:33:06 +00:00
|
|
|
{ { NULL } },
|
1995-04-27 18:03:55 +00:00
|
|
|
};
|
|
|
|
|
1995-05-01 21:56:32 +00:00
|
|
|
DMenu MenuDiskDevices = {
|
|
|
|
DMENU_MULTIPLE_TYPE,
|
|
|
|
"Select Drive(s)",
|
|
|
|
"Please select the drive, or drives, on which you wish to install\n\
|
|
|
|
FreeBSD. You need to select at least one drive containing some free\n\
|
|
|
|
space, though FreeBSD can be installed across several drives if you do\n\
|
|
|
|
not have the required space on a single drive. If you wish to boot\n\
|
1995-05-04 03:51:22 +00:00
|
|
|
off a drive that's not a `zero drive', or have multiple operating\n\
|
|
|
|
systems on your machine, you will have the option to install a boot\n\
|
|
|
|
manager later.",
|
1995-05-01 21:56:32 +00:00
|
|
|
"Press F1 for more information on what you see here.",
|
1995-05-04 03:51:22 +00:00
|
|
|
"drives.hlp",
|
1995-05-01 21:56:32 +00:00
|
|
|
{ { NULL } },
|
|
|
|
};
|
|
|
|
|
1995-04-29 19:33:06 +00:00
|
|
|
/* The main installation menu */
|
1995-04-27 18:03:55 +00:00
|
|
|
DMenu MenuInstall = {
|
1995-04-29 19:33:06 +00:00
|
|
|
DMENU_NORMAL_TYPE,
|
1995-04-27 18:03:55 +00:00
|
|
|
"Choose Installation Options", /* title */
|
|
|
|
"Before installation can continue, you need to specify a few items\n\
|
|
|
|
of information regarding the location of the distribution and the kind\n\
|
|
|
|
of installation you want to have (and where). There are also a number\n\
|
|
|
|
of options you can specify in the Options menu. If you do not wish to\n\
|
|
|
|
install FreeBSD at this time, you may select Cancel to leave this menu",
|
|
|
|
"You may wish to read the install guide - press F1 to do so",
|
1995-05-01 21:56:32 +00:00
|
|
|
"install.hlp",
|
1995-04-29 19:33:06 +00:00
|
|
|
{ { "Media", "Choose Installation media type", /* M */
|
|
|
|
DMENU_SUBMENU, (void *)&MenuMedia, 0 },
|
|
|
|
{ "Type", "Choose the type of installation you want", /* T */
|
|
|
|
DMENU_SUBMENU, (void *)&MenuInstallType, 0 },
|
|
|
|
{ "Options", "Specify installation options", /* O */
|
|
|
|
DMENU_SUBMENU, (void *)&MenuInstallOptions, 0 },
|
|
|
|
{ "Proceed", "Proceed with installation", /* P */
|
|
|
|
DMENU_CANCEL, (void *)NULL, 0 },
|
|
|
|
{ NULL } },
|
1995-04-27 18:03:55 +00:00
|
|
|
};
|
|
|
|
|