Author: janderwald Date: Mon Aug 27 22:40:02 2007 New Revision: 28605
URL: http://svn.reactos.org/svn/reactos?rev=28605&view=rev Log: - implement an AutoPartition setting in usetup (needs to be tested though yet)
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
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 Mon Aug 27 22:40:02 2007 @@ -80,6 +80,7 @@ LONG UnattendDestinationPartitionNumber; LONG UnattendMBRInstallType = -1; LONG UnattendFormatPartition = 0; +LONG AutoPartition = 0; WCHAR UnattendInstallationDirectory[MAX_PATH]; BOOLEAN RepairUpdateFlag = FALSE;
@@ -578,7 +579,13 @@ UnattendFormatPartition = IntValue; } } - + if (SetupFindFirstLineW(UnattendInf, L"Unattend", L"AutoPartition", &Context)) + { + if (SetupGetIntField(&Context, 1, &IntValue)) + { + AutoPartition = IntValue; + } + } SetupCloseInfFile(UnattendInf);
DPRINT("Running unattended setup\n"); @@ -1390,6 +1397,10 @@ if (SelectPartition(PartitionList, UnattendDestinationDiskNumber, UnattendDestinationPartitionNumber)) { return(SELECT_FILE_SYSTEM_PAGE); + } + else + { + return (CREATE_PARTITION_PAGE); } }
@@ -1695,21 +1706,29 @@ while (TRUE) { MaxSize = (PartEntry->UnpartitionedLength + (1 << 19)) >> 20; /* in MBytes (rounded) */ - ShowPartitionSizeInputBox (12, 14, xScreen - 12, 17, /* left, top, right, bottom */ + if (!IsUnattendedSetup || !AutoPartition) + { + ShowPartitionSizeInputBox (12, 14, xScreen - 12, 17, /* left, top, right, bottom */ MaxSize, InputBuffer, &Quit, &Cancel); + } + else + { + Quit = FALSE; + Cancel = FALSE; + } if (Quit == TRUE) - { - if (ConfirmQuit (Ir) == TRUE) { - return QUIT_PAGE; + if (ConfirmQuit (Ir) == TRUE) + { + return QUIT_PAGE; + } } - } else if (Cancel == TRUE) - { - return SELECT_PARTITION_PAGE; - } + { + return SELECT_PARTITION_PAGE; + } else - { + { PartSize = atoi (InputBuffer); if (PartSize < 1) {