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 libxcb-cursor0 to Linux dependencies for Qt 6.5 and up #221

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

IgKh
Copy link
Contributor

@IgKh IgKh commented Jan 26, 2024

Starting Qt 6.5.0, the XCB platform plugin for Linux/X11 also depends on xcb-cursor0 at runtime, logging as much if the compiled application is started without it being present:

from 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. 
Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

To resolve this in cases where the application needs to be run within the actions workflow, this PR add the requisite Ubuntu package to the dependency packages installed by the action.

Copy link
Contributor

@pzhlkj6612 pzhlkj6612 left a comment

Choose a reason for hiding this comment

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

Hi! I think we can keep dependencies const but change it to string[]
to avoid error-prone string manipulation. Example code:

const test = (version: number) => {
    const dependencies = [
        "build-essential",
    ]

    if (version > 42) {
        dependencies.push("libxcb-cursor0")
    }

    console.log(`Installing ${dependencies.join(" ")}`)
}

test(41);
test(43);

@IgKh
Copy link
Contributor Author

IgKh commented Jan 27, 2024

Thanks @pzhlkj6612! I've applied your suggestion.

Copy link
Contributor

@pzhlkj6612 pzhlkj6612 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Found the possible corresponding commit in Qt 6.5.0 Release Note:

  • 012132c60d xcb: use libxcb-cursor to replace Xlib/libXcursor
    Used libxcb-cursor to replace Xlib/libXcursor

@jurplel jurplel merged commit 0455760 into jurplel:master Feb 6, 2024
27 checks passed
@jurplel
Copy link
Owner

jurplel commented Feb 6, 2024

Thank you for your contribution!

@IgKh IgKh deleted the add-xcb-cursor-dependency branch February 6, 2024 19:54
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.

3 participants