49#define InstallVolume (InstallPartition->Volume)
62#define SystemVolume (SystemPartition->Volume)
84#define VOLUME_NEW_AUTOCREATE 0x80
108 DPRINT(
"mingliu.ttc found\n");
113 DPRINT(
"msgothic.ttc found\n");
118 DPRINT(
"msmincho.ttc found\n");
123 DPRINT(
"mssong.ttf found\n");
131 DPRINT(
"simsun.ttc found\n");
136 DPRINT(
"gulim.ttc found\n");
141 DPRINT(
"batang.ttc found\n");
197 coPos.
X = xLeft +
Width - 1;
206 for (coPos.
Y = yTop + 1; coPos.
Y < yTop +
Height - 1; coPos.
Y++)
222 coPos.
X = xLeft +
Width - 1;
249 coPos.
X = xLeft +
Width - 1;
318 Width = MaxLength + 4;
330 for (coPos.
Y = yTop; coPos.
Y < yTop +
Height; coPos.
Y++)
394 coPos.
X = xLeft +
Width - 1;
485 if (newLayout == LayoutId)
601 DPRINT1(
"The user-mode PnP manager could not initialize, expect unavailable devices!\n");
605 DPRINT1(
"WaitNoPendingInstallEvents() failed to wait!\n");
970 DPRINT1(
"Failed to get a list of NTOS installations; continue installation...\n");
1063 DPRINT1(
"Selected installation for repair: \"%S\" ; DiskNumber = %d , PartitionNumber = %d\n",
1171 return SCSI_CONTROLLER_PAGE;
1202 return OEM_DRIVER_PAGE;
1304 else if (
Line == 16)
1318 else if (
Line == 16)
1336 else if (
Line == 12)
1338 else if (
Line == 13)
1340 else if (
Line == 14)
1342 else if (
Line == 16)
1527 DPRINT1(
"Partition/Volume is too small (size: %I64u MB), required space is %lu MB\n",
1586 DPRINT1(
"RepairUpdateFlag == TRUE, SelectPartition() returned FALSE, assert!\n");
1635 goto CreateInstallPartition;
1641 goto CreateInstallPartition;
1721 PopupError(
"The disk you have selected for installing ReactOS\n"
1722 "is not visible by the firmware of your computer,\n"
1723 "and so may not be bootable.\n"
1724 "Press ENTER to continue anyway.",
1730 goto CreateInstallPartition;
1807CreateInstallPartition:
1846#define PARTITION_SIZE_INPUT_FIELD_LENGTH 9
1848#define PARTITION_MAXSIZE (pow(10, (PARTITION_SIZE_INPUT_FIELD_LENGTH - 1)) - 1)
2007 if ((ch >=
L'0') && (ch <=
L'9'))
2053 CHAR LineBuffer[100];
2110 if ((PartSize < 1) || (PartSize > MaxSize))
2119 if (PartSize == MaxSize)
2120 PartSize = MaxPartSize;
2123 DPRINT(
"Partition size: %I64u bytes\n", PartSize);
2125 ASSERT(PartSize <= MaxPartSize);
2197 CHAR LineBuffer[100];
2322 CHAR LineBuffer[100];
2349 if (Ir->Event.KeyEvent.wVirtualKeyCode ==
VK_RETURN)
2351 else if (Ir->Event.KeyEvent.wVirtualKeyCode ==
VK_ESCAPE)
2378 CHAR LineBuffer[100];
2380 DPRINT(
"SelectFileSystemPage()\n");
2394 Volume->New &= ~VOLUME_NEW_AUTOCREATE;
2437 DefaultFs =
L"BTRFS";
2458 FsVolContext->NextPageOnAbort =
QUIT_PAGE;
2479 FsVolContext->NextPageOnAbort =
QUIT_PAGE;
2534 CHAR LineBuffer[100];
2558 FsVolContext->NextPageOnAbort =
QUIT_PAGE;
2583 CHAR LineBuffer[100];
2609 switch (FormatStatus)
2643 PopupError(
"The ReactOS Setup could not find a supported system partition\n"
2644 "on your system or could not create a new one. Without such a partition\n"
2645 "the Setup program cannot install ReactOS.\n"
2646 "Press ENTER to return to the partition selection list.",
2712 "Setup is currently unable to format a partition in %S.\n"
2714 " \x07 Press ENTER to continue Setup.\n"
2715 " \x07 Press F3 to quit Setup.",
2762 "Setup is currently unable to check a partition formatted in %S.\n"
2764 " \x07 Press ENTER to continue Setup.\n"
2765 " \x07 Press F3 to quit Setup.",
2798 "ChkDsk detected some disk errors.\n(Status 0x%08lx).\n",
2893 wcscpy(InstallDir,
L"\\ReactOS");
2907 goto InitInstallDir;
2939 &InstallDir[
Pos + 1],
2993 goto InitInstallDir;
3027 InstallDir[
Pos] =
c;
3042 DPRINT1(
"InitDestinationPaths() failed: Status 0x%lx\n",
Status);
3137 PCWSTR SrcFileName, DstFileName;
3163 if (DstFileName) ++DstFileName;
3164 else DstFileName = FilePathInfo->
Target;
3175 if (SrcFileName) ++SrcFileName;
3176 else SrcFileName = FilePathInfo->
Source;
3179 if (DstFileName) ++DstFileName;
3180 else DstFileName = FilePathInfo->
Target;
3182 if (!
_wcsicmp(SrcFileName, DstFileName))
3188 SrcFileName, DstFileName);
3199 if (DstFileName) ++DstFileName;
3200 else DstFileName = FilePathInfo->
Target;
3206 DoWatchDestFileName(DstFileName);
3218 DPRINT1(
"An error happened while trying to copy file '%S' (error 0x%08lx), skipping it...\n",
3231 DPRINT1(
"CHECKPOINT:HALF_COPIED\n");
3278 MemBarWidth = (
xScreen - 26) / 5;
3279 MemBarWidth -= MemBarWidth % 2;
3294 (
xScreen / 2) + (MemBarWidth / 2),
3296 (
xScreen / 2)- (MemBarWidth / 2),
3333 static const UINT StringIDs[] =
3532 else if (
Line == 13)
3538 else if (
Line == 14)
3544 else if (
Line == 15)
3606 DPRINT1(
"InstallBootcodeToRemovable() failed: Status 0x%lx\n",
Status);
3608 "Setup could not install the bootloader.\n"
3609 "(Status 0x%08lx).\n"
3610 "Press ENTER to continue anyway.",
3655 PopupError(
"Setup does not currently support installing\n"
3656 "the bootloader on the computer you are using.\n"
3657 "Press ENTER to continue anyway.",
3666 DPRINT1(
"InstallBootManagerAndBootEntries() failed: Status 0x%lx\n",
Status);
3668 "Setup could not install the bootloader.\n"
3669 "(Status 0x%08lx).\n"
3670 "Press ENTER to continue anyway.",
3756 if (
Bar->StepCount == 0)
3762 Bar->Progress =
Bar->StepCount -
Bar->CurrentStep;
3766 if (
Bar->ProgressFormatText &&
3767 (AlwaysUpdate || (
Bar->Progress != OldProgress)))
3770 Bar->ProgressFormatText,
Bar->Progress /
max(1,
Bar->Width) + 1);
3802 LONG TimerValue, OldTimerValue;
3826 TimerValue = TimeOut * BarWidth;
3832 TimerDiv = 1000 / BarWidth;
3833 TimerDiv =
max(1, TimerDiv);
3834 OldTimerValue = TimerValue;
3845 if (TimeElapsed >= TimerDiv)
3848 TimeElapsed /= TimerDiv;
3851 if (TimeElapsed <= TimerValue)
3852 TimerValue -= TimeElapsed;
3856 RefreshProgress =
TRUE;
3859 if (RefreshProgress)
3862 RefreshProgress =
FALSE;
3866 if (TimerValue <= 0)
3879 if (TimeElapsed < TimerDiv)
3882 Timeout.QuadPart = (TimerDiv - TimeElapsed) * -10000LL;
3898 DPRINT1(
"NtWaitForSingleObject() failed, Status 0x%08lx\n",
Status);
3905 if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
4017 DPRINT1(
"NtInitializeRegistry() failed (Status 0x%08lx)\n",
Status);
4024 DPRINT1(
"The user-mode PnP manager could not initialize (Status 0x%08lx), expect unavailable devices!\n",
Status);
4075 case SCSI_CONTROLLER_PAGE:
4076 Page = ScsiControllerPage(&Ir);
4079 case OEM_DRIVER_PAGE:
4080 Page = OemDriverPage(&Ir);
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
BOOLEAN NTAPI PrepareFileCopy(IN OUT PUSETUP_DATA pSetupData, IN PFILE_COPY_STATUS_ROUTINE StatusRoutine OPTIONAL)
BOOLEAN NTAPI DoFileCopy(IN OUT PUSETUP_DATA pSetupData, IN PSP_FILE_CALLBACK_W MsgHandler, IN PVOID Context OPTIONAL)
PGENERIC_LIST CreateKeyboardDriverList(IN HINF InfFile)
PGENERIC_LIST CreateComputerTypeList(IN HINF InfFile)
ULONG GetDefaultLanguageIndex(VOID)
PGENERIC_LIST CreateDisplayDriverList(IN HINF InfFile)
PGENERIC_LIST CreateKeyboardLayoutList(IN HINF InfFile, IN PCWSTR LanguageId, OUT PWSTR DefaultKBLayout)
PGENERIC_LIST CreateLanguageList(IN HINF InfFile, OUT PWSTR DefaultLanguage)
struct _GENENTRY * PGENENTRY
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput, IN LPCSTR lpCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
BOOL WINAPI FillConsoleOutputCharacterA(IN HANDLE hConsoleOutput, IN CHAR cCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
BOOL WINAPI FreeConsole(VOID)
BOOL WINAPI FillConsoleOutputAttribute(IN HANDLE hConsoleOutput, IN WORD wAttribute, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfAttrsWritten)
NTSTATUS InitializeUserModePnpManager(IN HINF *phSetupInf)
VOID TerminateUserModePnpManager(VOID)
NTSTATUS WaitNoPendingInstallEvents(IN PLARGE_INTEGER Timeout OPTIONAL)
BOOLEAN EnableUserModePnpManager(VOID)
VOID ProgressSetStep(IN PPROGRESSBAR Bar, IN ULONG Step)
VOID ProgressNextStep(IN PPROGRESSBAR Bar)
PPROGRESSBAR CreateProgressBarEx(IN SHORT Left, IN SHORT Top, IN SHORT Right, IN SHORT Bottom, IN SHORT TextTop, IN SHORT TextRight, IN BOOLEAN DoubleEdge, IN SHORT ProgressColour, IN ULONG StepCount, IN PCSTR DescriptionText OPTIONAL, IN PCSTR ProgressFormatText OPTIONAL, IN PUPDATE_PROGRESS UpdateProgressProc OPTIONAL)
VOID ProgressSetStepCount(IN PPROGRESSBAR Bar, IN ULONG StepCount)
PPROGRESSBAR CreateProgressBar(IN SHORT Left, IN SHORT Top, IN SHORT Right, IN SHORT Bottom, IN SHORT TextTop, IN SHORT TextRight, IN BOOLEAN DoubleEdge, IN PCSTR DescriptionText OPTIONAL)
VOID DestroyProgressBar(IN OUT PPROGRESSBAR Bar)
static LPHIST_ENTRY Bottom
#define PARTITION_EXTENDED
NTSTATUS NTAPI InstallBootcodeToRemovable(_In_ ARCHITECTURE_TYPE ArchType, _In_ PCUNICODE_STRING RemovableRootPath, _In_ PCUNICODE_STRING SourceRootPath, _In_ PCUNICODE_STRING DestinationArcPath)
NTSTATUS NTAPI InstallBootManagerAndBootEntries(_In_ ARCHITECTURE_TYPE ArchType, _In_ PCUNICODE_STRING SystemRootPath, _In_ PCUNICODE_STRING SourceRootPath, _In_ PCUNICODE_STRING DestinationArcPath, _In_ ULONG_PTR Options)
Installs FreeLoader on the system and configure the boot entries.
_In_ PSCSI_REQUEST_BLOCK _Out_ NTSTATUS _Inout_ BOOLEAN * Retry
VOID RecoveryConsole(VOID)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
VOID CONSOLE_SetInputTextXY(IN SHORT x, IN SHORT y, IN SHORT len, IN LPCWSTR Text)
VOID CONSOLE_InvertTextXY(IN SHORT x, IN SHORT y, IN SHORT col, IN SHORT row)
VOID CONSOLE_SetCursorXY(IN SHORT x, IN SHORT y)
VOID CONSOLE_NormalTextXY(IN SHORT x, IN SHORT y, IN SHORT col, IN SHORT row)
VOID __cdecl CONSOLE_SetStatusText(IN LPCSTR fmt,...)
VOID CONSOLE_SetTextXY(IN SHORT x, IN SHORT y, IN LPCSTR Text)
VOID CONSOLE_ConInKey(OUT PINPUT_RECORD Buffer)
VOID __cdecl CONSOLE_PrintTextXY(IN SHORT x, IN SHORT y, IN LPCSTR fmt,...)
VOID CONSOLE_ClearScreen(VOID)
BOOLEAN CONSOLE_Init(VOID)
VOID CONSOLE_SetStatusTextV(IN LPCSTR fmt, IN va_list args)
BOOLEAN CONSOLE_ConInKeyPeek(OUT PINPUT_RECORD Buffer)
VOID CONSOLE_SetCursorType(IN BOOL bInsert, IN BOOL bVisible)
#define TEXT_TYPE_REGULAR
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
static VOID DrawPartitionList(_In_ HWND hWndList, _In_ PPARTLIST List)
static PDISK_IMAGE FloppyDrive[2]
#define IsListEmpty(ListHead)
@ ERROR_DRIVE_INFORMATION
@ ERROR_INSUFFICIENT_PARTITION_SIZE
@ ERROR_FORMATTING_PARTITION
#define SPFILENOTIFY_ENDDELETE
struct _FILEPATHS_W * PFILEPATHS_W
#define SPFILENOTIFY_STARTDELETE
#define SPFILENOTIFY_STARTSUBQUEUE
#define SPFILENOTIFY_ENDCOPY
#define SPFILENOTIFY_STARTCOPY
#define SPFILENOTIFY_COPYERROR
#define SPFILENOTIFY_STARTRENAME
#define SPFILENOTIFY_ENDRENAME
VOID EndCheck(_In_ NTSTATUS Status)
VOID StartCheck(_Inout_ PCHECK_VOLUME_INFO ChkInfo)
VOID StartFormat(_Inout_ PFORMAT_VOLUME_INFO FmtInfo, _In_ PFILE_SYSTEM_ITEM SelectedFileSystem)
static PPROGRESSBAR ProgressBar
VOID EndFormat(_In_ NTSTATUS Status)
VOID ScrollUpFileSystemList(IN PFILE_SYSTEM_LIST List)
VOID DrawFileSystemList(IN PFILE_SYSTEM_LIST List)
VOID ScrollDownFileSystemList(IN PFILE_SYSTEM_LIST List)
PFILE_SYSTEM_LIST CreateFileSystemList(IN SHORT Left, IN SHORT Top, IN BOOLEAN ForceFormat, IN PCWSTR SelectFileSystem)
VOID DestroyFileSystemList(IN PFILE_SYSTEM_LIST List)
NTSTATUS NTAPI NtRaiseHardError(IN NTSTATUS ErrorStatus, IN ULONG NumberOfParameters, IN ULONG UnicodeStringParameterMask, IN PULONG_PTR Parameters, IN ULONG ValidResponseOptions, OUT PULONG Response)
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
VOID InfSetHeap(PVOID Heap)
static LARGE_INTEGER StartTime
KLID MUIDefaultKeyboardLayout(IN PCWSTR LanguageId)
SPFILE_EXPORTS SpFileExports
SPINF_EXPORTS SpInfExports
ULONG NTAPI GetNumberOfListEntries(IN PGENERIC_LIST List)
VOID NTAPI SetCurrentListEntry(IN PGENERIC_LIST List, IN PGENERIC_LIST_ENTRY Entry)
VOID NTAPI DestroyGenericList(IN OUT PGENERIC_LIST List, IN BOOLEAN FreeData)
PGENERIC_LIST_ENTRY NTAPI GetFirstListEntry(IN PGENERIC_LIST List)
PGENERIC_LIST_ENTRY NTAPI GetNextListEntry(IN PGENERIC_LIST_ENTRY Entry)
PGENERIC_LIST_ENTRY NTAPI GetCurrentListEntry(IN PGENERIC_LIST List)
PVOID NTAPI GetListEntryData(IN PGENERIC_LIST_ENTRY Entry)
struct _PARTENTRY * PPARTENTRY
#define GetPartEntrySizeInBytes(PartEntry)
#define SystemPerformanceInformation
#define memmove(s1, s2, n)
#define sprintf(buf, format,...)
#define SE_SHUTDOWN_PRIVILEGE
static PLARGE_INTEGER Time
unsigned __int3264 UINT_PTR
#define CM_BOOT_FLAG_SETUP
NTSYSAPI PRTL_USER_PROCESS_PARAMETERS NTAPI RtlNormalizeProcessParams(_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
NTSTATUS NTAPI NtDisplayString(PUNICODE_STRING String)
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtTerminateProcess(HANDLE ProcessHandle, LONG ExitStatus)
#define NtCurrentProcess()
NTSTATUS NTAPI NtDelayExecution(IN BOOLEAN Alertable, IN PLARGE_INTEGER DelayInterval)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI BOOLEAN NTAPI RtlPrefixUnicodeString(IN PUNICODE_STRING String1, IN PUNICODE_STRING String2, IN BOOLEAN CaseInSensitive)
NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(IN HANDLE hObject, IN BOOLEAN bAlertable, IN PLARGE_INTEGER Timeout)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
NTSTATUS NTAPI NtInitializeRegistry(IN USHORT Flag)
#define RTL_NUMBER_OF_FIELD(type, field)
#define IsContainerPartition(PartitionType)
#define IsRecognizedPartition(PartitionType)
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSTATUS NTAPI NtShutdownSystem(IN SHUTDOWN_ACTION Action)
NTSTATUS NTAPI NtQuerySystemTime(OUT PLARGE_INTEGER SystemTime)
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
#define STATUS_PARTITION_FAILURE
#define STATUS_SYSTEM_PROCESS_TERMINATED
#define STATUS_APP_INIT_FAILURE
NTSTRSAFEVAPI RtlStringCchPrintfA(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)