diff --git a/reactos/boot/freeldr/freeldr/CMakeLists.txt b/reactos/boot/freeldr/freeldr/CMakeLists.txt index fc4d056d30f..911ac08923a 100644 --- a/reactos/boot/freeldr/freeldr/CMakeLists.txt +++ b/reactos/boot/freeldr/freeldr/CMakeLists.txt @@ -107,8 +107,8 @@ if(ARCH MATCHES i386) arch/i386/xboxmem.c arch/i386/xboxrtc.c arch/i386/xboxvideo.c - windows/i386/ntsetup.c - windows/i386/wlmemory.c + arch/i386/ntsetup.c + arch/i386/wlmemory.c windows/headless.c disk/scsiport.c) if(NOT MSVC) @@ -134,8 +134,8 @@ elseif(ARCH MATCHES amd64) arch/i386/pcmem.c arch/i386/pcrtc.c arch/i386/pcvideo.c - windows/amd64/ntsetup.c - windows/amd64/wlmemory.c) + arch/amd64/ntsetup.c + arch/amd64/wlmemory.c) else() #TBD endif() @@ -191,7 +191,7 @@ list(APPEND SETUPLDR_SOURCE inffile/inffile.c) if(ARCH MATCHES i386 OR ARCH MATCHES amd64) - list(APPEND SETUPLDR_SOURCE windows/setupldr2.c) + list(APPEND SETUPLDR_SOURCE windows/setupldr.c) endif() if(NOT MSVC) diff --git a/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c b/reactos/boot/freeldr/freeldr/arch/amd64/ntsetup.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c rename to reactos/boot/freeldr/freeldr/arch/amd64/ntsetup.c diff --git a/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c b/reactos/boot/freeldr/freeldr/arch/amd64/wlmemory.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c rename to reactos/boot/freeldr/freeldr/arch/amd64/wlmemory.c diff --git a/reactos/boot/freeldr/freeldr/windows/arm/wlmemory.c b/reactos/boot/freeldr/freeldr/arch/arm/wlmemory.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/arm/wlmemory.c rename to reactos/boot/freeldr/freeldr/arch/arm/wlmemory.c diff --git a/reactos/boot/freeldr/freeldr/windows/i386/ntsetup.c b/reactos/boot/freeldr/freeldr/arch/i386/ntsetup.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/i386/ntsetup.c rename to reactos/boot/freeldr/freeldr/arch/i386/ntsetup.c diff --git a/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c b/reactos/boot/freeldr/freeldr/arch/i386/wlmemory.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c rename to reactos/boot/freeldr/freeldr/arch/i386/wlmemory.c diff --git a/reactos/boot/freeldr/freeldr/bootmgr.c b/reactos/boot/freeldr/freeldr/bootmgr.c index 2acc457a702..3d46b2c004f 100644 --- a/reactos/boot/freeldr/freeldr/bootmgr.c +++ b/reactos/boot/freeldr/freeldr/bootmgr.c @@ -213,7 +213,7 @@ VOID RunLoader(VOID) if (BootType[0] == ANSI_NULL && SectionName[0] != ANSI_NULL) { // Try to infere boot type value -#ifdef __i386__ +#ifdef _M_IX86 ULONG FileId; if (ArcOpen((CHAR*)SectionName, OpenReadOnly, &FileId) == ESUCCESS) { @@ -231,20 +231,15 @@ VOID RunLoader(VOID) IniOpenSection("Operating Systems", &SectionId); IniReadSettingByName(SectionId, SectionName, SettingValue, sizeof(SettingValue)); -#ifndef _M_ARM // Install the drive mapper according to this sections drive mappings -#if defined(__i386__) && !defined(_MSC_VER) +#if defined(_M_IX86) && !defined(_MSC_VER) DriveMapMapDrivesInSection(SectionName); #endif + #ifdef FREELDR_REACTOS_SETUP - if (_stricmp(BootType, "ReactOSSetup2") == 0) - { - // WinLdr-style boot - LoadReactOSSetup2(); - } - else -#endif -#ifdef __i386__ + // WinLdr-style boot + LoadReactOSSetup2(); +#elif defined(_M_IX86) if (_stricmp(BootType, "Windows") == 0) { LoadAndBootWindows(SectionName, SettingValue, 0); @@ -273,13 +268,11 @@ VOID RunLoader(VOID) { LoadAndBootDrive(SectionName); } -#endif #else - LoadAndBootWindows(SectionName, SettingValue, _WIN32_WINNT_WS03); + LoadAndBootWindows(SectionName, SettingValue, _WIN32_WINNT_WS03); #endif } - reboot: UiUnInitialize("Rebooting..."); return; diff --git a/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild b/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild index 1a7bc730661..e8c8fa2526c 100644 --- a/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild +++ b/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild @@ -41,6 +41,8 @@ xboxmem.c xboxrtc.c xboxvideo.c + ntsetup.c + wlmemory.c @@ -69,6 +71,8 @@ loader.c + ntsetup.c + wlmemory.c hardware.c @@ -87,23 +91,8 @@ - - - - - - wlmemory.c - - - - - ntsetup.c - wlmemory.c - - - - - ntsetup.c + + wlmemory.c diff --git a/reactos/boot/freeldr/freeldr/setupldr_main.rbuild b/reactos/boot/freeldr/freeldr/setupldr_main.rbuild index 8b03906284e..220c8cce4a9 100644 --- a/reactos/boot/freeldr/freeldr/setupldr_main.rbuild +++ b/reactos/boot/freeldr/freeldr/setupldr_main.rbuild @@ -9,14 +9,7 @@ inffile.c - - - setupldr2.c - - - - - setupldr2.c - - + + setupldr.c + diff --git a/reactos/boot/freeldr/freeldr/windows/setupldr2.c b/reactos/boot/freeldr/freeldr/windows/setupldr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/setupldr2.c rename to reactos/boot/freeldr/freeldr/windows/setupldr.c