Commit Graph

3655 Commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
6ab8b3f905 ** TODO: Move this to setup_gui_UI_improve
See also CORE-13526
2026-08-14 20:53:46 +02:00
Hermès Bélusca-Maïto
15aa873541 ** SUPER WIP ** Centralize in the Upgrade/Repair page the decision to skip or keep it shown when going Back from Summary or Next to other pages
However, as usual, wine's code (in comctl32) is incomplete/buggy, and
the necessary message `PSM_GETCURRENTPAGEHWND` (and also `PSM_IDTOINDEX`
with ID == 0) doesn't work when being invoked from e.g. `PSN_SETACTIVE`
notification handler.
This is due to the fact the `active_page` propsheet variable is
artificially invalidated (to -1) before the notification is sent.

See also:
- 08afc1a5ed
  ("Lots of bug fixes and new features in property sheets.")
- 517b85f989
- 2a8463b558

And this:
- https://devblogs.microsoft.com/oldnewthing/20111021-00/?p=9323
2026-08-14 20:53:10 +02:00
Hermès Bélusca-Maïto
321d74c49f *** TESTS ONLY *** Setup: Disable sensitive code paths so as to be able to test on machine without wiping one's harddrive etc. 2026-08-14 20:53:09 +02:00
Hermès Bélusca-Maïto
441a1f97b1 ** WIP ** More TEMP testing 2026-08-14 20:53:09 +02:00
Hermès Bélusca-Maïto
098396d13d ** WIP ** [USETUP] Convert source files (but not the translation files) to UTF-8 2026-08-14 20:53:07 +02:00
Hermès Bélusca-Maïto
61ad4ba698 [SETUP:REACTOS] Remove the wizard title-setting workaround
This workaround, previously needed for the Wine propsheet/wizard title-setting
bugs, is not needed anymore; see CORE-20687
2026-08-14 20:53:06 +02:00
Hermès Bélusca-Maïto
3157bf2a46 ** WIP ** [SETUP:REACTOS][USETUP] Add extra TODOs for unattended support 2026-08-14 20:53:00 +02:00
Hermès Bélusca-Maïto
b299049410 [USERINIT] livecd.c: Change default actions in unattended mode, or if the installer cannot be found (#9363)
- Just after initially caching the path to the ReactOS installer, check
  whether an unattend.inf file can be found in its directory; otherwise,
  fall back to an unattend file in the current ReactOS directory.

- If this unattend.inf file specifies to run an unattended setup
  (`UnattendSetupEnabled` value set to `"yes"`), automatically start the
  ReactOS installer -- instead of starting the live environment desktop.

- If the user presses Ctrl+Shift+F10 however, disable unattended setup
  (suggestion to override the behaviour with a keypress from Whindmar Saksit).

NOTE: in the `WM_INITDIALOG` dialog handlers, use `SendMessageW`
to simulate the button presses. This also allows the invocation
of `EndDialog()` (from the button command handlers) while the
`WM_INITDIALOG` message is handled, so that the USER dialog manager
can then directly close the dialog without showing it first.
2026-08-14 20:05:29 +02:00
Hermès Bélusca-Maïto
fd764346de [SETUP:REACTOS][USETUP] Improve unattended setup support (#9363)
- Make unattended setup work for the 1st-stage GUI setup:

  1. Select the partition where to install ReactOS, partitioning empty
     space if necessary;

  2. Format the selected partition (if requested) with the correct
     filesystem, without showing the formatting dialog;

  3. Jump over the wizard pages -- some of them preinitialize the data
     before doing the jump. Unnecessary pages like the Welcome page,
     the Install type selection page, etc. aren't included in the wizard
     pages list in this mode.

  In case some unattended information isn't complete (or incorrect),
  halt on the concerned page(s) and allow the user to go back to the
  previously skipped pages.

- Remove an unattended setup hack for volumes format.

  Even in unattended setup and `FormatPartition == 0`, if the user chose
  to format the partition in the format dialog that pop up, then we *MUST*
  honour this choice! Otherwise, we would also have to ignore volume check
  for that volume (because we would get an assertion that the volume isn't
  formatted), **AND**, we wouldn't be able to install ReactOS there anyway
  because the volume isn't formatted!
2026-08-14 20:05:29 +02:00
Hermès Bélusca-Maïto
7a2ea5acb3 [SETUP:REACTOS] drivepage.c: Minor simplifications 2026-08-14 20:04:43 +02:00
Hermès Bélusca-Maïto
3821de1709 [SETUP:REACTOS] Update translations (#9383)
- Adjust the `IDS_DRIVESUBTITLE` string, and adapt its Russian translation
  (by Stanislav Motylkov).

- Shorten the `IDC_WARNTEXT2` Turkish translation string a bit (removing
  "henüz", since the base English translation doesn't contain "yet"),
  so as to fix the 256 characters warning:
  ```
  base\setup\reactos\lang/tr-TR.rc(25) : warning RC4206 : title string too long; truncated at 256
  ```
  Addendum to commit da9f16e1a8 (PR #9366).

- Update the French translation.
2026-08-12 19:05:29 +02:00
Ethem Çılgın
cf20b59a7f [RAPPS][INF] Update Turkish (tr-TR) translation and fix typos (#9364)
RAPPS:
    - Translated `IDS_INSTGEN_CONFIRMINSTRUNAPP` string.
    - Spelling & typos:
        - Fixed typo in `IDS_MISMATCH_CERT_INFO` ("bilimmiyor" -> "bilinmiyor").
        - Fixed phrasing in `IDS_CMD_PACKAGE_NOT_FOUND` ("bulunmadı" -> "bulunamadı").
        - Fixed spacing in `IDS_INFO_README` ("Benioku" -> "Beni Oku").

Shortcuts:
    - Grammar correction: Updated `README_TITLE` and `README_DESC` ("Benioku" -> "Beni Oku").
    - Translation: Translated Wine Internet Explorer title/description fields.
2026-08-12 16:45:55 +02:00
Alex Mendoza
4078d8c52a [SETUP:REACTOS] Translate some newly-added strings (#9380)
Suggested by (and adapted from) Swyter.

Translate the `IDD_FINISHPAGE` and `IDD_ABORTPAGE` pages,
the `IDS_FINISH_NO_REBOOT` and `IDS_ABORT_NO_REBOOT` labels,
the Reboot / Restart button labels, and some more strings.

Follow up to commit 10f8e6e9b7 (PR #8978).

Co-authored-by: Ismael Ferreras Morezuelas <swyterzone@gmail.com>
2026-08-12 16:23:34 +02:00
Ethem Çılgın
da9f16e1a8 [SETUP:REACTOS] Update and complete Turkish (tr-TR) translation (#9366) 2026-08-12 13:58:43 +02:00
Hermès Bélusca-Maïto
9d52b89a64 [SETUP:REACTOS] Enlarge a little bit the Wizard welcome-page warning text controls 2026-08-11 23:25:21 +02:00
Hermès Bélusca-Maïto
ff329dbe5a [SETUP:REACTOS] Allow only one single ReactOS Setup instance to run at a time 2026-08-11 23:24:43 +02:00
Hermès Bélusca-Maïto
1721f743ec [SMSS] Minor code cleanup
- Use `ValueBuffer` explicitly in the `NtQueryValueKey()` calls.

- When any of the `NtQueryValueKey()` calls fail and we print an error,
  avoid debug-printing an uninitialized `PartialInfo->Type` value.

- Remove unused dead code that was invoked in `SmpInvokeAutoChk()`.
  The "dots" that AUTOCHK may want to display instead of its usual
  messages (depending on whether /SOS is given in the boot options),
  is decided by AUTOCHK itself instead of SMSS.
2026-08-10 18:42:25 +02:00
Hermès Bélusca-Maïto
41dadd942f [SMSS] Skip empty commands when loading the "*Execute" Session Manager values
When loading the Session Manager "BootExecute", "SetupExecute",
..., "Execute" REG_MULTI_SZ/REG_SZ registry values, verify that each
NUL-terminated command string contained in these values is valid and
non-empty. Only then, add the command string into the suitable Execute
list. If not (the string is empty), just skip it.

Introduce a specific `SmpConfigureExecute()` handler for this purpose,
while the existing `SmpConfigureMemoryMgmt()` is kept for dealing with
(unrelated) page files values.

By skipping empty command strings, we avoid invoking `SmpExecuteCommand()`
on empty commands, and having `SmpParseCommandLine()` failing and showing
the following debug print:
```
(base\system\smss\smss.c:231) SMSS: SmpParseCommandLine(  ) failed - Status == c0000001
```
2026-08-10 18:42:20 +02:00
Eric Kohl
c00b0a4035 [DHCPSVC][IDL] Implement DhcpRequestParams partially
Retrieve DHCP Options from the cache

- No DHCP_IMFORM requests yet
- No persistent requests yet
2026-08-09 19:54:06 +02:00
Hermès Bélusca-Maïto
5178c3913e [SMSS] Improve the SmpUnhandledExceptionFilter() routine a bit
- Compile the extended diagnostics messages + breakpoint only
  in DBG builds.

- Trigger the breakpoint only if SMSS is being debugged (the
  `BeingDebugged` flag is set in the current PEB). This will
  avoid any unhandled breakpoint exceptions when running
  debug builds of ReactOS without any debugger attached.

- Use a `ExceptionRecord` local variable that captures the
  `ExceptionInfo->ExceptionRecord` member, and use it in the
  code to shorten lines a bit.

- Print the "Memory Address" and "Read/Write" values only for
  specific exceptions (`STATUS_ACCESS_VIOLATION`, `STATUS_GUARD_PAGE_VIOLATION`,
  `STATUS_STACK_OVERFLOW`, and `STATUS_IN_PAGE_ERROR`), whose
  parameters actually specify these values.

  Additionally, print the "I/O Error" code in case of the
  `STATUS_IN_PAGE_ERROR` exception.

- In all of these specific exceptions, the `ExceptionInformation[0]`
  specifies the "Read/Write" (or "Execute") value, while the
  `ExceptionInformation[1]` specifies the virtual address of the
  inaccessible data. And not the reverse, as we did previously.
2026-08-09 17:05:16 +02:00
Tibor Lajos Füzi
6fa7b87e0d [3DTEXT] Add ability to draw any letter or character (#8755)
* [3DTEXT] add the ability to draw any letter, not just the first 255 from the character set, limit the text length to 20

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2026-08-05 16:45:26 -05:00
Alex Mendoza
10f8e6e9b7 [SETUP:REACTOS] Update Spanish (es-ES) translation (#8978)
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2026-08-05 22:49:52 +02:00
Jose Carlos Jesus
1f41f36a6c [SETUP:REACTOS] Update Portuguese (pt-PT) translation (#8970) 2026-08-05 20:45:16 +02:00
Eric Kohl
d2025ff295 [NSLOOKUP] Fix calls to stricmp and strnicmp
GCC does not complain about this!
2026-08-03 01:40:42 +02:00
Eric Kohl
07068a363f [NSLOOKUP] Implement the interactive mode
Also implement the retry and timeout command line options
2026-08-03 01:20:33 +02:00
Jose Carlos Jesus
9abb0c4d82 [FORMAT] Add Portuguese (pt-PT) translation (#9168) 2026-07-30 19:50:44 +03:00
Jose Carlos Jesus
bd891b6e27 [DISKPART] Update Portuguese (pt-PT) translation (#9159) 2026-07-30 19:30:43 +03:00
Ahmed Arif
ed367320c2 [DHCPCSVC] Fix DHCP option stack overflow (#9056)
Reject malformed DHCP subnet mask and router option lengths
before setup_adapter() consumes them.

This prevents attacker-controlled option lengths from expanding DHCP
option bytes into a fixed stack buffer while preserving valid
router address lists.

Validate the option lengths before use, keep router lists limited to
complete IPv4 addresses, and format registry IPv4 strings with
RtlIpv4AddressToStringA().

Booted amd64 QEMU image: no DHCP/client networking regression observed.
2026-07-30 18:20:50 +03:00
Hermès Bélusca-Maïto
3da59bca94 [SETUP:REACTOS] Tweak the Summary page controls
- Tweak the dimensions of the read-only editboxes.

- Tweak the Confirmation checkbox: adjust its dimensions, remove some
  artificatial newlines, and adjust the wording in some translations.
2026-07-29 16:49:17 +02:00
Hermès Bélusca-Maïto
ba58e3f528 [SETUP:REACTOS] Improve navigation in the setup wizard
- Support double-clicking on the Installation type page radio buttons.

  The Installation type page offers two self-excluding options:
  "Install ReactOS", and "Upgrade an existing ReactOS installation",
  and no other controls are available (except for the wizard navigation
  buttons). Thus, we can implement the UI feature of supporting double-
  clicked radio buttons as an abbreviation for "select + Next".

  For this, add the `BS_NOTIFY` style to both radio buttons, so as to
  receive the `BN_DBLCLK` notification via the `WM_COMMAND` message.

  Based on a suggestion by Raymond Chen,
  https://devblogs.microsoft.com/oldnewthing/20050804-10/?p=34713

- Ensure the correct radio button is selected when activating the
  Installation type page:
  ensure the "Install ReactOS" radio button is checked if we don't have
  a selected installation (default case), which can also happen if the
  user clicked on the "Do not upgrade" button on the Upgrade/Repair
  selection page, then went back.

- In the Upgrade/Repair selection page, go to the next page if the user
  double-clicked on a listed installation.

- In the Drives/Partitions page:
  * support pressing DELETE key to delete an existing partition;
  * support pressing ENTER key to install ReactOS on a eligible
    partition;
  * enable the "Create" partition button only if the selected disk region
    is not partitioned, and can be partitioned according to the disk's
    partitioning scheme (e.g. for MBR disks, no more than 4 primary
    partitions).
2026-07-29 16:49:15 +02:00
Hermès Bélusca-Maïto
cb61fd4d71 [SETUP:REACTOS] Slight WM_COMMAND handlers improvements
- Explicitly check for `BN_CLICKED` notification when handling
  single-click on standard push-buttons.

- Return TRUE explicitly from `WM_COMMAND` in the _dialog_ procedures
  when the message is handled and no extra default processing is needed.

- Reduce some extra indentation when possible.
2026-07-29 16:49:14 +02:00
Hermès Bélusca-Maïto
096c0aa9d4 [WELCOME] Update the ExpandInstallerPath() information
Update its parameter names, SAL2 annotations, and Doxygen comment.
2026-07-27 20:08:16 +02:00
Hermès Bélusca-Maïto
064dd8f832 [USERINIT] Locate and cache early the path to the ReactOS installer when starting in livecd mode
- Move `ExpandInstallerPath()` from userinit.c to livecd.c, and update
  its SAL2 annotations and Doxygen comment.

- Make `StartInstaller()` directly use the cached ReactOS installer path.

- This avoids invoking yet again `ExpandInstallerPath()` when trying to
  locate the installer also for the aim of determining whether to disable
  the "Install" button.
2026-07-27 20:06:02 +02:00
Hermès Bélusca-Maïto
d524789ed0 [USERINIT] Simplify the LiveMedium check
Use the standard way of checking for the existence of
the `HKLM\SYSTEM\CurrentControlSet\Control\MiniNT` key.
Addendum to commit 8c9a41db96 (r70607).
2026-07-27 19:32:27 +02:00
Hermès Bélusca-Maïto
b1bd421163 [UMPNPMGR] Simplify the LiveMedium check
Use the standard way of checking for the existence of
the `HKLM\SYSTEM\CurrentControlSet\Control\MiniNT` key.
Addendum to commits 8fabb29ed9 and 9fa8028ae4.
2026-07-27 19:32:27 +02:00
Hermès Bélusca-Maïto
8dce28564a [UMPNPMGR] IsConsoleBoot(): Check for RegOpenKeyExW() failure before continuing 2026-07-27 19:32:26 +02:00
Stanislav Motylkov
4eb9e87f09 [USETUP] Fix Albanian (sq-AL) translation
Remove a deprecated ERROR_FIND_SETUPDATA, which was supposed
to be removed in a7afba7703,
however it was skipped probably due to broken encoding.

Noticed in 7090cf7ebc / 7f7df51c62.
2026-07-26 01:16:26 +03:00
Stanislav Motylkov
7f7df51c62 [USETUP] Fix broken OEM encoding of comments
Partial revert of commit 7090cf7ebc.
2026-07-26 01:16:12 +03:00
Timo Kreuzer
83216fe2ed Revert "[SETUP:LIB] Prepare setup for GPT support"
This reverts commit 8d238c1d00.
2026-07-25 11:29:13 +00:00
Mohammad Amin Mollazadeh
e3c4b21737 [RAPPS] Force download online apps catalog in ID_RESETDB (#9242)
Since the database is downloaded lazily, clicking on "Update Database"
button won't re-download the online catalog if "Available apps" view is
not active. This patch forces the download even when the "Installed apps"
is active.

CORE-20205
2026-07-25 08:15:19 +02:00
Hermès Bélusca-Maïto
f6fcb596bc [SETUPLIB] There is no need to update the keyboard settings only for non-unattended setup
Updating keyboard layout settings with user-overridden values, was
restricted to non-unattended setups, in an apparent attempt to fix
in commit 829b0c63d9 (r38146) the problem reported at CORE-3634.
This special-casing is now unnecessary.
2026-07-24 23:10:48 +02:00
Hermès Bélusca-Maïto
5302d4dca6 [SETUP:REACTOS] Select a better default keyboard layout, depending on the selected language
For example, when installing ReactOS in French, this selects the French
keyboard layout as default, while keeping English installed but not
activated.

This is partly a "hack", and adapts the existing solution chosen in USETUP.
A better fix will be done in the future.
2026-07-24 23:10:32 +02:00
Hermès Bélusca-Maïto
5da41b3448 [SETUP:REACTOS] Improve Installation thread initialization and termination
- Improve install abort on errors;
- Wait for the install thread to finish within the page that created it;
- Display the hourglass cursor while waiting for the thread.
2026-07-24 23:10:19 +02:00
Hermès Bélusca-Maïto
1648ea7555 [SETUP:REACTOS] Fix initialization of the Finish page
- Ensure the wizard gets shown, centered on the screen, and focused,
  when the Finish page is reached.

- Trigger the change of the "Cancel" wizard dialog button text, not
  from the `WM_INITDIALOG` page handler, but from `PSN_SETACTIVE`.

- Add a `PSN_KILLACTIVE` handler to kill the timer initialized in
  the `PSN_SETACTIVE` handler.

- Add a `PSN_WIZBACK` handler to disable going back in the wizard.
2026-07-24 23:10:04 +02:00
Hermès Bélusca-Maïto
da6e675c1b [SETUP:REACTOS] Set a common install wizard title; remove the per-page titles
This requires a workaround for the existing Wine propsheet/wizard
title-setting bugs, see CORE-20687.
2026-07-24 23:09:49 +02:00
Hermès Bélusca-Maïto
8eeff75e15 [SETUP:REACTOS] Improve wizard dialog initialization
- Store the wizard page descriptors in a separate static array.
  Then loop over these descriptors to create each page.

- Set the window small icon.

- Add a property sheet callback to set the window large icon (and not
  a rescaled small icon!) from the `PSCB_INITIALIZED` notification.
  Also, handle the `PSCB_PRECREATE` notification, and subclass the
  property sheet window procedure, so as to be able to initially center
  the wizard window while keeping it hidden before showing it,
  independently of which wizard page is going to be initially shown.

  A small hack for handling the `DM_REPOSITION` message is added,
  because Wine's comctl32 propsheet.c doesn't send the message after
  creating, initializing and resizing the property sheet dialog...
2026-07-24 23:09:28 +02:00
Hermès Bélusca-Maïto
4777621490 [SETUP:REACTOS] Minor code cleanup
- drivepage.c:
  * Move some local loop variables inside their loop block.
  * Move the core of the Drives/Partitions dialog `PSN_WIZNEXT` handler
    into a separate function.

- reactos.c:
  * Move some `break;` into their corresponding `case` blocks.
  * Replace remaining `EnableWindow(GetDlgItem(...), ...)` instances
    with `EnableDlgItem(...)`.
  * Introduce `hWndParent` variables in some routines, so as not to
    invoke `GetParent(hwndDlg)` repeatedly.
  * Use NULL for default "Error" message-box title.
  * Remove an empty `case WM_DESTROY` in `FinishDlgProc()`.

- Use explicit Unicode property-sheet structures.

- Update the copyright notice dates. Fix the file header in drivepage.c.
  Add the missing file header into reactos.rc.
2026-07-24 23:09:00 +02:00
Hermès Bélusca-Maïto
b6f3d519b4 [SETUP:REACTOS] Fix navigation in the setup wizard pages and dialogs
- Fix TAB order in the Installation type page.

- Don't systematically set focus to the "Install ReactOS" radio-button.

  Always resetting the focus to the "Install" choice is unwanted,
  because, if the user instead selects "Upgrade", goes to the next
  "Upgrade/Repair" page, then goes back to the installation type page,
  the selection focus wouldn't be on what the user previously chose,
  but would instead be on the "Install" choice, while the "Upgrade"
  choice would stay checked, thus leading to an inconsistency.

  We want instead the selection to stay as the user previously chose,
  without changing it.

- Correctly handle item selection change in the Installations list,
  so that only the "selected" state change is detected and UI buttons
  are updated accordingly.
  When the `PSN_QUERYINITIALFOCUS` notification is received (whenever
  the page is made active), reselect the currently-selected item so as
  to properly update the UI buttons.

- Add missing keyboard accelerators in the Devices selection page.

- Group all the push-buttons together in the Drives/Partitions page,
  so that when the focus is on the first one and the user presses the
  Left-arrow key, the focus stays on the buttons and doesn't go to the
  partitions list.

- Remove the `PSN_QUERYINITIALFOCUS` hack in the Drives/Partition page
  dialog procedure (see commit 6cb1394bb1, PR #9272).

- Correctly handle item selection change in the Drives/Partition list,
  so that only the "selected" state change is detected and UI buttons
  are updated accordingly.
  When the `PSN_QUERYINITIALFOCUS` notification is received (whenever
  the page is made active), reselect the currently-selected item so as
  to properly update the UI buttons.

- Remove redundant `WS_VISIBLE` style for all the Edit-text fields of
  the Summary page.

- In the Start/Welcome and the Finish/Abort pages: when disabling the
  wizard "Back"/"Next" navigation buttons with `PropSheet_SetWizButtons()`,
  for the purpose of hiding them next, do *NOT* use that macro, because
  it posts the `PSM_SETWIZBUTTONS` message instead of sending it, and so,
  it would be handled after hiding the buttons. The message would then
  interfere with the hidden buttons (when both "Back" and "Next" are
  hidden, "Next" gets forcefully shown).

- Set the default button to "No" for some confirmation dialogs
  (setup abort; partition deletion; ...).
2026-07-24 23:07:40 +02:00
Hermès Bélusca-Maïto
e9990e7b3d [SETUP:REACTOS] Improve the Installation Progress page layout
- Move around the status items static controls.

- Bolden the main status label.

- Whereas the repair/upgrade procedure may move, rename, or delete files,
  the regular installation only copies files. Therefore, display only the
  file name instead of the full "Copying..." message in this case.
  (Based upon a suggestion by Carl Bialorucki.)
2026-07-24 23:01:10 +02:00
Hermès Bélusca-Maïto
44e4f66ffb [SETUP:REACTOS] treelist.c/.h: Convert the files to UTF-8 without BOM 2026-07-24 23:00:58 +02:00