From f7e32af29be153bdebeac3a83db62f63ea93768f Mon Sep 17 00:00:00 2001 From: Andrew Greenwood Date: Mon, 19 Jan 2009 23:38:08 +0000 Subject: [PATCH] setupldr previously worked by faking the FreeLdr OS menu function. Now FreeLdr has a special OS type for ReactOS Setup, which will only work for the bootcd. As a result, bootcd can display a menu now. This opens up the possibility of including both a "live" environment for users to play with as well as the opportunity to install, from the same disc. svn path=/trunk/; revision=38962 --- reactos/boot/freeldr/freeldr/bootmgr.c | 8 ++++++++ reactos/boot/freeldr/freeldr/freeldr_base.rbuild | 6 ++++++ reactos/boot/freeldr/freeldr/freeldr_main.rbuild | 6 ------ reactos/boot/freeldr/freeldr/include/freeldr.h | 1 + reactos/boot/freeldr/freeldr/reactos/setupldr.c | 2 +- reactos/boot/freeldr/freeldr/setupldr_main.rbuild | 4 ++++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/bootmgr.c b/reactos/boot/freeldr/freeldr/bootmgr.c index 1762c33731c..0d74206e874 100644 --- a/reactos/boot/freeldr/freeldr/bootmgr.c +++ b/reactos/boot/freeldr/freeldr/bootmgr.c @@ -115,6 +115,14 @@ VOID RunLoader(VOID) { LoadAndBootReactOS(OperatingSystemSectionNames[SelectedOperatingSystem]); } +#ifdef FREELDR_ROS_SETUP + else if (_stricmp(SettingValue, "ReactOSSetup") == 0) + { + // Could probably pass the selection across at a later date + // which might be useful for different install methods? + RunReactOSSetup(); + } +#endif #ifdef __i386__ else if (_stricmp(SettingValue, "WindowsNT40") == 0) { diff --git a/reactos/boot/freeldr/freeldr/freeldr_base.rbuild b/reactos/boot/freeldr/freeldr/freeldr_base.rbuild index c5d39db316e..a0d008f4612 100644 --- a/reactos/boot/freeldr/freeldr/freeldr_base.rbuild +++ b/reactos/boot/freeldr/freeldr/freeldr_base.rbuild @@ -77,6 +77,12 @@ version.c cmdline.c machine.c + drivemap.c + miscboot.c + options.c + linuxboot.c + oslist.c + custom.c freeldr.h diff --git a/reactos/boot/freeldr/freeldr/freeldr_main.rbuild b/reactos/boot/freeldr/freeldr/freeldr_main.rbuild index 57178db0e82..7ad1d850700 100644 --- a/reactos/boot/freeldr/freeldr/freeldr_main.rbuild +++ b/reactos/boot/freeldr/freeldr/freeldr_main.rbuild @@ -7,10 +7,4 @@ -fno-inline -fno-zero-initialized-in-bss bootmgr.c - drivemap.c - miscboot.c - options.c - linuxboot.c - oslist.c - custom.c diff --git a/reactos/boot/freeldr/freeldr/include/freeldr.h b/reactos/boot/freeldr/freeldr/include/freeldr.h index b1a63a1535f..5f00f9bcc68 100644 --- a/reactos/boot/freeldr/freeldr/include/freeldr.h +++ b/reactos/boot/freeldr/freeldr/include/freeldr.h @@ -107,5 +107,6 @@ VOID BootMain(LPSTR CmdLine); VOID RunLoader(VOID); +VOID RunReactOSSetup(VOID); #endif // defined __FREELDR_H diff --git a/reactos/boot/freeldr/freeldr/reactos/setupldr.c b/reactos/boot/freeldr/freeldr/reactos/setupldr.c index 3b371639e71..b9f036c3aeb 100644 --- a/reactos/boot/freeldr/freeldr/reactos/setupldr.c +++ b/reactos/boot/freeldr/freeldr/reactos/setupldr.c @@ -42,7 +42,7 @@ extern BOOLEAN FrLdrLoadNlsFile(PCSTR szFileName, PCSTR szModuleName); #define USE_UI -VOID RunLoader(VOID) +VOID RunReactOSSetup(VOID) { ULONG i; LPCSTR SourcePath; diff --git a/reactos/boot/freeldr/freeldr/setupldr_main.rbuild b/reactos/boot/freeldr/freeldr/setupldr_main.rbuild index d0151e397c5..8341ae67b01 100644 --- a/reactos/boot/freeldr/freeldr/setupldr_main.rbuild +++ b/reactos/boot/freeldr/freeldr/setupldr_main.rbuild @@ -4,11 +4,15 @@ include include + -ffreestanding -fno-builtin -fno-inline -fno-zero-initialized-in-bss -Os + + bootmgr.c + inffile.c