Run $WINELOADER --version under the correct env

This makes the initialization message reflect the correct Wine version
when using a `WINELOADER` script to change between Wine versions
depending on the Wine prefix.
This commit is contained in:
Robbert van der Helm
2021-06-21 13:00:05 +02:00
parent b81871e4bf
commit 466fe3abcf
4 changed files with 59 additions and 46 deletions
+13 -10
View File
@@ -83,6 +83,19 @@ struct PluginInfo {
*/
boost::filesystem::path normalize_wine_prefix() const;
/**
* Return the installed Wine version. This is obtained by from `wine
* --version` and then stripping the `wine-` prefix. This respects the
* `WINELOADER` environment variable used in the scripts generated by
* winegcc. The script will be run with under the same environment as the
* Wine plugin host will be run at, since the user may use a custom
* `WINELOADER` to change use different Wine binaries for each prefix.
*
* This will *not* throw when Wine can not be found, but will instead return
* '<NOT FOUND>'. This way the user will still get some useful log files.
*/
std::string wine_version() const;
const PluginType plugin_type;
/**
@@ -228,16 +241,6 @@ std::vector<boost::filesystem::path> get_augmented_search_path();
*/
boost::filesystem::path get_this_file_location();
/**
* Return the installed Wine version. This is obtained by from `wine --version`
* and then stripping the `wine-` prefix. This respects the `WINELOADER`
* environment variable used in the scripts generated by winegcc.
*
* This will *not* throw when Wine can not be found, but will instead return
* '<NOT FOUND>'. This way the user will still get some useful log files.
*/
std::string get_wine_version();
/**
* Load the configuration that belongs to a copy of or symlink to
* `libyabridge-{vst2,vst3}.so`. If no configuration file could be found then