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

Add optional including of eglfs platform plugins using ENABLE_EGLFS environment variable #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

viktorgino
Copy link

No description provided.

@TheAssassin
Copy link
Member

TheAssassin commented Nov 19, 2021

egldeviceintegrations is not a platform plugins path, is it? I think we should have a separate deployer.

Is there a reason other than bloat that prevents us from shipping those plugins by default?

What is your use case? Do you have an application on GitHub that needs this which I could have a look at?

@viktorgino
Copy link
Author

Hi @TheAssassin

The egl platform plugin has a few different integrations. So when we launch a Qt app with -platform eglfs it selects which eglfs integration to use.
In my case its located under /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/
And the size of the files are :

9.5K libqeglfs.so
393K libqlinuxfb.so
135K libqminimalegl.so
107K libqminimal.so
123K libqoffscreen.so
200K libqvnc.so
9.5K libqxcb.so

I'm trying to create an AppImage for the Rapsberry Pi OS Lite version, so no X11 there. EGLFS is used on a lot of other embedded platforms too.
This is the app I'm working with at the moment: https://github.com/viktorgino/headunit-desktop works fine with these changes.

Only other issue I have now is the bluetooth qml module is not getting deployed even tho I added it to the QML_MODULES_PATHS, but that's for an other PR :)

@@ -17,8 +17,23 @@ bool PlatformPluginsDeployer::deploy() {

ldLog() << "Deploying platform plugins" << std::endl;

if (!appDir.deployLibrary(qtPluginsPath / "platforms/libqxcb.so", appDir.path() / "usr/plugins/platforms/"))
return false;
if (getenv("ENABLE_EGLFS")){
Copy link
Member

Choose a reason for hiding this comment

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

Code style violation.

if (!appDir.deployLibrary(qtPluginsPath / "platforms/libqxcb.so", appDir.path() / "usr/plugins/platforms/"))
return false;
if (getenv("ENABLE_EGLFS")){
if (!appDir.deployLibrary(qtPluginsPath / "platforms/libqxcb.so", appDir.path() / "usr/plugins/platforms/"))
Copy link
Member

Choose a reason for hiding this comment

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

This should be refactored into a loop.

if (!appDir.deployLibrary(qtPluginsPath / "egldeviceintegrations/libqeglfs-kms-emu-integration.so", appDir.path() / "usr/plugins/egldeviceintegrations/"))
ldLog() << "No EGLFS EMU Integration plugin found, skipping" << std::endl;
} else {
if (!appDir.deployLibrary(qtPluginsPath / "platforms/libqxcb.so", appDir.path() / "usr/plugins/platforms/"))
Copy link
Member

Choose a reason for hiding this comment

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

The term "enable" implies that enabling the env var just adds additional files. But that's not true: it is more like "either egl or xcb". The name or at least the docs should reflect that. I think USE_ would be a better prefix in the current state.

Can xcb be deployed safely next to egl?

Copy link
Author

Choose a reason for hiding this comment

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

yes, by default they're both installed on Debian, you select the platform plugin with --plugin flag or an environment variable

@TheAssassin
Copy link
Member

Ping @viktorgino. I'd like this to get merged.

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.

2 participants