#define NDEBUG
#include <debug.h>
-/* required free disk space in MB */
-#define MINIMUMDISKSIZE 350
/* GLOBALS ******************************************************************/
static LANGID LanguageId = 0;
+static ULONG RequiredPartitionDiskSpace = ~0;
+
/* FUNCTIONS ****************************************************************/
static VOID
UINT ErrorLine;
ULONG ReturnSize;
PGENERIC_LIST_ENTRY ListEntry;
+ INT IntValue;
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
return QUIT_PAGE;
}
+ /* Open 'DiskSpaceRequirements' section */
+ if (!SetupFindFirstLineW(SetupInf, L"DiskSpaceRequirements", L"FreeSysPartDiskSpace", &Context))
+ {
+ MUIDisplayError(ERROR_CORRUPT_TXTSETUPSIF, Ir, POPUP_WAIT_ENTER);
+ return QUIT_PAGE;
+ }
+
+ /* Get the 'FreeSysPartDiskSpace' value */
+ if (!SetupGetIntField(&Context, 1, &IntValue))
+ {
+ MUIDisplayError(ERROR_CORRUPT_TXTSETUPSIF, Ir, POPUP_WAIT_ENTER);
+ return QUIT_PAGE;
+ }
+
+ RequiredPartitionDiskSpace = (ULONG)IntValue;
+
/* Start PnP thread */
if (hPnpThread != INVALID_HANDLE_VALUE)
{
/* check for unpartitioned space */
m = PartEntry->UnpartitionedLength;
m = (m + (1 << 19)) >> 20; /* in MBytes (rounded) */
- if( m > MINIMUMDISKSIZE)
+ if( m > RequiredPartitionDiskSpace)
{
return TRUE;
}
// check for partitioned space
m = PartEntry->PartInfo[0].PartitionLength.QuadPart;
m = (m + (1 << 19)) >> 20; /* in MBytes (rounded) */
- if( m < MINIMUMDISKSIZE)
+ if( m < RequiredPartitionDiskSpace)
{
/* partition is too small so ask for another partion */
DPRINT1("Partition too small");
6 = Fonts
7 = bin
+[DiskSpaceRequirements]
+; Required free system partition disk space in MB
+FreeSysPartDiskSpace=350
+
[SourceDisksFiles]
acpi.sys=,,,,,,,,,,,,4
uniata.sys=,,,,,,x,,,,,,4