- Move boot options parsing early on in LoadWindowsCore().
- Add WinLdrIsPaeSupported(), move in it the PAE options parsing.
The aim is to perform other tests to determine whether or not to
enable PAE, and select an adequate kernel image.
Co-authored-by: Vadim Galyant <vgal@rambler.ru>
- Fix parsing of the NOEXECUTE options, taking their precedence
into account. Most of these are also x86-specific.
This includes:
- the default TimeText;
- the default colors.
They can however be changed by the user at one's convenience, by
explicitly specifying different values.
Now, default UI colors/strings (e.g. titles/timeout text) that are
dependent of the UI "theme" (mini vs. full TUI) are set first when
calling their corresponding Initialize() function.
Then, the user UI settings are read from the user's freeldr.ini file
and override the UI theme defaults.
These settings get effectively applied at the first drawing operation
(usually the UiFadeInBackdrop() call done by the main UiInitialize()
function).
For "directui" we don't care about the settings -- they are hardcoded.
This allows not having to specify the default settings in the
freeldr.ini files anymore.
+ Add support for "None" UiBackdropFillStyle: fill with whitespace,
instead of the specific patterns.
Fixes CORE-13827, where the timer countdown would otherwise display
incorrectly if there were no trailing spaces after the timer string.
Now, the countdown is always appended with one space separator after
the end of the string, **or**, it is inserted at a specific place
delimited by a %d insertion point in the string.
Also, don't repaint the date & time (in full-UI mode) many times per
second -- instead of only once per second -- while displaying a menu.
A Kernel Debugger Transport DLL is always loaded for Windows XP+ :
either the standard KDCOM.DLL (by default), or an alternative
user-provided one via the /DEBUGPORT= option. If this alternative
does not exist or fails to be loaded, fall back to the standard
KDCOM.DLL.
If no KD dll is loaded, kernel loading would fail because of the
resulting unsatisfied KDCOM dll import (tested on Windows and ReactOS).
+ Normalize kernel, HAL and KD dll file names to lowercase (needed for
case-sensitive installations).
CORE-9023, CORE-18033
- Reset the UI to a minimal one in SOS mode.
- In SOS mode, a trace of loaded files is displayed on the screen,
instead of the usual progress bar.
- Add a callback to the PE loader to notify when imported DLLs are
loaded for a main image. This allows getting an accurate SOS trace.
- If the started OS loader failed and we are back to the OS selection
menu, re-initialize the UI as the loader may have messed up the display
in the meantime.
- Tear down allocated off-screen back-buffer when uninitializing the TUI.
- Clear up the screen when initializing the direct-UI.
- Remove excessive UiDrawBackdrop() calls that caused too many
unnecessary redraws.
- ProgressBar: Clear only the portions that need to be cleared up.
This allows to not use DrawBackdrop anymore and the flickering.
- Remove duplicated code from directui.c and use the one from
TUI instead, with the latter properly #ifdef'ed for _M_ARM.
- Fix their title color.
- Add SAL annotations.
- TuiDrawCenteredText: Partly fix centering calculations (susceptible
to give negative coordinates).
- TuiDrawText2: Don't display anything if X or Y are out of the screen.
- Remove duplicated code from directui.c and use the one from
TUI instead, with the latter properly #ifdef'ed for _M_ARM.
- Provide the minimal implementations for NoUiDrawText*().
- TuiDrawText() is just a particular case of TuiDrawText2().
- Isolate the TuiPrintf() and TuiDraw*Text*() functions as separate
"Generic TUI utils".
- Fix "TAG_TAG" typo in TAG_TAG_TUI_PALETTE.
- Add SAL annotations.
Suppose you copy a CPL file (e.g. console.dll renamed into console.cpl)
into a path containing spaces, for example into the Desktop:
C:\Documents and Settings\Administrator\Desktop\console.cpl
If the shell registry value for the "open" action of 'cplfile' does not
contain quotes around %1, then the Control_RunDLL function will attempt
to load "C:\Documents" as a file, which of course does not exist.
(NOTE: Missing in ReactOS: Doing a PathFindOnPath() or a PathFileExists()
call to verify that the file actually exists, instead of blindly trying
to run it and failing later in kernel32!LoadExecuteExW ...)
Adding quotes around the %1 fixes this and the correct file is being
loaded.
This behaviour has been confirmed to exist e.g. on Windows Server 2003
too (and is thus *NOT* a bug in ReactOS/Wine's Control_RunDLL
implementation).
----------------------
How to confirm this behaviour, in Win2k3 x86:
1. Start Win2k3 in debug mode under WinDbg. Ensure you have the debug
symbols available.
2. Once loaded, break into the debugger, attach context to explorer.exe,
and enter the magical :) single WinDbg command (all in one line, with
**NO inserted newlines!!**):
bp shell32!CPL_RunMeBaby ".echo \"CPL CmdLine:\"; ?? (wchar_t*)*(void**)(@esp+12);
bp SHLWAPI!PathIsFileSpecW \".echo \\\"CPL Path:\\\"; ?? (wchar_t*)*(void**)(@esp+4);
bc \\\"SHLWAPI!PathIsFileSpecW\\\"; g;\"; g"
(Explanation:
a breakpoint is placed in the internal shell32!CPL_RunMeBaby function.
When the bp is hit, it runs the large WinDbg command inside the quotes.
This command echoes an informative line, then dumps the 3rd parameter
of the function on the stack that contains the CPL command-line.
It then adds a new breakpoint in SHLWAPI!PathIsFileSpecW, which is the
function that is being called *just after* the internal parsing of the
CPL command-line, and will verify whether the extracted CPL path does
exist. That new breakpoint in turn will run a WinDbg command that will:
(i) Display the CPL file path (1st-param of that new function), then
(ii) Clear that breakpoint. Finally, automatic continuation ensues.)
3. On vanilla Win2k3, whose 'cplfile' "open" action does contain the
quotes around %1:
rundll32.exe shell32.dll,Control_RunDLL "%1",%*
you will observe the following:
CPL CmdLine:
wchar_t * 0x00094e30
""C:\Documents and Settings\Administrator\Desktop\console.cpl","
CPL Path:
wchar_t * 0x0007f898
"C:\Documents and Settings\Administrator\Desktop\console.cpl"
Notice the extra pair of quotes around the CPL filename in the CmdLine.
4. When modifying the 'cplfile' "open" action by *removing* the quotes
around %1, you will instead see the following, thereby confirming
the behaviour, which is now identical to what used to happen in ROS:
CPL CmdLine:
wchar_t * 0x00094e30
"C:\Documents and Settings\Administrator\Desktop\console.cpl,"
CPL Path:
wchar_t * 0x0007f898
"C:\Documents"
Due to the (now) absence of quotes around %1, the command-line gets
wrongly parsed and the extracted file path is incorrect.
- Added translation for:
- [W32TIME]
- [MODE]
- [TIMEOUT]
- [MODEMUI]
- [ARPING]
- [FRAGINATOR]
- and more
- Updated existing translation
- [WINNLS] Update cht (zh-TW) and zhh (zh-HK)
- [DOC] Update rules in Chinese translation notes.txt
- Wine translation sync
Some of the punctuation use in WIne has been converted to half-width,
so the punctuation will no longer synced.
Neither LiveCD nor BootCD 2nd stage are able to use new registry key for videoprt,
as they depend of some PnP entries which are unavailable.
This line was added in a7ebc6bd5c (r43711)
Note that it doesn't change much for ReactOS yet, as neither
videoprt.sys nor win32k.sys take care of this parameter.
- Don't store trailing newlines in the exception description text strings.
- Remove unused i386PrintChar().
- Display CR4 in x86.
- Use the "indentation" printf generation trick in order to get aligned
strings for (CF4 and) DR6 and DR7, without having to hardcode the tons
of alignment whitespaces (--> make the strings stored in freeldr shorter).
- Show the IP/ErrorCode/EFlags/GDTR/IDTR/LDTR values vertically aligned.
- Display the stack frames in both x86 and x64 modes.
- Adjust the instruction pointer when a BREAKPOINT or OVERFLOW exception
arises, so that the offending instruction can show up in the instruction
stream.
CORE-16748
- Display the correct TR register value.
- Ensure that the x86 segment register values displayed are really
2-byte long.
Segment registers are intrinsically 16 bits. Even if the x86
KTRAP_FRAME structure stores them as ULONG, only their lower 16 bits
are initialized. We thus cast them to USHORT before display.
These segment registers are saved in a stack-based KTRAP_FRAME by the
CPU trap mechanism (for SS), and by 'push CS' etc. instructions for
the others, and from Intel documentation, we know that:
"
If the source operand is a segment register (16 bits) and the operand
size is 64-bits, a zero-extended value is pushed on the stack; if the
operand size is 32-bits, either a zero-extended value is pushed on the
stack or the segment selector is written on the stack using a 16-bit
move. For the last case, all recent Core and Atom processors perform
a 16-bit move, leaving the upper portion of the stack location unmodified.
"
So it may happen, when using the push, that either they get zero-extended,
or garbage gets stored in the higher bits, and these need to be trimmed.
CORE-17350
Makes testing easier on real hardware (especially for these configs
where debugging can only be done via screen mode).
Add also an experimental Setup ACPI APIC entry in bootcd.ini for testing
purposes, along the lines of commit 5ee09256d .
In the similar LiveCD entry, use instead the /HAL= option.
Converted from Cantonese to HK-Style Written Chinese.
Also assign zh-HK translations to the ReactOS Chinese
translation team in the CODEOWNERS file.
Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>