|
From Proton 9.0 and up, the directory containing
library files and wine executables - previously
called `dist`, appears to have been renamed to
`files`. This breaks OpenTrack with newer Proton
versions, because the path to the `wine` executable
and proton library files is constructed as
`:PROTON_PATH/dist/bin/wine`, i.e. the dist dir
name is hardcoded.
To fix this while preserving backward compatibility,
this commit changes `proton_path` to point to the
`dist` dir directly, be it `files` for 9.0+ or
`dist` for older versions. Templated variables
are adjusted accordingly to omit the dist dir.
Obtaining the dist. dir path for a specific Proton
version is done by recursively iterating the version's
directory, looking for the `wine` executable. The
first match is used to discover the grandparent dir path,
which is the desired `:PROTON_PATH/:DIST_DIR` path.
|