Skip to content

plugin-loader: adjust path for plugins installed with wayfire-plugin - #3126

Open
dkondor wants to merge 2 commits into
WayfireWM:masterfrom
dkondor:plugin_lib_path
Open

dkondor wants to merge 2 commits into
WayfireWM:masterfrom
dkondor:plugin_lib_path

Conversation

@dkondor

@dkondor dkondor commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #3124

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'.

Note: I'm not that happy with the REL_LIBDIR name for this variable, happy to hear alternate suggestions :)

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'.
@soreau

soreau commented Sep 4, 2026

Copy link
Copy Markdown
Member

Fixes #3124

Ensure that we use that path that will be generated by meson using get_option('prefix') / get_option('libdir') / 'wayfire'.

Nice work, this is basically exactly what I had in mind. (aside from the REL_LIBDIR name, heh)

Note: I'm not that happy with the REL_LIBDIR name for this variable, happy to hear alternate suggestions :)

How about WF_LIBDIR?

{
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wayfire-plugin meson libdir can be incorrect (Ubuntu 24.04)

3 participants