Commit graph

194 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto d05be0da3f
[FREELDR] Some ARC-spec compatibility refactoring + simplifications & fixes.
CORE-9023

- During loading and initialization of the list of operating systems
  available in freeldr.ini, convert any legacy operating system entry
  encountered -- they are like those in NTLDR's boot.ini file, i.e.:

    ArcOsLoadPartition="LoadIdentifier" /List /of /Options

  into a new operating system INI entry, like those used by default in
  FreeLoader. This allows us to avoid treating this corner-case later in
  different parts of the code. Also, the "BootType" value is now
  determined there, only once.

- Convert the OS loaders entry-points to ARC-compatible ones, following
  the "Advanced RISC Computing Specification, Version 1.2" specification
  https://www.netbsd.org/docs/Hardware/Machines/ARC/riscspec.pdf

- Introduce helpers for retrieving options values from the argument vector
  in a simple way.

- Simplify LoadOperatingSystem(), since now the "BootType" value has
  been determined once while loading the list of OSes (see above) and
  is well-defined there. Use the BuildArgvForOsLoader() helper to build
  the ARC-compatible argument vector from the corresponding INI settings
  for the selected operating system entry, and use it when calling the
  corresponding OS loader.

- In the OS loaders, since we can now directly read the settings from
  the argument vector (instead of using INI settings), we can avoid
  using a bunch of fixed-size string buffers, and avoid potentially
  failing IniOpenSection() calls as well.

- Simplify code in the Linux loader (and the RemoveQuotes() function).

- Add UiShowMessageBoxesInArgv() that acts on the "MessageBox=" settings
  passed through the argument vector (equivalent to
  UiShowMessageBoxesInSection() ).

- Use string-safe functions where needed (copy/concatenation/printf on
  fixed-size buffers).
2019-08-06 23:40:05 +02:00
Hermès Bélusca-Maïto d21ffe6336
[FREELDR] Add an INI helper that allows modifying an existing setting's value in memory. 2019-08-06 23:39:53 +02:00
Hermès Bélusca-Maïto 909bfff460
[FREELDR] Some initialization fixes.
- Initialize BootPath and BootOptions buffers when fallback behaviour is not taken.
- Correctly skip all the understood whitespace (space & tabs) and the
  quotes before reading the boot options when using the alternative syntax:

  [Operating Systems]
  section_name = "ReactOS" /bootoptions

  Fixes the minor regression introduced in 370e8564 (r43875).
2019-08-04 17:47:04 +02:00
Hermès Bélusca-Maïto b978d42bd9
[FREELDR] Whitespace, minor code styles and comments fixes only. 2019-08-04 17:47:04 +02:00
Hermès Bélusca-Maïto e79e7bf53c
[FREELDR] Unload freeldr.ini file before booting. 2019-08-04 17:47:03 +02:00
Hermès Bélusca-Maïto 5cdb76094c
[FREELDR] Use NOGUIBOOT when booting in Safe-Mode. 2019-08-04 17:47:03 +02:00
Katayama Hirofumi MZ dc1aa8010a
[FONTS][SETUP][BOOTDATA] Add Lucida Console font (#1793)
Add "Lucida Console" fonts. CORE-16264

- Add "Lucida Console" font by duplicating "DejaVu Sans Mono" font and renaming it.
- Delete some "Lucida Console" font substitutes.
- Add LICENSE file.

I used FontForge to rename it. Its family name is "Lucida Console". Its display name is "Lucida Console". Its font filename is lucon.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
2019-08-04 15:38:45 +09:00
Katayama Hirofumi MZ dbb4432b25
[FONTS][SETUP][BOOTDATA] Add Times New Roman fonts (#1790)
Add "Times New Roman" fonts. CORE-16272

- Add "Times New Roman" and "Times New Roman Italic" fonts by duplicating "Liberation Serif" fonts and renaming them.
- Delete some "Times New Roman" font substitutes.
- Add LICENSE file.

I made these font files by using FontForge. Their family name is "Times New Roman". Their display names are "Times New Roman", "Times New Roman Bold", "Times New Roman Bold Italic" and "Times New Roman Italic". Their font filenames are times.ttf, timesbd.ttf, timesbi.ttf and timesi.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
2019-08-04 11:22:51 +09:00
Katayama Hirofumi MZ faa3237d46
[FONTS][BOOTDATA][SETUP] Add Courier New fonts (#1783)
Add "Courier New" fonts. CORE-16272

- Add "Courier New", "Courier New Bold", "Courier New Bold Italic" and "Courier New Italic" fonts by duplicating FreeMono fonts and renaming them.
- Delete some "Courier New" font substitutes.
- Add LICENSE file.

I made these font files by using FontForge. Their family name is "Courier New". Their display names are "Courier New", "Courier New Bold", "Courier New Bold Italic" and "Courier New Italic". Their font filenames are cour.ttf, courbd.ttf, courbi.ttf and couri.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
2019-08-03 09:05:14 +09:00
Katayama Hirofumi MZ 1463f4b02a
[FONTS][SETUP][BOOTDATA] Add Arial fonts (#1781)
Add Arial fonts. CORE-16272

- Add "Arial", "Arial Bold", "Arial Bold Italic" and "Arial Italic" fonts by duplicating Liberation Sans fonts and renaming them.
- Disable some Arial font substitutes.
- Add LICENSE file.

I made these font files by using FontForge. Their family name is "Arial". Their display names are "Arial", "Arial Bold", "Arial Bold Italic" and "Arial Italic". Their font filenames are arial.ttf, arialbd.ttf, arialbi.ttf and ariali.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
2019-08-02 20:37:53 +09:00
Hermès Bélusca-Maïto b382145539
[FREELDR] Improve some *GetFileInformation() traces. 2019-07-30 00:57:22 +02:00
Stanislav Motylkov ef76709b3d [FREELDR] Fix remaining hwdisk and FATX bugs (#1766)
- DiskGetFileInformation() should return relative addresses -- relative to the beginning of the "device" (partition, or disk) in question.
- FatXSearchDirectoryBufferForFile() should assign file attributes.
- Minor code style improvements in FatOpenVolume().

CORE-16216 CORE-16248

Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
2019-07-30 00:27:36 +02:00
Stanislav Motylkov 06b77b8572 [FREELDR] Implement proper partition type detection and handling (#1762)
- This allows to detect and dynamically handle different partitioning schemes.
- Implemented detection of MBR, GPT, Xbox-BRFR, and partitionless disks.
- Currently only MBR and Xbox-BRFR partitions are handled and tested.

CORE-9841 CORE-15768 CORE-16216 CORE-16248
2019-07-29 14:25:54 +02:00
Stanislav Motylkov 8f25e464c2 [FREELDR] Trivial improvements (#1757)
* [FREELDR] Fix uninitialized string in DiskGetBootPath()

CORE-16216 CORE-16248

* [FREELDR] xboxdisk: Add comment and fix code style
2019-07-28 18:20:53 +02:00
Eric Kohl 8a631c8455 [WUAUSERV] Make the wuauserv service startable and stoppable. 2019-07-20 19:30:27 +02:00
Timo Kreuzer 8f050e66fd [FREELDR] Use RtlStringCbPrintfA instead of sprintf
Fixes GCC 8 warnings like:
boot/freeldr/freeldr/disk/scsiport.c:806:31: error: 'partition(0)' directive writing 12 bytes into a region of size between 1 and 64 [-Werror=format-overflow=]
     sprintf(PartitionName, "%spartition(0)", ArcName);
                               ^~~~~~~~~~~~
boot/freeldr/freeldr/disk/scsiport.c:806:5: note: 'sprintf' output between 13 and 76 bytes into a destination of size 64
     sprintf(PartitionName, "%spartition(0)", ArcName);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-07-20 13:56:18 +02:00
Stanislav Motylkov 74bcf3083d [FREELDR] Abstract VGA BIOS specific code (#1736)
* [FREELDR] Abstract VGA BIOS specific code

WinLdrSetupSpecialDataPointers() uses INT 10h video interrupts, but they are not available on Xbox, so make them machine-specific.

CORE-16204 CORE-16210

* [FREELDR] Abstract getting extended BIOS data area

WinLdrSetupSpecialDataPointers() uses INT 15h AH=C1h to get extended BIOS data area, but it's not available on Xbox, so make it machine-specific.

CORE-16204 CORE-16210
2019-07-18 23:09:59 +02:00
Stanislav Motylkov 7547f85b7e [FREELDR] Abstract floppy drive detection code (#1735)
Make floppy detection code machine-specific, because Xbox CMOS cannot be used to detect floppies. Based on a patch by Matt Borgerson.

CORE-16204 CORE-16207

Co-authored-by: Matt Borgerson <contact@mborgerson.com>
2019-07-18 22:50:48 +02:00
Stanislav Motylkov bca8093b89 [FREELDR] Fix memory initialization on Xbox
- Refactor and use PC memory map init functions
- This fixes filesystem detection and probably some other problems

Based on a patch by Matt Borgerson.

CORE-16204 CORE-16206

Co-authored-by: Matt Borgerson <contact@mborgerson.com>
2019-07-18 22:49:51 +02:00
Stanislav Motylkov 8c55fdd17c [FREELDR] Whitespace improvements - no code changes 2019-07-18 22:49:51 +02:00
Stanislav Motylkov 31aca248a1 [FREELDR] hwdisk: Add sanity checks to avoid infinite loop (#1731)
CORE-16204 CORE-16205
2019-07-18 22:49:11 +02:00
Joachim Henze 5dbc677cdd [BOOTDATA][SETUP] Fix regression CORE-16200 font rendering
By removing font substitution for 'Microsoft Sans Serif'.
Thanks to the patches author Katayama Hirofumi MZ.

This is a partial revert of the guilty rev
master guilty 0.4.13-dev-9-g
811faed421

RC guilty 0.4.12-RC-13-g
8d3def0529

VBox test result:
https://reactos.org/testman/compare.php?ids=68497,68499

The same fix has been applied before to 0.4.12-RC-44-g
ca0e00e8af
2019-07-16 22:51:42 +02:00
Hermès Bélusca-Maïto 8a30801516
[SHELL32] Recycle-Bin: Minor code enhancements.
- Use _countof() and ZeroMemory().
- Fix case of 'BitBucket' registry key (Windows-compatible).
- Simplify code.
- Minor code formatting.
2019-07-07 17:56:51 +02:00
Doug Lyons e4898e6e0b
[W32TIME] Implement w32time service. CORE-13001 2019-07-07 12:55:13 +02:00
Pierre Schweitzer c2aa749bbd [REACTOS] Finally enable the LUID mapped devices
This allows users to have their own locally mapped DOS devices.
For instance, when a network drive is mapped, it is now mapped in the
user device maps and no longer in the global device map.
This avoids sharing mount points system wide whereas they shouldn't.

LUID mapped devices is the default W2K3 behavior.
Globally mapped devices can be restored by adding back this registry key.

https://twitter.com/HeisSpiter/status/1143615176450686976

CORE-16114
2019-06-30 23:07:54 +02:00
Victor Perevertkin 12542f271d
[FREELDR] Fix Release build 2019-06-26 00:56:21 +03:00
Yaroslav Kibysh f37fb1f7f8
[FREELDR] Always change video mode back to text-mode before starting up ReactOS.
CORE-16116

- This allows getting the /NOGUIBOOT mode working correctly, as the latter
  expects text-mode. Then, usetup (via BLUE driver) will change to a
  different text-mode, or, GUI boot will change (via BOOTVID) to VGA
  640*480 16-color.

- Always hide the VGA cursor.

- Remove also the deprecated boolean "Setup" in the *PrepareForReactOS()
  functions.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-06-25 02:32:09 +02:00
Serge Gautherie 7eead93569 [BOOTLIB] Check DBG with #if, not #ifdef (#1621) 2019-06-06 01:53:53 +02:00
Pierre Schweitzer 7898b2eaa3
[NTOSKRNL] Disable LUID mapping until it's properly implemented 2019-06-01 14:40:54 +02:00
Victor Perevertkin 63286c6bbc
[HIVESYS] Add missing UpperFilters for mouse and keyboard classes 2019-05-20 01:28:33 +03:00
Pierre Schweitzer e97b412a76
[BASESRV] Strengthen default permissions for DOS devices
This is linked to previous work done on DOS devices creation
in basesrv. If this DWORD is not set (or 0), DOS devices will
be created with an ACL that make the symlink readable by any
and modifiable by any.
With protection mode set, the symlink will be still readable by
any but not modifiable by anyone but the owner.

This should also affect some objects managed by session manager.

By default, on W2K3, that protection mode is set.
2019-05-15 08:41:16 +02:00
Pierre Schweitzer ab69736a1d
[AUTOCHK] Don't check any volume on boot
This will avoid triggering a FAT repair on
unclean FAT volumes.

If dosfstools.fsck works fine in Linux, its
usage on ReactOS triggers worse corruption
than unclean shutdown.

Given I've no time for debugging this, I
kill it off.

CORE-14638
2019-05-04 11:02:29 +02:00
Colin Finck e34d3cf379 [REGTEST] Add regtest.cmd to the Run key inside regtest.cmd, so we're also started on the next reboot in case ReactOS crashed *and* the registry has been saved.
unattend.inf only allows to add RunOnce entries, which are in theory only executed on the first boot after installation.
For almost a decade, this worked anyway to start regtest.cmd again after a ReactOS crash, because the registry and thus the deletion of the RunOnce entry wasn't stored on disk in case of a crash.
Thanks to Sylvain for the hint!

As Explorer processes the Run key right after RunOnce and therefore picks up regtest.cmd a second time during the first boot, exit the script just after adding the Run key.
Otherwise, rosautotest.exe would be started twice, with catastrophic results.
2019-04-26 10:02:47 +02:00
Hermès Bélusca-Maïto 2e1f594d5e
[FREELDR] Add some missing UiDrawBackdrop() calls. 2019-04-22 19:33:20 +02:00
Katayama Hirofumi MZ 24647a270e
[BOOTDATA] Add registry keys for ComDlg32 (#1511)
Add registry keys for ComDlg32. CORE-7114
2019-04-21 23:47:10 +09:00
Serge Gautherie 4126817f7f [BOOTDATA] AHKAppTests.cmd: Fix 'media' typo (#1502)
Addendum to df2a8c4. s/media/medium/
2019-04-19 22:12:16 +09:00
Katayama Hirofumi MZ df2a8c40be [BOOTDATA] Improve AHKAppTests.cmd (follow-up of #1476) 2019-04-16 10:38:51 +09:00
Hermès Bélusca-Maïto 3b7f710fc7
[BOOTDATA] Remove stray value. 2019-04-14 01:25:35 +02:00
Timo Kreuzer f9a967b2ae [REACTOS] Fix misc 64 bit issues 2019-04-13 14:07:50 +02:00
Katayama Hirofumi MZ 811faed421
[GDI32][NTGDI][SETUP] Fix font enumeration part 2 (#1492)
Eliminate some bugs about font enumeration. CORE-15755

- Add "Microsoft Sans Serif" font substitution.
- Fix and improve the treatment of the nominal font names.
- Split IntGetFontFamilyInfo function from NtGdiGetFontFamilyInfo.
- Add DoFontSystemUnittest function for font system unittest to GDI32.
- Call DoFontSystemUnittest function at CreateFontIndirectW first call.
2019-04-11 11:46:52 +09:00
Foxlet 28804dd71d [THEMES] Mizu Theme RC. 2019-04-07 22:47:20 +02:00
Maxim Smirnov ffb4b674c7 [FONT] Fix FontSmoothing 2019-04-07 01:42:29 +02:00
Katayama Hirofumi MZ b8f5fed484
[BOOTDATA] Improve error message of AHKAppTests.cmd (#1476)
+    dbgprint "Insert ReactOS CD and try again."
2019-04-07 08:05:35 +09:00
Jérôme Gardou 157a509a0f [CMAKE] Also set blank DEFINE_SYMBOL property for freeldr helpers 2019-04-06 17:43:38 +02:00
Adam Słaboń 7047aa80ef [TRANSLATION] Polish translation update
Polish translation update for calc, fltmc, magnify, notepad, osk, sndvol32, usetup, fdebug, appwiz, mmsys, sysdm, acppage, ziplfdr, browseui, cryptui, jscript, shell32, themeui and inf. Added translation for cyrptext, vcdcontroltool, and (not yet complete) getuname.
2019-04-05 10:34:10 +02:00
Katayama Hirofumi MZ 466dbc5929
[BOOTDATA] Japanese calendar-related registry info (#1468)
Add registry info about Japanese calendar. CORE-15920
2019-04-05 07:21:00 +09:00
Hervé Poussineau a15160cd45 [FREELDR] Prevent a warning in Xbox memory initialization 2019-04-01 11:38:32 +02:00
Adam Słaboń 8946920109
[THEMES] Add new ReactOS theme - Lunar. By Adam Słaboń and Joann Mõndresku.
Reuse some Lautus assets, adjust the theme configuration and include it in the build process.
2019-03-31 22:13:15 +02:00
Yaroslav Kibysh a30e644dc4 [EXPLORER][SHPOLICY] Implement "NoSimpleStartMenu" policy (#1258)
- Enable "New Start Menu" control for all languages.
- Implement the "NoSimpleStartMenu" policy in shpolicy.c and its usage in explorer.
- Hide controls instead of disabling (as in Win XP/Vista).
2019-03-24 14:56:43 +01:00
Stanislav Motylkov 6676b7c48b [BOOTDATA] Fix Volgograd time zone (UTC+04:00)
CORE-15831
2019-03-08 22:44:27 +01:00