diff --git a/reactos/base/setup/usetup/interface/usetup.c b/reactos/base/setup/usetup/interface/usetup.c index b0b99e14c8f..6832cad83b8 100644 --- a/reactos/base/setup/usetup/interface/usetup.c +++ b/reactos/base/setup/usetup/interface/usetup.c @@ -2635,7 +2635,7 @@ InstallDirectoryPage(PINPUT_RECORD Ir) } static BOOLEAN -AddSectionToCopyQueue(HINF InfFile, +AddSectionToCopyQueueCab(HINF InfFile, PWCHAR SectionName, PWCHAR SourceCabinet, PCUNICODE_STRING DestinationPath, @@ -2709,6 +2709,94 @@ AddSectionToCopyQueue(HINF InfFile, return TRUE; } +static BOOLEAN +AddSectionToCopyQueue(HINF InfFile, + PWCHAR SectionName, + PWCHAR SourceCabinet, + PCUNICODE_STRING DestinationPath, + PINPUT_RECORD Ir) +{ + INFCONTEXT FilesContext; + INFCONTEXT DirContext; + PWCHAR FileKeyName; + PWCHAR FileKeyValue; + PWCHAR DirKeyValue; + PWCHAR TargetFileName; + + if (SourceCabinet) + return AddSectionToCopyQueueCab(InfFile, L"SourceFiles", SourceCabinet, DestinationPath, Ir); + + /* Search for the SectionName section */ + if (!SetupFindFirstLineW (InfFile, SectionName, NULL, &FilesContext)) + { + char Buffer[128]; + sprintf(Buffer, "Setup failed to find the '%S' section\nin TXTSETUP.SIF.\n", SectionName); + PopupError(Buffer, "ENTER = Reboot computer", Ir, POPUP_WAIT_ENTER); + return(FALSE); + } + + /* + * Enumerate the files in the section + * and add them to the file queue. + */ + do + { + /* Get source file name and target directory id */ + if (!INF_GetData (&FilesContext, &FileKeyName, &FileKeyValue)) + { + /* FIXME: Handle error! */ + DPRINT1("INF_GetData() failed\n"); + break; + } + + /* Get target directory id */ + if (!INF_GetDataField (&FilesContext, 13, &FileKeyValue)) + { + /* FIXME: Handle error! */ + DPRINT1("INF_GetData() failed\n"); + break; + } + + /* Get optional target file name */ + if (!INF_GetDataField (&FilesContext, 11, &TargetFileName)) + TargetFileName = NULL; + else if (!*TargetFileName) + TargetFileName = NULL; + + DPRINT ("FileKeyName: '%S' FileKeyValue: '%S'\n", FileKeyName, FileKeyValue); + + /* Lookup target directory */ + if (!SetupFindFirstLineW (InfFile, L"Directories", FileKeyValue, &DirContext)) + { + /* FIXME: Handle error! */ + DPRINT1("SetupFindFirstLine() failed\n"); + break; + } + + if (!INF_GetData (&DirContext, NULL, &DirKeyValue)) + { + /* FIXME: Handle error! */ + DPRINT1("INF_GetData() failed\n"); + break; + } + + if (!SetupQueueCopy(SetupFileQueue, + SourceCabinet, + SourceRootPath.Buffer, + SourceRootDir.Buffer, + FileKeyName, + DirKeyValue, + TargetFileName)) + { + /* FIXME: Handle error! */ + DPRINT1("SetupQueueCopy() failed\n"); + } + } + while (SetupFindNextLine(&FilesContext, &FilesContext)); + + return TRUE; +} + static BOOLEAN PrepareCopyPageInfFile(HINF InfFile, PWCHAR SourceCabinet, @@ -2722,7 +2810,7 @@ PrepareCopyPageInfFile(HINF InfFile, NTSTATUS Status; /* Add common files */ - if (!AddSectionToCopyQueue(InfFile, L"SourceFiles", SourceCabinet, &DestinationPath, Ir)) + if (!AddSectionToCopyQueue(InfFile, L"SourceDisksFiles", SourceCabinet, &DestinationPath, Ir)) return FALSE; /* Add specific files depending of computer type */ diff --git a/reactos/boot/bootdata/txtsetup.sif b/reactos/boot/bootdata/txtsetup.sif index 0703079c89d..1d4cfe6b006 100644 --- a/reactos/boot/bootdata/txtsetup.sif +++ b/reactos/boot/bootdata/txtsetup.sif @@ -5,53 +5,35 @@ Signature = "$ReactOS$" ; = 1 = "\" 2 = system32 -3 = system32\drivers -4 = system32\config +3 = system32\config +4 = system32\drivers 5 = media 6 = media\fonts 7 = bin [SourceDisksFiles] -atapi.sys=,,,,,,x -buslogic.sys=,,,,,,x -;acpi.sys=,,,,,,x -;isapnp.sys=,,,,,,x -;pci.sys=,,,,,,x -scsiport.sys=,,,,,,x -class2.sys=,,,,,,x -cdrom.sys=,,,,,,x -cdfs.sys=,,,,,,x -disk.sys=,,,,,,x -floppy.sys=,,,,,,x -i8042prt.sys=,,,,,,x -kbdclass.sys=,,,,,,x -blue.sys=,,,,,,x - -[SourceFiles] -; = -acpi.sys = 3 -atapi.sys = 3 -buslogic.sys = 3 -blue.sys = 3 -bootvid.dll = 3 -c_437.nls = 2 -c_1252.nls = 2 -cdfs.sys = 3 -cdrom.sys = 3 -class2.sys = 3 -kdcom.dll = 3 -disk.sys = 3 -floppy.sys = 3 -;keyboard.sys = 3 -i8042prt.sys = 3 -kbdclass.sys = 3 -l_intl.nls = 2 -ntfs.sys = 3 -ntoskrnl.exe = 2 -pci.sys = 3 -scsiport.sys = 3 -uniata.sys = 3 -vfatfs.sys = 3 +acpi.sys=,,,,,,,,,,,,4 +atapi.sys=,,,,,,x,,,,,,4 +buslogic.sys=,,,,,,x,,,,,,4 +blue.sys=,,,,,,x,,,,,,4 +bootvid.dll=,,,,,,,,,,,,4 +c_437.nls=,,,,,,,,,,,,2 +c_1252.nls=,,,,,,,,,,,,2 +cdfs.sys=,,,,,,x,,,,,,4 +cdrom.sys=,,,,,,x,,,,,,4 +class2.sys=,,,,,,x,,,,,,4 +kdcom.dll=,,,,,,,,,,,,4 +disk.sys=,,,,,,x,,,,,,4 +floppy.sys=,,,,,,x,,,,,,4 +i8042prt.sys=,,,,,,x,,,,,,4 +kbdclass.sys=,,,,,,x,,,,,,4 +l_intl.nls=,,,,,,,,,,,,2 +ntfs.sys=,,,,,,,,,,,,4 +ntoskrnl.exe=,,,,,,,,,,,,2 +pci.sys=,,,,,,,,,,,,4 +scsiport.sys=,,,,,,x,,,,,,4 +uniata.sys=,,,,,,,,,,,,4 +vfatfs.sys=,,,,,,,,,,,,4 [Cabinets] Cabinet=reactos.cab @@ -79,12 +61,12 @@ pci_up = "PC UP" pci_mp = "PC MP" [Files.pci_up] -; = , -hal.dll = 2 +ntoskrnl.exe=,,,,,,,,,,,,2 +hal.dll=,,,,,,,,,,,,2 [Files.pci_mp] -; = , -halmp.dll = 2,hal.dll +ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2 +halmp.dll=,,,,,,,,,,hal.dll,,2 [Display] ; = ,,,,,