diff options
author | David Robillard <d@drobilla.net> | 2011-02-17 03:11:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-17 03:11:41 +0000 |
commit | df7a87fe043440d99b23378efc6664b5deed8b42 (patch) | |
tree | faf7f20f1dc209f0e16b565008df58e1af096585 /src/shared | |
parent | 8c6a7c4ad5f5cb6b3b583aefbfe6b0cf57414294 (diff) | |
download | ingen-df7a87fe043440d99b23378efc6664b5deed8b42.tar.gz ingen-df7a87fe043440d99b23378efc6664b5deed8b42.tar.bz2 ingen-df7a87fe043440d99b23378efc6664b5deed8b42.zip |
Fix "Ingen as an LV2", i.e. make Ingen bundles working LV2 plugins.
Fix module loading/unloading (don't use statics).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2973 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/runtime_paths.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/shared/runtime_paths.cpp b/src/shared/runtime_paths.cpp index f4ddd897..b92529a1 100644 --- a/src/shared/runtime_paths.cpp +++ b/src/shared/runtime_paths.cpp @@ -15,11 +15,16 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <dlfcn.h> #include <limits.h> #include <stdlib.h> + +#include <dlfcn.h> + #include <glibmm/module.h> #include <glibmm/miscutils.h> + +#include "raul/log.hpp" + #include "ingen-config.h" #include "runtime_paths.hpp" @@ -30,7 +35,6 @@ namespace Shared { static std::string bundle_path; - /** Must be called once at startup, and passed a pointer to a function * that lives in the 'top level' of the bundle (e.g. the executable). * Passing a function defined in a module etc. will not work! @@ -48,19 +52,19 @@ set_bundle_path_from_code(void* function) const char* bin_loc = dli.dli_fname; #endif + Raul::info << "[Module] Binary location: " << bin_loc << std::endl; + string bundle = bin_loc; bundle = bundle.substr(0, bundle.find_last_of(G_DIR_SEPARATOR)); bundle_path = bundle; } - void set_bundle_path(const char* path) { bundle_path = path; } - /** Return the absolute path of a file in an Ingen LV2 bundle */ std::string @@ -81,7 +85,6 @@ data_file_path(const std::string& name) #endif } - /** Return the absolute path of a module (dynamically loaded shared library). */ std::string @@ -106,7 +109,6 @@ module_path(const std::string& name, std::string dir) return ret; } - } // namespace Ingen } // namespace Shared |