diff --git a/reactos/boot/freeldr/freeldr/windows/peloader.c b/reactos/boot/freeldr/freeldr/windows/peloader.c index 7a87e282545..a1d015046b8 100644 --- a/reactos/boot/freeldr/freeldr/windows/peloader.c +++ b/reactos/boot/freeldr/freeldr/windows/peloader.c @@ -266,13 +266,6 @@ WinLdrLoadImage(IN PCHAR FileName, 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); if (Status != ESUCCESS) diff --git a/reactos/boot/freeldr/freeldr/windows/winldr.c b/reactos/boot/freeldr/freeldr/windows/winldr.c index 14159b47a24..970b8a0b3d4 100644 --- a/reactos/boot/freeldr/freeldr/windows/winldr.c +++ b/reactos/boot/freeldr/freeldr/windows/winldr.c @@ -457,6 +457,8 @@ LoadAndBootWindows(PCSTR OperatingSystemName, 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 @@ LoadAndBootWindows(PCSTR OperatingSystemName, 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 @@ LoadAndBootWindows(PCSTR OperatingSystemName, } /* Let user know we started loading */ - UiDrawStatusText("Loading..."); + //UiDrawStatusText("Loading..."); /* append a backslash */ strcpy(BootPath, FullPath); @@ -545,6 +548,10 @@ LoadAndBootWindows(PCSTR OperatingSystemName, 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 @@ LoadAndBootWindows(PCSTR OperatingSystemName, /* 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 @@ LoadAndBootWindows(PCSTR OperatingSystemName, { 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 @@ LoadAndBootWindows(PCSTR OperatingSystemName, 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);