Commit graph

257 commits

Author SHA1 Message Date
Joachim Henze 3a6cb85f12 [0.4.12][USETUP] Addendum to last commit
I forgot to add that yet unversioned header for
pt-PT localization. It was present when I built locally.
2019-08-26 16:39:15 +02:00
Joachim Henze 2038a6adce [0.4.12][SETUPLIB][USETUP] Fix regression CORE-16274
Symptom 'USETUP detects active ext2 partition as raw and attempts to format'

It was a regression of 0.4.12-dev-835-g
c1fbc2d651

We now let the user decide in terms of uncertainty (unrecognized FS'es)
This commit is a squashed backport of the following commits to master:

The essential parts of the fix 1 by Hermès Bélusca-Maïto
0.4.13-dev-997-g
626c654a10

The essential parts of the fix 2 by Hermès Bélusca-Maïto
0.4.13-dev-998-g
59acff79e5

A compilation fix on top contributed by Katayama Hirofumi MZ
0.4.13-dev-1000-g
bfea773ee5

And because it made the backporting easier:
I also took a localization patch of B. George
0.4.13-dev-922-g
2fbff73792

and an improvement from Oleg Dubinskiy
0.4.13-dev-714-g
6ee7cba77b

and a GCC8 fix of hpoussin
0.4.13-dev-275-g
6129fbaf1e
2019-08-26 15:54:04 +02:00
Joachim Henze ca0e00e8af [0.4.12][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
2019-07-15 03:35:42 +02:00
Katayama Hirofumi MZ 8d3def0529 [0.4.12] [GDI32][NTGDI][SETUP] CORE-15755 commit 1 of 3
Fix font enumeration part 2 (#1492)

Eliminate some bugs about font enumeration.

- 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.

cherry picked from commit 0.4.13-dev-9-g
811faed421
2019-05-09 22:20:55 +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
Hermès Bélusca-Maïto 47a1acedf7
[SETUPLIB][USETUP] Improve disk HW numbering, removable disk support, and "super-floppy" partitioning.
Nowadays more and more people try to install ReactOS from removable
drives (e.g. USB sticks) onto fixed HDDs, or try to install it into
USB sticks too.

Both fixed and removable drives, as well as partitions on these, are
represented in NT using the same device name format:

  \Device\HarddiskM\PartitionN ,

with an increasing disk number M. Using this number for building the
corresponding firmware-specific ARC multi(x)disk(y)rdisk(z) path used
by the NT/ROS loader (FreeLdr, ...) is then prone to error since there
may have  been  removable drives  inserted  and  accounted for in the
calculation  of  the disk number.  These drives must be  correctly
subtracted in order to generate the correct ARC path, valid once all
the removable drives have been ejected (which should also be the
situation seen from the BIOS when booting up, except of course if you
boot on a USB stick).

This problem is now solved. Note that it matters only for the disks
that have also been enumerated by the firmware (BIOS; Int 13h). We
don't have to care about the other drives, since the ARC path will be
of a different format and will not use the disk number (instead, the
SCSI coordinates are used).

We also try to enumerate all the disks found in all the possible disk
adapters and  controllers enumerated  in the Hardware registry tree
(and that are visible by FreeLdr) in order to cover all.

Finally, we detect whether a disk reports as  a "super-floppy",  i.e.
an unpartitioned disk with a valid VBR. This is indeed how a standard
floppy disk looks like, or how USB sticks are partitioned on Windows.
Such disk is reported has having only one single partition starting at
the beginning of the disk, with partition number == 0, its type being
FAT16 non-bootable.
This allows us to forbid creating any new partitions on such disks.
Note that accessing either \Device\HarddiskN\Partition0 or Partition1
on such a disk returns the same data.
Note also that on the contrary, regular MBR-partitioned disks would
report at least four partitions entries, instead of just one.

The other improvements are:

- Do *NOT* write any MBR on a disk partitioned as "super-floppy".
  CORE-13703

- Fix the computed disk identifier, of format: %08x-%08x-%c .
  The numbers are respectively the checksum of the first sector, and
  the disk signature. The terminating letter is A or X, depending
  whether the first sector ends with 0x55AA/0xAA55 or not (see also
  commit 5053f1f5).

- Warn if the user attempts to install ReactOS on a disk that is not
  visible by the  firmware of his computer,  because it may not be
  bootable.
2019-03-12 02:17:11 +01:00
Hermès Bélusca-Maïto 1d51b56882
[USETUP] Use for-loops; simplify the code. 2019-03-11 00:05:37 +01:00
Hermès Bélusca-Maïto 84f3e2df5d
[SETUPLIB][USETUP] Remove CurrentDisk/Partition from the partlist lib code, and move these into the UI code.
- Add also some validation ASSERTs and simplify the code here and there.

- The installation partition is called "InstallPartition", while the
  global "CurrentPartition" is the disk region currently selected in
  the partition UI list, on which prtitioning operations are effectued.

- Extend CheckActiveSystemPartition() to use an optional alternative
  disk or partition in case the actual system partition (present in the
  first disk) cannot be used, e.g. because we don't support writes on it.
2019-03-11 00:05:37 +01:00
Hermès Bélusca-Maïto 0d9ebb67ce
[SETUPLIB] Improve the discovery of the active system partition.
CORE-7749, CORE-6305, CORE-13205
2019-03-11 00:05:36 +01:00
Hermès Bélusca-Maïto a543103068
[USETUP] Improve the formatter & check-disk state machine. CORE-7749
- Find or set the active system partition only once, when we start the
  formatting stage. If the system partition is to be created in some
  non-partitioned space, we create it.

- A file-system check is always scheduled for both the system and the
  installation partitions.

- If the system partition was already formatted (which usually means
  that it already existed on the system), don't ask for formatting it.

  CORE-13205

- For each partition to be formatted, the file-system menu list is
  re-created, in order to display only the FSes that are compatible
  with the selected partition, and allow to give the user the choice
  to keep the existing file-system only if the selected partition was
  already formatted.

- Check whether the user attempts to delete the partition on which
  the installation source is present, only if it is not "new" and is
  formatted.

- Check first whether the current partition is the system partition,
  before displaying the CONFIRM_DELETE_SYSTEM_PARTITION_PAGE.
2019-03-10 15:41:25 +01:00
Hermès Bélusca-Maïto 29cc1843d0
[SETUPLIB][USETUP] Minor improvements.
- Make some partitioning functions not dependent on the selected "CurrentPartition".
- Add some sanity checks.
- Improve some of the "is-partitioned" checks.
2019-03-10 15:41:20 +01:00
Hermès Bélusca-Maïto c1fbc2d651
[SETUPLIB][USETUP] Factor out the usage of FS provider structures.
Similarly to FMIFS this structure should be private. Instead file-system
names are passed to the helper functions, allowing to use the names
returned by the FS drivers. The names are then internally mapped to the
corresponding FS providers.

In particular this allows to handle the "RAW" file-system and to assign
the 'Unformatted' flag to partitions having this FS.

Finally this helps us refining the checks performed to see whether the
current "active" system partition uses a supported file-system.
2019-03-10 15:41:05 +01:00
Bișoc George 35f7267a97 [USETUP] Check the status value of BuildInstallPaths() (#1349) 2019-02-13 15:22:28 +01:00
Bișoc George 8bde4de2d6 [USETUP][REACTOS] Check the status return value of InitDestinationPaths() (#1264)
- Within the function's body code, check the status values returned by the called functions.
- Change the BuildInstallPaths's function type to NTSTATUS instead of VOID (and check the status of InitDestinationPaths() as well.
2019-02-10 16:43:51 +01:00
Luo Yufan 02eeee15f0 [SETUP][INF] Add font substitute for CJK. (#1346)
Fix CJK font problem in Royale theme in ReactOS.

The reason for this PR is similar to the previous one (#1127).
CORE-15738
2019-02-10 15:46:19 +01:00
Luo Yufan 96d1cd2b62 [TRANSLATION] Update Chinese translation. 2019-02-03 13:17:13 +01:00
Arnav Bhatt f5960cea70 [SETUP] GUI setup Hindi translation (#951) 2019-02-02 14:41:31 +01:00
Katayama Hirofumi MZ 8886a2261a [USETUP] Improve lang/ReadMe.txt 2019-01-30 14:59:10 +09:00
Katayama Hirofumi MZ 232cf9f0b6
[USETUP] Follow-up ro-RO.h and add lang/ReadMe.txt (#1321)
- Add lang/ReadMe.txt for code7bit description.
- Follow up ro-RO.h file (#1317).
2019-01-29 23:55:45 +09:00
Ștefan Fulea 092b67c723 [TRANSLATION] Improve the existing translated contents 2019-01-29 13:48:48 +01:00
Ștefan Fulea 211ad8c73d [TRANSLATION] Update the existing romanian resources
This includes both newly added and previously left untranslated strings.
2019-01-29 13:48:48 +01:00
Yaroslav Kibysh 8d15720b31 [USETUP] Implement handling Home/End keys in Boot Loader Page (#1265) 2019-01-19 18:44:13 +01:00
Luo Yufan 980d8b1b12 [TRANSLATION] Update Chinese translation. (#1227)
Update Chinese and Traditional Chinese translations.
2019-01-08 13:42:17 +01:00
Pierre Schweitzer 0150bb964a
[SETUP] Silence some noisy DPRINT1 2019-01-01 10:08:02 +01:00
Hermès Bélusca-Maïto 7d6cbea42d
[USETUP] Fix the strings given to the printf-like functions (addendum to a3168373). 2018-12-30 15:26:44 +01:00
Pierre Schweitzer 4ed6b1ffca
[SETUP] Add support for selecting FS type in unattended setups
By default, we still fallback to FAT if nothing asked, or if there
is an invalid input.
0 is FAT, 1 is BtrFS. This can be grown as soon as we add more IFS.
2018-12-28 20:36:47 +01:00
Luo Yufan 0a3f6f3b47 [TRANSLATION] Update Chinese translation. (#1187)
[REG][REACTOS][EXPLORER][APPWIZ][CONSOLE][INETCPL][INPUT]
[INTL][OPENGLCFG][TIMEDATE][DEVCPUX][COMCTL32][COMDLG32]
[MSGINA][NETCFGX][NETID][SETUPAPI][SHELL32][SYSSETUP]
Update Simplified and Traditional Chinese translations.
2018-12-25 17:28:36 +09:00
Hermès Bélusca-Maïto 02e4ff8eb3
[USETUP] Add SETUP_INIT_PAGE in the list of virtual pages. 2018-12-23 21:02:08 +01:00
Hermès Bélusca-Maïto d23fa54488
[USETUP] Modify the integrated user-mode PnP manager along the lines of UMPNPMGR, so that we can wait until all the queued device installations finish before continuing the installation further.
Add a corresponding please-wait page and update the translations.
2018-12-23 20:37:14 +01:00
Hermès Bélusca-Maïto 9f1c8ac020
[USETUP] Check for invalid INF handles before doing operations. 2018-12-23 20:37:13 +01:00
Katayama Hirofumi MZ 6d63d76655
[USETUP][NTDLL_APITEST][KBDROST] Allow non-Latin codepage users to build ReactOS on MSVC (Retrial of #1150) (#1168)
- The converter is code7bit I made. code7bit: https://github.com/katahiromz/code7bit
- This converter converts non-clean characters in string literals.
- However I couldn't erase a ton of codepage C4819 warnings.
- CORE-15447

You can edit an European source file as follows:
- Right click the file in the Solution Explorer.
- Select "Open With...".
- Choose "C++ Source Code Editor (with encoding)".
- Choose "Central European (Windows) - Codepage 1260".
2018-12-20 17:25:32 +09:00
Baruch Rutman 3d991ea5a7 [TRANSLATION][USETUP] Complete Hebrew translation (#1163)
- Code-page 862, Hebrew text is in visual order.
- Use escape sequences for quotation marks.
2018-12-19 13:20:18 +01:00
Yaroslav Kibysh 8540ab04d7 [TRANSLATION] Ukrainian Translation Update & OEM-866 Code Page Problem (#1133)
Also add the Ї ї Є є characters to the VGA font for code page 866.
2018-12-18 18:38:42 +01:00
Hermès Bélusca-Maïto a3168373eb
[SETUPLIB] Detect GPT-partitioned disks but don't use them since we don't support them at the moment.
- Add checks for GPT disks and either fail or ignore the disk,
  depending on the operation being executed.

[USETUP][REACTOS] Display the disk style more accurately.
2018-12-14 23:32:31 +01:00
Luo Yufan b0b81e54e9 [SETUP][FONT] Add font substitute of Ubuntu font for CJK
CORE-15179
2018-12-14 02:54:13 +09:00
Hermès Bélusca-Maïto 8bed4adf56
[SETUPLIB] Use for-loops instead of while-loops to enumerate linked lists in the partition code. 2018-12-10 00:27:58 +01:00
Hermès Bélusca-Maïto 7df9296692
[SETUPLIB] Partitioning code fixes and improvements.
CORE-7749

- Correctly insert discovered partitions in sorted order of StartSector,
  and verify that they do not overlap (-> check for broken partitioning).

May help for CORE-10898.

- Use the correct reported partition numbers that may be modified after
  partitioning changes, and that need to be used when opening
  \Device\Harddisk'M'\Partition'N' files. This is achieving by
  retrieving the returned value of the IOCTL_DISK_SET_DRIVE_LAYOUT call.

  Distinguish them from the "on-disk" partition numbers that are the ones
  that enumerate the partition in partition-table order (and is the order
  known by e.g. the BIOS), and that should be used to construct the
  destination ARC path.

May help for CORE-4870, CORE-13205.

- Simplify a lot of duplicated code by using helper functions.
2018-12-10 00:27:56 +01:00
Stanislav Motylkov f851b82570 [USETUP] Update russian translation
Addendum to 03b7e13, 29ace9c and a5bcd95.
2018-12-08 23:36:06 +01:00
Ștefan Fulea b0ab61e6c3
[BOOTDATA][SETUPLIB] Setup the Romanian Stdandard Keyboard layout. (#861)
Adjust the miscellaneous files to activate the Romanian Standard
Keyboard layout in the OS and set it as default for Romanian.

CORE-15056
2018-12-08 18:53:18 +01:00
Hermès Bélusca-Maïto 79bc82206f
[SETUPLIB] Re-enable the filesystem detection code based on recognition by FSDs. 2018-11-25 15:03:52 +01:00
Hermès Bélusca-Maïto 9504a38f52
[SETUPLIB] Dismount a disk partition before deleting it. 2018-11-25 15:03:47 +01:00
Hermès Bélusca-Maïto a31d2f820a
[SETUPLIB] Improve the Freeldr timeout INI setting hack-fix. Dedicated to Mark Jansen ;-) CORE-15193 2018-11-24 02:45:03 +01:00
Hermès Bélusca-Maïto 70fa2e2eb4
[SETUPLIB][USETUP] Additional partition validity checks.
Always perform the partition validity checks when creating new
primary/extended/logical partitions, and also when a new partition
is automatically created when unpartitioned space is selected for
ReactOS installation.

CORE-12246
2018-11-18 21:13:36 +01:00
Hermès Bélusca-Maïto f527e23aa7
[SETUPLIB] Lock the BTRFS volume before installing the new bootsector code.
CORE-15334 CORE-15339

The BTRFS driver requires the volume to be locked in order to modify
the first sectors of the partition, even though they are outside the
file-system space / in the reserved area (they are situated before
the super-block at 0x1000) and is in principle allowed by the NT
storage stack.
So we lock here in order to write the bootsector at sector 0.
If locking fails, we ignore and continue nonetheless.

See also the following links for reference:
https://stackoverflow.com/a/12928934
https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-writefile
https://support.microsoft.com/en-us/help/942448/changes-to-the-file-system-and-to-the-storage-stack-to-restrict-direct
2018-11-11 21:55:48 +01:00
Hermès Bélusca-Maïto bfb2b88f82
[SETUPLIB] Use proper file share access when opening partitions for raw access. 2018-11-11 21:47:37 +01:00
Luo Yufan 5cdee1ab82 [TRANSLATION] Update Simplified Chinese translation. (#1028) 2018-11-11 17:57:12 +01:00
Adam Słaboń b8044d6783 [TRANSLATION] Polish translation update (#1029)
Translated missing strings and improved existing translations.
2018-11-11 17:55:01 +01:00
Pierre Schweitzer 26408b02f1
[SETUP] Align partition start at 2048 minimum
This will allow compatibility with modern OSes and
modern disk management utilities.
It will also improve performances by properly aligning
partition start.
And it will let enough room at the begin of the disk
for 3rd party bootloaders.

WARNING: this is not compatible with previous partition
model, and old one will likely not be compatible. You'll
have to erase your whole partition table and start from
scratch.
2018-11-11 17:38:37 +01:00
Luo Yufan 91e032f9b1 [TRANSLATION] Update Simplified Chinese translation. (#1025) 2018-11-09 15:31:53 +01:00
Ercan Ersoy ea47d95b05 [OSK][RAPPS][USETUP] Turkish translations update. (#1024) 2018-11-09 15:13:03 +01:00