mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:33:01 +00:00
[FREELDR] Add ReactOS Setup as a custom boot type. (#1763)
CORE-9023 CORE-16260 Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
This commit is contained in:
parent
b34d516e81
commit
bc7c689448
3 changed files with 42 additions and 13 deletions
|
@ -31,6 +31,20 @@ VOID
|
||||||
(*EDIT_OS_ENTRY_PROC)(
|
(*EDIT_OS_ENTRY_PROC)(
|
||||||
IN ULONG_PTR SectionId OPTIONAL);
|
IN ULONG_PTR SectionId OPTIONAL);
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
EditCustomBootReactOSSetup(
|
||||||
|
IN ULONG_PTR SectionId OPTIONAL)
|
||||||
|
{
|
||||||
|
EditCustomBootReactOS(SectionId, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
EditCustomBootNTOS(
|
||||||
|
IN ULONG_PTR SectionId OPTIONAL)
|
||||||
|
{
|
||||||
|
EditCustomBootReactOS(SectionId, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
PCSTR BootType;
|
PCSTR BootType;
|
||||||
|
@ -38,18 +52,18 @@ static const struct
|
||||||
ARC_ENTRY_POINT OsLoader;
|
ARC_ENTRY_POINT OsLoader;
|
||||||
} OSLoadingMethods[] =
|
} OSLoadingMethods[] =
|
||||||
{
|
{
|
||||||
{"ReactOSSetup", EditCustomBootReactOS, LoadReactOSSetup},
|
{"ReactOSSetup", EditCustomBootReactOSSetup, LoadReactOSSetup},
|
||||||
|
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
{"Drive" , EditCustomBootDisk , LoadAndBootDrive },
|
{"Drive" , EditCustomBootDisk , LoadAndBootDrive },
|
||||||
{"Partition" , EditCustomBootPartition , LoadAndBootPartition },
|
{"Partition" , EditCustomBootPartition , LoadAndBootPartition },
|
||||||
{"BootSector" , EditCustomBootSectorFile, LoadAndBootBootSector},
|
{"BootSector" , EditCustomBootSectorFile, LoadAndBootBootSector},
|
||||||
|
|
||||||
{"Linux" , EditCustomBootLinux , LoadAndBootLinux },
|
{"Linux" , EditCustomBootLinux, LoadAndBootLinux },
|
||||||
{"WindowsNT40" , EditCustomBootReactOS, LoadAndBootWindows},
|
{"WindowsNT40" , EditCustomBootNTOS , LoadAndBootWindows},
|
||||||
#endif
|
#endif
|
||||||
{"Windows" , EditCustomBootReactOS, LoadAndBootWindows},
|
{"Windows" , EditCustomBootNTOS , LoadAndBootWindows},
|
||||||
{"Windows2003" , EditCustomBootReactOS, LoadAndBootWindows},
|
{"Windows2003" , EditCustomBootNTOS , LoadAndBootWindows},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* FUNCTIONS ******************************************************************/
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
|
|
@ -51,7 +51,8 @@ VOID OptionMenuCustomBoot(VOID)
|
||||||
"Boot Sector File",
|
"Boot Sector File",
|
||||||
"Linux",
|
"Linux",
|
||||||
#endif
|
#endif
|
||||||
"ReactOS"
|
"ReactOS",
|
||||||
|
"ReactOS Setup"
|
||||||
};
|
};
|
||||||
ULONG SelectedMenuItem;
|
ULONG SelectedMenuItem;
|
||||||
|
|
||||||
|
@ -84,11 +85,19 @@ VOID OptionMenuCustomBoot(VOID)
|
||||||
EditCustomBootLinux(0);
|
EditCustomBootLinux(0);
|
||||||
break;
|
break;
|
||||||
case 4: // ReactOS
|
case 4: // ReactOS
|
||||||
#else
|
EditCustomBootReactOS(0, FALSE);
|
||||||
case 0:
|
|
||||||
#endif
|
|
||||||
EditCustomBootReactOS(0);
|
|
||||||
break;
|
break;
|
||||||
|
case 5: // ReactOS Setup
|
||||||
|
EditCustomBootReactOS(0, TRUE);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
case 0: // ReactOS
|
||||||
|
EditCustomBootReactOS(0, FALSE);
|
||||||
|
break;
|
||||||
|
case 1: // ReactOS Setup
|
||||||
|
EditCustomBootReactOS(0, TRUE);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,7 +395,10 @@ VOID EditCustomBootLinux(IN ULONG_PTR SectionId OPTIONAL)
|
||||||
|
|
||||||
#endif // _M_IX86
|
#endif // _M_IX86
|
||||||
|
|
||||||
VOID EditCustomBootReactOS(IN ULONG_PTR SectionId OPTIONAL)
|
VOID
|
||||||
|
EditCustomBootReactOS(
|
||||||
|
IN ULONG_PTR SectionId OPTIONAL,
|
||||||
|
IN BOOLEAN IsSetup)
|
||||||
{
|
{
|
||||||
TIMEINFO* TimeInfo;
|
TIMEINFO* TimeInfo;
|
||||||
OperatingSystemItem OperatingSystem;
|
OperatingSystemItem OperatingSystem;
|
||||||
|
@ -452,7 +464,7 @@ VOID EditCustomBootReactOS(IN ULONG_PTR SectionId OPTIONAL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Add the BootType */
|
/* Add the BootType */
|
||||||
if (!IniAddSettingValueToSection(SectionId, "BootType", "Windows2003"))
|
if (!IniAddSettingValueToSection(SectionId, "BootType", IsSetup ? "ReactOSSetup" : "Windows2003"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Construct the ReactOS ARC system path */
|
/* Construct the ReactOS ARC system path */
|
||||||
|
|
|
@ -36,7 +36,10 @@ VOID EditCustomBootLinux(IN ULONG_PTR SectionId OPTIONAL);
|
||||||
VOID OptionMenuCustomBoot(VOID);
|
VOID OptionMenuCustomBoot(VOID);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VOID EditCustomBootReactOS(IN ULONG_PTR SectionId OPTIONAL);
|
VOID
|
||||||
|
EditCustomBootReactOS(
|
||||||
|
IN ULONG_PTR SectionId OPTIONAL,
|
||||||
|
IN BOOLEAN IsSetup);
|
||||||
|
|
||||||
#ifdef HAS_OPTION_MENU_REBOOT
|
#ifdef HAS_OPTION_MENU_REBOOT
|
||||||
VOID OptionMenuReboot(VOID);
|
VOID OptionMenuReboot(VOID);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue