diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-10-29 04:32:59 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-10-29 04:32:59 +0100 |
commit | ec00863aff826bc63f221136caf54da8b9285201 (patch) | |
tree | 4f1e9a1d53279166f6342a09014a53e4e1952be5 /proto-wine/ftnoir_protocol_wine.cpp | |
parent | 5b0f05ec74fffb1380285ef491eb5b68aab386d6 (diff) |
proto/wine: add support for setting WINEPREFIX
Diffstat (limited to 'proto-wine/ftnoir_protocol_wine.cpp')
-rw-r--r-- | proto-wine/ftnoir_protocol_wine.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/proto-wine/ftnoir_protocol_wine.cpp b/proto-wine/ftnoir_protocol_wine.cpp index ae7c6c31..bed1fed3 100644 --- a/proto-wine/ftnoir_protocol_wine.cpp +++ b/proto-wine/ftnoir_protocol_wine.cpp @@ -70,6 +70,19 @@ module_status wine::initialize() wine_path = proton_path(s.proton_version); env = make_steam_environ(s.proton_version, s.proton_appid); } + else + { + QString wineprefix = "~/.wine"; + if (!s.wineprefix->isEmpty()) + wineprefix = s.wineprefix; + if (wineprefix[0] == '~') + wineprefix = qgetenv("HOME") + wineprefix.mid(1); + + if (wineprefix[0] != '/') + error(tr("Wine prefix must be an absolute path (given '%1')").arg(wineprefix)); + + env.insert("WINEPREFIX", wineprefix); + } if (s.esync) env.insert("WINEESYNC", "1"); |