ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

Flatpak Support

Open Doomsdayrs opened this issue 2 years ago • 15 comments
trafficstars

Describe the feature

While ruffle is still in active development and not yet stable, it is still quite useful for users to play many flash games (such as BTD) that do operate well with the current support.

To make it easier for users on Linux distributions to use Ruffle, it would be nice to get ruffle bundled with flatpak and published to flathub.

This repository contains my current bundling of ruffle. There are issues I want to first solve before I can submit to flathub, of course with permission from ruffle-rs to do so.

Issues

Most of these are all XDG compliance related.

  • [ ] Linux packaging requirements These are some requirements I would like to get put upstream.
    • [ ] Desktop file https://github.com/ruffle-rs/ruffle/pull/11227
    • [ ] Metainfo file https://github.com/ruffle-rs/ruffle/pull/11227
    • [x] SVG Logo https://github.com/ruffle-rs/ruffle/pull/11226
  • [x] Immediate crash due to clipboard errors, detailed below; Dealt with by using x11 fallback.

Doomsdayrs avatar Jan 19 '23 10:01 Doomsdayrs

Error

Error: Couldn't get platform clipboard

Caused by:
    Unknown error while interacting with the clipboard: Display parsing error

Digging

This line is the reason for the first message, as far as I am aware this should be harmless.

In arboard, this line implements the new function for Clipboard for wayland.

This line in wl-clipboard-rs determines if there is a clipboard supported or not. And at this point, I reach the end of my knowledge.

Doomsdayrs avatar Jan 19 '23 11:01 Doomsdayrs

Clipboard crash is just missing permissions iirc. A good test would be to download Flatseal and enable all the permissions and see if it still crashes.

The SVG logo isn't required but highly encouraged, same thing with Desktop/metainfo file being upstreamed but it can be in your Flatpak repo. The only thing that is 100% required when submitting to Flathub is you have permission from the ruffle-rs maintainers

dginovker avatar Jan 19 '23 16:01 dginovker

Clipboard crash is just missing permissions iirc. A good test would be to download Flatseal and enable all the permissions and see if it still crashes.

Apologies, I doubt that the issue is with permissions. Please do follow the mention hole with https://github.com/YaLTeR/wl-clipboard-rs/issues/32 to see. It seems it might be improper usage of libraries.

Specifically flatpak support might have to wait on https://github.com/rust-windowing/winit/pull/2156 for proper clipboard handling.

The only thing that is 100% required when submitting to Flathub is you have permission from the ruffle-rs maintainers

That is why I am here :D

Doomsdayrs avatar Jan 19 '23 19:01 Doomsdayrs

One solution is to allow Clipboard to become null, and simply warn in console that it will not operate. But I despise this type of hacky solution and would ruin user experience.

Doomsdayrs avatar Jan 19 '23 19:01 Doomsdayrs

I understand that the suggestion is to use Smithay Clipboard, but this is not a cross-platform library like arboard, and I'm not sure the Ruffle devs would want to add this additional dependency.

Anyway @Doomsdayrs thanks for your work on this! Here's the Ruffle icon SVG: favicon

n0samu avatar Jan 20 '23 00:01 n0samu

I understand that the suggestion is to use Smithay Clipboard, but this is not a cross-platform library like arboard, and I'm not sure the Ruffle devs would want to add this additional dependency.

It can be done via abstraction. Using a separate library for Linux while retaining the current library for other platforms. In fact, the abstraction would be quite simple as the clipboard is only used in two lines of code.

Anyway @Doomsdayrs thanks for your work on this! Here's the Ruffle icon SVG: favicon

Where is this file hosted on the github? Since I rather have it included upstream.

Doomsdayrs avatar Jan 22 '23 05:01 Doomsdayrs

Where is this file hosted on the github?

I don't think it is. One of the other Ruffle developers sent me this file on Discord. I do think it would be a good idea to include it in the repo somewhere though.

n0samu avatar Jan 22 '23 10:01 n0samu

Would love to see a Flatpak or an AppImage supported, as on readonly systems like SteamOS, we are missing libraries to run it:

./ruffle: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

WingofaGriffin avatar May 01 '23 01:05 WingofaGriffin

Would love to see a Flatpak or an AppImage supported, as on readonly systems like SteamOS, we are missing libraries to run it:

./ruffle: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

Sorry for the late reply. Currently I am tied up with College work, hopefully once all is done I will once again contact all the various developers to work on getting support working.

Doomsdayrs avatar May 04 '23 00:05 Doomsdayrs

Alright, Now using the nightly-2023-05-26

Congrats to the new UI, Looks much better!

The issue with the clipboard still seems present.

image


To update, @YaLTeR from wl-clipboard-rs states the following.

To summarize, wl-clipboard-rs is for terminal or background applications; arboard is in the wrong for using it for GUI applications (?).

GUI apps should be using the wayland offer, which should be in winit, but the support has not been added in yet it seems.

@YaLTeR suggests smithay-clipboard, but that seems a bit unmaintained and is not cross-platform.

I personally want to say clipboard should be disabled on flatpak & wayland until proper support is added, but I believe that might be contrary to the goals Ruffle has currently.

Doomsdayrs avatar May 26 '23 17:05 Doomsdayrs

On a brighter note, I can run it under flatpak, but only under x11, which is sub-optimal due to many reasons I will not get too deep into.

image

Doomsdayrs avatar May 26 '23 17:05 Doomsdayrs

Does https://github.com/ruffle-rs/ruffle/pull/14362 help with this, as suggested by @n0samu?

torokati44 avatar Dec 11 '23 10:12 torokati44

Does #14362 help with this, as suggested by @n0samu?

Yep!

Doomsdayrs avatar Dec 11 '23 14:12 Doomsdayrs

The only thing that is 100% required when submitting to Flathub is you have permission from the ruffle-rs maintainers

It isn't, but it is recommended, especially if there are problems that need to be solved in up-stream.

zefr0x avatar Feb 13 '24 22:02 zefr0x

Does #14362 help with this, as suggested by @n0samu?

It seems that I did not fully test it, https://github.com/ruffle-rs/ruffle/issues/15213

Doomsdayrs avatar Feb 14 '24 00:02 Doomsdayrs

See https://github.com/flathub/flathub/pull/5473

evilpie avatar Aug 03 '24 20:08 evilpie

We are now officially available on Flathub: https://flathub.org/apps/rs.ruffle.Ruffle :tada:

Thank you to all the contributors, especially @Doomsdayrs !

kjarosh avatar Aug 09 '24 10:08 kjarosh