- Re-enable the partition size check and display a warning if the install partition is too small.
- Update the required install partition size to 550MB.

svn path=/trunk/; revision=65847
This commit is contained in:
Eric Kohl 2014-12-27 12:33:59 +00:00
parent 9eba5bef02
commit 27ff04d62b
27 changed files with 123 additions and 84 deletions

View file

@ -66,7 +66,7 @@ typedef enum
ERROR_UPDATE_LOCALESETTINGS,
ERROR_ADDING_KBLAYOUTS,
ERROR_UPDATE_GEOID,
ERROR_INSUFFICIENT_DISKSPACE,
ERROR_INSUFFICIENT_PARTITION_SIZE,
ERROR_PARTITION_TABLE_FULL,
ERROR_ONLY_ONE_EXTENDED,

View file

@ -1425,28 +1425,18 @@ LayoutSettingsPage(PINPUT_RECORD Ir)
}
#if 0
static BOOL
IsDiskSizeValid(PPARTENTRY PartEntry)
{
ULONGLONG m1, m2;
ULONGLONG size;
/* check for unpartitioned space */
m1 = PartEntry->UnpartitionedLength;
m1 = (m1 + (1 << 19)) >> 20; /* in MBytes (rounded) */
size = PartEntry->SectorCount.QuadPart * PartEntry->DiskEntry->BytesPerSector;
size = (size + 524288) / 1048576; /* in MBytes */
if( m1 > RequiredPartitionDiskSpace)
{
return TRUE;
}
/* check for partitioned space */
m2 = PartEntry->PartInfo[0].PartitionLength.QuadPart;
m2 = (m2 + (1 << 19)) >> 20; /* in MBytes (rounded) */
if (m2 < RequiredPartitionDiskSpace)
if (size < RequiredPartitionDiskSpace)
{
/* partition is too small so ask for another partion */
DPRINT1("Partition is too small(unpartitioned: %I64u MB, partitioned: %I64u MB), required disk space is %lu MB\n", m1, m2, RequiredPartitionDiskSpace);
DPRINT1("Partition is too small (size: %I64u MB), required disk space is %lu MB\n", size, RequiredPartitionDiskSpace);
return FALSE;
}
else
@ -1454,7 +1444,6 @@ IsDiskSizeValid(PPARTENTRY PartEntry)
return TRUE;
}
}
#endif
static PAGE_NUMBER
@ -1513,17 +1502,17 @@ SelectPartitionPage(PINPUT_RECORD Ir)
{
if (AutoPartition)
{
#if 0
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
#endif
CreatePrimaryPartition(PartitionList,
PartitionList->CurrentPartition->SectorCount.QuadPart,
TRUE);
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
RequiredPartitionDiskSpace);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
return SELECT_FILE_SYSTEM_PAGE;
@ -1531,13 +1520,13 @@ SelectPartitionPage(PINPUT_RECORD Ir)
}
else
{
#if 0
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
RequiredPartitionDiskSpace);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
#endif
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
return SELECT_FILE_SYSTEM_PAGE;
@ -1609,13 +1598,6 @@ SelectPartitionPage(PINPUT_RECORD Ir)
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN) /* ENTER */
{
#if 0
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_DISKSPACE, Ir, POPUP_WAIT_ANY_KEY);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
#endif
if (IsContainerPartition(PartitionList->CurrentPartition->PartitionType))
continue; //return SELECT_PARTITION_PAGE;
@ -1627,6 +1609,13 @@ SelectPartitionPage(PINPUT_RECORD Ir)
TRUE);
}
if (!IsDiskSizeValid(PartitionList->CurrentPartition))
{
MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
RequiredPartitionDiskSpace);
return SELECT_PARTITION_PAGE; /* let the user select another partition */
}
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
return SELECT_FILE_SYSTEM_PAGE;

View file

@ -1506,8 +1506,10 @@ MUI_ERROR bgBGErrorEntries[] =
"ENTER = <20>१ ¯ã᪠­¥ ­  ª®¬¯îâêà "
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"<EFBFBD> 豆﹤<E8B186>剁 歹<><> 亢摵罱聬陋 屣恣恕陋 能桑瘔<E6A191>.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * <20> â¨á­¥â¥ ª« ¢¨è, §  ¤  ¯à®¤ê«¦¨â¥.",
NULL
},

View file

@ -1493,8 +1493,10 @@ MUI_ERROR bnBDErrorEntries[] =
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Press any key to continue.",
NULL
},

View file

@ -1501,8 +1501,10 @@ MUI_ERROR csCZErrorEntries[] =
"ENTER = Restartovat poŸ¡taŸ"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Na zvolenm odd¡lu nen¡ dost volnho m¡sta.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * PokraŸujte stisknut¡m libovoln kl vesy.",
NULL
},

View file

@ -1497,9 +1497,10 @@ MUI_ERROR deDEErrorEntries[] =
"EINGABETASTE = Computer neu starten"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Es ist nicht gen<65>gend Speicherplatz auf der\n"
"gew„hlten Partition vorhanden.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"Die gew„hlten Partition ist nicht groá genug, um ReactOS zu installieren.\n"
"Die Installationspartition muss mindestens %lu MB groá sein.\n"
"\n"
" * Eine beliebige Taste zum Fortsetzen dr<64>cken.",
NULL
},

View file

@ -1493,8 +1493,10 @@ MUI_ERROR enUSErrorEntries[] =
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Press any key to continue.",
NULL
},

View file

@ -1501,8 +1501,10 @@ MUI_ERROR esESErrorEntries[] =
"ENTER = Reiniciar el equipo"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"No hay suficiente espacio disponible en la partici¢n seleccionada.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Presione una tecla para continuar.",
NULL
},

View file

@ -1491,8 +1491,10 @@ MUI_ERROR etEEErrorEntries[] =
"ENTER = Taask„ivita arvuti"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Valitud partitsioonil pole piisavalt ruumi.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Vajuta suvalist klahvi, et j„tkata.",
NULL
},

View file

@ -1506,8 +1506,10 @@ MUI_ERROR frFRErrorEntries[] =
"ENTR<EFBFBD>E = Redmarrer l'ordinateur"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Pas assez d'espace libre dans la partition slectionne.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Appuyer sur une touche pour continuer.",
NULL
},

View file

@ -1494,8 +1494,10 @@ MUI_ERROR heILErrorEntries[] =
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Press any key to continue.",
NULL
},

View file

@ -1495,8 +1495,10 @@ MUI_ERROR itITErrorEntries[] =
"INVIO = Riavviare il computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Lo spazio disponibile nella partizione selezionata Š insufficiente.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Premere un tasto qualsiasi per continuare.",
NULL
},

View file

@ -1495,8 +1495,10 @@ MUI_ERROR jaJPErrorEntries[] =
"ENTER = ºÝËß­°ÀÉ »²·ÄÞ³"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Press any key to continue.",
NULL
},

View file

@ -1503,8 +1503,10 @@ MUI_ERROR ltLTErrorEntries[] =
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Press any key to continue.",
NULL
},

View file

@ -1539,8 +1539,10 @@ MUI_ERROR nlNLErrorEntries[] =
"ENTER = Computer opnieuw opstarten"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Onvoldoende vrije ruimte in de geselecteerde partitie.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Druk op een toets om door te gaan.",
NULL
},

View file

@ -1503,8 +1503,10 @@ MUI_ERROR plPLErrorEntries[] =
"ENTER = Restart komputera"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Brak wystarczajĽcej wolnej przestrzeni w wybranej partycji.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Naci˜nij dowolny klawisz, aby kontynuowa†.",
NULL
},

View file

@ -1531,8 +1531,10 @@ MUI_ERROR ptBRErrorEntries[] =
"ENTER=Reiniciar"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"NÆo h  espa‡o suficiente na parti‡Æo selecionada.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Pressione qualquer tecla para continuar.",
NULL
},

View file

@ -1570,9 +1570,10 @@ MUI_ERROR roROErrorEntries[] =
"ENTER = Repornire calculator"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Pe partiîia selectatÇ nu existÇ suficient\n"
"spaîiu liber."
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Tastaîi pentru a continua.",
NULL
},

View file

@ -1495,8 +1495,10 @@ MUI_ERROR ruRUErrorEntries[] =
"ENTER = Reboot computer"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Not enough free space in the selected partition.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Press any key to continue.",
NULL
},

View file

@ -1505,8 +1505,10 @@ MUI_ERROR skSKErrorEntries[] =
"ENTER = Reçtart poŸ¡taŸa"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Na zvolenej partˇcii nie je dostatok vonho miesta.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * PokraŸujte stlaŸen¡m ubovonho kl vesu.",
NULL
},

View file

@ -1498,8 +1498,10 @@ MUI_ERROR sqALErrorEntries[] =
"ENTER = Ristarto kompjuterin"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Jo mjaft hapesir‰ e lir‰ n‰ particionin e p‰rzgjedhur.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Shtypni nj‰ tast cfar‰do p‰r t‰ vazhduar.",
NULL
},

View file

@ -1501,8 +1501,10 @@ MUI_ERROR svSEErrorEntries[] =
"ENTER = Starta om datorn"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Inte tillr„ckligt mycket fritt utrymme p† den valda partitionen.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * Tryck valfri tangent f”r att forts„tta.",
NULL
},

View file

@ -1481,8 +1481,10 @@ MUI_ERROR trTRErrorEntries[] =
"GiriŸ = Bilgisayar<61> Yeniden BaŸlat"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"Se‡ili b”l<E2809D>mde yeterli boŸ alan yok.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * S<>rd<72>rmek i‡in bir d<>§meye bas<61>n<EFBFBD>z.",
NULL
},

View file

@ -1501,8 +1501,10 @@ MUI_ERROR ukUAErrorEntries[] =
"ENTER = <20>¥à¥§ ¢ ­â ¦¨â¨ ª®¬¯'îâ¥à"
},
{
//ERROR_INSUFFICIENT_DISKSPACE,
"<EFBFBD>¥¤®áâ â­ì® ¢i«ì­®£® ¬iáæï ­  ®¡à ­®¬ã à®§¤i«i.\n"
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"The install partition must have a size of at least %lu MB.\n"
"\n"
" * <20> â¨á­iâì ¡ã¤ì-ïªã ª« ¢ièã ¤«ï ¯à®¤®¢¦¥­­ï.",
NULL
},

View file

@ -213,9 +213,12 @@ VOID
MUIDisplayError(
IN ULONG ErrorNum,
OUT PINPUT_RECORD Ir,
IN ULONG WaitEvent)
IN ULONG WaitEvent,
...)
{
const MUI_ERROR * entry;
CHAR Buffer[2048];
va_list ap;
if (ErrorNum >= ERROR_LAST_ERROR_CODE)
{
@ -237,7 +240,11 @@ MUIDisplayError(
return;
}
PopupError(entry[ErrorNum].ErrorText,
va_start(ap, WaitEvent);
vsprintf(Buffer, entry[ErrorNum].ErrorText, ap);
va_end(ap);
PopupError(Buffer,
entry[ErrorNum].ErrorStatus,
Ir,
WaitEvent);

View file

@ -69,7 +69,8 @@ VOID
MUIDisplayError(
ULONG ErrorNum,
PINPUT_RECORD Ir,
ULONG WaitEvent);
ULONG WaitEvent,
...);
LPCWSTR
MUIDefaultKeyboardLayout(VOID);

View file

@ -13,7 +13,7 @@ Signature = "$ReactOS$"
[DiskSpaceRequirements]
; Required free system partition disk space in MB
FreeSysPartDiskSpace=350
FreeSysPartDiskSpace=550
[SourceDisksFiles]
acpi.sys=,,,,,,,,,,,,4