50#define InstallVolume (InstallPartition->Volume)
63#define SystemVolume (SystemPartition->Volume)
85#define VOLUME_NEW_AUTOCREATE 0x80
109 DPRINT(
"mingliu.ttc found\n");
114 DPRINT(
"msgothic.ttc found\n");
119 DPRINT(
"msmincho.ttc found\n");
124 DPRINT(
"mssong.ttf found\n");
132 DPRINT(
"simsun.ttc found\n");
137 DPRINT(
"gulim.ttc found\n");
142 DPRINT(
"batang.ttc found\n");
198 coPos.
X = xLeft +
Width - 1;
207 for (coPos.
Y = yTop + 1; coPos.
Y < yTop +
Height - 1; coPos.
Y++)
223 coPos.
X = xLeft +
Width - 1;
250 coPos.
X = xLeft +
Width - 1;
319 Width = MaxLength + 4;
331 for (coPos.
Y = yTop; coPos.
Y < yTop +
Height; coPos.
Y++)
395 coPos.
X = xLeft +
Width - 1;
486 if (newLayout == LayoutId)
579 DPRINT1(
"The user-mode PnP manager could not initialize, expect unavailable devices!\n");
583 DPRINT1(
"WaitNoPendingInstallEvents() failed to wait!\n");
950 DPRINT1(
"Failed to get a list of NTOS installations; continue installation...\n");
1044 DPRINT1(
"Selected installation for repair: \"%S\" ; DiskNumber = %d , PartitionNumber = %d\n",
1154 return SCSI_CONTROLLER_PAGE;
1186 return OEM_DRIVER_PAGE;
1288 else if (
Line == 16)
1302 else if (
Line == 16)
1321 else if (
Line == 12)
1323 else if (
Line == 13)
1325 else if (
Line == 14)
1327 else if (
Line == 16)
1513 DPRINT1(
"Partition is too small (size: %I64u MB), required disk space is %lu MB\n",
1572 DPRINT1(
"RepairUpdateFlag == TRUE, SelectPartition() returned FALSE, assert!\n");
1718 PopupError(
"The disk you have selected for installing ReactOS\n"
1719 "is not visible by the firmware of your computer,\n"
1720 "and so may not be bootable.\n"
1721 "Press ENTER to continue anyway.",
1834#define PARTITION_SIZE_INPUT_FIELD_LENGTH 9
1836#define PARTITION_MAXSIZE (pow(10, (PARTITION_SIZE_INPUT_FIELD_LENGTH - 1)) - 1)
1998 if ((ch >=
L'0') && (ch <=
L'9'))
2042 CHAR LineBuffer[100];
2099 if ((PartSize < 1) || (PartSize > MaxSize))
2108 if (PartSize == MaxSize)
2109 PartSize = MaxPartSize;
2112 DPRINT(
"Partition size: %I64u bytes\n", PartSize);
2114 ASSERT(PartSize <= MaxPartSize);
2187 CHAR LineBuffer[100];
2313 CHAR LineBuffer[100];
2340 if (Ir->Event.KeyEvent.wVirtualKeyCode ==
VK_RETURN)
2342 else if (Ir->Event.KeyEvent.wVirtualKeyCode ==
VK_ESCAPE)
2369 CHAR LineBuffer[100];
2371 DPRINT(
"SelectFileSystemPage()\n");
2385 Volume->New &= ~VOLUME_NEW_AUTOCREATE;
2428 DefaultFs =
L"BTRFS";
2449 FsVolContext->NextPageOnAbort =
QUIT_PAGE;
2470 FsVolContext->NextPageOnAbort =
QUIT_PAGE;
2526 CHAR LineBuffer[100];
2550 FsVolContext->NextPageOnAbort =
QUIT_PAGE;
2576 CHAR LineBuffer[100];
2602 switch (FormatStatus)
2636 PopupError(
"The ReactOS Setup could not find a supported system partition\n"
2637 "on your system or could not create a new one. Without such a partition\n"
2638 "the Setup program cannot install ReactOS.\n"
2639 "Press ENTER to return to the partition selection list.",
2705 "Setup is currently unable to format a partition in %S.\n"
2707 " \x07 Press ENTER to continue Setup.\n"
2708 " \x07 Press F3 to quit Setup.",
2758 "Setup is currently unable to check a partition formatted in %S.\n"
2760 " \x07 Press ENTER to continue Setup.\n"
2761 " \x07 Press F3 to quit Setup.",
2797 "ChkDsk detected some disk errors.\n(Status 0x%08lx).\n",
2892 wcscpy(InstallDir,
L"\\ReactOS");
2906 DPRINT1(
"InitDestinationPaths() failed: Status 0x%lx\n",
Status);
2954 &InstallDir[
Pos + 1],
3018 DPRINT1(
"InitDestinationPaths() failed: Status 0x%lx\n",
Status);
3065 InstallDir[
Pos] =
c;
3177 PCWSTR SrcFileName, DstFileName;
3203 if (DstFileName) ++DstFileName;
3204 else DstFileName = FilePathInfo->
Target;
3215 if (SrcFileName) ++SrcFileName;
3216 else SrcFileName = FilePathInfo->
Source;
3219 if (DstFileName) ++DstFileName;
3220 else DstFileName = FilePathInfo->
Target;
3222 if (!
wcsicmp(SrcFileName, DstFileName))
3228 SrcFileName, DstFileName);
3239 if (DstFileName) ++DstFileName;
3240 else DstFileName = FilePathInfo->
Target;
3246 DoWatchDestFileName(DstFileName);
3258 DPRINT1(
"An error happened while trying to copy file '%S' (error 0x%08lx), skipping it...\n",
3271 DPRINT1(
"CHECKPOINT:HALF_COPIED\n");
3318 MemBarWidth = (
xScreen - 26) / 5;
3319 MemBarWidth -= MemBarWidth % 2;
3334 (
xScreen / 2) + (MemBarWidth / 2),
3336 (
xScreen / 2)- (MemBarWidth / 2),
3373 static const UINT StringIDs[] =
3573 else if (
Line == 13)
3579 else if (
Line == 14)
3585 else if (
Line == 15)
3675 L"\\Device\\Harddisk%d\\Partition0",
3679 DestinationDevicePathBuffer);
3682 DPRINT1(
"InstallMbrBootCodeToDisk() failed: Status 0x%lx\n",
Status);
3727 L"\\Device\\Harddisk%lu\\Partition%lu\\",
3789 if (
Bar->StepCount == 0)
3795 Bar->Progress =
Bar->StepCount -
Bar->CurrentStep;
3799 if (
Bar->ProgressFormatText &&
3800 (AlwaysUpdate || (
Bar->Progress != OldProgress)))
3803 Bar->ProgressFormatText,
Bar->Progress /
max(1,
Bar->Width) + 1);
3835 LONG TimerValue, OldTimerValue;
3859 TimerValue = TimeOut * BarWidth;
3865 TimerDiv = 1000 / BarWidth;
3866 TimerDiv =
max(1, TimerDiv);
3867 OldTimerValue = TimerValue;
3878 if (TimeElapsed >= TimerDiv)
3881 TimeElapsed /= TimerDiv;
3884 if (TimeElapsed <= TimerValue)
3885 TimerValue -= TimeElapsed;
3889 RefreshProgress =
TRUE;
3892 if (RefreshProgress)
3895 RefreshProgress =
FALSE;
3899 if (TimerValue <= 0)
3912 if (TimeElapsed < TimerDiv)
3915 Timeout.QuadPart = (TimerDiv - TimeElapsed) * -10000LL;
3931 DPRINT1(
"NtWaitForSingleObject() failed, Status 0x%08lx\n",
Status);
3938 if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
4050 DPRINT1(
"NtInitializeRegistry() failed (Status 0x%08lx)\n",
Status);
4057 DPRINT1(
"The user-mode PnP manager could not initialize (Status 0x%08lx), expect unavailable devices!\n",
Status);
4112 case SCSI_CONTROLLER_PAGE:
4113 Page = ScsiControllerPage(&Ir);
4116 case OEM_DRIVER_PAGE:
4117 Page = OemDriverPage(&Ir);
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
BOOLEAN DoFileCopy(IN OUT PUSETUP_DATA pSetupData, IN PSP_FILE_CALLBACK_W MsgHandler, IN PVOID Context OPTIONAL)
BOOLEAN PrepareFileCopy(IN OUT PUSETUP_DATA pSetupData, IN PFILE_COPY_STATUS_ROUTINE StatusRoutine 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 InstallVBRToPartition(IN PUNICODE_STRING SystemRootPath, IN PUNICODE_STRING SourceRootPath, IN PUNICODE_STRING DestinationArcPath, IN PCWSTR FileSystemName)
NTSTATUS InstallFatBootcodeToFloppy(IN PUNICODE_STRING SourceRootPath, IN PUNICODE_STRING DestinationArcPath)
NTSTATUS InstallMbrBootCodeToDisk(IN PUNICODE_STRING SystemRootPath, IN PUNICODE_STRING SourceRootPath, IN PCWSTR DestinationDevicePathBuffer)
_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 NT_SUCCESS(StatCode)
static VOID DrawPartitionList(_In_ HWND hWndList, _In_ PPARTLIST List)
#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)
KLID MUIDefaultKeyboardLayout(IN PCWSTR LanguageId)
VOID SetCurrentListEntry(IN PGENERIC_LIST List, IN PGENERIC_LIST_ENTRY Entry)
PGENERIC_LIST_ENTRY GetFirstListEntry(IN PGENERIC_LIST List)
VOID DestroyGenericList(IN OUT PGENERIC_LIST List, IN BOOLEAN FreeData)
PGENERIC_LIST_ENTRY GetCurrentListEntry(IN PGENERIC_LIST List)
ULONG GetNumberOfListEntries(IN PGENERIC_LIST List)
PVOID GetListEntryData(IN PGENERIC_LIST_ENTRY Entry)
PGENERIC_LIST_ENTRY GetNextListEntry(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)