mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:45:40 +00:00
[SETUPLIB] Some INI support refactoring: function/struct names, duplicated code (#6815)
And convert ANSI strings to UNICODE in a better way instead of zero-extending them.
This commit is contained in:
parent
cb6fc76b8b
commit
817c27a54e
4 changed files with 291 additions and 444 deletions
|
@ -232,7 +232,7 @@ InstallSetupInfFile(
|
|||
IO_STATUS_BLOCK IoStatusBlock;
|
||||
#endif
|
||||
|
||||
PINICACHESECTION IniSection;
|
||||
PINI_SECTION IniSection;
|
||||
WCHAR PathBuffer[MAX_PATH];
|
||||
WCHAR UnattendInfPath[MAX_PATH];
|
||||
|
||||
|
@ -241,35 +241,31 @@ InstallSetupInfFile(
|
|||
if (!IniCache)
|
||||
return;
|
||||
|
||||
IniSection = IniCacheAppendSection(IniCache, L"SetupParams");
|
||||
IniSection = IniAddSection(IniCache, L"SetupParams");
|
||||
if (IniSection)
|
||||
{
|
||||
/* Key "skipmissingfiles" */
|
||||
// RtlStringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer),
|
||||
// L"\"%s\"", L"WinNt5.2");
|
||||
// IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
// L"Version", PathBuffer);
|
||||
// IniAddKey(IniSection, L"Version", PathBuffer);
|
||||
}
|
||||
|
||||
IniSection = IniCacheAppendSection(IniCache, L"Data");
|
||||
IniSection = IniAddSection(IniCache, L"Data");
|
||||
if (IniSection)
|
||||
{
|
||||
RtlStringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer),
|
||||
L"\"%s\"", IsUnattendedSetup ? L"yes" : L"no");
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
L"UnattendedInstall", PathBuffer);
|
||||
IniAddKey(IniSection, L"UnattendedInstall", PathBuffer);
|
||||
|
||||
// "floppylessbootpath" (yes/no)
|
||||
|
||||
RtlStringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer),
|
||||
L"\"%s\"", L"winnt");
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
L"ProductType", PathBuffer);
|
||||
IniAddKey(IniSection, L"ProductType", PathBuffer);
|
||||
|
||||
RtlStringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer),
|
||||
L"\"%s\\\"", pSetupData->SourceRootPath.Buffer);
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
L"SourcePath", PathBuffer);
|
||||
IniAddKey(IniSection, L"SourcePath", PathBuffer);
|
||||
|
||||
// "floppyless" ("0")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue