Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin loading broken in flatpaks with 3.17 #1047

Open
yselkowitz opened this issue Mar 14, 2024 · 0 comments
Open

Plugin loading broken in flatpaks with 3.17 #1047

yselkowitz opened this issue Mar 14, 2024 · 0 comments

Comments

@yselkowitz
Copy link

Describe the bug
The following commit was supposed to fix plugin loading in Fedora:

c8f6c32

Unfortunately this breaks plugin loading in flatpaks, since this returns the Qt location (which is in the runtime) rather than the application's location. This applies to both Flathub flatpaks built with the latest 3.17 snapshot:

[INFO] plugins dir set to:  "/usr/lib/x86_64-linux-gnu/nomacs-plugins"

As well as with Fedora flatpaks (currently WIP):

[INFO] plugins dir set to:  "/usr/lib64/nomacs-plugins"

However, the previous code was also incorrect wrt Fedora native RPM builds, so a simple revert won't fix this. Rather, a different approach appears to be necessary. Either this needs to be a compile-time variable passed from cmake, or a list of possible directories relative to QCoreApplication::applicationDirPath() should be tried until one is found. Accepting an environment variable (e.g. NOMACS_PLUGIN_PATH) as an override, either as an alternative or supplement to those, could also work.

To Reproduce
Steps to reproduce the behavior:

  1. Build 3.17.z snapshot as a flatpak
  2. Run the flatpak from the command line
  3. Note the "plugins dir set to" line.
  4. Plugins->Plugin Manager shows no plugins.

Expected behavior
Plugins are discovered and loaded, both in Fedora native builds as well as in flatpaks.

Desktop (please complete the following information):

  • OS: Fedora
  • Version: 39
yselkowitz referenced this issue Mar 14, 2024
- thanks @tieugene
- beta version: 3.17
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

No branches or pull requests

1 participant