From 2a6a9fdfc0814835c811bcc101153fd5409bdaab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kondor=20D=C3=A1niel?= Date: Fri, 4 Sep 2026 23:16:42 +0200 Subject: [PATCH 1/2] plugin-loader: adjust path for plugins installed with wayfire-plugin Ensure that we use that path that will be generated by meson using `get_option('prefix') / get_option('libdir') / 'wayfire'`. Note: the 'libdir' component can vary among systems; while most often it is just `lib`, e.g. on Ubuntu, it is `lib/x86_64-linux-gnu'. --- config.h.in | 1 + meson.build | 1 + src/core/plugin-loader.cpp | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.h.in b/config.h.in index 66d2cdc0f..e2798c660 100644 --- a/config.h.in +++ b/config.h.in @@ -6,6 +6,7 @@ #define WAYFIRE_API_ABI_VERSION_STRING "@WAYFIRE_API_ABI_VERSION@" #define PLUGIN_PATH "@PLUGIN_PATH@" #define PLUGIN_XML_DIR "@PLUGIN_XML_DIR@" +#define REL_LIBDIR "@REL_LIBDIR@" #define SYSCONFDIR "@SYSCONFDIR@" #define WF_DEFAULT_CONFIG_BACKEND "@DEFAULT_CONFIG_BACKEND@" #mesondefine BUILD_WITH_IMAGEIO diff --git a/meson.build b/meson.build index 6a36389e4..e74d93297 100644 --- a/meson.build +++ b/meson.build @@ -168,6 +168,7 @@ conf_data.set('PLUGIN_XML_DIR', join_paths(get_option('prefix'), metadata_dir_su sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) conf_data.set('SYSCONFDIR', sysconfdir) pkgdatadir = join_paths(get_option('prefix'), 'share', 'wayfire', 'protocols') +conf_data.set('REL_LIBDIR', get_option('libdir')) if get_option('default_config_backend') == 'default' conf_data.set('DEFAULT_CONFIG_BACKEND', join_paths(conf_data.get('PLUGIN_PATH'), 'libdefault-config-backend.so')) diff --git a/src/core/plugin-loader.cpp b/src/core/plugin-loader.cpp index a3f863e1f..07e891fbc 100644 --- a/src/core/plugin-loader.cpp +++ b/src/core/plugin-loader.cpp @@ -326,8 +326,9 @@ std::vector wf::get_plugin_paths() if (xdg_data_dir != "") { - plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugin-manager/install/lib/wayfire"); - plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugin-manager/install/lib64/wayfire"); + // REL_LIBDIR from meson.build: get_option('libdir') to be compatible with wayfire-plugin + plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugin-manager/install/" + + REL_LIBDIR + "/wayfire"); plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugins"); } From f2e97a233f395e349aa3f3386da556a9cd903613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kondor=20D=C3=A1niel?= Date: Sat, 5 Sep 2026 12:55:29 +0200 Subject: [PATCH 2/2] plugin-loader: also include legacy plugin paths for compatibility --- src/core/plugin-loader.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/core/plugin-loader.cpp b/src/core/plugin-loader.cpp index 07e891fbc..1e0dde56d 100644 --- a/src/core/plugin-loader.cpp +++ b/src/core/plugin-loader.cpp @@ -327,8 +327,22 @@ std::vector wf::get_plugin_paths() if (xdg_data_dir != "") { // REL_LIBDIR from meson.build: get_option('libdir') to be compatible with wayfire-plugin + std::string rel_libdir = REL_LIBDIR; plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugin-manager/install/" + - REL_LIBDIR + "/wayfire"); + rel_libdir + "/wayfire"); + + // previous hardcoded paths for wayfire-plugin + if (rel_libdir != "lib") + { + plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugin-manager/install/lib/wayfire"); + } + + if (rel_libdir != "lib64") + { + plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugin-manager/install/lib64/wayfire"); + } + + // additional path for manually installed plugins plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugins"); }