mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
(Linux) Ugly Flatpak PATH hack.
This commit is contained in:
parent
b544066e12
commit
b7d3b242fd
|
@ -255,9 +255,19 @@ namespace Utils
|
|||
#if defined(_WIN64)
|
||||
return "";
|
||||
#else
|
||||
std::string pathVariable = std::string(getenv("PATH"));
|
||||
std::vector<std::string> pathList =
|
||||
Utils::String::delimitedStringToVector(pathVariable, ":");
|
||||
#if defined(FLATPAK_BUILD)
|
||||
// Ugly hack for the Flatpak build as Flathub doesn't allow the "--env=PATH=" option
|
||||
// to be used and I have not found a way to pass the actual PATH variable from the host
|
||||
// to the sandbox. This variable value is a combination of all common paths found on
|
||||
// all supported distributions.
|
||||
std::string pathVariable {"/app/bin:/var/lib/flatpak/exports/bin:/usr/bin:/usr/local/"
|
||||
"bin:/usr/local/sbin:/usr/sbin:/sbin:/bin:/usr/games:/usr/"
|
||||
"local/games:/snap/bin:/var/lib/snapd/snap/bin"};
|
||||
#else
|
||||
std::string pathVariable {std::string(getenv("PATH"))};
|
||||
#endif
|
||||
std::vector<std::string> pathList {
|
||||
Utils::String::delimitedStringToVector(pathVariable, ":")};
|
||||
|
||||
std::string pathTest;
|
||||
|
||||
|
|
Loading…
Reference in a new issue