mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 18:01:07 +00:00
[FREELDR]
- Correctly append a backslash to the BootPath (if needed). - Be able to specify relative boot paths (relative to the current boot device): as a consequence, remove the "LiveCD" hackish special value that was introduced long long ago. - Fix BootPath retrieval in ReactOSSetup mode (via the SystemPath optional value), and use a better way to build the temporary txtsetup.sif full file names. As a consequence we can now build hybrid cds with the following architecture: \ --> loader\ (bootsectors + free/setupldr.sys) --> myboot\ (contents of what_defaults_to_reactos directory for the bootcd) --> mylive\ (contents of what_defaults_to_reactos directory for the livecd) --> <regular_files> and freeldr.ini specifying the following values: ; The Setup entry [Setup] BootType=ReactOSSetup SystemPath=\myboot ; The LiveCD entry [LiveCD] BootType=Windows2003 SystemPath=\mylive Options=/MININT Part 2/2 CORE-9023 svn path=/trunk/; revision=65982
This commit is contained in:
parent
614b562bb0
commit
1ebcd68f0d
|
@ -32,20 +32,20 @@ LiveCD_LogFile="LiveCD (Log file)"
|
||||||
|
|
||||||
[LiveCD]
|
[LiveCD]
|
||||||
BootType=Windows2003
|
BootType=Windows2003
|
||||||
SystemPath=LiveCD\reactos
|
SystemPath=\reactos
|
||||||
Options=/MININT
|
Options=/MININT
|
||||||
|
|
||||||
[LiveCD_Debug]
|
[LiveCD_Debug]
|
||||||
BootType=Windows2003
|
BootType=Windows2003
|
||||||
SystemPath=LiveCD\reactos
|
SystemPath=\reactos
|
||||||
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT
|
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT
|
||||||
|
|
||||||
[LiveCD_Screen]
|
[LiveCD_Screen]
|
||||||
BootType=Windows2003
|
BootType=Windows2003
|
||||||
SystemPath=LiveCD\reactos
|
SystemPath=\reactos
|
||||||
Options=/DEBUG /DEBUGPORT=SCREEN /SOS /MININT
|
Options=/DEBUG /DEBUGPORT=SCREEN /SOS /MININT
|
||||||
|
|
||||||
[LiveCD_LogFile]
|
[LiveCD_LogFile]
|
||||||
BootType=Windows2003
|
BootType=Windows2003
|
||||||
SystemPath=LiveCD\reactos
|
SystemPath=\reactos
|
||||||
Options=/DEBUG /DEBUGPORT=FILE:\Device\HarddiskX\PartitionY\debug.log /SOS /MININT
|
Options=/DEBUG /DEBUGPORT=FILE:\Device\HarddiskX\PartitionY\debug.log /SOS /MININT
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
Changes in v3.0+ (05/01/2015) (hbelusca)
|
||||||
|
|
||||||
|
- Remove support for special value "LiveCD" of SystemPath option
|
||||||
|
for loading ReactOS since now we treat non-ARC SystemPath as
|
||||||
|
a path relative to the boot path.
|
||||||
|
|
||||||
Changes in v3.0.0 (11/12/2007) (fball)
|
Changes in v3.0.0 (11/12/2007) (fball)
|
||||||
|
|
||||||
- Support for building an ARC Tree.
|
- Support for building an ARC Tree.
|
||||||
|
|
|
@ -178,17 +178,40 @@ LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
|
||||||
HasSection = IniOpenSection(SectionName, &SectionId);
|
HasSection = IniOpenSection(SectionName, &SectionId);
|
||||||
|
|
||||||
UiDrawBackdrop();
|
UiDrawBackdrop();
|
||||||
UiDrawProgressBarCenter(1, 100, "Loading NT...");
|
UiDrawProgressBarCenter(1, 100, "Loading ReactOS Setup...");
|
||||||
|
|
||||||
/* Read the system path is set in the .ini file */
|
/* Read the system path is set in the .ini file */
|
||||||
if (!HasSection ||
|
if (!HasSection ||
|
||||||
!IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
|
!IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
|
||||||
{
|
{
|
||||||
MachDiskGetBootPath(BootPath, sizeof(BootPath));
|
// MachDiskGetBootPath(BootPath, sizeof(BootPath));
|
||||||
|
// strcpy(BootPath, SectionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Append a backslash */
|
/*
|
||||||
if ((strlen(BootPath)==0) || BootPath[strlen(BootPath)] != '\\')
|
* Check whether BootPath is a full path
|
||||||
|
* and if not, create a full boot path.
|
||||||
|
*
|
||||||
|
* See FsOpenFile for the technique used.
|
||||||
|
*/
|
||||||
|
if (strrchr(BootPath, ')') == NULL)
|
||||||
|
{
|
||||||
|
/* Temporarily save the boot path */
|
||||||
|
strcpy(FileName, BootPath);
|
||||||
|
|
||||||
|
/* This is not a full path. Use the current (i.e. boot) device. */
|
||||||
|
MachDiskGetBootPath(BootPath, sizeof(BootPath));
|
||||||
|
|
||||||
|
/* Append a path separator if needed */
|
||||||
|
if (FileName[0] != '\\' && FileName[0] != '/')
|
||||||
|
strcat(BootPath, "\\");
|
||||||
|
|
||||||
|
/* Append the remaining path */
|
||||||
|
strcat(BootPath, FileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Append a backslash if needed */
|
||||||
|
if ((strlen(BootPath) == 0) || BootPath[strlen(BootPath) - 1] != '\\')
|
||||||
strcat(BootPath, "\\");
|
strcat(BootPath, "\\");
|
||||||
|
|
||||||
/* Read booting options */
|
/* Read booting options */
|
||||||
|
@ -233,10 +256,11 @@ LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
|
||||||
ERR("Failed to open txtsetup.sif\n");
|
ERR("Failed to open txtsetup.sif\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sprintf(File, "%stxtsetup.sif", SystemPath);
|
strcpy(File, SystemPath);
|
||||||
if (InfOpenFile (&InfHandle, BootPath, &ErrorLine))
|
strcpy(FileName, BootPath);
|
||||||
|
strcat(FileName, "txtsetup.sif");
|
||||||
|
if (InfOpenFile(&InfHandle, FileName, &ErrorLine))
|
||||||
{
|
{
|
||||||
sprintf(File, "%s", SystemPath);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -621,16 +621,30 @@ LoadAndBootWindows(IN OperatingSystemItem* OperatingSystem,
|
||||||
strcpy(BootPath, SectionName);
|
strcpy(BootPath, SectionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Special case for LiveCD */
|
/*
|
||||||
if (!_strnicmp(BootPath, "LiveCD", strlen("LiveCD")))
|
* Check whether BootPath is a full path
|
||||||
|
* and if not, create a full boot path.
|
||||||
|
*
|
||||||
|
* See FsOpenFile for the technique used.
|
||||||
|
*/
|
||||||
|
if (strrchr(BootPath, ')') == NULL)
|
||||||
{
|
{
|
||||||
strcpy(FileName, BootPath + strlen("LiveCD"));
|
/* Temporarily save the boot path */
|
||||||
|
strcpy(FileName, BootPath);
|
||||||
|
|
||||||
|
/* This is not a full path. Use the current (i.e. boot) device. */
|
||||||
MachDiskGetBootPath(BootPath, sizeof(BootPath));
|
MachDiskGetBootPath(BootPath, sizeof(BootPath));
|
||||||
|
|
||||||
|
/* Append a path separator if needed */
|
||||||
|
if (FileName[0] != '\\' && FileName[0] != '/')
|
||||||
|
strcat(BootPath, "\\");
|
||||||
|
|
||||||
|
/* Append the remaining path */
|
||||||
strcat(BootPath, FileName);
|
strcat(BootPath, FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Append a backslash */
|
/* Append a backslash if needed */
|
||||||
if ((strlen(BootPath)==0) || BootPath[strlen(BootPath)] != '\\')
|
if ((strlen(BootPath) == 0) || BootPath[strlen(BootPath) - 1] != '\\')
|
||||||
strcat(BootPath, "\\");
|
strcat(BootPath, "\\");
|
||||||
|
|
||||||
/* Read booting options */
|
/* Read booting options */
|
||||||
|
|
Loading…
Reference in a new issue