Make OSInstall generate Limine.CFG always when installing any bootloader, if the Limine files are present.

This commit is contained in:
TomAwezome 2022-10-31 00:45:04 -04:00
parent 6622e0f624
commit 05d6c373b9
2 changed files with 15 additions and 4 deletions

View file

@ -11,7 +11,6 @@
"Limine supports UEFI and BIOS mode and multiple boot protocols, but is written in BSD-2 licensed C code, and cannot be modified within ZealOS.$$FG$$\n\n\n"
// TODO FIXME: refactor OSUpgrade code into optional Diff prompt to compare ISO<->HDD before Install.
// (also test to ensure that Installs to existing installations don't remove existing untracked files)
CDirEntry OSFilesMGFind(CDirEntry *needle_entry, CDirEntry *haystack_list)
{
@ -204,7 +203,11 @@ U0 OSUpgrade()
"%c\n", ch;
if (ch == 'Z')
{
BootMHDIns(drv_let);
"\n(Generating optional UEFI-mode Limine.CFG...)\n";
LimineCFGMake(drv_let); // ensures we don't leave the LiveCD's Limine.CFG on the HDD
}
else
{
LimineMHDIns(drv_let);
@ -343,7 +346,11 @@ U0 VMInstallWiz()
"%c\n", ch;
if (ch == 'Z')
{
BootMHDIns('C');
"\n(Generating optional UEFI-mode Limine.CFG...)\n";
LimineCFGMake('C'); // ensures we don't leave the LiveCD's Limine.CFG on the HDD
}
else
{
LimineMHDIns('C');
@ -455,7 +462,11 @@ U0 RegularInstallWiz()
"%c\n", ch;
if (ch == 'Z')
{
BootMHDIns(drv_let);
"\n(Generating optional UEFI-mode Limine.CFG...)\n";
LimineCFGMake(drv_let); // ensures we don't leave the LiveCD's Limine.CFG on the HDD
}
else
{
LimineMHDIns(drv_let);

View file

@ -47,16 +47,16 @@ Bool LimineCFGMake(U8 drv_let)
"\n", drv_let, drive->prt_num + 1, drive->prt_num + 1);
DocPrint(doc, st);
"\n%C:/ drive added as a Limine.CFG menu entry.\n", drv_let;
"%C:/ drive added as a Limine.CFG menu entry.\n", drv_let;
}
else
"\n%C:/ drive is missing Limine bootloader files.\n", drv_let;
"%C:/ drive is missing Limine bootloader files.\n", drv_let;
}
}
DocWrite(doc);
DocDel(doc);
"/Boot/Limine.CFG generated.\n\n";
"/Boot/Limine.CFG generated.\n";
"Copying Limine.CFG to all other drives ...\n";
for (i = 0, drive = blkdev.drvs; i < DRIVES_NUM; i++, drive++)