Simplified implementation of the proposed solution by George Bișoc
and revised by Victor Perevertkin from PR #952.
NOTE: For whatever reason ERROR_INSTALL_BOOTCODE and ERROR_WRITE_BOOT
seem to be redundant with each other. To be investigated...
Most of Linux filesystems have the MBR ID assigned as 0x83 and when the user chooses BTRFS upon partitions page wizard, we're thinking of the partition as having Ext2 filesystem which is wrong and misleading.
- Interface the TreeList code and populate it with the list of
discovered disks and partitions. Code is adapted from USETUP.
Also display the names of the disks.
- Display some installation settings summary, before doing the
installation proper.
- Force the user to select a checkbox when (s)he acknowledges that
ReactOS is alpha-quality software and may break on his/her computer
or corrupt his/her data.
- Improve wizard pages transitions and buttons enabling/disabling.
- Press Shift-F10 to start a command-line (as in the 2nd-stage setup
in syssetup.dll).
- Use some explicit UNICODE functions/macros.
Add the TreeList control from Anton Zechner and Sébastien Kirche
from https://github.com/sebkirche/treelist (under GPL-3.0+) as a
*TEMPORARY* solution until a better-suited control for ReactOS is
developed.
- Compilation fixes for the TreeList control.
- SETUPLIB and USETUP: Convert PARTENTRY::DriveLetter to WCHAR.
- SETUPLIB: Retrieve volume label.
- SETUPLIB and USETUP: Move the partition types (IDs) table from
USETUP to SETUPLIB so that they can share it with the 1st-stage
GUI installer too. Also take the opportunity to update the table
with information from http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
and cross-checked with the list from Paragon Hard-Disk Manager.
- USETUP: Simplify PrintPartitionData().
- Add some code comments.
This increases performance for each time the SETUPLIB calls (using NT paths)
Win32 SetupAPI functions which of course only accept Win32 paths.
- Handle also the fact that a NT path to convert may start with
\Device\HarddiskX\PartitionY\..., which can be a symlink to
\Device\HarddiskVolumeN\... on some systems. In that case, the
Win32 path mapping should be done slightly differently.
- Add support for network mapped drives.
- Improve UI usage and wizard transitions (Work In Progress).
- Add interfacing code that display installation status.
- When the user attempts to cancel the installation during file copying,
pause the file copying, and restart it if the user changes it mind and
wants to continue the installation. Otherwise file copying is properly
halted.
- BOOTDATA: Use standard INF signature string, so that they can be
opened successfully using ReactOS' or Windows' setupapi.dll with
the INF_STYLE_WIN4 style.
- SETUPLIB: Use the correct INF_STYLE_* INF styles in SpInfOpenInfFile() calls.
- REACTOS : Switch thread locale to user-specified LocaleId when calling
SetupOpenInfFileW(), so that the correct localized strings are used.
- In PrepareCopyInfFile(), explicitly use AddSectionToCopyQueueCab()
to retrieve the files from the CAB INF.
Otherwise if one continued to use and rely on AddSectionToCopyQueue()
to do this job instead, bad things could happen like, re-enumerating
twice or more (and adding them to the file queue) the same files.
This is because in the new code AddSectionToCopyQueue() can be called
many times to deal with different SIF file sections. The old code then
called AddSectionToCopyQueueCab() in turn, but on the same list...
Now the steps performed are clear, and everything works as intended.
- Simplify the code that computes the full source and destination paths
for the files to be copied and directories to be created, using helper
functions.
- Compute the source file and target location from the TXTSETUP.SIF
entries in a NT-compatible manner.
- Define IntUnicodeStringToBuffer function to copy the contents of a UNICODE_STRING to a string buffer with a UNICODE_NULL correctly.
- Use it.
JIRA issue: N/A
- Use adequate access flag when opening symbolic links.
- Simplify the prototype of UpdateRegistry() since now both Setup INF
handle and settings lists are inside the USETUP_DATA structure.
This means, call in the correct order the user callback with the correct
parameters (in particular the correct paths for file copy operations),
and check also for the callback returned value to know whether or not to
continue the file operations.
This allows using some of the SetupApi.dll functions when SETUPLIB is
used in the (Win32) GUI 1st-stage installer "REACTOS", while using the
custom implemented NT-aware functions in "USETUP".