Author: hpoussin Date: Sun Dec 2 14:32:52 2007 New Revision: 30954
URL: http://svn.reactos.org/svn/reactos?rev=30954&view=rev Log: In txtsetup.sif, replace SourceFiles section by SourceDisksFiles See http://www.win-web.be/forum/index.php?showtopic=10706&st=0&p=86340&a...
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c trunk/reactos/boot/bootdata/txtsetup.sif
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interface... ============================================================================== --- trunk/reactos/base/setup/usetup/interface/usetup.c (original) +++ trunk/reactos/base/setup/usetup/interface/usetup.c Sun Dec 2 14:32:52 2007 @@ -2635,7 +2635,7 @@ }
static BOOLEAN -AddSectionToCopyQueue(HINF InfFile, +AddSectionToCopyQueueCab(HINF InfFile, PWCHAR SectionName, PWCHAR SourceCabinet, PCUNICODE_STRING DestinationPath, @@ -2710,6 +2710,94 @@ }
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, PINPUT_RECORD Ir) @@ -2722,7 +2810,7 @@ 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 */
Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif?... ============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif Sun Dec 2 14:32:52 2007 @@ -5,53 +5,35 @@ ; <directory_id> = <path> 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] -; <filename> = <directory_id> -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_mp = "PC MP"
[Files.pci_up] -; <filename> = <directory_id>,<new name> -hal.dll = 2 +ntoskrnl.exe=,,,,,,,,,,,,2 +hal.dll=,,,,,,,,,,,,2
[Files.pci_mp] -; <filename> = <directory_id>,<new name> -halmp.dll = 2,hal.dll +ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2 +halmp.dll=,,,,,,,,,,hal.dll,,2
[Display] ;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp>