gstreamer-full: use the basename of plugin_path to avoid the ':' detection
authorStéphane Cerveau <scerveau@igalia.com>
Mon, 5 Dec 2022 08:50:43 +0000 (08:50 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 5 Dec 2022 13:15:50 +0000 (13:15 +0000)
The absolute path on windows contains ':' which prevents
gstinitstaticplugins.py to work properly. Use the basename whic is good
enough for the script to make the list of plugins

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3526>

meson.build
scripts/generate_init_static_plugins.py

index e8ee127..e925ec9 100644 (file)
@@ -271,7 +271,7 @@ foreach plugin: all_plugins
   plugin_path = plugin.get_variable('full_path')
   all_plugins_paths += plugin_path
   all_plugins_dirs += fs.parent(plugin_path)
-  plugins_names += plugin_path
+  plugins_names += fs.name(plugin_path)
 endforeach
 
 # Work around meson bug: https://github.com/mesonbuild/meson/pull/6770
index 6b86ea4..af8b275 100755 (executable)
@@ -116,7 +116,7 @@ if __name__ == "__main__":
         plugin_name = split[0]
         if plugin_name == '':
             continue
-        filename = os.path.basename(plugin)
+        filename = os.path.basename(plugin).strip()
         if filename.startswith('libgst') and filename.endswith('.a'):
             plugin_name = filename[len('libgst'):-len('.a')]
         plugins_registration += ['GST_PLUGIN_STATIC_REGISTER(%s);' % (plugin_name)]