Commit graph

558 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 57b9c6b2f2
[FREELDR:NTLDR] Improve NLS data loading.
- 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.
2022-04-07 03:19:10 +02:00
Hermès Bélusca-Maïto 24cb57fdea
[BOOT][SDK:RTL] Compile a reduced RTL library for FreeLdr / NT bootloader...
... 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.
2022-04-07 03:19:09 +02:00
Hermès Bélusca-Maïto 64290dd2c9
[BOOT] Move boot-related commands from boot/CMakeLists.txt into a boot_images.cmake sub-file. (#4407)
This allows the CMakeLists.txt file to be less cluttered by unrelated stuff.
2022-04-01 04:58:08 +02:00
Hermès Bélusca-Maïto 88618f176d
[BOOTSECT] ISOBOOT: Add missing trailing 0x55AA sector signature. 2022-04-01 04:57:31 +02:00
Wu Haotian 0c42866e64
[TRANSLATION] Review & update Simplified Chinese (zh-CN) translation (#3933)
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>
2022-03-31 20:30:52 +03:00
Chan Chilung 2752c42f0b
[TRANSLATION] Update Hong Kong Chinese (zh-HK) translation - Part 2 (#4347)
- 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>
2022-03-31 17:10:21 +03:00
Hermès Bélusca-Maïto a6da36ed1b
[BOOTDATA] Properly capitalize 'Boot File System'. 2022-03-27 19:38:53 +02:00
Hermès Bélusca-Maïto a4cad7be6b
[SDK:CMLIB][MKHIVE][BOOT:ENVIRON][NTOS:CONFIG] Add missing HvGetCell casts. Replace some ASSERT(FALSE). 2022-03-27 18:37:16 +02:00
Hermès Bélusca-Maïto eeb4cbcb6b
[FREELDR:INF] Change immutable input string pointers to PCSTR when it's possible. 2022-03-25 18:54:22 +01:00
Hermès Bélusca-Maïto 9d3c3a757a
[SDK:REACTOS][CMLIB][BOOT] Get rid of the FreeLdr-specific __FREELDR_H define, and use the standard NT _BLDR_ instead.
This standard _BLDR_ define is already defined for both FreeLdr and
boot/environ UEFI bootloader lib, so no actual behavioural changes
should occur.
2022-03-25 18:54:18 +01:00
Vadim Galyant d4a05ad7aa
[FREELDR:NTLDR] Stub out x86 PAE support in preparation for PR #4272.
- 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.
2022-03-20 04:12:58 +01:00
Hermès Bélusca-Maïto d535ecf1dc
[FREELDR] Use safe-string buffer printf to initialize the returned strings in WinLdrGetNLSNames().
This will also stop the GCC 9+ warnings, see PR #4385.
2022-03-19 16:56:13 +01:00
Vadim Galyant d01f948925
[FREELDR] Allow booting from NTFS volume. (#3775) 2022-03-19 15:44:42 +01:00
Hermès Bélusca-Maïto 38cbe5acc3
[FREELDR] Update documentation following timeout and UI style work. 2022-02-21 02:54:06 +01:00
Hermès Bélusca-Maïto 63833c769f
[FREELDR] Update existing FREELDR.INI documentation. 2022-02-21 02:54:05 +01:00
Hermès Bélusca-Maïto ea4cfcfa12
[BOOTDATA][SETUPLIB] Don't hardcode FreeLdr's UI defaults in the freeldr.ini files.
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.
2022-02-21 02:54:04 +01:00
Hermès Bélusca-Maïto d215039216
[FREELDR:UI] Improve setting UI colors/strings ("theme") defaults.
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.
2022-02-21 02:54:03 +01:00
Hermès Bélusca-Maïto 44ed4fb001
[FREELDR:UI] TuiUpdateDateTime(): Simplify building the date/time strings. 2022-02-21 02:54:02 +01:00
Hermès Bélusca-Maïto 3599c835f6
[FREELDR:UI] Improve menu timeout drawing.
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.
2022-02-21 02:54:01 +01:00
Hermès Bélusca-Maïto ee32f9b86e
[FREELDR:UI] Isolate TuiDrawBox() top/bottom horizontal lines drawing into their own helpers. 2022-02-21 02:54:00 +01:00
Hermès Bélusca-Maïto 622a90522d
[FREELDR:UI] Fix the painting ordering of menu elements. 2022-02-21 02:53:59 +01:00
Hermès Bélusca-Maïto 5239a0ca4d
[FREELDR:UI] Improve how menu line separators are drawn.
When the menu is not boxed, do not draw the specific "T"-shaped box
corners for the separators.
2022-02-21 02:53:58 +01:00
Hermès Bélusca-Maïto c322610f6e
[FREELDR] Improve progress bar support, adapted from Inbv.
- Improve accuracy/progression smoothness when loading drivers.
- Allow changing text and percentage independently.
2022-02-21 02:53:54 +01:00
Hermès Bélusca-Maïto 81943afb7b
[FREELDR:NTLDR] Slightly rework how KD transport DLLs are loaded.
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).
2022-02-18 20:24:51 +01:00
Hermès Bélusca-Maïto 2221df213f
[FREELDR] Add cleanup in PE-image-handling-related failure code paths. 2022-02-18 20:24:49 +01:00
Hermès Bélusca-Maïto 15e1489c7f
[FREELDR:NTLDR] Add some error handling for LoadModule().
Based on PR #4294 by Serge Gautherie.

Co-authored-by: Serge Gautherie <reactos-git_serge_171003@gautherie.fr>
2022-02-18 20:24:48 +01:00
Hermès Bélusca-Maïto 1a920d9a7e
[FREELDR:NTLDR] Shorten KdTransportDllName --> KdDllName. 2022-02-18 20:24:47 +01:00
Hermès Bélusca-Maïto a7e3584065
[FREELDR:UI] Cleanup for the DrawMenu* functions.
- Remove duplicated code from directui.c and use the one from
  TUI instead, with the latter properly #ifdef'ed for _M_ARM.

- Add SAL annotations.
2022-02-16 00:49:48 +01:00
Hermès Bélusca-Maïto ccddb4aaf2
[BOOTDATA] Add /HAL=halpc98.dll to all the PC98 floppy disk's freeldr INI file boot entries. 2022-02-16 00:49:47 +01:00
Hermès Bélusca-Maïto f73c0e08e2
[FDEBUG][CMIDRIVER] Add missing psdk dependency for user-mode code. 2022-02-12 16:21:30 +01:00
Hermès Bélusca-Maïto 914f14a8b9
[FREELDR:NTLDR] Adjust some debug traces. RegOpenKey(): demote an ERR to WARN.
CORE-18040
2022-02-07 00:26:30 +01:00
Hermès Bélusca-Maïto f6a13d452c
[FREELDR:NTLDR] Implement support for the SOS option.
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.
2022-02-06 23:53:41 +01:00
Hermès Bélusca-Maïto cfbec70e04
[FREELDR] Use strsafe functions in the PE loader. 2022-02-06 22:20:58 +01:00
Hermès Bélusca-Maïto 313e6b6cbb
[FREELDR:UI] Clean-up when uninitializing the UI.
- 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.
2022-02-06 22:20:57 +01:00
Hermès Bélusca-Maïto e2daca3f60
[FREELDR:UI] Improve drawing of progress bars, reducing flickering.
- 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.
2022-02-06 17:52:46 +01:00
Hermès Bélusca-Maïto 9101247366
[FREELDR:UI] Couple of fixes for the ProgressBar functions.
- Fix box size calculations.
- MiniTUI: Distinguish Vista+ vs. NTLDR style progress bar.
2022-02-06 17:52:44 +01:00
Hermès Bélusca-Maïto d749b45e2a
[FREELDR:UI] Cleanup for the ProgressBar functions.
- 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.
2022-02-06 17:52:43 +01:00
Hermès Bélusca-Maïto a9994eab45
[FREELDR:UI] Couple of fixes for some TUI Draw*Text functions.
- TuiDrawCenteredText: Partly fix centering calculations (susceptible
  to give negative coordinates).

- TuiDrawText2: Don't display anything if X or Y are out of the screen.
2022-02-06 17:52:42 +01:00
Hermès Bélusca-Maïto f6a2438c1f
[FREELDR:UI] Cleanup for the DrawText* functions.
- 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.
2022-02-06 17:52:40 +01:00
Hermès Bélusca-Maïto 06fc2e72a6
[FREELDR:UI] Disable GUI code from compilation as it is currently stubbed.
Rename "ShowGui" -> "ShowUi" as this variable was actually unrelated
to *graphical* aspects of the UI.
2022-02-06 17:52:39 +01:00
Hermès Bélusca-Maïto 844c9dce6c
[FREELDR:UI] Code formatting only. 2022-02-06 17:52:38 +01:00
Hermès Bélusca-Maïto c5b029d0fc
[BOOTDATA] "open" actions for 'msstylesfile' and 'themefile' should be REG_EXPAND_SZ since they contain unexpanded environment variables. 2022-01-30 03:51:34 +01:00
Hermès Bélusca-Maïto 4929d8ddb8
[BOOTDATA] Add missing quotes around %1 for the 'cplfile' Control_RunDLL command line.
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.
2022-01-30 03:51:33 +01:00
Stanislav Motylkov 2318f7f436
[TRANSLATION] Cumulative update for Russian (ru-RU) translation
[SYSDM] Addendum to 5a2911d7, e58b4a49, ea2ca8fa.
[SHELL32] Addendum to 16f64a95, 44bb99cc, 2ae526a0, 34b0f3e4, fd39a292.
[SYSSETUP] Addendum to 556cfbf5, 6f1a57a9, 3f053db3.
[SAMSRV] Addendum to 6f1a57a9.
[BOOTDATA] Addendum to 63cd5d54.
[INF] Addendum to fb500b88.
2022-01-18 23:42:06 +03:00
Stanislav Motylkov 63cd5d54b8
[BOOTDATA] Make Secondary Logon service name and description translatable
Addendum to 43fa9548.
2022-01-16 22:46:36 +03:00
Eric Kohl 43fa9548d3 [services] Add the secondary logon service 2022-01-16 17:02:01 +01:00
Chan Chilung 171a920680
[TRANSLATION] Update Chinese Traditional (zh-TW) translation (#4154)
- 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.
2022-01-14 20:22:46 +03:00
Hervé Poussineau f03750de6a [VBEMP] Rename to vgapnp.sys
- rename driver vbemp.sys to vgapnp.sys
- rename service VBE to vga
- store settings in non hardware-profile registry key
2022-01-06 20:16:12 +01:00
Hervé Poussineau 073a1ea34c [VGAMP] Rename to vga.sys
- rename driver vgamp.sys to vga.sys
- rename service Vga to VgaSave
- store settings in non hardware-profile registry key
2022-01-06 20:16:12 +01:00
Hervé Poussineau 5afea63e66 [BOOTDATA] hivesys.inf: remove UseNewKey setting
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.
2022-01-06 17:45:03 +01:00