mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Prettify usetup a bit, show a warranty page before continuing installation (not a license agreement, simply a message stating this is a beta foss product with no warranty), make progressbars have a double border and change the copy file dialog a bit. Also changed setupldr and ntoskrnl to have a more unified text-mode look/appearance when installing. The effect is really nice and the blue screen with gray status-bar appears as soon as the CD boots and takes you all the way to usetup without any breakages or black/blue/black/blue fades and confusing messages. Also, fixed ntoskrnl not to break into KDBG if /NODEBUG is set.
svn path=/trunk/; revision=15394
This commit is contained in:
parent
474cd6a3e3
commit
dfedb99675
10 changed files with 290 additions and 124 deletions
|
@ -756,6 +756,16 @@ LoadAndBootReactOS(PCHAR OperatingSystemName)
|
|||
if (!FrLdrLoadDriver(szHalName, 10))
|
||||
return;
|
||||
|
||||
#if 0
|
||||
/* Load bootvid */
|
||||
strcpy(value, "INBV.DLL");
|
||||
strcpy(szHalName, szBootPath);
|
||||
strcat(szHalName, "SYSTEM32\\");
|
||||
strcat(szHalName, value);
|
||||
|
||||
if (!FrLdrLoadDriver(szHalName, 10))
|
||||
return;
|
||||
#endif
|
||||
/*
|
||||
* Load the System hive from disk
|
||||
*/
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "registry.h"
|
||||
|
||||
|
||||
//#define USE_UI
|
||||
#define USE_UI
|
||||
|
||||
|
||||
static BOOL
|
||||
|
@ -88,7 +88,7 @@ LoadKernel(PCHAR szSourcePath, PCHAR szFileName)
|
|||
* Update the status bar with the current file
|
||||
*/
|
||||
#ifdef USE_UI
|
||||
sprintf(szBuffer, "Reading %s", szShortName);
|
||||
sprintf(szBuffer, "Setup is loading files (%s)", szShortName);
|
||||
UiDrawStatusText(szBuffer);
|
||||
#else
|
||||
printf("Reading %s\n", szShortName);
|
||||
|
@ -155,7 +155,7 @@ LoadDriver(PCHAR szSourcePath, PCHAR szFileName)
|
|||
* Update the status bar with the current file
|
||||
*/
|
||||
#ifdef USE_UI
|
||||
sprintf(szBuffer, "Reading %s", szShortName);
|
||||
sprintf(szBuffer, "Setup is loading files (%s)", szShortName);
|
||||
UiDrawStatusText(szBuffer);
|
||||
#else
|
||||
printf("Reading %s\n", szShortName);
|
||||
|
@ -220,7 +220,7 @@ LoadNlsFile(PCHAR szSourcePath, PCHAR szFileName, PCHAR szModuleName)
|
|||
* Update the status bar with the current file
|
||||
*/
|
||||
#ifdef USE_UI
|
||||
sprintf(szBuffer, "Reading %s", szShortName);
|
||||
sprintf(szBuffer, "Setup is loading files (%s)", szShortName);
|
||||
UiDrawStatusText(szBuffer);
|
||||
#else
|
||||
printf("Reading %s\n", szShortName);
|
||||
|
@ -232,6 +232,7 @@ LoadNlsFile(PCHAR szSourcePath, PCHAR szFileName, PCHAR szModuleName)
|
|||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOL SetupUiInitialize(VOID);
|
||||
|
||||
VOID RunLoader(VOID)
|
||||
{
|
||||
|
@ -294,7 +295,7 @@ VOID RunLoader(VOID)
|
|||
#endif
|
||||
|
||||
#ifdef USE_UI
|
||||
UiInitialize();
|
||||
SetupUiInitialize();
|
||||
UiDrawStatusText("");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <inifile.h>
|
||||
#include <version.h>
|
||||
#include <video.h>
|
||||
#include <reactos/buildno.h>
|
||||
|
||||
ULONG UiScreenWidth = 80; // Screen Width
|
||||
ULONG UiScreenHeight = 25; // Screen Height
|
||||
|
@ -196,6 +197,39 @@ BOOL UiInitialize(BOOLEAN ShowGui)
|
|||
|
||||
UserInterfaceUp = TRUE;
|
||||
|
||||
DbgPrint((DPRINT_UI, "UiInitialize() returning TRUE.\n"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SetupUiInitialize(VOID)
|
||||
{
|
||||
|
||||
CHAR DisplayModeText[260];
|
||||
ULONG Depth;
|
||||
|
||||
|
||||
DisplayModeText[0] = '\0';
|
||||
|
||||
|
||||
UiDisplayMode = MachVideoSetDisplayMode(DisplayModeText, TRUE);
|
||||
MachVideoGetDisplaySize(&UiScreenWidth, &UiScreenHeight, &Depth);
|
||||
|
||||
TuiInitialize();
|
||||
|
||||
// Draw the backdrop and fade it in if special effects are enabled
|
||||
TuiFillArea(0,
|
||||
0,
|
||||
UiScreenWidth - 1,
|
||||
UiScreenHeight - 2,
|
||||
0,
|
||||
ATTR(UiBackdropFgColor, UiBackdropBgColor));
|
||||
|
||||
UiStatusBarBgColor = 7;
|
||||
UserInterfaceUp = TRUE;
|
||||
|
||||
TuiDrawText(4, 1, "ReactOS " KERNEL_VERSION_STR " Setup", ATTR(COLOR_GRAY, UiBackdropBgColor));
|
||||
TuiDrawText(3, 2, "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD", ATTR(COLOR_GRAY, UiBackdropBgColor));
|
||||
|
||||
DbgPrint((DPRINT_UI, "UiInitialize() returning TRUE.\n"));
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -29,6 +29,7 @@ extern PRTL_MESSAGE_RESOURCE_DATA KiBugCodeMessages;
|
|||
extern LIST_ENTRY KiProfileListHead;
|
||||
extern LIST_ENTRY KiProfileSourceListHead;
|
||||
extern KSPIN_LOCK KiProfileLock;
|
||||
BOOLEAN SetupMode = TRUE;
|
||||
|
||||
VOID PspPostInitSystemProcess(VOID);
|
||||
|
||||
|
@ -258,7 +259,7 @@ ExecuteRuntimeAsserts(VOID)
|
|||
inline
|
||||
VOID
|
||||
STDCALL
|
||||
ParseAndCacheLoadedModules(PBOOLEAN SetupBoot)
|
||||
ParseAndCacheLoadedModules(VOID)
|
||||
{
|
||||
ULONG i;
|
||||
PCHAR Name;
|
||||
|
@ -294,7 +295,7 @@ ParseAndCacheLoadedModules(PBOOLEAN SetupBoot)
|
|||
} else if (!_stricmp(Name, "system") || !_stricmp(Name, "system.hiv")) {
|
||||
|
||||
CachedModules[SystemRegistry] = &KeLoaderModules[i];
|
||||
*SetupBoot = FALSE;
|
||||
SetupMode = FALSE;
|
||||
|
||||
} else if (!_stricmp(Name, "hardware") || !_stricmp(Name, "hardware.hiv")) {
|
||||
|
||||
|
@ -369,20 +370,54 @@ ParseCommandLine(PULONG MaxMem,
|
|||
p1 = p2;
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
INIT_FUNCTION
|
||||
ExpDisplayNotice(VOID)
|
||||
{
|
||||
CHAR str[50];
|
||||
|
||||
if (SetupMode)
|
||||
{
|
||||
HalDisplayString(
|
||||
"\n\n\n ReactOS " KERNEL_VERSION_STR " Setup \n");
|
||||
HalDisplayString(
|
||||
" \xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
|
||||
HalDisplayString(
|
||||
"\xCD\xCD\n");
|
||||
return;
|
||||
}
|
||||
|
||||
HalDisplayString("Starting ReactOS "KERNEL_VERSION_STR" (Build "
|
||||
KERNEL_VERSION_BUILD_STR")\n");
|
||||
HalDisplayString(RES_STR_LEGAL_COPYRIGHT);
|
||||
HalDisplayString("\n\nReactOS is free software, covered by the GNU General "
|
||||
"Public License, and you\n");
|
||||
HalDisplayString("are welcome to change it and/or distribute copies of it "
|
||||
"under certain\n");
|
||||
HalDisplayString("conditions. There is absolutely no warranty for "
|
||||
"ReactOS.\n\n");
|
||||
|
||||
/* Display number of Processors */
|
||||
sprintf(str,
|
||||
"Found %x system processor(s). [%lu MB Memory]\n",
|
||||
(int)KeNumberProcessors,
|
||||
(KeLoaderBlock.MemHigher + 1088)/ 1024);
|
||||
HalDisplayString(str);
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
INIT_FUNCTION
|
||||
STDCALL
|
||||
ExpInitializeExecutive(VOID)
|
||||
{
|
||||
CHAR str[50];
|
||||
UNICODE_STRING EventName;
|
||||
HANDLE InitDoneEventHandle;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
BOOLEAN NoGuiBoot = FALSE;
|
||||
BOOLEAN BootLog = FALSE;
|
||||
ULONG MaxMem = 0;
|
||||
BOOLEAN SetupBoot = TRUE;
|
||||
BOOLEAN ForceAcpiDisable = FALSE;
|
||||
LARGE_INTEGER Timeout;
|
||||
HANDLE ProcessHandle;
|
||||
|
@ -413,7 +448,7 @@ ExpInitializeExecutive(VOID)
|
|||
MaxMem > 8 ? MaxMem : 4096);
|
||||
|
||||
/* Parse the Loaded Modules (by FreeLoader) and cache the ones we'll need */
|
||||
ParseAndCacheLoadedModules(&SetupBoot);
|
||||
ParseAndCacheLoadedModules();
|
||||
|
||||
/* Initialize the kernel debugger parameters */
|
||||
KdInitSystem(0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
|
||||
|
@ -511,27 +546,12 @@ ExpInitializeExecutive(VOID)
|
|||
|
||||
/* Report all resources used by hal */
|
||||
HalReportResourceUsage();
|
||||
|
||||
|
||||
/* Clear the screen to blue */
|
||||
HalInitSystem(2, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
|
||||
|
||||
/* Display version number and copyright/warranty message */
|
||||
HalDisplayString("Starting ReactOS "KERNEL_VERSION_STR" (Build "
|
||||
KERNEL_VERSION_BUILD_STR")\n");
|
||||
HalDisplayString(RES_STR_LEGAL_COPYRIGHT);
|
||||
HalDisplayString("\n\nReactOS is free software, covered by the GNU General "
|
||||
"Public License, and you\n");
|
||||
HalDisplayString("are welcome to change it and/or distribute copies of it "
|
||||
"under certain\n");
|
||||
HalDisplayString("conditions. There is absolutely no warranty for "
|
||||
"ReactOS.\n\n");
|
||||
|
||||
/* Display number of Processors */
|
||||
sprintf(str,
|
||||
"Found %d system processor(s). [%lu MB Memory]\n",
|
||||
KeNumberProcessors,
|
||||
(KeLoaderBlock.MemHigher + 1088)/ 1024);
|
||||
HalDisplayString(str);
|
||||
ExpDisplayNotice();
|
||||
|
||||
/* Call KD Providers at Phase 2 */
|
||||
KdInitSystem(2, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock);
|
||||
|
@ -540,13 +560,13 @@ ExpInitializeExecutive(VOID)
|
|||
RtlpInitNls();
|
||||
|
||||
/* Import and Load Registry Hives */
|
||||
CmInitHives(SetupBoot);
|
||||
CmInitHives(SetupMode);
|
||||
|
||||
/* Initialize the time zone information from the registry */
|
||||
ExpInitTimeZoneInfo();
|
||||
|
||||
/* Enter the kernel debugger before starting up the boot drivers */
|
||||
KdbEnter();
|
||||
/* Enter the kernel debugger before starting up the boot drivers */
|
||||
if (KdDebuggerEnabled) KdbEnter();
|
||||
|
||||
/* Setup Drivers and Root Device Node */
|
||||
IoInit2(BootLog);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
/* ke/main.c */
|
||||
extern LOADER_PARAMETER_BLOCK EXPORTED KeLoaderBlock;
|
||||
extern ULONG KeTickCount;
|
||||
extern BOOLEAN SetupMode;
|
||||
|
||||
NTSTATUS
|
||||
LdrProcessModule(PVOID ModuleLoadBase,
|
||||
|
@ -272,12 +273,23 @@ IopCreateDriverObject(
|
|||
* Display 'Loading XXX...' message.
|
||||
*/
|
||||
|
||||
VOID FASTCALL
|
||||
IopDisplayLoadingMessage(PWCHAR ServiceName)
|
||||
VOID
|
||||
FASTCALL
|
||||
INIT_FUNCTION
|
||||
IopDisplayLoadingMessage(PVOID ServiceName,
|
||||
BOOLEAN Unicode)
|
||||
{
|
||||
CHAR TextBuffer[256];
|
||||
sprintf(TextBuffer, "Loading %S...\n", ServiceName);
|
||||
HalDisplayString(TextBuffer);
|
||||
if (SetupMode) return;
|
||||
CHAR TextBuffer[256];
|
||||
if (Unicode)
|
||||
{
|
||||
sprintf(TextBuffer, "Loading %S...\n", (PWCHAR)ServiceName);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(TextBuffer, "Loading %s...\n", (PCHAR)ServiceName);
|
||||
}
|
||||
HalDisplayString(TextBuffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -390,8 +402,8 @@ IopLoadServiceModule(
|
|||
DPRINT("RtlQueryRegistryValues() failed (Status %x)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
IopDisplayLoadingMessage(ServiceName->Buffer);
|
||||
|
||||
IopDisplayLoadingMessage(ServiceName->Buffer, TRUE);
|
||||
|
||||
/*
|
||||
* Normalize the image path for all later processing.
|
||||
|
@ -1122,7 +1134,6 @@ IopInitializeBuiltinDriver(
|
|||
PDEVICE_NODE DeviceNode;
|
||||
PDRIVER_OBJECT DriverObject;
|
||||
NTSTATUS Status;
|
||||
CHAR TextBuffer[256];
|
||||
PCHAR FileNameWithoutPath;
|
||||
LPWSTR FileExtension;
|
||||
|
||||
|
@ -1130,11 +1141,9 @@ IopInitializeBuiltinDriver(
|
|||
FileName, ModuleLoadBase, ModuleLength);
|
||||
|
||||
/*
|
||||
* Display 'Initializing XXX...' message
|
||||
* Display 'Loading XXX...' message
|
||||
*/
|
||||
|
||||
sprintf(TextBuffer, "Initializing %s...\n", FileName);
|
||||
HalDisplayString(TextBuffer);
|
||||
IopDisplayLoadingMessage(FileName, FALSE);
|
||||
|
||||
/*
|
||||
* Determine the right device object
|
||||
|
@ -1307,7 +1316,7 @@ IopLoadDriver(PSERVICE Service)
|
|||
{
|
||||
NTSTATUS Status = STATUS_UNSUCCESSFUL;
|
||||
|
||||
IopDisplayLoadingMessage(Service->ServiceName.Buffer);
|
||||
IopDisplayLoadingMessage(Service->ServiceName.Buffer, TRUE);
|
||||
Status = ZwLoadDriver(&Service->RegistryPath);
|
||||
IopBootLog(&Service->ImagePath, NT_SUCCESS(Status) ? TRUE : FALSE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -792,7 +792,7 @@ LdrPEProcessModule(
|
|||
CPRINT("Failed to allocate a virtual section for driver\n");
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
DbgPrint("DriverBase for %wZ: %x\n", FileName, DriverBase);
|
||||
DPRINT("DriverBase for %wZ: %x\n", FileName, DriverBase);
|
||||
|
||||
/* Copy headers over */
|
||||
memcpy(DriverBase, ModuleLoadBase, PENtHeaders->OptionalHeader.SizeOfHeaders);
|
||||
|
|
|
@ -107,7 +107,8 @@ FormatPartition (PUNICODE_STRING DriveRoot)
|
|||
ProgressBar = CreateProgressBar (6,
|
||||
yScreen - 14,
|
||||
xScreen - 7,
|
||||
yScreen - 10);
|
||||
yScreen - 10,
|
||||
"Setup is formatting your disk");
|
||||
|
||||
ProgressSetStepCount (ProgressBar, 100);
|
||||
|
||||
|
|
|
@ -84,6 +84,78 @@ DrawBorder(PPROGRESSBAR Bar)
|
|||
&Written);
|
||||
}
|
||||
|
||||
static VOID
|
||||
DrawThickBorder(PPROGRESSBAR Bar)
|
||||
{
|
||||
COORD coPos;
|
||||
ULONG Written;
|
||||
SHORT i;
|
||||
|
||||
/* draw upper left corner */
|
||||
coPos.X = Bar->Left;
|
||||
coPos.Y = Bar->Top + 1;
|
||||
FillConsoleOutputCharacter(0xC9, // '+',
|
||||
1,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
/* draw upper edge */
|
||||
coPos.X = Bar->Left + 1;
|
||||
coPos.Y = Bar->Top + 1;
|
||||
FillConsoleOutputCharacter(0xCD, // '-',
|
||||
Bar->Right - Bar->Left - 1,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
/* draw upper right corner */
|
||||
coPos.X = Bar->Right;
|
||||
coPos.Y = Bar->Top + 1;
|
||||
FillConsoleOutputCharacter(0xBB, // '+',
|
||||
1,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
/* draw left and right edge */
|
||||
for (i = Bar->Top + 2; i < Bar->Bottom; i++)
|
||||
{
|
||||
coPos.X = Bar->Left;
|
||||
coPos.Y = i;
|
||||
FillConsoleOutputCharacter(0xBA, // '|',
|
||||
1,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
coPos.X = Bar->Right;
|
||||
FillConsoleOutputCharacter(0xBA, //'|',
|
||||
1,
|
||||
coPos,
|
||||
&Written);
|
||||
}
|
||||
|
||||
/* draw lower left corner */
|
||||
coPos.X = Bar->Left;
|
||||
coPos.Y = Bar->Bottom;
|
||||
FillConsoleOutputCharacter(0xC8, // '+',
|
||||
1,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
/* draw lower edge */
|
||||
coPos.X = Bar->Left + 1;
|
||||
coPos.Y = Bar->Bottom;
|
||||
FillConsoleOutputCharacter(0xCD, // '-',
|
||||
Bar->Right - Bar->Left - 1,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
/* draw lower right corner */
|
||||
coPos.X = Bar->Right;
|
||||
coPos.Y = Bar->Bottom;
|
||||
FillConsoleOutputCharacter(0xBC, // '+',
|
||||
1,
|
||||
coPos,
|
||||
&Written);
|
||||
}
|
||||
|
||||
static VOID
|
||||
DrawProgressBar(PPROGRESSBAR Bar)
|
||||
|
@ -91,6 +163,7 @@ DrawProgressBar(PPROGRESSBAR Bar)
|
|||
CHAR TextBuffer[8];
|
||||
COORD coPos;
|
||||
ULONG Written;
|
||||
PROGRESSBAR BarBorder = *Bar;
|
||||
|
||||
/* Print percentage */
|
||||
sprintf(TextBuffer, "%-3lu%%", Bar->Percent);
|
||||
|
@ -101,7 +174,18 @@ DrawProgressBar(PPROGRESSBAR Bar)
|
|||
4,
|
||||
coPos);
|
||||
|
||||
/* Draw the progress bar border */
|
||||
DrawBorder(Bar);
|
||||
|
||||
/* Write Text Associated with Bar */
|
||||
SetTextXY(10, 24, Bar->Text);
|
||||
|
||||
/* Draw the progress bar "border" border */
|
||||
BarBorder.Top -= 5;
|
||||
BarBorder.Bottom += 2;
|
||||
BarBorder.Right += 5;
|
||||
BarBorder.Left -= 5;
|
||||
DrawThickBorder(&BarBorder);
|
||||
|
||||
/* Draw the bar */
|
||||
coPos.X = Bar->Left + 1;
|
||||
|
@ -126,7 +210,8 @@ PPROGRESSBAR
|
|||
CreateProgressBar(SHORT Left,
|
||||
SHORT Top,
|
||||
SHORT Right,
|
||||
SHORT Bottom)
|
||||
SHORT Bottom,
|
||||
char* Text)
|
||||
{
|
||||
PPROGRESSBAR Bar;
|
||||
|
||||
|
@ -140,6 +225,7 @@ CreateProgressBar(SHORT Left,
|
|||
Bar->Top = Top;
|
||||
Bar->Right = Right;
|
||||
Bar->Bottom = Bottom;
|
||||
Bar->Text = Text;
|
||||
|
||||
Bar->Width = Bar->Right - Bar->Left + 1;
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ typedef struct _PROGRESS
|
|||
|
||||
ULONG StepCount;
|
||||
ULONG CurrentStep;
|
||||
|
||||
CHAR *Text;
|
||||
} PROGRESSBAR, *PPROGRESSBAR;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
@ -50,7 +52,8 @@ PPROGRESSBAR
|
|||
CreateProgressBar(SHORT Left,
|
||||
SHORT Top,
|
||||
SHORT Right,
|
||||
SHORT Bottom);
|
||||
SHORT Bottom,
|
||||
char* Text);
|
||||
|
||||
VOID
|
||||
DestroyProgressBar(PPROGRESSBAR Bar);
|
||||
|
|
|
@ -59,6 +59,7 @@ typedef enum _PAGE_NUMBER
|
|||
START_PAGE,
|
||||
INTRO_PAGE,
|
||||
LICENSE_PAGE,
|
||||
WARNING_PAGE,
|
||||
INSTALL_INTRO_PAGE,
|
||||
|
||||
// SCSI_CONTROLLER_PAGE,
|
||||
|
@ -88,8 +89,6 @@ typedef enum _PAGE_NUMBER
|
|||
|
||||
REPAIR_INTRO_PAGE,
|
||||
|
||||
EMERGENCY_INTRO_PAGE,
|
||||
|
||||
SUCCESS_PAGE,
|
||||
QUIT_PAGE,
|
||||
FLUSH_PAGE,
|
||||
|
@ -710,12 +709,11 @@ IntroPage(PINPUT_RECORD Ir)
|
|||
SetTextXY(6, 12, "computer and prepares the second part of the setup.");
|
||||
|
||||
SetTextXY(8, 15, "\x07 Press ENTER to install ReactOS.");
|
||||
SetTextXY(8, 17, "\x07 Press L to view the licensing terms for ReactOS.");
|
||||
SetTextXY(8, 19, "\x07 Press E to start the emergency console.");
|
||||
SetTextXY(8, 21, "\x07 Press R to repair ReactOS.");
|
||||
SetTextXY(8, 23, "\x07 Press F3 to quit without installing ReactOS.");
|
||||
SetTextXY(8, 17, "\x07 Press R to repair ReactOS.");
|
||||
SetTextXY(8, 19, "\x07 Press L to view the ReactOS Licensing Terms and Conditions");
|
||||
SetTextXY(8, 21, "\x07 Press F3 to quit without installing ReactOS.");
|
||||
|
||||
SetStatusText(" ENTER = Continue F3 = Quit");
|
||||
SetStatusText(" ENTER = Continue R = Repair F3 = Quit");
|
||||
|
||||
if (IsUnattendedSetup)
|
||||
{
|
||||
|
@ -735,20 +733,19 @@ IntroPage(PINPUT_RECORD Ir)
|
|||
}
|
||||
else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
||||
{
|
||||
return INSTALL_INTRO_PAGE;
|
||||
}
|
||||
else if (toupper(Ir->Event.KeyEvent.uChar.AsciiChar) == 'L') /* L */
|
||||
{
|
||||
return LICENSE_PAGE;
|
||||
}
|
||||
else if (toupper(Ir->Event.KeyEvent.uChar.AsciiChar) == 'E') /* E */
|
||||
{
|
||||
return EMERGENCY_INTRO_PAGE;
|
||||
return WARNING_PAGE;
|
||||
break;
|
||||
}
|
||||
else if (toupper(Ir->Event.KeyEvent.uChar.AsciiChar) == 'R') /* R */
|
||||
{
|
||||
return REPAIR_INTRO_PAGE;
|
||||
break;
|
||||
}
|
||||
else if (toupper(Ir->Event.KeyEvent.uChar.AsciiChar) == 'L') /* R */
|
||||
{
|
||||
return LICENSE_PAGE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return INTRO_PAGE;
|
||||
|
@ -779,61 +776,62 @@ LicensePage(PINPUT_RECORD Ir)
|
|||
SetTextXY(8, 23, "GNU General Public License with ReactOS please visit");
|
||||
SetHighlightedTextXY(8, 25, "http://www.gnu.org/licenses/licenses.html");
|
||||
|
||||
SetStatusText("ENTER = Continue F3 = Quit");
|
||||
SetStatusText(" ENTER = Return");
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
ConInKey(Ir);
|
||||
|
||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
||||
{
|
||||
return INTRO_PAGE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return LICENSE_PAGE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Warning Page
|
||||
* RETURNS
|
||||
* Continues to setup
|
||||
*/
|
||||
static PAGE_NUMBER
|
||||
WarningPage(PINPUT_RECORD Ir)
|
||||
{
|
||||
SetUnderlinedTextXY(4, 3, " ReactOS " KERNEL_VERSION_STR " Warranty Statement");
|
||||
SetHighlightedTextXY(6, 8, "Warranty:");
|
||||
|
||||
SetTextXY(8, 11, "This is free software; see the source for copying conditions.");
|
||||
SetTextXY(8, 12, "There is NO warranty; not even for MERCHANTABILITY or");
|
||||
SetTextXY(8, 13, "FITNESS FOR A PARTICULAR PURPOSE");
|
||||
|
||||
SetTextXY(8, 15, "For more information on ReactOS, please visit:");
|
||||
SetHighlightedTextXY(8, 16, "http://www.reactos.org");
|
||||
|
||||
SetStatusText(" F8 = Continue ESC = Exit");
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
ConInKey(Ir);
|
||||
|
||||
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
|
||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F8)) /* F8 */
|
||||
{
|
||||
if (ConfirmQuit(Ir) == TRUE)
|
||||
return QUIT_PAGE;
|
||||
return INSTALL_INTRO_PAGE;
|
||||
break;
|
||||
}
|
||||
else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
||||
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
|
||||
{
|
||||
return INTRO_PAGE;
|
||||
return QUIT_PAGE;
|
||||
}
|
||||
}
|
||||
|
||||
return LICENSE_PAGE;
|
||||
}
|
||||
|
||||
static PAGE_NUMBER
|
||||
EmergencyIntroPage(PINPUT_RECORD Ir)
|
||||
{
|
||||
SetTextXY(6, 8, "ReactOS Setup is in an early development phase. It does not yet");
|
||||
SetTextXY(6, 9, "support all the functions of a fully usable setup application.");
|
||||
|
||||
SetTextXY(6, 12, "The emergency console is not implemented yet.");
|
||||
|
||||
SetTextXY(8, 15, "\x07 Press ESC to return to the main page.");
|
||||
|
||||
SetTextXY(8, 17, "\x07 Press ENTER to reboot your computer.");
|
||||
|
||||
SetStatusText(" ESC = Main page ENTER = Reboot");
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
ConInKey(Ir);
|
||||
|
||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
||||
{
|
||||
return REBOOT_PAGE;
|
||||
}
|
||||
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
|
||||
{
|
||||
return INTRO_PAGE;
|
||||
}
|
||||
}
|
||||
|
||||
return REPAIR_INTRO_PAGE;
|
||||
}
|
||||
|
||||
|
||||
static PAGE_NUMBER
|
||||
RepairIntroPage(PINPUT_RECORD Ir)
|
||||
{
|
||||
|
@ -842,9 +840,11 @@ RepairIntroPage(PINPUT_RECORD Ir)
|
|||
|
||||
SetTextXY(6, 12, "The repair functions are not implemented yet.");
|
||||
|
||||
SetTextXY(8, 15, "\x07 Press ESC to return to the main page.");
|
||||
SetTextXY(8, 15, "\x07 Press R for the Recovery Console.");
|
||||
|
||||
SetTextXY(8, 17, "\x07 Press ESC to return to the main page.");
|
||||
|
||||
SetTextXY(8, 17, "\x07 Press ENTER to reboot your computer.");
|
||||
SetTextXY(8, 19, "\x07 Press ENTER to reboot your computer.");
|
||||
|
||||
SetStatusText(" ESC = Main page ENTER = Reboot");
|
||||
|
||||
|
@ -856,6 +856,10 @@ RepairIntroPage(PINPUT_RECORD Ir)
|
|||
{
|
||||
return REBOOT_PAGE;
|
||||
}
|
||||
else if (toupper(Ir->Event.KeyEvent.uChar.AsciiChar) == 'R') /* R */
|
||||
{
|
||||
return INTRO_PAGE;
|
||||
}
|
||||
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
|
||||
{
|
||||
|
@ -870,6 +874,8 @@ RepairIntroPage(PINPUT_RECORD Ir)
|
|||
static PAGE_NUMBER
|
||||
InstallIntroPage(PINPUT_RECORD Ir)
|
||||
{
|
||||
SetUnderlinedTextXY(4, 3, " ReactOS " KERNEL_VERSION_STR " Setup ");
|
||||
|
||||
SetTextXY(6, 8, "ReactOS Setup is in an early development phase. It does not yet");
|
||||
SetTextXY(6, 9, "support all the functions of a fully usable setup application.");
|
||||
|
||||
|
@ -3140,11 +3146,7 @@ FileCopyCallback(PVOID Context,
|
|||
|
||||
case SPFILENOTIFY_STARTCOPY:
|
||||
/* Display copy message */
|
||||
PrintTextXYN(6, 16, 60, "Copying file: %S", (PWSTR)Param1);
|
||||
|
||||
PrintTextXYN(6, 18, 60, "File %lu of %lu",
|
||||
CopyContext->CompletedOperations + 1,
|
||||
CopyContext->TotalOperations);
|
||||
SetStatusText(" \xB3 Copying file: %S", (PWSTR)Param1);
|
||||
break;
|
||||
|
||||
case SPFILENOTIFY_ENDCOPY:
|
||||
|
@ -3164,18 +3166,20 @@ FileCopyPage(PINPUT_RECORD Ir)
|
|||
SHORT xScreen;
|
||||
SHORT yScreen;
|
||||
|
||||
SetStatusText(" Please wait...");
|
||||
SetStatusText(" \xB3 Please wait... ");
|
||||
|
||||
SetTextXY(6, 8, "Copying files");
|
||||
|
||||
GetScreenSize(&xScreen, &yScreen);
|
||||
SetTextXY(11, 12, "Please wait while ReactOS Setup copies files to your ReactOS");
|
||||
SetTextXY(30, 13, "installation folder.");
|
||||
SetTextXY(20, 14, "This may take several minutes to complete.");
|
||||
|
||||
GetScreenSize(&xScreen, &yScreen);
|
||||
CopyContext.TotalOperations = 0;
|
||||
CopyContext.CompletedOperations = 0;
|
||||
CopyContext.ProgressBar = CreateProgressBar(6,
|
||||
yScreen - 14,
|
||||
xScreen - 7,
|
||||
yScreen - 10);
|
||||
CopyContext.ProgressBar = CreateProgressBar(13,
|
||||
26,
|
||||
xScreen - 13,
|
||||
yScreen - 20,
|
||||
"Setup is copying files...");
|
||||
|
||||
SetupCommitFileQueue(SetupFileQueue,
|
||||
DestinationRootPath.Buffer,
|
||||
|
@ -3811,6 +3815,11 @@ NtProcessStartup(PPEB Peb)
|
|||
case LICENSE_PAGE:
|
||||
Page = LicensePage(&Ir);
|
||||
break;
|
||||
|
||||
/* Warning page */
|
||||
case WARNING_PAGE:
|
||||
Page = WarningPage(&Ir);
|
||||
break;
|
||||
|
||||
/* Intro page */
|
||||
case INTRO_PAGE:
|
||||
|
@ -3916,13 +3925,6 @@ NtProcessStartup(PPEB Peb)
|
|||
Page = RepairIntroPage(&Ir);
|
||||
break;
|
||||
|
||||
|
||||
/* Emergency pages */
|
||||
case EMERGENCY_INTRO_PAGE:
|
||||
Page = EmergencyIntroPage(&Ir);
|
||||
break;
|
||||
|
||||
|
||||
case SUCCESS_PAGE:
|
||||
Page = SuccessPage(&Ir);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue