Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
19 changes: 17 additions & 2 deletions src/core/plugin-loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,23 @@ std::vector<std::string> 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we push the old paths just so that this is backwards compatible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could -- my thinking was that cases where things worked with plugins using get_option('libdir') will continue to do so. The only breakage will come from when the plugin build was manually adjusted to the hardcoded path (which I expect not to be common, since I was the first one reporting the issue). But in any case, better to be safe, so I'll add the old paths explicitly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, just pushed an update to include the original paths here. BTW, I was wondering whether it would make sense to use fs::path here as well as it is done in plugin.cpp (e.g. here)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice, if you feel like updating the code once again :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm happy to look into this, but might be only during the weekend / next week

std::string rel_libdir = REL_LIBDIR;
plugin_prefixes.push_back(xdg_data_dir + "/wayfire/plugin-manager/install/" +
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");
}

Expand Down
Loading