reactos/base/setup
Hermès Bélusca-Maïto 3ddb05d443
[SETUPLIB] GetSourcePaths(): Fix determination of the installation source path.
Refine the algorithm introduced in commit c560342f08 (r75667, r75676),
whereby the installation source path is based on the full image file path
of the installer program, and of the \SystemRoot symlink.

Also reverts commit 6f389a35db "Add a workaround for installing from USB drives"
CORE-17818

+ SAL2-annotate and add Doxygen comments.

----

In case the \SystemRoot full path prefixes the image file path,
use the resolved \SystemRoot as the installation source path.
Otherwise, use the image file path.

The \SystemRoot symlink target resolution needs full path reparsing,
because it can reference other symlinks. This is what happens, for
example when booting the installation from a removable hard-disk.
We can have:

         \SystemRoot ---> \Device\Harddisk1\Partition1\ReactOS
and:     \Device\Harddisk1\Partition1 ---> \Device\HarddiskVolume2
etc.
and we wish to resolve \SystemRoot to: \Device\HarddiskVolume2\ReactOS
instead of keeping the former version (using Harddisk1\Partition1).

We then verify whether it prefixes the image file path, which is
a fully reparsed path.
2024-10-23 23:19:58 +02:00
..
lib [SETUPLIB] GetSourcePaths(): Fix determination of the installation source path. 2024-10-23 23:19:58 +02:00
reactos
setup
usetup
welcome
CMakeLists.txt