104 DPRINT(
"mingliu.ttc found\n");
109 DPRINT(
"msgothic.ttc found\n");
114 DPRINT(
"msmincho.ttc found\n");
119 DPRINT(
"mssong.ttf found\n");
127 DPRINT(
"simsun.ttc found\n");
132 DPRINT(
"gulim.ttc found\n");
137 DPRINT(
"batang.ttc found\n");
193 coPos.
X = xLeft +
Width - 1;
202 for (coPos.
Y = yTop + 1; coPos.
Y < yTop +
Height - 1; coPos.
Y++)
218 coPos.
X = xLeft +
Width - 1;
245 coPos.
X = xLeft +
Width - 1;
314 Width = MaxLength + 4;
326 for (coPos.
Y = yTop; coPos.
Y < yTop +
Height; coPos.
Y++)
390 coPos.
X = xLeft +
Width - 1;
474 if (pszNewLayout !=
NULL)
720 DPRINT1(
"The user-mode PnP manager could not initialize, expect unavailable devices!\n");
724 DPRINT1(
"WaitNoPendingInstallEvents() failed to wait!\n");
941 DPRINT1(
"Failed to get a list of NTOS installations; continue installation...\n");
1035 DPRINT1(
"Selected installation for repair: \"%S\" ; DiskNumber = %d , PartitionNumber = %d\n",
1145 return SCSI_CONTROLLER_PAGE;
1177 return OEM_DRIVER_PAGE;
1279 else if (
Line == 16)
1293 else if (
Line == 16)
1312 else if (
Line == 12)
1314 else if (
Line == 13)
1316 else if (
Line == 14)
1318 else if (
Line == 16)
1505 DPRINT1(
"Partition is too small (size: %I64u MB), required disk space is %lu MB\n",
size,
USetupData.RequiredPartitionDiskSpace);
1569 DPRINT1(
"RepairUpdateFlag == TRUE, SelectPartition() returned FALSE, assert!\n");
1724 PopupError(
"The disk you have selected for installing ReactOS\n" 1725 "is not visible by the firmware of your computer,\n" 1726 "and so may not be bootable.\n" 1727 "Press ENTER to continue nonetheless.",
1844 L"\\Device\\Harddisk%lu\\Partition%lu\\",
1875 #define PARTITION_SIZE_INPUT_FIELD_LENGTH 9 1877 #define PARTITION_MAXSIZE (pow(10, (PARTITION_SIZE_INPUT_FIELD_LENGTH - 1)) - 1) 2039 if ((ch >=
L'0') && (ch <=
L'9'))
2084 CHAR LineBuffer[100];
2144 if (PartSize > MaxSize)
2151 if (PartSize == MaxSize)
2166 DPRINT (
"Partition size: %I64u bytes\n", PartSize);
2202 CHAR LineBuffer[100];
2262 if (PartSize > MaxSize)
2269 if (PartSize == MaxSize)
2284 DPRINT (
"Partition size: %I64u bytes\n", PartSize);
2319 CHAR LineBuffer[100];
2379 if (PartSize > MaxSize)
2386 if (PartSize == MaxSize)
2401 DPRINT(
"Partition size: %I64u bytes\n", PartSize);
2472 CHAR LineBuffer[100];
2556 CHAR LineBuffer[100];
2558 DPRINT(
"SelectFileSystemPage()\n");
2586 DPRINT1(
"We are using a different system partition!!!!\n");
2646 PopupError(
"The ReactOS Setup could not find a supported system partition\n" 2647 "on your system or could not create a new one. Without such partition\n" 2648 "the Setup program cannot install ReactOS.\n" 2649 "Press ENTER to return to the partition selection list.",
2678 DPRINT(
"WritePartitionsToDisk() failed\n");
2734 DPRINT1(
"FormatState: Start --> FormatSystemPartition\n");
2752 DPRINT1(
"FormatState: Start --> FormatInstallPartition\n");
2763 DPRINT1(
"FormatState: FormatSystemPartition --> FormatInstallPartition\n");
2778 DPRINT1(
"FormatState: FormatInstallPartition --> FormatOtherPartition\n");
2780 DPRINT1(
"FormatState: FormatOtherPartition --> FormatOtherPartition\n");
2787 DPRINT1(
"FormatState: FormatInstallPartition --> FormatDone\n");
2789 DPRINT1(
"FormatState: FormatOtherPartition --> FormatDone\n");
2798 DPRINT1(
"FormatState: FormatDone\n");
2834 else if (PartEntry->
New)
2883 DefaultFs =
L"BTRFS";
3013 DPRINT(
"FormatPartitionPage()\n");
3082 "Setup is currently unable to format a partition in %S.\n" 3084 " \x07 Press ENTER to continue Setup.\n" 3085 " \x07 Press F3 to quit Setup.",
3120 L"\\Device\\Harddisk%lu\\Partition%lu",
3124 DPRINT1(
"FormatPartition() failed with status 0x%08lx\n",
Status);
3175 DPRINT1(
"CheckFileSystemPage -- PartitionType: 0x%02X ; FileSystem: %S\n",
3190 "Setup is currently unable to check a partition formatted in %S.\n" 3192 " \x07 Press ENTER to continue Setup.\n" 3193 " \x07 Press F3 to quit Setup.",
3220 DPRINT1(
"ChkdskPartition() failed with status 0x%08lx\n",
Status);
3224 "ChkDsk detected some disk errors.\n(Status 0x%08lx).\n",
3256 if (InstallDir[
Length - 1] ==
L'\\')
3269 if (InstallDir[
i] ==
L'\\' &&
i > 0)
3271 if (InstallDir[
i - 1] ==
L'.')
3276 if (InstallDir[
Length - 1] ==
L'.')
3313 else if (
USetupData.InstallationDirectory[0])
3316 wcscpy(InstallDir,
L"\\ReactOS");
3330 DPRINT1(
"InitDestinationPaths() failed. Status code: 0x%lx",
Status);
3378 &InstallDir[
Pos + 1],
3434 DPRINT1(
"InitDestinationPaths() failed. Status code: 0x%lx",
Status);
3480 InstallDir[
Pos] =
c;
3592 PCWSTR SrcFileName, DstFileName;
3618 if (DstFileName) ++DstFileName;
3619 else DstFileName = FilePathInfo->
Target;
3630 if (SrcFileName) ++SrcFileName;
3631 else SrcFileName = FilePathInfo->
Source;
3634 if (DstFileName) ++DstFileName;
3635 else DstFileName = FilePathInfo->
Target;
3637 if (!
wcsicmp(SrcFileName, DstFileName))
3643 SrcFileName, DstFileName);
3652 if (DstFileName) ++DstFileName;
3653 else DstFileName = FilePathInfo->
Target;
3658 DoWatchDestFileName(DstFileName);
3670 DPRINT1(
"An error happened while trying to copy file '%S' (error 0x%08lx), skipping it...\n",
3683 DPRINT1(
"CHECKPOINT:HALF_COPIED\n");
3730 MemBarWidth = (
xScreen - 26) / 5;
3731 MemBarWidth -= MemBarWidth % 2;
3746 (
xScreen / 2) + (MemBarWidth / 2),
3748 (
xScreen / 2)- (MemBarWidth / 2),
3785 static const UINT StringIDs[] =
3885 L"\\Device\\Harddisk%lu\\Partition%lu\\",
3992 else if (
Line == 13)
3998 else if (
Line == 14)
4004 else if (
Line == 15)
4132 L"\\Device\\Harddisk%d\\Partition0",
4136 DestinationDevicePathBuffer);
4139 DPRINT1(
"InstallMbrBootCodeToDisk() failed (Status %lx)\n",
Status);
4195 if (
Bar->StepCount == 0)
4201 Bar->Progress =
Bar->StepCount -
Bar->CurrentStep;
4205 if (
Bar->ProgressFormatText &&
4209 Bar->ProgressFormatText,
Bar->Progress /
max(1,
Bar->Width) + 1);
4241 LONG TimerValue, OldTimerValue;
4264 BarWidth =
max(1, ProgressBar->
Width);
4265 TimerValue = TimeOut * BarWidth;
4271 TimerDiv = 1000 / BarWidth;
4272 TimerDiv =
max(1, TimerDiv);
4273 OldTimerValue = TimerValue;
4284 if (TimeElapsed >= TimerDiv)
4287 TimeElapsed /= TimerDiv;
4290 if (TimeElapsed <= TimerValue)
4291 TimerValue -= TimeElapsed;
4295 RefreshProgress =
TRUE;
4298 if (RefreshProgress)
4301 RefreshProgress =
FALSE;
4305 if (TimerValue <= 0)
4318 if (TimeElapsed < TimerDiv)
4321 Timeout.QuadPart = (TimerDiv - TimeElapsed) * -10000
LL;
4337 DPRINT1(
"NtWaitForSingleObject() failed, Status 0x%08lx\n",
Status);
4344 if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
4463 DPRINT1(
"NtInitializeRegistry() failed (Status 0x%08lx)\n",
Status);
4470 DPRINT1(
"The user-mode PnP manager could not initialize (Status 0x%08lx), expect unavailable devices!\n",
Status);
4525 case SCSI_CONTROLLER_PAGE:
4526 Page = ScsiControllerPage(&Ir);
4529 case OEM_DRIVER_PAGE:
4530 Page = OemDriverPage(&Ir);
VOID RecoveryConsole(VOID)
PPARTLIST CreatePartitionList(VOID)
return STATUS_NOT_SUPPORTED
IN BOOLEAN OUT PSTR IN SIZE_T cchBufferSize
#define memmove(s1, s2, n)
#define TEXT_TYPE_REGULAR
ERROR_NUMBER ExtendedPartitionCreationChecks(IN PPARTENTRY PartEntry)
VOID FinishSetup(IN OUT PUSETUP_DATA pSetupData)
static USETUP_DATA USetupData
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
PGENERIC_LIST_ENTRY GetFirstListEntry(IN PGENERIC_LIST List)
enum _REGISTRY_STATUS REGISTRY_STATUS
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STRING_CONSOLEFAIL2
ULONG GetNumberOfListEntries(IN PGENERIC_LIST List)
VOID CONSOLE_SetTextXY(IN SHORT x, IN SHORT y, IN LPCSTR Text)
BOOL WINAPI FillConsoleOutputAttribute(IN HANDLE hConsoleOutput, IN WORD wAttribute, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfAttrsWritten)
static PAGE_NUMBER BootLoaderPage(PINPUT_RECORD Ir)
#define STRING_CREATEPARTITION
NTSTATUS NTAPI NtRaiseHardError(IN NTSTATUS ErrorStatus, IN ULONG NumberOfParameters, IN ULONG UnicodeStringParameterMask, IN PULONG_PTR Parameters, IN ULONG ValidResponseOptions, OUT PULONG Response)
#define STRING_CHOOSE_NEW_LOGICAL_PARTITION
#define STATUS_APP_INIT_FAILURE
#define STRING_NONFORMATTEDSYSTEMPART
static VOID ResetFileSystemList(VOID)
ACPI_SIZE strlen(const char *String)
VOID DestroyGenericList(IN OUT PGENERIC_LIST List, IN BOOLEAN FreeData)
BOOLEAN DeletePartition(IN PPARTLIST List, IN PPARTENTRY PartEntry, OUT PPARTENTRY *FreeRegion OPTIONAL)
static PPARTENTRY TempPartition
VOID MUIDisplayPage(IN ULONG page)
static BOOL IsDiskSizeValid(PPARTENTRY PartEntry)
#define STRING_REBOOTPROGRESSBAR
static PAGE_NUMBER InstallDirectoryPage(PINPUT_RECORD Ir)
VOID RestoreGenericListUiState(IN PGENERIC_LIST_UI ListUi)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
static PAGE_NUMBER SetupStartPage(PINPUT_RECORD Ir)
VOID InfSetHeap(PVOID Heap)
ULARGE_INTEGER SectorCount
#define STRING_CONSOLEFAIL3
NTSTRSAFEVAPI RtlStringCchPrintfW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
#define SPFILENOTIFY_ENDCOPY
#define STRING_DISPLAYSETTINGSUPDATE
VOID CONSOLE_SetStatusTextV(IN LPCSTR fmt, IN va_list args)
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 __cdecl CONSOLE_PrintTextXY(IN SHORT x, IN SHORT y, IN LPCSTR fmt,...)
__MINGW_EXTENSION _Check_return_ _CRTIMP unsigned __int64 __cdecl _wcstoui64(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
ERROR_NUMBER LogicalPartitionCreationChecks(IN PPARTENTRY PartEntry)
static PAGE_NUMBER RepairIntroPage(PINPUT_RECORD Ir)
VOID ProgressNextStep(IN PPROGRESSBAR Bar)
static PPARTENTRY InstallPartition
VOID PopupError(PCCH Text, PCCH Status, PINPUT_RECORD Ir, ULONG WaitEvent)
VOID ScrollToPositionGenericList(IN PGENERIC_LIST_UI ListUi, IN ULONG uIndex)
#define SPFILENOTIFY_STARTRENAME
static PPARTENTRY CurrentPartition
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
VOID ProgressSetStep(IN PPROGRESSBAR Bar, IN ULONG Step)
PGENERIC_LIST CreateLanguageList(IN HINF InfFile, OUT PWSTR DefaultLanguage)
#define IsContainerPartition(PartitionType)
VOID CONSOLE_SetInputTextXY(IN SHORT x, IN SHORT y, IN SHORT len, IN LPCWSTR Text)
#define TEXT_ID_FORMAT_PROMPT
VOID RedrawGenericList(IN PGENERIC_LIST_UI ListUi)
VOID DestroyProgressBar(IN OUT PPROGRESSBAR Bar)
BOOLEAN WritePartitionsToDisk(IN PPARTLIST List)
_In_ HFONT _Out_ PUINT Height
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
WDF_EXTERN_C_START typedef _Must_inspect_result_ _In_opt_ PCUNICODE_STRING UnicodeString
PGENERIC_LIST CreateKeyboardLayoutList(IN HINF InfFile, IN PCWSTR LanguageId, OUT PWSTR DefaultKBLayout)
PRTL_USER_PROCESS_PARAMETERS ProcessParameters
VOID DiskDescription(IN PDISKENTRY DiskEntry, OUT PSTR strBuffer, IN SIZE_T cchBuffer)
static PFILE_SYSTEM_LIST FileSystemList
#define SPFILENOTIFY_ENDRENAME
#define STRING_CHOOSENEWPARTITION
static LARGE_INTEGER StartTime
static PAGE_NUMBER InstallIntroPage(PINPUT_RECORD Ir)
#define POPUP_WAIT_ANY_KEY
VOID InstallSetupInfFile(IN OUT PUSETUP_DATA pSetupData)
VOID InitGenericListUi(IN OUT PGENERIC_LIST_UI ListUi, IN PGENERIC_LIST List, IN PGET_ENTRY_DESCRIPTION GetEntryDescriptionProc)
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
BOOL WINAPI FillConsoleOutputCharacterA(IN HANDLE hConsoleOutput, IN CHAR cCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
enum _FORMATMACHINESTATE FORMATMACHINESTATE
BOOLEAN DoFileCopy(IN OUT PUSETUP_DATA pSetupData, IN PSP_FILE_CALLBACK_W MsgHandler, IN PVOID Context OPTIONAL)
static PAGE_NUMBER HandleGenericList(PGENERIC_LIST_UI ListUi, PAGE_NUMBER nextPage, PINPUT_RECORD Ir)
VOID CONSOLE_NormalTextXY(IN SHORT x, IN SHORT y, IN SHORT col, IN SHORT row)
PPARTENTRY SystemPartition
VOID ScrollDownGenericList(IN PGENERIC_LIST_UI ListUi)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
static PAGE_NUMBER BootLoaderInstallationPage(PINPUT_RECORD Ir)
NTSYSAPI PRTL_USER_PROCESS_PARAMETERS NTAPI RtlNormalizeProcessParams(_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
#define STRING_IMPORTFILE
static PAGE_NUMBER ConfirmDeleteSystemPartitionPage(PINPUT_RECORD Ir)
VOID ScrollDownFileSystemList(IN PFILE_SYSTEM_LIST List)
#define sprintf(buf, format,...)
static PAGE_NUMBER KeyboardSettingsPage(PINPUT_RECORD Ir)
static BOOLEAN IsValidPath(IN PCWSTR InstallDir)
#define SPFILENOTIFY_STARTSUBQUEUE
static NTSTATUS NTAPI GetNTOSInstallationName(IN PGENERIC_LIST_ENTRY Entry, OUT PSTR Buffer, IN SIZE_T cchBufferSize)
static PAGE_NUMBER LanguagePage(PINPUT_RECORD Ir)
#define STRING_NEWPARTITION
#define STRING_REBOOTCOMPUTER2