Commit graph

170 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
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
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
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
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
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
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
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
9bb5627df6
[SETUP][INF] Use the standard "Helv" -> "MS Sans Serif" substitution... (#4864)
... and let the latter one substitute to whatever we want.
Hindi however had "Helv" -> "Tahoma", but "MS Sans Serif" -> "FreeSans".
Now its "Helv" will go to "FreeSans".
2022-11-13 00:26:13 +01:00
Hermès Bélusca-Maïto
34c0bd0d5a
[SETUP] muifonts.h Formatting only. 2022-11-13 00:25:53 +01:00
Joachim Henze
c47758b102
[SETUP][INF][MEDIA] Get rid of the last Ubuntu references CORE-18607 (#4871)
An addendum to 0.4.14-dev-20-g 2f4fb903b4
because since then we don't have the Ubuntu font anymore.

The substitutes are also not needed any longer.
We can use Tahoma here without causing any change in the current rendering,
because for all languages the former
Ubuntu substitutions did point either to Tahoma,
or to the same thing, that Tahoma atm points to
(for those language that do require additional glyphs).

This way we do not only get the substitutions closer to 2k3sp2, but will also
simplify our maintenance and testing, because the same font is guaranteed to be used then
for all themes: Classic, Blackshade and Lautus: The font which has the needed glyphs for
that specific language.

E.g.
"FreeSans" for Hindi,
"Tahoma" for most Western languages, and
"Droid Sans Fallback" for Chinese and Japanese language.

Things are cleaner and simpler this way.
2022-11-12 12:44:54 +01:00
Katayama Hirofumi MZ
bd40c13f6f
[SETUP][BOOTDATA][FONTS][INF] Delete DejaVu Sans Mono and re-map (#4856)
- 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
2022-11-07 11:34:19 +09:00
Katayama Hirofumi MZ
a4193ade03
[SETUP][FONTS][INF][GDI32_APITEST] Delete FreeMono and re-map (#4852)
- Delete FreeMono fonts.
- Re-map "Courier" font substitutes to "Courier New" fonts.
CORE-18605
2022-11-07 08:04:38 +09:00
Joachim Henze
d035452148 [SETUP][INF][ROSTESTS] Delete font substitutions and tests for "DejaVu Sans" (#4829)
I manually applied the final state of the reviewed (#4829) by hand.

The commit relies on (#4837) which added the Greek Tahoma glyphs, and the result now
does finally draw fine with unbold Tahoma also for the Greek ros installation.
See the final screenshot that I added today within (#4829).

Since 0.4.14-dev-6-g f45dd65 we do have a proper "Verdana" font,
so there is no need for substitution with "DejaVu Sans" any longer. That is the proper MS name for such a font.

And with 0.4.14-dev-20-g 2f4fb90 we even deleted the "DejaVu Sans" font,
so it makes no sense to keep it as a substitution target.

So adapt fonts.inf and muifonts.h, and also a test where it was still referenced.
MS 2k3sp2 does neither have such a font substitute, nor such a font.
2022-11-04 15:39:32 +01:00
Joachim Henze
4615c824db
[SETUP][INF] Delete obsolete font substitutions "DejaVu Serif" (#4827)
[INF] These 2 lines are nonsense now for 2 different reasons even:
Since 0.4.13-dev-764-g dbb4432b25
we do have a proper "Times New Roman" font, so there is no need for
substitution any longer.

And since 0.4.14-dev-20-g 2f4fb903b4
we don't even have the substitution-target "DejaVu Serif" anymore.

[SETUP] Similar glitch in muifonts.h

[ROSTESTS] Thin out gdi32:GetTextMetrics test
 Deletes tests for 3 fonts that we do not longer have
2022-10-31 02:00:01 +01:00
Vadim Galyant
2580889cfa
[SETUPLIB] Add NTFS boot support. (#3778) 2022-10-19 02:02:24 +02:00
Katayama Hirofumi MZ
26408144a1
[INF][INTL.INF][SETUPLIB] We don't have preinstalled IMEs (#4774)
Don't write the preinstalled IME keyboard layouts in Chinese, Japanese and Korean (CJK). CORE-18506
2022-10-14 07:17:24 +09:00
Hervé Poussineau
9e19352492 [CMAKE] Set _WINKD_ define only where required (kernel and setuplib) 2022-09-10 23:16:26 +02:00
Timo Kreuzer
6778fa157f [SETUP] Don't default to MP builds, when KDBG is enabled
The reason is that KDBG and the MP kernel don't like each other much and crash hard, causing VBox to shut down.
2022-07-20 23:57:42 +02: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
Luo Yufan
41e7701e08
[INF] Fix Mizu theme display problems with CJK font (#4284)
Add font substitute from "Source Sans Pro" to "Droid Sans Fallback" if the user is CJK.
CORE-17997
2022-01-17 08:43:15 +09:00
Hervé Poussineau
cdae92ed8c [SETUPLIB] Upgrade display settings even if no hardware profile exists 2022-01-06 17:45:03 +01:00
Chan Chilung
570cedf176
[SETUPLIB][INPUT.CPL] Move zh-MO to ChineseTraditionalFonts group (#4010)
- The use of Traditional Chinese character is far more than Simplified one according to Wikipedia
- The code page used on zh-MO is 950, which is Traditional Chinese's one
- zh-MO is described as Traditional Chinese here: https://support.microsoft.com/en-us/windows/microsoft-traditional-chinese-ime-ef596ca5-aff7-4272-b34b-0ac7c2631a38#ID0EBBD=Microsoft_ChangJie/Quick
2021-10-11 16:24:21 +03:00
Hermès Bélusca-Maïto
c188821f8b
[SETUPLIB] Default to "ReactOS (Debug)" boot entry on debug builds, instead of "ReactOS". 2021-09-07 22:25:37 +02:00
Serge Gautherie
6d01afbc9d [SETUPLIB] CreateFreeLoaderReactOSEntries(): Fix 'VBoxDebug' typo
Match newer 84c2695.

Addendum to 69512e2 (r65813).
2021-09-03 23:10:42 +03:00
Victor Perevertkin
49cfac17c5
[FFS] Remove the FFS/UFS driver
The upstream driver is not maintained and the file system itself
is in a semi-abandoned state.
Originally imported at 3a3ef631d1

The driver is written by Lee Jae-Hong, updated by Bo Brantén.
ReactOS porting made by Peter Hater and Pierre Schweitzer.
Follow updates at http://www.acc.umu.se/~bosse/

FS Recognizer code is left to keep the FS support as an
installable driver.

CORE-11040
2021-07-30 17:14:57 +03:00
Victor Perevertkin
2e2190df57
[REISERFS] Remove the ReiserFS driver
The upstream driver is not maintained and the file system itself
is in a semi-abandoned state.
Originally imported at e308102f4a

The driver is written by Mark W Piper, updated by Bo Brantén.
ReactOS porting made by Peter Hater and Pierre Schweitzer.
Follow updates at http://www.acc.umu.se/~bosse/

FS Recognizer code is left to keep the FS support as an
installable driver.

CORE-11005
2021-07-30 17:14:53 +03:00
Timo Kreuzer
5d8e834897 [REACTOS] Fix a number of MSVC warnings 2021-07-23 22:03:48 +02:00
Timo Kreuzer
b627352815 [NTOS][SETUP] Add x64 SMP kernel and make SMP the default boot mode on x64 2021-06-19 12:17:18 +02:00
Serge Gautherie
32f7474f38
[SETUPLIB] Fix 'unlock' copypasta in debug print (#3448)
Addendum to 76ac898.
2021-02-05 16:10:15 +03:00
Jérôme Gardou
76ac898bc5 [SETUPLIB] Lock the volume before writing MBR boot code 2021-02-03 09:41:22 +01:00
Hermès Bélusca-Maïto
74c0a37e2f
[SETUPLIB][REACTOS][USETUP] Move partition types information to its dedicated file; update MBR partition types and add GPT GUID partition types. 2021-02-01 01:48:14 +01:00
Victor Perevertkin
6f389a35db
[SETUPLIB] Add a workaround for installing from USB drives 2021-01-27 05:15:15 +03:00