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 Wayland deps to install commands #14

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented May 27, 2024

Description

Builds on #13. The idea here is to add Wayland deps everywhere so people more easily can use that support.

Distributions to be tested:

How to test:

Build a Fyne application with -tags wayland.

@andydotxyz
Copy link
Member

Ticking for Debian :)

@andydotxyz
Copy link
Member

Just an FYI - in Debian at least this will only work if Gnome dev (gnome-software-plugin-deb) is already installed.

In fact this new decoration requirement makes Fyne dependant upon GTK which I did not fully realise until now. I don't think it should be listed as a mandatory requirement, but if it isn't then will people using the apps get no borders?
Can it be optional in a meaningful way?

@Jacalz
Copy link
Member Author

Jacalz commented May 29, 2024

Solus works fine. Gave up Void because their installed is crap.
Got compilation errors on OpenSUSE with not finding wayland-client.h even though all deps are installed. Strange.

@Jacalz
Copy link
Member Author

Jacalz commented May 29, 2024

In fact this new decoration requirement makes Fyne dependant upon GTK which I did not fully realise until now. I don't think it should be listed as a mandatory requirement, but if it isn't then will people using the apps get no borders?
Can it be optional in a meaningful way?

Is it really dependent on GTK? As far as I can tell from libdecor, it is only linking to cairo but not GTK itself.
I don't really know how to handle it. It is kind of a necessity to get good Wayland support.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

I think we agreed on the call that the decor dependency should not be included, though the others may still be needed.

@Jacalz
Copy link
Member Author

Jacalz commented Jun 28, 2024

Wayland builds on OpenSUSE are currently broken, see go-gl/glfw#402. Should hopefully be a relatively simple fix to add the include path.

@Jacalz Jacalz marked this pull request as ready for review June 28, 2024 21:10
@Jacalz Jacalz requested a review from andydotxyz June 28, 2024 21:11
@Jacalz
Copy link
Member Author

Jacalz commented Jun 28, 2024

I believe this is ready. All the big linux distros have been tested and a bug about openSUSE has been filed but that should be a simple fix hopefully (all required packages are installed now none the less). The obscure ones have more of a manual gui setup and are a lot harder for me to test but the packages that we now install do exist (checked in the corresponding package repos for naming and so on).

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

Thanks. Added some thoughts about the wayland libdecor.

* `sudo apt-get install golang gcc libegl1-mesa-dev xorg-dev`
* `sudo apt-get install golang gcc libegl1-mesa-dev xorg-dev libxkbcommon-dev`

**NOTE:** Some Wayland compositors (Gnome's compositor Mutter etc.) do not support server side decorations resulting in Fyne applications showing up without window borders. Installing `libdecor` should solve these issues.
Copy link
Member

Choose a reason for hiding this comment

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

Raspberry Pi now uses Wayfire which seems to support server side rendering. So this should not be needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but you can also install something like Ubuntu 24.04 om Raspberry Pi and that ides Gnome. Maybe the RPi tab (which just checks arm64 right?) needs to be updated with more distribution options?

`nix-shell -p libGL pkg-config xorg.libX11.dev xorg.libXcursor xorg.libXi xorg.libXinerama xorg.libXrandr xorg.libXxf86vm`
`nix-shell -p libGL pkg-config xorg.libX11.dev xorg.libXcursor xorg.libXi xorg.libXinerama xorg.libXrandr xorg.libXxf86vm libxkbcommon wayland`

**NOTE:** Some Wayland compositors (Gnome's compositor Mutter etc.) do not support server side decorations resulting in Fyne applications showing up without window borders. Installing `libdecor` should solve these issues.
Copy link
Member

Choose a reason for hiding this comment

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

This is a runtime and not a compile-time issue so I'm not sure it belongs here. Or maybe it does but should also appear in the troubleshooting page?

Copy link
Member Author

Choose a reason for hiding this comment

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

From what I can tell, it is a bit of both. You can install it either at compile time or runtime. I have a vague recollection that I got better borders with -devel packages than just using it at runtime but I'll check. Adding it to troubleshooting is a good idea but I think it is worth having here as well.

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