mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-16 01:06:09 +00:00
trivial: Define the plugindir in one central place
This commit is contained in:
parent
e643fb283f
commit
4af05398af
@ -25,6 +25,7 @@ AM_CPPFLAGS = \
|
|||||||
-DVERSION="\"$(VERSION)\"" \
|
-DVERSION="\"$(VERSION)\"" \
|
||||||
-DDAEMON_USER="\"$(daemon_user)\"" \
|
-DDAEMON_USER="\"$(daemon_user)\"" \
|
||||||
-DTESTDATADIR=\""$(top_srcdir)/data/tests"\" \
|
-DTESTDATADIR=\""$(top_srcdir)/data/tests"\" \
|
||||||
|
-DPLUGINDIR=\""$(libdir)/fwupd-plugins-2"\" \
|
||||||
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
|
-DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
|
||||||
-DLOCALEDIR=\""$(localedir)"\"
|
-DLOCALEDIR=\""$(localedir)"\"
|
||||||
|
|
||||||
|
@ -2622,12 +2622,10 @@ static gboolean
|
|||||||
fu_main_load_plugins (FuMainPrivate *priv, GError **error)
|
fu_main_load_plugins (FuMainPrivate *priv, GError **error)
|
||||||
{
|
{
|
||||||
const gchar *fn;
|
const gchar *fn;
|
||||||
g_autofree gchar *plugin_dir = NULL;
|
|
||||||
g_autoptr(GDir) dir = NULL;
|
g_autoptr(GDir) dir = NULL;
|
||||||
|
|
||||||
/* search */
|
/* search */
|
||||||
plugin_dir = g_build_filename (LIBDIR, "fwupd-plugins-2", NULL);
|
dir = g_dir_open (PLUGINDIR, 0, error);
|
||||||
dir = g_dir_open (plugin_dir, 0, error);
|
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
while ((fn = g_dir_read_name (dir)) != NULL) {
|
while ((fn = g_dir_read_name (dir)) != NULL) {
|
||||||
@ -2640,7 +2638,7 @@ fu_main_load_plugins (FuMainPrivate *priv, GError **error)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* open module */
|
/* open module */
|
||||||
filename = g_build_filename (plugin_dir, fn, NULL);
|
filename = g_build_filename (PLUGINDIR, fn, NULL);
|
||||||
plugin = fu_plugin_new ();
|
plugin = fu_plugin_new ();
|
||||||
fu_plugin_set_usb_context (plugin, priv->usb_ctx);
|
fu_plugin_set_usb_context (plugin, priv->usb_ctx);
|
||||||
g_debug ("adding plugin %s", filename);
|
g_debug ("adding plugin %s", filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user