From 9e346cb4e4fc4bd4fc25115be9fad111ec326ae8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Aug 2015 02:12:27 +0000 Subject: Save plugin version information in bundles. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5710 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/LV2Plugin.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/server') diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp index 3dc87030..ddc80f70 100644 --- a/src/server/LV2Plugin.cpp +++ b/src/server/LV2Plugin.cpp @@ -38,6 +38,29 @@ LV2Plugin::LV2Plugin(World* world, const LilvPlugin* lplugin) , _lilv_plugin(lplugin) { set_property(_uris.rdf_type, _uris.lv2_Plugin); + + LilvNode* minor = lilv_world_get(world->lilv_world(), + lilv_plugin_get_uri(lplugin), + _uris.lv2_minorVersion, + NULL); + LilvNode* micro = lilv_world_get(world->lilv_world(), + lilv_plugin_get_uri(lplugin), + _uris.lv2_minorVersion, + NULL); + + if (lilv_node_is_int(minor) && lilv_node_is_int(micro)) { + fprintf(stderr, "%s version %d.%d\n", + lilv_node_as_uri(lilv_plugin_get_uri(lplugin)), + lilv_node_as_int(minor), + lilv_node_as_int(micro)); + set_property(_uris.lv2_minorVersion, + world->forge().make(lilv_node_as_int(minor))); + set_property(_uris.lv2_microVersion, + world->forge().make(lilv_node_as_int(micro))); + } + + lilv_node_free(minor); + lilv_node_free(micro); } const Raul::Symbol -- cgit v1.2.1