Commit graph

481 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
f57601d14b
[SETUPLIB][USETUP] FS utilities: Use the ISO C and C++ conformant name: _wcsicmp
Stop using non-conforming wcsicmp.
See also PR #6925 by Timo Kreuzer.
2024-07-01 16:28:17 +02:00
Hermès Bélusca-Maïto
a7a7e6a09c
[SETUPLIB][USETUP] Isolate and decouple the filesystem operations code from the UI (#7049)
The idea is reminiscent of the SetupCommitFileQueue() function:
filesystem volume operations are "queued" and processed via a
"commit queue".

The commit queue uses a user-specified callback, that is used to
interact with the user whenever an operation (filesystem formatting,
checking) is started, ended, or fails, for example by displaying
appropriate UI screens and choices, etc.
2024-07-01 16:18:57 +02:00
Katayama Hirofumi MZ
0f9e889736
[NTGDI][FREETYPE][SETUP][INF] Support FontLink (#7009)
If East Asian people were unable
to see the Latin characters, it
becomes a barrier to mutual
understanding.
FontLink will break that barrier.
JIRA issue: CORE-9616
JIRA issue: CORE-15480
- Modify font substitutes.
- Unify the lock variables.
- Add FONTLINK and
  FONTLINK_CHAIN structures.
- Add FontLink_Create and
  FontLink_Destroy functions.
- Add FontLink_Chain_Init,
  FontLink_Chain_Free,
  FontLink_Chain_LoadReg,
  FontLink_Chain_Populate, and
  FontLink_Chain_FindGlyph
  functions.
- Implement FontLink.
- Add font file DroidSansFallback.ttf
  for LiveCD.
2024-06-30 22:15:34 +09:00
Hermès Bélusca-Maïto
a2777cd828
[SETUPLIB] Cleanup some partition getters and remove GetDiskOrPartition.
- osdetect.c: Replace usage of GetDiskOrPartition by SelectPartition.
2024-06-24 16:28:07 +02:00
Hermès Bélusca-Maïto
99f0937fd0
[SETUPLIB][USETUP] Finish unification of extended and primary/logical partitions
See commits ebcf3cf38 and c9c6902f0 (PR #5837)

In addition, correctly set the type of extended partition being used,
depending on whether it is contained below or above the 1024-cylinder
boundary (tested on NT).
2024-06-20 17:21:51 +02:00
Katayama Hirofumi MZ
e1094e6f8a [USETUP] Update Japanese (ja-JP) translation
CORE-18706
2024-06-11 15:15:26 +09:00
Hermès Bélusca-Maïto
c752e8c0be
[SETUPLIB] FindSupportedSystemPartition(): Add missing NULL check
Addendum to commit 59acff79e.
2024-06-10 13:14:28 +02:00
Hermès Bélusca-Maïto
a7cbb60ebf
[SETUPLIB] Don't flag freeldr.ini as read-only during installation.
CORE-19575

For the time being, don't add read-only attribute for ease of testing
and modifying files, but it won't always stay this way.

For example, Windows sets its boot.ini (as well as NTLDR, NTDETECT.COM
etc.) as read-only (+ hidden and system) during its 1st-stage setup.
2nd-stage setup makes some adjustments in boot.ini but doesn't restore
its read-only attribute.
Windows tools that can modify boot.ini (i.e. msconfig.exe, bootcfg.exe,
and sysdm.cpl) **ALL** know how to remove the read-only attribute for
modifying boot.ini, before restoring it if needed.
2024-05-07 19:30:33 +02:00
Hermès Bélusca-Maïto
2b43390d04
[SETUPLIB] Use new BootPath value for BootSector boot entries (#6815)
The BootDrive and BootPartition values are deprecated, and support
for them will soon be removed from FreeLoader.

Add an helper function to migrate these values during ReactOS
(re)installation / update.
2024-05-07 12:33:14 +02:00
Hermès Bélusca-Maïto
c7295b2cdf
[SETUPLIB] Support different boot store file creation/opening and access modes
The support is so far enabled only for INI files (freeldr.ini, boot.ini).
May be subject to further improvements in the future.

Usage examples:

- When finding existing ReactOS or Windows installations, the boot store
  should exist and is opened in read-only mode. Closing the boot store
  doesn't store any temporary modifications made to it.

- When doing a clean installation, freeldr.ini is created in read-write
  access.

- When installing with an existing freeldr.ini or boot.ini, they are
  opened as existing files in read-write access.
2024-05-06 21:13:23 +02:00
Hermès Bélusca-Maïto
9b563d32d2
[SETUPLIB] Improve a bit the management of boot-store options
- QueryBootStoreOptions(): De-duplicate code.
- SetBootStoreOpt(): Respect the FieldsToChange flag.
- BOOT_STORE_OPTIONS: Remove unused Version field and distinguish
  between "Current" and "Next" BootEntryKey.
2024-05-06 17:05:03 +02:00
Hermès Bélusca-Maïto
68c2a28973
[SETUPLIB] Split OpenAndMapFile function and Doxygen-ize it 2024-05-06 17:00:01 +02:00
Hermès Bélusca-Maïto
e151ef9ae1
[SETUPLIB] Add support for removing sections and key values, and remove some hacks (#6815)
- Use LIST_ENTRY instead of custom list pointers;
- Fix key/section unlinking before freeing.
2024-05-05 18:15:31 +02:00
Hermès Bélusca-Maïto
b9ca9b0061
[SETUPLIB] Don't create new INI sections or key-values if they already exist (#6815)
- If a section already exists, return the existing one. This allows
  avoiding different section entries with the same name in the cache.
  If an INI file has separate sections with the same name, their
  contents (key-values) get merged into a unique section.

- If a key-value already exists, update its data value and return the
  existing one. (Note that this may be subject to behaviour change in
  the future.)
2024-05-05 18:15:31 +02:00
Hermès Bélusca-Maïto
817c27a54e
[SETUPLIB] Some INI support refactoring: function/struct names, duplicated code (#6815)
And convert ANSI strings to UNICODE in a better way instead of
zero-extending them.
2024-05-05 18:15:24 +02:00
Julen Urizar Compains
54df31ccac
[TRANSLATION] Update Spanish (es-ES) translation (#6449)
- [REACTOS] es-ES: Fixes and typos
- [USETUP] es-ES: Fixes and typos
- [HOTPLUG] es-ES: Fixes and typos
- [OPENGLCFG] Add Spanish (es-ES) translation
- [NETSHELL] es-ES: Fixes and typos
- [SHELL32] es-ES: Fixes and typos
- [SYSSETUP] es-ES: Fixes and typos

Reviewed-by: Ismael Ferreras Morezuelas <swyterzone@gmail.com>
2024-03-24 12:30:56 +03:00
Hermès Bélusca-Maïto
ed7dc31103
[SETUP:REACTOS] Set the default language and keyboard layout at startup
Retrieve the current ambient language and keyboard layout, that has been
chosen in the "General language and keyboard layout selection" dialog
when starting the LiveCD.

A more robust solution will be developed later.
2024-02-26 12:45:43 +01:00
Hermès Bélusca-Maïto
047f1c3d55
[USETUP] Exchange SetupStartPage and LanguagePage 2024-02-22 22:41:03 +01:00
Hermès Bélusca-Maïto
b7ad4a2298
[SETUPLIB][USETUP] Some cleanup for partition code.
- Make the Create*Partition helpers take a size in bytes, not in sectors.

  This allows them to be easier to use by the caller, alleviating the
  need for making the size conversion into sectors. Instead it is done
  internally by the helpers.

- Introduce helper macros to easily retrieve the size of a partition
  entry or a disk in bytes, from their internal representation in number
  of sectors.

- The 'AutoCreate' variable being USETUP-specific, remove it from the
  PARTENTRY structure and use instead a flag set into the 'New' member.

- Rename IsDiskSizeValid to IsPartitionLargeEnough, to better describe
  what the function is for.
2024-02-20 15:52:37 +01:00
Hermès Bélusca-Maïto
b02dd8eb22
[SETUPLIB] Make the settings' Process* functions take an actual value instead of a GENERIC_LIST
The reason is to avoid enforcing the usage of a specific list
container by the users of the setup library. This is a departure
of what I originally thought would be the best, in commits
92692eae3 (r74553), 8f2c4f7a6 (r75700)

This should actually make some parts of the GUI setup code simpler
(e.g. using the win32 comboboxes to store the list contents).
2024-02-18 16:30:46 +01:00
Andrei Miloiu
7d7ea3d43c
[REACTOS] Update Romanian (ro-RO) translation (#6479) 2024-02-11 23:16:51 +01:00
Andrei Miloiu
8ceb3e6d33
[USETUP] Update Romanian (ro-RO) translation (#6474) 2024-02-11 23:14:33 +01:00
Andrei Miloiu
a1756b347e
[USETUP] Update Romanian (ro-RO) translation (#6428) 2024-02-11 22:50:49 +01:00
Hermès Bélusca-Maïto
88891d2ce7
[SETUPLIB][USETUP] Convert MUI_LANGUAGE GeoID values to numbers. 2024-02-09 22:33:30 +01:00
Hermès Bélusca-Maïto
c26a2e89eb
[SETUPLIB][USETUP] Convert MUI_LANGUAGE codepages to numbers. 2024-02-09 22:06:39 +01:00
Hermès Bélusca-Maïto
f0a1d766f1
[SETUPLIB][USETUP] Convert internal MUI_LAYOUTS data to numbers.
LangID is a LANGID and LayoutID is a KLID: keyboard layout ID.
See terminology at http://archives.miloush.net/michkap/archive/2004/11/27/270931.html

These tables of MUI_LAYOUTS for each language, correspond to the
intl.inf LCID map:
```
; List of locales.
; <LCID> = <Description>,<OEMCP>,<Language Group>,<langID:HKL pair>,<langID:HKL pair>,...
```
where:
- each MUI_LANGUAGE entry corresponds to one such locale description;
- each MUI_LAYOUTS entry corresponds to a <langID:HKL pair>.

See http://archives.miloush.net/michkap/archive/2006/10/14/825404.html
for some details.
2024-02-09 21:28:23 +01:00
Hermès Bélusca-Maïto
87df3b548e
[SETUP:REACTOS] Temporarily use USETUP file/cabinet extraction routines.
Do this until Wine's setupapi cabinet extraction becomes faster...
2024-02-08 19:08:46 +01:00
Hermès Bélusca-Maïto
bff31569e6
[USETUP] Make the "SpApiSup" files usable from e.g. the GUI setup. 2024-02-08 19:08:39 +01:00
Andrei Miloiu
0830e7a445
[REACTOS] Update Romanian (ro-RO) translation (#6341) 2024-01-15 21:56:32 +01:00
Николай Димитров
4514e91dd6
[TRANSLATION] Update and fix Bulgarian (bg-BG) translation (#5581)
NOTE: IDS_ADMINISTRATOR_NAME translation excluded for the time being.

It should be "Администратор", but bg-BG translation missing in samsrv.dll,
therefore don't translate it because otherwise this would introduce a mismatch
(samsrv falls back into english when translation is missing).

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2023-12-21 18:09:34 +01:00
Hermès Bélusca-Maïto
bb7661312e
[SETUP:REACTOS] Fix identical expression in treelist.c
Supersedes PRs #3226 and #5199 by Kyle_Katarn.
CORE-16036
2023-12-17 20:58:32 +01:00
Hermès Bélusca-Maïto
63d5423853
[SETUP:REACTOS] Simplify CONTROL "ComboBox" to COMBOBOX resource declaration. 2023-12-17 20:57:11 +01:00
Hermès Bélusca-Maïto
bd51cd14d6
[SETUP:REACTOS] Fix layout of the Restart-page. 2023-12-17 20:57:10 +01:00
Jose Carlos Jesus
80751952ba
[USETUP] Shorten the Portuguese translation to fit on one line (#6174) 2023-12-16 20:58:08 +00:00
Katayama Hirofumi MZ
e2b1ee9a53
[SETUP][BOOTDATA][INF] Add font substitute ('Segoe UI Symbol' to 'Arial') (#6155)
Based on CORE-19346 "segoe-ui-symbo.patch".
In order to display gender glyphs (U+2642 and
U+2640; ♂ and ♀), we add a font substitute from
"Segoe UI Symbol" to "Arial".

ReactOS Arial has many symbol glyphs, so I think
we can use it for "Segoe UI Symbol" font substitute.

The glyph size problem will be fixed in #6156.
CORE-19346
2023-12-11 20:51:04 +09:00
Stanislav Motylkov
8bc6c8fa56 [USETUP] Update Russian (ru-RU) translation
- Translate one untranslated string
- Fix some "е" -> "ё" occurences and punctuation.
2023-12-03 23:40:45 +03:00
Andrei Miloiu
98d652e6b7
[REACTOS] Update Romanian (ro-RO) translation (#6079) 2023-12-01 15:38:01 +01:00
Hermès Bélusca-Maïto
5ee1dc6113
[USETUP] Don't error out in case one tries to "delete" empty partition space.
Just... don't delete it ¯\_(ツ)_/¯
2023-11-19 16:44:34 +01:00
Serge Gautherie
780c2a0375
[SERVICES][SETUPLIB][UMANDLG][USETUP] Add missing \n to DPRINT() calls (#5983)
And promote 1 DPRINT() to DPRINT1.
2023-11-16 22:22:12 +00:00
Dmitry Borisov
8d7153c8ba
[FREELDR] Implement NOSERIALMICE and FASTDETECT options (#5886)
Enable FASTDETECT by default, as done in NT 5+. This is because
the serial mouse is recognized by the serial stack since NT 5.x.
2023-11-13 19:49:41 +01:00
Jose Carlos Jesus
357189bdea
[USETUP][SHELL32][ACCESS] Improve Portuguese (pt-PT) Translation (#5897) 2023-11-13 10:59:05 +01:00
Katayama Hirofumi MZ
25b7447818
[SETUPLIB][NTUSER] Toggle input language/layout on Alt+Shift / Ctrl+Shift (#5839)
- Respect the toggle key settings.
- Change the hot key settings in 
  base/setup/lib/mui.c.
- Revert IntDefWindowProc function about
  Alt+Shift handling.
- Delete some code in
  co_IntProcessKeyboardMessage for Alt+Shift
  handling.
- Add IntGetNextKL, IntLanguageToggle, and
  IntCheckLanguageToggle helper functions.
- Modify ProcessKeyEvent and
  UserGetLanguageToggle functions to
  support [Left Alt]+Shift and Ctrl+Shift.
- Improve WM_INPUTLANGCHANGEREQUEST
  handling.
- Message handling shouldn't access kbswitch
  directly.
CORE-10667
2023-10-31 22:37:49 +09:00
Hermès Bélusca-Maïto
c9c6902f08
[USETUP] Further simplify partition creation UI code (#5837)
- Use the same keypress 'C' to create either primary or logical partitions.
  Their type is automatically determined, whether they are created in
  general unpartitioned space, or space within an extended partition.

- Extensively adapt the translations to reflect these changes.
2023-10-28 17:08:42 +02:00
Hermès Bélusca-Maïto
ebcf3cf38e
[USETUP] Blur the boundaries between MBR "Primary" and "Logical" partitions (#5837)
Do not do that yet for extended partitions (containers).

This is possible, because when creating partitions, we do that on
unpartitioned space that is already "tagged" as either being "logical"
or not, and the partition style is inherited from that.

The resulting code is simpler, yet working as it should.
This will also help in the future for supporting other platforms, where
the concept of "primary", "extended" and "logical" partitions do not
exist (basically all platforms except BIOS-based PC-AT).
2023-10-28 17:08:41 +02:00
Hermès Bélusca-Maïto
9ed4bf1ed7
[USETUP] Show the partition description (and its disk) being formatted and checked (#5837)
And improve some strings -- Translations need to be rechecked!
2023-10-28 17:08:40 +02:00
Hermès Bélusca-Maïto
06e4f13653
[USETUP] Simplify partition creation UI code (#5837)
Unify CREATE_{PRIMARY,EXTENDED,LOGICAL}_PARTITION_PAGE
(i.e. Create{Primary,Extended,Logical}PartitionPage() functions)
into a single CREATE_PARTITION_PAGE (i.e. CreatePartitionPage()).

A lot of code was duplicated there (display, size input, etc.) just
for calling ultimately the Create{Primary,Extended,Logical}Partition()
helper functions.

This will also help in the future for supporting other platforms, where
the concept of "primary", "extended" and "logical" partitions do not
exist (basically all platforms except BIOS-based PC-AT).
2023-10-28 17:08:39 +02:00
Hermès Bélusca-Maïto
1899a09399
[USETUP] Simplify display of partitions being formatted (#5837) 2023-10-28 17:08:39 +02:00
Hermès Bélusca-Maïto
3d4f001084
[USETUP] Rename some MUI string identifiers (#5837)
STRING_CHOOSENEWPARTITION --> STRING_CHOOSE_NEW_PARTITION
STRING_FORMATTINGDISK     --> STRING_FORMATTINGPART
STRING_HDDSIZE            --> STRING_HDPARTSIZE
STRING_HDINFOPARTCREATE_1 --> STRING_HDDISK1
STRING_HDINFOPARTDELETE_1 --> STRING_HDDISK2
STRING_HDDINFO_{1,2}      --> STRING_HDDINFO{1,2}

Move STRING_NEWPARTITION just before STRING_PARTFORMAT
and renumber the STRING_* identifiers.
2023-10-28 17:08:38 +02:00
Hermès Bélusca-Maïto
5c2ec83fa7
[USETUP] Decouple bootloader install choice page from its actual installation (#5786)
This allows to move this choice sooner in the process, thus having all
the user key presses at first, then all the actual installation going
without any key presses needed anymore... (that is, unless you wanted
to install the bootloader on a removable device. Then it will prompt
you there!)

- Additional "cosmetic"/future-proof changes: Rename all instances
  of "floppy" in the bootloader install variables to "RemovableDisk"
  because it would be great to have this install choice later.

- Layout adjustments in the translated bootloader pages.

- Skip bootloader installation on upgrades. The idea here is that if
  we were able to find a ReactOS installation to upgrade, this means
  we were able to find a valid bootloader + boot entry.
  See also PR #5633.

  This logic may be slightly improved in the future to detect whether
  the underlying bootloader is FreeLdr and if so, only update its files.
  But this is for the future.
2023-10-14 16:29:43 +02:00
Jose Carlos Jesus
3463a3fba3
[USETUP] Update Portuguese (pt-PT) translation (#5508)
Fix a typo, and add three forgotten error codes to pt-PT language.

Co-authored-by: SecurityAndStuff <74931194+SecurityAndStuff@users.noreply.github.com>
2023-08-09 11:54:52 +02:00