Change prefix detection to be relative to the .dll

This commit is contained in:
Robbert van der Helm
2020-05-06 19:16:19 +02:00
parent f79115992b
commit 261cf0554c
2 changed files with 6 additions and 3 deletions
+2
View File
@@ -22,6 +22,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
symlinking plugins. Now you can use a symlink to a copy of `libyabridge.so`
that's installed for a plugin in another directory. This is not recommended
though. Fixes #3.
- Changed Wine prefix detection to be relative to the plugin's `.dll` file,
rather than the loaded `.so` file.
- Clarified the error that appears when we're unable to load the `.dll`.
### Fixed
+4 -3
View File
@@ -646,9 +646,10 @@ std::string create_logger_prefix(const fs::path& socket_path) {
}
std::optional<fs::path> find_wineprefix() {
// Try to locate the Wine prefix this .so file is located in by finding the
// first parent directory that contains a directory named `dosdevices`
fs::path wineprefix_path = get_this_file_location().remove_filename();
// Try to locate the Wine prefix the plugin's .dll file is located in by
// finding the first parent directory that contains a directory named
// `dosdevices`
fs::path wineprefix_path = find_vst_plugin();
while (wineprefix_path != "") {
if (fs::is_directory(wineprefix_path / "dosdevices")) {
return wineprefix_path;