From df7a87fe043440d99b23378efc6664b5deed8b42 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 17 Feb 2011 03:11:41 +0000 Subject: 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 --- src/shared/runtime_paths.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/shared/runtime_paths.cpp') 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 #include #include + +#include + #include #include + +#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 -- cgit v1.2.1