diff options
Diffstat (limited to 'lvz')
-rw-r--r-- | lvz/gendata.cpp | 47 |
1 files changed, 4 insertions, 43 deletions
diff --git a/lvz/gendata.cpp b/lvz/gendata.cpp index dac5dc7..8d82efa 100644 --- a/lvz/gendata.cpp +++ b/lvz/gendata.cpp @@ -26,7 +26,6 @@ #include <dlfcn.h> #include "audioeffectx.h" -#include "AEffEditor.hpp" using namespace std; @@ -44,10 +43,9 @@ struct Record { UIs uis; }; + typedef std::map<string, Record> Manifest; Manifest manifest; -typedef std::map<string, Record> GUIManifest; -GUIManifest gui_manifest; string @@ -158,27 +156,6 @@ write_plugin(AudioEffectX* effect, const string& lib_file_name) void -write_gui(AEffEditor* gui, const string& lib_file_name) -{ - const string base_name = lib_file_name.substr(0, lib_file_name.find_last_of(".")); - assert(gui_manifest.find(gui->getURI()) == gui_manifest.end()); - gui_manifest.insert(std::make_pair(gui->getURI(), Record(base_name))); - Manifest::iterator plugin_record = manifest.find(lib_file_name); - if (plugin_record != manifest.end()) { - plugin_record->second.uis.push_back(gui->getPluginURI()); - } - Manifest::iterator i = manifest.find(gui->getPluginURI()); - if (i != manifest.end()) { - i->second.uis.push_back(gui->getURI()); - } else { - Record r("ERRNOBASE"); - r.uis.push_back(gui->getURI()); - manifest.insert(std::make_pair(gui->getPluginURI(), r)); - } -} - - -void write_manifest(ostream& os) { os << "@prefix lv2: <http://lv2plug.in/ns/lv2core#> ." << endl; @@ -193,13 +170,6 @@ write_manifest(ostream& os) os << ";" << endl << "\tuiext:ui <" << *j << "> "; os << "." << endl << endl; } - - for (GUIManifest::iterator i = gui_manifest.begin(); i != gui_manifest.end(); ++i) { - Record& r = i->second; - os << "<" << i->first << "> a uiext:GtkUI ;" << endl; - os << "\trdfs:seeAlso <" << r.base_name << ".ttl> ;" << endl; - os << "\tuiext:binary <" << r.base_name << ".so> ." << endl << endl; - } } @@ -216,13 +186,10 @@ main(int argc, char** argv) } typedef AudioEffectX* (*new_effect_func)(); - typedef AEffEditor* (*new_gui_func)(); typedef AudioEffectX* (*plugin_uri_func)(); - new_effect_func constructor = NULL; - new_gui_func gui_constructor = NULL; - AudioEffectX* effect = NULL; - AEffEditor* gui = NULL; + new_effect_func constructor = NULL; + AudioEffectX* effect = NULL; for (int i = 1; i < argc; ++i) { void* handle = dlopen(argv[i], RTLD_LAZY); @@ -242,13 +209,7 @@ main(int argc, char** argv) write_plugin(effect, lib_path); } - gui_constructor = (new_gui_func)dlsym(handle, "lvz_new_aeffeditor"); - if (gui_constructor != NULL) { - gui = gui_constructor(); - write_gui(gui, lib_path); - } - - if (constructor == NULL && gui_constructor == NULL) { + if (constructor == NULL) { cerr << "ERROR: " << argv[i] << ": not an LVZ plugin library, ignoring" << endl; } |