diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2021-03-22 16:51:41 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-03-23 16:54:37 +0100 |
commit | 0631c6644e6398c051dcda1a53c0fc0e40c814a3 (patch) | |
tree | 1599f4a2e0786ea7ecccc17d3e8ab5af9f1146d3 /winsup/cygwin/release/3.2.0 | |
parent | 2533912fc76c08af9e386a371fc6b3eb194d56be (diff) | |
download | cygnal-0631c6644e6398c051dcda1a53c0fc0e40c814a3.tar.gz cygnal-0631c6644e6398c051dcda1a53c0fc0e40c814a3.tar.bz2 cygnal-0631c6644e6398c051dcda1a53c0fc0e40c814a3.zip |
Cygwin: Treat Windows Store's "app execution aliases" as symbolic links
When the Windows Store version of Python is installed, so-called "app
execution aliases" are put into the `PATH`. These are reparse points
under the hood, with an undocumented format.
We do know a bit about this format, though, as per the excellent analysis:
https://www.tiraniddo.dev/2019/09/overview-of-windows-execution-aliases.html
The first 4 bytes is the reparse tag, in this case it's
0x8000001B which is documented in the Windows SDK as
IO_REPARSE_TAG_APPEXECLINK. Unfortunately there doesn't seem to
be a corresponding structure, but with a bit of reverse
engineering we can work out the format is as follows:
Version: <4 byte integer>
Package ID: <NUL Terminated Unicode String>
Entry Point: <NUL Terminated Unicode String>
Executable: <NUL Terminated Unicode String>
Application Type: <NUL Terminated Unicode String>
Let's treat them as symbolic links. For example, in this developer's
setup, this will result in the following nice output:
$ cd $LOCALAPPDATA/Microsoft/WindowsApps/
$ ls -l python3.exe
lrwxrwxrwx 1 me 4096 105 Aug 23 2020 python3.exe -> '/c/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0/python.exe'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'winsup/cygwin/release/3.2.0')
0 files changed, 0 insertions, 0 deletions