mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Change prefix detection to be relative to the .dll
This commit is contained in:
@@ -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`
|
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
|
that's installed for a plugin in another directory. This is not recommended
|
||||||
though. Fixes #3.
|
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`.
|
- Clarified the error that appears when we're unable to load the `.dll`.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -646,9 +646,10 @@ std::string create_logger_prefix(const fs::path& socket_path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::optional<fs::path> find_wineprefix() {
|
std::optional<fs::path> find_wineprefix() {
|
||||||
// Try to locate the Wine prefix this .so file is located in by finding the
|
// Try to locate the Wine prefix the plugin's .dll file is located in by
|
||||||
// first parent directory that contains a directory named `dosdevices`
|
// finding the first parent directory that contains a directory named
|
||||||
fs::path wineprefix_path = get_this_file_location().remove_filename();
|
// `dosdevices`
|
||||||
|
fs::path wineprefix_path = find_vst_plugin();
|
||||||
while (wineprefix_path != "") {
|
while (wineprefix_path != "") {
|
||||||
if (fs::is_directory(wineprefix_path / "dosdevices")) {
|
if (fs::is_directory(wineprefix_path / "dosdevices")) {
|
||||||
return wineprefix_path;
|
return wineprefix_path;
|
||||||
|
|||||||
Reference in New Issue
Block a user