Don't set WINEPREFIX for the current process

`native_environment` allows modification of the current process's
environment, so we had to use the plain `environment` class instead.
This commit is contained in:
Robbert van der Helm
2020-06-20 13:43:54 +02:00
parent 56af346277
commit 34e3f1a1bf
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -597,7 +597,7 @@ void PluginBridge::log_init_message() {
// If the Wine prefix is manually overridden, then this should be made
// clear. This follows the behaviour of `set_wineprefix()`.
bp::native_environment env = boost::this_process::environment();
bp::environment env = boost::this_process::environment();
if (!env["WINEPREFIX"].empty()) {
init_msg << env["WINEPREFIX"].to_string() << " <overridden>";
} else {
+2 -2
View File
@@ -242,7 +242,7 @@ std::string get_wine_version() {
// used to run Wine, so will will respect this as well
std::string wine_command = "wine";
bp::native_environment env = boost::this_process::environment();
bp::environment env = boost::this_process::environment();
if (!env["WINELOADER"].empty()) {
wine_command = env.get("WINELOADER");
}
@@ -271,7 +271,7 @@ std::string get_wine_version() {
}
bp::environment set_wineprefix() {
bp::native_environment env = boost::this_process::environment();
bp::environment env = boost::this_process::environment();
// Allow the wine prefix to be overridden manually
if (!env["WINEPREFIX"].empty()) {