Author: ekohl
Date: Tue May 25 00:32:23 2010
New Revision: 47345
URL:
http://svn.reactos.org/svn/reactos?rev=47345&view=rev
Log:
[USETUP]
Make the required minimum disk space configurable from the txtsetup.sif file.
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/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Tue May 25 00:32:23
2010
@@ -31,8 +31,6 @@
#define NDEBUG
#include <debug.h>
-/* required free disk space in MB */
-#define MINIMUMDISKSIZE 350
/* GLOBALS ******************************************************************/
@@ -84,6 +82,8 @@
static LANGID LanguageId = 0;
+static ULONG RequiredPartitionDiskSpace = ~0;
+
/* FUNCTIONS ****************************************************************/
static VOID
@@ -723,6 +723,7 @@
UINT ErrorLine;
ULONG ReturnSize;
PGENERIC_LIST_ENTRY ListEntry;
+ INT IntValue;
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
@@ -802,6 +803,22 @@
MUIDisplayError(ERROR_SIGNATURE_TXTSETUPSIF, Ir, POPUP_WAIT_ENTER);
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)
@@ -1390,7 +1407,7 @@
/* check for unpartitioned space */
m = PartEntry->UnpartitionedLength;
m = (m + (1 << 19)) >> 20; /* in MBytes (rounded) */
- if( m > MINIMUMDISKSIZE)
+ if( m > RequiredPartitionDiskSpace)
{
return TRUE;
}
@@ -1398,7 +1415,7 @@
// 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");
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 [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Tue May 25 00:32:23 2010
@@ -10,6 +10,10 @@
5 = media
6 = Fonts
7 = bin
+
+[DiskSpaceRequirements]
+; Required free system partition disk space in MB
+FreeSysPartDiskSpace=350
[SourceDisksFiles]
acpi.sys=,,,,,,,,,,,,4