mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Pass plugin path around instead of redetecting
This is now set only once at the top level. This is needed for the chainloading to work because we'll need to set the path when we create the bridge.
This commit is contained in:
@@ -20,7 +20,9 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
std::string get_this_file_location() {
|
||||
namespace fs = ghc::filesystem;
|
||||
|
||||
fs::path get_this_file_location() {
|
||||
// We'll try to find the library this function was defined in. When called
|
||||
// from a copy of `libyabridge-*.so` this will return that library. Because
|
||||
// the chainloader libraries load the plugin libraries from fixed locations,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// This header is completely standalone so the chainloading libraries can
|
||||
// retrieve their file path without pulling in a lot of additional dependencies
|
||||
|
||||
#include <string>
|
||||
#include <ghc/filesystem.hpp>
|
||||
|
||||
/**
|
||||
* Return a path to this `.so` file. This can be used to find out from where
|
||||
@@ -29,4 +29,4 @@
|
||||
* library using the provided exported functions since they can't detect the
|
||||
* path themselves.
|
||||
*/
|
||||
std::string get_this_file_location();
|
||||
ghc::filesystem::path get_this_file_location();
|
||||
|
||||
Reference in New Issue
Block a user