registry: Use plugin directory from the build system for relocateable Windows builds

Instead of guessing something based on preprocessor defines and magic.
This commit is contained in:
Sebastian Dröge 2019-08-08 13:49:07 +03:00 committed by Nirbheek Chauhan
parent d6c14e70a1
commit 533fbf766e
3 changed files with 21 additions and 5 deletions

View file

@ -1065,6 +1065,23 @@ esac
AC_DEFINE_UNQUOTED(GST_PLUGIN_SCANNER_SUBDIR,
"$GST_PLUGIN_SCANNER_SUBDIR", [libexecdir path component, used to find plugin-scanner on relocatable builds on windows])
case "${libdir}" in
*lib64)
GST_PLUGIN_SUBDIR="lib64";;
*lib32)
GST_PLUGIN_SUBDIR="lib32";;
*lib)
GST_PLUGIN_SUBDIR="lib";;
*)
GST_PLUGIN_SUBDIR=`basename ${libdir}`;
if test -z "$GST_PLUGIN_SUBDIR"; then
AC_MSG_WARN([Couldn't determined libdir suffix, using "lib"])
GST_PLUGIN_SUBDIR="lib";
fi
;;
esac
AC_DEFINE_UNQUOTED(GST_PLUGIN_SUBDIR,
"$GST_PLUGIN_SUBDIR", [plugin directory path component, used to find plugins on relocatable builds on windows])
dnl completion helper locations
AS_AC_EXPAND(GST_COMPLETION_HELPER_INSTALLED,${libexecdir}/gstreamer-$GST_API_VERSION/gst-completion-helper)

View file

@ -1648,11 +1648,8 @@ scan_and_update_registry (GstRegistry * default_registry,
g_win32_get_package_installation_directory_of_module
(_priv_gst_dll_handle);
dir = g_build_filename (base_dir,
#ifdef _DEBUG
"debug"
#endif
"lib", "gstreamer-" GST_API_VERSION, NULL);
dir = g_build_filename (base_dir, GST_PLUGIN_SUBDIR,
"gstreamer-" GST_API_VERSION, NULL);
GST_DEBUG ("scanning DLL dir %s", dir);
changed |= gst_registry_scan_path_internal (&context, dir);

View file

@ -114,6 +114,8 @@ cdata.set_quoted('PLUGINDIR', join_paths(get_option('prefix'), get_option('libdi
cdata.set_quoted('VERSION', gst_version)
cdata.set_quoted('GST_PLUGIN_SCANNER_INSTALLED', join_paths(prefix, helpers_install_dir, 'gst-plugin-scanner'))
cdata.set_quoted('GST_PTP_HELPER_INSTALLED', join_paths(prefix, helpers_install_dir, 'gst-ptp-helper'))
cdata.set_quoted('GST_PLUGIN_SUBDIR', get_option('libdir'),
description: 'plugin directory path component, used to find plugins on relocatable builds on windows')
cdata.set_quoted('GST_PLUGIN_SCANNER_SUBDIR', libexecdir,
description: 'libexecdir path component, used to find plugin-scanner on relocatable builds on windows')
cdata.set('GST_DISABLE_OPTION_PARSING', not get_option('option-parsing'))