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
+3
View File
@@ -24,6 +24,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
the same name from being used simultaneously in multiple Wine prefixes.
- Fixed manual Wine prefix overides through the `WINEPREFIX` environment
variable not being reflected in the output shwon in startup.
- Fixed the Wine prefix being overwritten for all subsequent plugins opened
within the same process. This prevented the use of multiple Wine prefixes
within hosts that do not sandbox their plugins, such as Ardour.
## [1.2.0] - 2020-05-29
+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()) {