Author: mkupfer
Date: Sat May 14 18:32:59 2011
New Revision: 51742
URL:
http://svn.reactos.org/svn/reactos?rev=51742&view=rev
Log:
bring back progress bar for loading files
Modified:
trunk/reactos/boot/freeldr/freeldr/windows/peloader.c
trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/windows/peloader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] Sat May 14 18:32:59
2011
@@ -265,13 +265,6 @@
LONG Status;
LARGE_INTEGER Position;
ULONG i, BytesRead;
-
- CHAR ProgressString[256];
-
- /* Inform user we are loading files */
- sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1);
- UiDrawBackdrop();
- UiDrawProgressBarCenter(1, 100, ProgressString);
/* Open the image file */
Status = ArcOpen(FileName, OpenReadOnly, &FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Sat May 14 18:32:59
2011
@@ -457,6 +457,8 @@
PVOID GdtIdt;
ULONG PcrBasePage=0;
ULONG TssBasePage=0;
+ // Progress bar
+ CHAR ProgressString[256];
// Open the operating system section
// specified in the .ini file
@@ -464,7 +466,8 @@
UiDrawBackdrop();
UiDrawStatusText("Detecting Hardware...");
- UiDrawProgressBarCenter(1, 100, "Loading NT...");
+ sprintf(ProgressString, "Loading NT...");
+ UiDrawProgressBarCenter(1, 100, ProgressString);
/* Read the system path is set in the .ini file */
if (!HasSection || !IniReadSettingByName(SectionId, "SystemPath", FullPath,
sizeof(FullPath)))
@@ -524,7 +527,7 @@
}
/* Let user know we started loading */
- UiDrawStatusText("Loading...");
+ //UiDrawStatusText("Loading...");
/* append a backslash */
strcpy(BootPath, FullPath);
@@ -545,6 +548,10 @@
UseRealHeap = TRUE;
LoaderBlock->ConfigurationRoot = MachHwDetect();
+ sprintf(ProgressString, "Loading system hive...");
+ UiDrawBackdrop();
+ UiDrawProgressBarCenter(15, 100, ProgressString);
+
/* Load Hive */
Status = WinLdrInitSystemHive(LoaderBlock, BootPath);
DPRINTM(DPRINT_WINDOWS, "SYSTEM hive loaded with status %d\n", Status);
@@ -555,12 +562,18 @@
/* Load kernel */
strcpy(FileName, BootPath);
strcat(FileName, "SYSTEM32\\NTOSKRNL.EXE");
+ sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1);
+ UiDrawBackdrop();
+ UiDrawProgressBarCenter(30, 100, ProgressString);
Status = WinLdrLoadImage(FileName, LoaderSystemCode, &NtosBase);
DPRINTM(DPRINT_WINDOWS, "Ntos loaded with status %d at %p\n", Status,
NtosBase);
/* Load HAL */
strcpy(FileName, BootPath);
strcat(FileName, "SYSTEM32\\HAL.DLL");
+ sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1);
+ UiDrawBackdrop();
+ UiDrawProgressBarCenter(45, 100, ProgressString);
Status = WinLdrLoadImage(FileName, LoaderHalCode, &HalBase);
DPRINTM(DPRINT_WINDOWS, "HAL loaded with status %d at %p\n", Status,
HalBase);
@@ -569,6 +582,9 @@
{
strcpy(FileName, BootPath);
strcat(FileName, "SYSTEM32\\KDCOM.DLL");
+ sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') +
1);
+ UiDrawBackdrop();
+ UiDrawProgressBarCenter(60, 100, ProgressString);
Status = WinLdrLoadImage(FileName, LoaderBootDriver, &KdComBase);
DPRINTM(DPRINT_WINDOWS, "KdCom loaded with status %d at %p\n", Status,
KdComBase);
}
@@ -592,11 +608,17 @@
if (KdComDTE)
WinLdrScanImportDescriptorTable(LoaderBlock, FileName, KdComDTE);
+ sprintf(ProgressString, "Loading NLS and OEM fonts...");
+ UiDrawBackdrop();
+ UiDrawProgressBarCenter(80, 100, ProgressString);
/* Load NLS data, OEM font, and prepare boot drivers list */
Status = WinLdrScanSystemHive(LoaderBlock, BootPath);
DPRINTM(DPRINT_WINDOWS, "SYSTEM hive scanned with status %d\n", Status);
/* Load boot drivers */
+ sprintf(ProgressString, "Loading boot drivers...");
+ UiDrawBackdrop();
+ UiDrawProgressBarCenter(100, 100, ProgressString);
Status = WinLdrLoadBootDrivers(LoaderBlock, BootPath);
DPRINTM(DPRINT_WINDOWS, "Boot drivers loaded with status %d\n", Status);