IniSection = IniCacheAppendSection(IniCache,
L"FREELOADER");
- /* DefaultOS=ReactOS */
- IniCacheInsertKey(IniSection,
- NULL,
+#if DBG
+ if (IsUnattendedSetup)
+ {
+ /* DefaultOS=ReactOS */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"DefaultOS",
+ L"ReactOS_KdSerial");
+ }
+ else
+#endif
+ {
+ /* DefaultOS=ReactOS */
+ IniCacheInsertKey(IniSection,
+ NULL,
INSERT_LAST,
L"DefaultOS",
L"ReactOS");
+ }
- /* Timeout=0 or 10 */
- IniCacheInsertKey(IniSection,
+#if DBG
+ if (IsUnattendedSetup)
+#endif
+ {
+ /* Timeout=0 for unattended or non debug*/
+ IniCacheInsertKey(IniSection,
NULL,
INSERT_LAST,
L"TimeOut",
-#ifndef DBG
L"0");
-#else
+ }
+#if DBG
+ else
+ {
+ /* Timeout=0 or 10 */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"TimeOut",
L"10");
+ }
#endif
/* Create "Display" section */
NULL,
INSERT_LAST,
L"MenuTextColor",
- L"White");
+ L"Gray");
/* MenuColor=Blue */
IniCacheInsertKey(IniSection,
NULL,
INSERT_LAST,
L"MenuColor",
- L"Blue");
+ L"Black");
/* TextColor=Yellow */
IniCacheInsertKey(IniSection,
NULL,
INSERT_LAST,
L"TextColor",
- L"Yellow");
+ L"Gray");
/* SelectedTextColor=Black */
IniCacheInsertKey(IniSection,
INSERT_LAST,
L"SelectedColor",
L"Gray");
+
+ /* SelectedColor=Gray */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"ShowTime",
+ L"No");
+
+ /* SelectedColor=Gray */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"MenuBox",
+ L"No");
+
+ /* SelectedColor=Gray */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"CenterMenu",
+ L"No");
+
+ /* SelectedColor=Gray */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"MinimalUI",
+ L"Yes");
+
+ /* SelectedColor=Gray */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"TimeText",
+ L"Seconds until highlighted choice will be started automatically: ");
}
L"SystemPath",
ArcPath);
- /* Options=/DEBUGPORT=SCREEN /NOGUIBOOT */
+ /* Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS*/
IniCacheInsertKey(IniSection,
NULL,
INSERT_LAST,
L"Options",
- L"/DEBUGPORT=SCREEN /NOGUIBOOT");
+ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
/* Create "DOS" section */
IniSection = IniCacheAppendSection(IniCache,
}
+NTSTATUS
+CreateFreeLoaderEntry(
+ PINICACHE IniCache,
+ PINICACHESECTION OSSection,
+ PWCHAR Section,
+ PWCHAR Description,
+ PWCHAR BootType,
+ PWCHAR ArcPath,
+ PWCHAR Options)
+{
+ PINICACHESECTION IniSection;
+
+ /* Insert entry into "Operating Systems" section */
+ IniCacheInsertKey(OSSection,
+ NULL,
+ INSERT_LAST,
+ Section,
+ Description);
+
+ /* Create new section */
+ IniSection = IniCacheAppendSection(IniCache, Section);
+
+ /* BootType= */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"BootType",
+ BootType);
+
+ /* SystemPath= */
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"SystemPath",
+ ArcPath);
+
+ /* Options=*/
+ IniCacheInsertKey(IniSection,
+ NULL,
+ INSERT_LAST,
+ L"Options",
+ Options);
+
+ return STATUS_SUCCESS;
+}
+
NTSTATUS
CreateFreeLoaderIniForReactos(PWCHAR IniPath,
PWCHAR ArcPath)
IniSection = IniCacheAppendSection(IniCache,
L"Operating Systems");
- /* ReactOS="ReactOS" */
- IniCacheInsertKey(IniSection,
- NULL,
- INSERT_LAST,
- L"ReactOS",
- L"\"ReactOS\"");
-
- /* ReactOS_Debug="ReactOS (Debug)" */
- IniCacheInsertKey(IniSection,
- NULL,
- INSERT_LAST,
- L"ReactOS_Debug",
- L"\"ReactOS (Debug)\"");
-
- /* Create "ReactOS" section */
- IniSection = IniCacheAppendSection(IniCache,
- L"ReactOS");
-
- /* BootType=ReactOS */
- IniCacheInsertKey(IniSection,
- NULL,
- INSERT_LAST,
- L"BootType",
- L"ReactOS");
-
- /* SystemPath=<ArcPath> */
- IniCacheInsertKey(IniSection,
- NULL,
- INSERT_LAST,
- L"SystemPath",
- ArcPath);
-
- /* Create "ReactOS_Debug" section */
- IniSection = IniCacheAppendSection(IniCache,
- L"ReactOS_Debug");
+ /* ReactOS */
+ CreateFreeLoaderEntry(IniCache, IniSection,
+ L"ReactOS", L"\"ReactOS\"",
+ L"Windows2003", ArcPath,
+ L"");
+
+ /* ReactOS_Debug */
+ CreateFreeLoaderEntry(IniCache, IniSection,
+ L"ReactOS_Debug", L"\"ReactOS (Debug)\"",
+ L"Windows2003", ArcPath,
+ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
+
+#if DBG
+ /* ReactOS_KdSerial */
+ CreateFreeLoaderEntry(IniCache, IniSection,
+ L"ReactOS_KdSerial", L"\"ReactOS (RosDbg)\"",
+ L"ReactOS", ArcPath,
+ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /KDSERIAL");
+
+ /* ReactOS_Ram */
+ CreateFreeLoaderEntry(IniCache, IniSection,
+ L"ReactOS_Ram", L"\"ReactOS (RAM Disk)\"",
+ L"ReactOS", L"ramdisk(0)\\ReactOS",
+ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /RDIMAGEPATH=reactos.img /RDIMAGEOFFSET=32256");
+#endif
- /* BootType=ReactOS */
- IniCacheInsertKey(IniSection,
- NULL,
- INSERT_LAST,
- L"BootType",
- L"ReactOS");
+ /* ReactOS_old */
+ CreateFreeLoaderEntry(IniCache, IniSection,
+ L"ReactOS_old", L"\"ReactOS (old boot method)\"",
+ L"ReactOS", ArcPath,
+ L"");
- /* SystemPath=<ArcPath> */
- IniCacheInsertKey(IniSection,
- NULL,
- INSERT_LAST,
- L"SystemPath",
- ArcPath);
-
- /* Options=/DEBUGPORT=SCREEN /NOGUIBOOT */
- IniCacheInsertKey(IniSection,
- NULL,
- INSERT_LAST,
- L"Options",
- L"/DEBUGPORT=COM1 /NOGUIBOOT");
+ /* ReactOS_Debug_old */
+ CreateFreeLoaderEntry(IniCache, IniSection,
+ L"ReactOS_Debug_old", L"\"ReactOS (Debug, old boot method)\"",
+ L"ReactOS", ArcPath,
+ L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS");
/* Save the ini file */
IniCacheSave(IniCache, IniPath);
NtClose(FileHandle);
if (!NT_SUCCESS(Status))
{
-CHECKPOINT1;
RtlFreeHeap(ProcessHeap, 0, OrigBootSector);
return(Status);
}
return(Status);
}
-
BOOLEAN
CheckInstallFatBootcodeToPartition(PUNICODE_STRING SystemRootPath)
{
+#ifdef __REACTOS__
if (DoesFileExist(SystemRootPath->Buffer, L"ntldr") ||
DoesFileExist(SystemRootPath->Buffer, L"boot.ini"))
{
{
return TRUE;
}
+#endif
return FALSE;
}
PUNICODE_STRING DestinationArcPath,
UCHAR PartitionType)
{
+#ifdef __REACTOS__
WCHAR SrcPath[MAX_PATH];
WCHAR DstPath[MAX_PATH];
NTSTATUS Status;
/* FAT or FAT32 partition */
- DPRINT1("System path: '%wZ'\n", SystemRootPath);
+ DPRINT("System path: '%wZ'\n", SystemRootPath);
if (DoesFileExist(SystemRootPath->Buffer, L"ntldr") == TRUE ||
DoesFileExist(SystemRootPath->Buffer, L"boot.ini") == TRUE)
wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\freeldr.sys");
- DPRINT1("Copy: %S ==> %S\n", SrcPath, DstPath);
+ DPRINT("Copy: %S ==> %S\n", SrcPath, DstPath);
Status = SetupCopyFile(SrcPath, DstPath);
if (!NT_SUCCESS(Status))
{
wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\freeldr.ini");
- DPRINT1("Copy: %S ==> %S\n", SrcPath, DstPath);
+ DPRINT("Copy: %S ==> %S\n", SrcPath, DstPath);
Status = CreateFreeLoaderIniForReactos(DstPath,
DestinationArcPath->Buffer);
if (!NT_SUCCESS(Status))
wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\bootsect.old");
- DPRINT1("Save bootsector: %S ==> %S\n", SrcPath, DstPath);
+ DPRINT("Save bootsector: %S ==> %S\n", SrcPath, DstPath);
Status = SaveCurrentBootSector(SrcPath,
DstPath);
if (!NT_SUCCESS(Status))
}
return STATUS_SUCCESS;
+#else
+ return STATUS_NOT_IMPLEMENTED;
+#endif
}
InstallFatBootcodeToFloppy(PUNICODE_STRING SourceRootPath,
PUNICODE_STRING DestinationArcPath)
{
+#ifdef __REACTOS__
WCHAR SrcPath[MAX_PATH];
WCHAR DstPath[MAX_PATH];
NTSTATUS Status;
}
return STATUS_SUCCESS;
+#else
+ return STATUS_NOT_IMPLEMENTED;
+#endif
}
/* EOF */