Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
- Allow to boot NT kernel on UEFI systems with our 2 primary supported architectures
- Implement remaining code needed to pass execution to x86 and amd64 kernels
CORE-11954
Adds the option to set the address edit box to use the display name or the full path. Also refreshes the window title and edit box in all open explorer windows when changing these settings using the folder options dialog.
## PROPOSED CHANGES ##
- Create a new CabinetStateSettings type that inherits from the CABINETSTATE type. This allows us to add additional cabinet state settings not exposed in the CABINETSTATE type as well as adding a Load() method to easily populate the cabinet state settings.
- Add a global cabinet state settings object. While most settings in browseui are stored independently in each shellbrowser window, cabinet state settings are global and apply to every shellbrowser window. This can be confirmed on Windows Server 2003 and Windows 7.
- When receiving the WM_SETTINGCHANGE window message from the folder options dialog, refresh the title of the window and the text in the address edit box. This is the same behavior as Windows Server 2003 and Windows 7.
Add a DWORD registry value to HKCU\...\Explorer\CabinetState\FullPathAddress to allow users to toggle this setting on or off in our folder options.
CORE-9277
Create the folder TEMP in X:\reactos so now we can match current livecd
environment variables TMP and TEMP
can be seen as a part of solving CORE-13041
The use-case for that is:
copying the livecd folder structure directly to writable media as USB sticks or memory cards,
will work then out-of-the-box without any other change.
Implement NTFS boot sector that loads FreeLdr from a NTFS partition.
CORE-17474
- Able to find/parse root directory;
- Handle fixups in FILE MFT record;
- Implement directory tree search;
- Implement loading found file from disk;
- Handle fixups in INDX records;
- Fail if compressed or sparse;
- Attempt to support 64-bit disks.
Some TO-DOs for later:
- Handle "weird" NTFS partition with uncommon sector sizes / sectors per cluster / sectors per index record;
- Better implementation for file loading;
- 64-bit LCN support.
This works similarly to how our shell stores its settings from a software design standpoint.
- Add settings.cpp file and ShellSettings structure to load and save settings.
- Add a registry value to hivedef.inf for the locked toolbar state.
This prevents a bug where the associated registry key cannot be opened or saved to.
- Add new BWM_SETTINGCHANGE window message to refresh the UI on setting changes
and send it to every open window when saving settings to the registry.
- Add new BWM_GETSETTINGSPTR window message to share the shellbrowser settings
structure pointer with child windows and toolbars.
- Set `HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CabinetState\FullPath` to 0 by default.
Adding this registry value also enables the "Display the full path in the title bar" option in our folder options window.
- Query the same registry key when the file explorer is started to determine whether to use the full path or the display name in the window title.
CORE-19046 CORE-18904
New ReactOS can zip/unzip files and folders in UTF-8 filenames.
You can also choose the codepage of filenames to zip/unzip via
the ZipCodePage / UnZipCodePage registry values on the registry
key HKEY_CURRENT_USER\Software\ReactOS.
Windows 8 or later also support UTF-8 zipped folders.
You can also use 3rd party software to zip/unzip in older Windows.
- Use <atlconv.h> for string conversion.
- Use zipOpenNewFileInZip4_64 instead of zipOpenNewFileInZip3_64,
and then add MINIZIP_UTF8_FLAG flag.
- Set the filenames in UTF-8 by using CP_UTF8 codepage.
- Codepage is user selectable via registry settings.
CORE-16668
Enable the explorer status bar by default, which
the vast majority of our community voted for.
Set `HKCU\Software\Microsoft\Internet Explorer\Main\StatusBarOther`
to 1 in hivedef.inf. This will show the status bar by default.
CORE-19028 CORE-19010
- Add registry key to show the time and date when two lines are available
in the taskbar clock area.
- Keep old behavior when `PreferDateOverWeekday` registry key in
`HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced`
is set to 0 or not present.
When three or more lines are available, the clock will continue to show
the time, day of the week, and the date. When only one line is visible,
the clock will continue to only display the time.
CORE-19018
In both lines 451 and 474:
uefidisk.c: warning C4553: '==': result of expression not used; did you intend '='?
It's "funny" that GCC builds doesn't catch those...
Based on a commit by Vadim Galyant:
5ef5c11e7f
Also fix a minor type conversion warning. CORE-18963 CORE-17977
Co-authored-by: Vadim Galyant <vgal@rambler.ru>
CORE-17604
- Disable some functions for ARM32;
- Remove some link options not used on ARM;
- Add get _controlfp() to LIBCNTPR to link properly on ARM;
- Unify Freeldr UI Drawing on ARM;
- Add qemu UART debugging for ARM32/ARM64.
CORE-11954
- EFI binaries have a different subsystem in the PE header;
- ENVIRON: Make sure INTN and UINTN are 64bit for 64bit platforms;
- Handle UEFI Memory maps and translate it for freeldr;
- Add FAILED_TO_EXIT_BOOTSERVICES Freeldr BSoD code.
For: hivedef.inf, powercfg.cpl, sysdm.cpl
and: netshell.dll, netcfgx.dll, shell32.dll, userenv.dll
Also fix "My Documents" and "My Network Places" folder names.
First batch of changes to implement a UEFI version of freeldr:
- Compile freeldr as EFI binary on top of the existing loader.
- Stub out various functions so we can create a UEFI machine-type in freeldr.
- Implement all of the video output functions so we can display a pretty freeldr BSoD :)
- Keep the common definitions and file lists in CMakeLists.txt
- Move PC-AT & compatibles (PC-98, XBOX) definitions in pcat.cmake
- Future UEFI-specific definitions will be in an uefi.cmake
Miniport drivers import from NDIS, but NDIS does not support being
loaded as a dependent driver (it does not have DllInitialize).
Instead, NDIS needs to load before all possible miniport drivers,
even boot-start ones. We achieve this by placing it in its own service
order group, which loads before the NDIS group.
All our miniport drivers are demand-start, so would automatically start
later. The ndisprot driver from the ticket is likely the first boot-start
miniport we've encountered. Since DriverEntry did not run,
AdapterListHead was NULL, resulting in the crash.
This is what Windows does. And we forgot this location here.
This is an addendum to
0.4.15-dev-5365-g 9bb5627df6 [SETUP][INF] Use the standard "Helv" -> "MS Sans Serif" substitution... (#4864)
- Delete "DejaVu Sans Mono" font files (DejaVuSansMono.ttf etc.).
- Re-map "Terminal" font substitute to "Lucida Console" except for HebrewFonts and UnicodeFonts.
- Re-map HebrewFonts "Terminal" font substitute to "Courier New".
- Re-map UnicodeFonts "Terminal" font substitute to "Courier New". And then, re-map UnicodeFonts "Courier" font substitute to "Courier New". Delete UnicodeFonts "Courier New" font substitute.
CORE-18605
The keyboard layout file names of ReactOS are different from Windows' ones. It was one reason why ImmInstallIMEW fails.
- s/kbdbgm/kbdbu/ Bulgarian (Typewriter)
- s/kbdgrist/kbdgr1/ German_IBM
- s/kbdes/kbdsp/ Spanish (non-alternate!)
- s/kbdja/kbdjpn/ Japanese
- s/kbdko/kbdkor/ Korean
- s/kbdsk/kbdsl/ Slovak
- s/kbdsk1/kbdsl1/ Slovak (QWERTY)
CORE-11700
- Changed some wording according to the translation requirements.
- Fixed some mistakes.
- Changed my name.
Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
Restore MUP again back to its "Network" group. CORE-12107
This reverts commit 21fc538c (r75355), that reverted part of
commit e145ed06 (r72450).
In addition: noticed by Serge Gautherie (see CORE-12107):
- AudioSrv belongs to "AudioGroup" (and not "Audio" that doesn't exist).
- lanmanworkstation belongs to "NetworkProvider" (without a space).
- Fix the ErrorControl values to 1 (SERVICE_ERROR_NORMAL).
- Fix RamDisk driver type (it's SERVICE_KERNEL_DRIVER, not FS).
- btrfs.inf : This is a filesystem driver, so fix its ServiceType.
- Move 3rd-party FS data (btrfs, ext2, nfs(d)) from the system
hivesys.inf and into their dedicated **.reg.inf files.
Correct fix was to fix the HCELL_INDEX <-> HKEY conversions, much like
is being done with UlongToHandle / HandleToUlong.
The on-disk/in-memory hive file structures are platform-independent:
their layout must not depend on whether code is compiled in 32 or 64
bits.
They are correct and are more performant.
- Rewrite WinLdrAddDriverToList() on the model of CmpAddDriverToList()
with support for CmpIsDriverInList().
- Disable RegEnumKey() as it is now unused.
They date back from commit a880f2ee (r9611), and were the root cause for
the bug that was tentatively fixed by commit 81a9ce44e (PR #755).
On Windows, boot file system drivers have either the SERVICE_DEMAND_START
or the SERVICE_DISABLED start type, and only the filesystem to access the
boot media is manually loaded by the OS loader (other FSes that are needed
later are loaded by the FSRecognizer).
Also there is no need to disable NTFS anymore.
Typos introduced in commit 4d1ea554c.
These had the effect of enumerating "NetworkProviderRemoteValidation"
and "Extended BasePCI Configuration" as groups, which were of course
invalid/non-existent.
The actual groups are: "NetworkProvider", "RemoteValidation",
"Extended Base", and "PCI Configuration".
Fixing this may correct the loading order of drivers that belong to
these groups (if we do have such drivers).
Turns out, that rtl/amd64/rtlmem.S doesn't currently compile fine with
ML64, and it wasn't included for compilation anyways in the original RTL.
So, just remove it from there as well.
This allows: (i) to shorten dramatically the lengths of the static
registry path strings being used (and thus, allow for reduced binary
file size), and (ii) to prepare future support for selecting different
control sets (and related Last-Known-Good configurations).
- Use UNICODE_STRINGs wherever possible.
- Retrieve the OEMHAL font file name. TODO: Load it!
- In WinLdrLoadNLSData(), don't open/close each file twice (and showing
we are loading them twice). Instead, open all files at once (and keep
them that way), retrieve their sizes and do the calculations, then
load their respective contents one by one -- giving loading feedback
only at that point -- and finally close all of them at once.
... as it should have always been done (and must be done for NTDLL
and NTOS kernel as well). This allows using the RTL with the correct
definitions and the reduced functionality available at boot-time.
+ Make the RTL main header compatible.
In addition, this will permit re-using existing code that already
uses the RTL (mostly string conversions).
See commits 427c90af3 (r36761) and b46e8cc18 (r36980) for some
background.
Reviewed all Chinese Simplified translation files and updated those
inappropriate or outdated ones.
Co-authored-by: Liu Wenyuan <15816141883@163.com>
Reviewed-by: Chan Chilung <eason066@gmail.com>
Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Zheng Jianping <robsean@126.com>
Reviewed-by: Luo Yufan <njlyf2011@hotmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
- Added zh-HK translation for following files:
- [BASE/SERVICES/W32TIME]
- [BASE/SYSTEM/...] (except CMD console only applications)
- [FDEBUG]
- [DLL/CPL/...] (except Wine related applications)
- [DLL/SHELLEXT/...]
- [DLL/WIN32/...] (not all applications are translated, and Wine related applications are excluded from this part)
- [MODULES/ROSAPPS/APPLICATIONS/...] (not all applications are translated)
- [SCREENSAVERS]
- [NTVDM]
- [USERSRV]
- Translation Improvement
- Fix header for zh-TW and zh-HK translation files
Reviewed-by: Luo Yufan <njlyf2011@hotmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
- 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>
Actually, RegCloseKey() is here a dummy macro that just "returns"
success. Indeed, the internal implementation of RegOpenKey() doesn't
really allocate internal structures: it just returns a "pointer" to
already existing allocated data. Therefore nothing needs to be closed/freed
later on.
- Move a few lines around.
- Switch to RtlZeroMemory() from memset().
- Make while() more explicit.
For CORE-12802:
- Add/Fix FrLdrHeapAlloc() failure handling and related.
Especially, add/fix FrLdrHeapFree() calls.
- Add/Improve ERR() to some FrLdrHeapAlloc() failure cases.
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>