itchio / itch

🎮 The best way to play your itch.io games
https://itch.io/app
MIT License
2.36k stars 209 forks source link

Flatpak version - OK to submit to Flathub for review? #2793

Open gjpin opened 2 years ago

gjpin commented 2 years ago

Hello!

First of all I'd like to show my great appreciation for the itch project! I'm also a big Flatpak fan and would like to see itch available on Flathub.

I've worked on an initial version of the Flatpak version of the itch app that can be found at: https://github.com/gjpin/itch-flatpak. It uses the newly released org.winehq.Wine as the base and downloads the Linux client directly from broth, so Wine is working out of the box.

I've tested a few Windows and Linux games with success.

I'd like to know if I can initiate the submission to Flathub for review or if the itch team is interested in taking the lead. Either way, I'm just looking to help and would like to see it published.

Thanks,

lil5 commented 2 years ago

Have any steps from @leafo been made to you, @gjpin in relation to this issue yet?

TheGreatDeadOne commented 2 years ago

This is pretty cool, I hope upstream approves this Flatpak build and its publication on Flathub.

Nyamiou commented 2 years ago

Can this be given any consideration whatsoever by the developers?

heidiwenger commented 1 year ago

Yes, what seems to be the problem if there is any? This has been ready to go for a good while now? And if not, why no communication? These are essential things in the means of all Linux adoption, too.

tazihad commented 1 year ago

i tried this flatpak. but c++ 2015 failed to install automatically. So, the game didn't run. I hope officials give it a try.

Doomsdayrs commented 1 year ago

I continued the work properly,

https://github.com/Doomsdayrs/flathub/tree/io.itch.AppBin

Mailaender commented 1 year ago

Why are you using Wine instead of Electron as a base?

Doomsdayrs commented 1 year ago

Why are you using Wine instead of Electron as a base?

For windows games

jokeyrhyme commented 1 year ago

I assume we need both wine and electron in the mix, but I think flatpak requires us to pick one runtime

So, we could use this choice to optimise for disk space by choosing the larger runtime/base, or the the more commonly-installed one?

But if we choose a runtime/base that is updated, too, often, then we're causing frequent downloads

And then there's the developer experience: which runtime/base is easiest to work with?

ssokolow commented 1 year ago

Use the Electron runtime, for the following reasons:

  1. Last I checked, Chrome's codebase, which Electron embeds, is gigantic, hell to build, and takes forever and gigabytes of RAM to do so... so the Flathub maintainers might ask you to switch to the Electron BaseApp when you submit.
  2. Conceptually, you use the BaseApp for the component the application itself is actually built using. So you'd use Wine if you were doing something like making a Flatpak of something like foobar2000 (Is there anything but foobar2000 or WinAMP with a working USF (Nintendo 64 chiptune) playback plugin these days?) or, I assume, building something that was ported using winelib.
  3. Users may need more than one version of Wine and/or Proton for proper compatibility anyway, so, the Wine BaseApp isn't useful for game launchers. (eg. Game X requires compatibility hack Y that hasn't yet been rewritten to solve the problem properly so upstream will accept it. Windows 3.1 game Z requires Wine 1.2 because that's the last version before they removed a bunch of Win16 hacks and started rewriting things properly. etc.)

For Wine, take a look at how Flatpaks which have internal downloaders/version managers for Wine builds do it.

Doomsdayrs commented 1 year ago

@ssokolow

  1. Last I checked, Chrome's codebase, which Electron embeds, is gigantic, hell to build, and takes forever and gigabytes of RAM to do so... so the Flathub maintainers might ask you to switch to the Electron BaseApp when you submit.

I am not building itch, I am downloading the binary tar and extracting it, there are other reasons such as requiring network during build that prevent building from source.

  1. Users may need more than one version of Wine and/or Proton for proper compatibility anyway, so, the Wine BaseApp isn't useful for game launchers. (eg. Game X requires compatibility hack Y that hasn't yet been rewritten to solve the problem properly so upstream will accept it. Windows 3.1 game Z requires Wine 1.2 because that's the last version before they removed a bunch of Win16 hacks and started rewriting things properly. etc.)

itch has no built in support for WINE management, and just prefixes the exec command with "wine" for wine support, no modifications. If you want to provide this functionality, I am pretty sure merge requests to itch are welcome.

For Wine, take a look at how Flatpaks which have internal downloaders/version managers for Wine builds do it.

I am not an itch developer. I am simply creating a script to package itch for flatpak.

Next time, before writing something, consider actually looking at what I am doing.

ssokolow commented 1 year ago

I am not building itch, I am downloading the binary tar and extracting it, there are other reasons such as requiring network during build that prevent building from source.

Unless you're doing something akin to an at-runtime Wine version manager but for Electron, the Flathub maintainers might also ask you to change that. They prefer anything that can be built from source to be built from source for auditability reasons.

I am not an itch developer. I am simply creating a script to package itch for flatpak.

Next time, before writing something, consider actually looking at what I am doing.

I never said you were... I'm just talking about what I've observed about how Flatpak packaging works and the changes Flathub maintainers propose to submissions.

EDIT: Also, I almost forgot. If memory serves, all Chrome-based things (including the Electron BaseApp) rely on some special fixups to proxy sandbox setup through Flatpak to keep keep Chrome's content processes from dying with some kind of Access Denied error on trying to access the Linux sandboxing control APIs from inside a Flatpak sandbox.

Doomsdayrs commented 1 year ago

I am not building itch, I am downloading the binary tar and extracting it, there are other reasons such as requiring network during build that prevent building from source.

Unless you're doing something akin to an at-runtime Wine version manager but for Electron, the Flathub maintainers might also ask you to change that. They prefer anything that can be built from source to be built from source for auditability reasons.

such as requiring network during build that prevent building from source.

EDIT: Also, I almost forgot. If memory serves, all Chrome-based things (including the Electron BaseApp) rely on some special fixups to proxy sandbox setup through Flatpak to keep keep Chrome's content processes from dying with some kind of Access Denied error on trying to access the Linux sandboxing control APIs from inside a Flatpak sandbox.

Citations?

ssokolow commented 1 year ago

such as requiring network during build that prevent building from source.

Is it a license compliance thing? ...because, if not, they're pretty big on reproducible builds and whoever reviews your submission might ask you to argue (in the "provide citations" sense) why requiring network during build is an "I need this" rather than an "I want this".

Citations?

The Chromium Flatpak has patches on it to utilize Flatpak's support for nested sandboxing.

-- refi64@ https://github.com/flatpak/flatpak/issues/4032

Given that refi64 is the author of zypak, I'd say that's pretty authoritative.

Doomsdayrs commented 1 year ago

such as requiring network during build that prevent building from source.

Is it a license compliance thing? ...because, if not, they're pretty big on reproducible builds and whoever reviews your submission might ask you to argue (in the "provide citations" sense) why requiring network during build is an "I need this" rather than an "I want this".

No one is asking on the PR https://github.com/flathub/flathub/pull/3719 , Stop speaking for others.

Citations?

The Chromium Flatpak has patches on it to utilize Flatpak's support for nested sandboxing. -- refi64@ flatpak/flatpak#4032

Given that refi64 is the author of zypak, I'd say that's pretty authoritative.

if this particular Chromium

Please note you are now blocked, I no longer find any discussion with you productive in any way. Goodbye.

ssokolow commented 1 year ago

No one is asking on the PR https://github.com/flathub/flathub/pull/3719 , Stop speaking for others.

*shrug* Suit yourself.

I did say "whoever reviews your submission" and "might ask". It depends on who you get and what they notice.

Bugbert commented 1 year ago

It might be best solution to not try and fit the regular app in a flatpak. We might instead use the same fronted with something like Tauri and make the back end manage wine/proton/soda or whatever. This would likely be more difficult but would be a much nicer and native solution.

EDIT: I was under the false impression that this had been still for a month (mostly due to the arguing). Checked back on the PR to see that it's in a healthy state. Hope it gets merged soon!