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

Appimage/Flatpak releases for Linux #241

Open
CaptainMuskrat opened this issue Aug 4, 2023 · 13 comments
Open

Appimage/Flatpak releases for Linux #241

CaptainMuskrat opened this issue Aug 4, 2023 · 13 comments

Comments

@CaptainMuskrat
Copy link

I would like to request the addition of Appimage and/or Flatpak support for the Ironwail engine. Both methods would ensure far greater compatibility across all Linux distributions, as well as easier maintenance and long-term stability.

@fpiesche
Copy link

Just to ping this: I've just set up a Flatpak release for the original Quakespasm, which should be adaptable for Ironwail with minimal changes. Flathub's submission guidelines require at least permission from the project author to redistribute the software via Flathub, so if @andrei-drexler is willing to give this I could set this up pretty easily.

For what it's worth, a Flatpak release will be very little extra maintenance effort - we'd have to add a .desktop file as a launcher and an AppStream metadata file to this repo here; builds will automatically happen on FlatHub infrastructure when a new release tag is created in the GitHub repo and any dependencies will also be kept up to date by Flathub's build processes.

@fpiesche
Copy link

I've now modified my Quakespasm Flatpak build spec for Ironwail and confirmed this builds and runs fine. Would be happy to submit a PR for the required metadata here and then submit my Ironwail build to Flathub! :)

@4LT
Copy link

4LT commented Dec 10, 2023

Not sure if it's a good default or not, but personally I build with DO_USERDIRS=1 to enable reading game files from ~/.ironwail

This overrides reading from Steam or GoG, so it might not be a great new user experience (though new users wouldn't have an .ironwail directory in their home to begin with, so maybe that's not an issue)

@fpiesche
Copy link

Flathub gave me code review feedback on trying to do this with Quakespasm, noting that in keeping with Flatpak's sandbox security principles Flatpak apps should be built with minimal necessary permissions for users to then override if they need/want to.

Between that and the Flatpak distributions for other games' source ports using the data directory within the Flatpak user data path (i.e. ~/.var/app/tld.host.appid/data/) I've set my Quakespasm flatpak up to do the same thing and prompt users on first startup with a note saying to copy their id1 directory there (as Quakespasm otherwise just exits with a message to the terminal, which would be invisible to a user launching from the shortcut in their desktop app menu).

Screenshot_20231210_181732

In my personal use case I've simply symlinked that data directory to my Quake data path elsewhere (which has all my mods, maps etc separate from any individual installation of the game) and given the Quakespasm/Ironwail flatpak permission to access that path.

@PhoenixBlade24
Copy link

I want to state my support for this too!. Doubly so for an Appimage.

@KAMiKAZOW
Copy link

for users to then override if they need/want to.

But Flatpak does not yet support asking for permissions for a location, right?

prompt users on first startup with a note saying to copy their id1 directory there

That's sadly not in line with Ironwail's "zero setup" route to autodetect the Steam installation. May I suggest that you at least add the default Quake 1 of Steam with Proton path to the permissions and change the prompt say something along the lines of "For Ironwail to automatically detect your Quake installation, install Quake from Steam to the default location and not external media. If your Quake installation is set up differently, please copy or symlink the id1 folder to ..."

@fpiesche
Copy link

for users to then override if they need/want to.

But Flatpak does not yet support asking for permissions for a location, right?

It does not. There is a graphical application for adjusting permissions though - and honestly if we set this up right it shouldn't be necessary really.

That's sadly not in line with Ironwail's "zero setup" route to autodetect the Steam installation. May I suggest that you at least add the default Quake 1 of Steam with Proton path to the permissions and change the prompt say something along the lines of "For Ironwail to automatically detect your Quake installation, install Quake from Steam to the default location and not external media. If your Quake installation is set up differently, please copy or symlink the id1 folder to ..."

That's a very good thought - I'll give that a try when I have a few minutes to breathe. Sorry for the long silence; life's been pretty full on the past few weeks.

@fpiesche
Copy link

fpiesche commented Feb 4, 2024

That's sadly not in line with Ironwail's "zero setup" route to autodetect the Steam installation. May I suggest that you at least add the default Quake 1 of Steam with Proton path to the permissions and change the prompt say something along the lines of "For Ironwail to automatically detect your Quake installation, install Quake from Steam to the default location and not external media. If your Quake installation is set up differently, please copy or symlink the id1 folder to ..."

I've been trying to get this to work but it's a bit difficult - the problem is that Ironwail outputs error messages when e.g. finding Quake game data only to the terminal, which means that if something goes wrong, the Flatpak launched from a desktop/app launcher shortcut (as is the intended use for Flatpaks) would just exit silently with no feedback, which I'm sure you'll agree is a bad way to do things.

The way I've tried to mitigate this is this:

  • If $XDG_DATA_HOME/id1/pak0.pak exists, run Ironwail with -basedir $XDG_DATA_HOME.
  • If there's no game data in $XDG_DATA_HOME/id1:
    • If there's also no $HOME/.steam/steam/steamapps/common/Quake (the default installation path on Linux), exit with a dialog saying to either install Quake to the default path via Steam or copy the game data to the Flatpak $XDG_DATA_HOME[1].
    • If there is a $HOME/.steam/steam/steamapps/common/Quake, run Ironwail without -basedir so its automatic detection can kick in.
    • However, if Ironwail then exits with a non-zero error code (eg. if the Steam Quake directory exists but is empty, or Ironwail fails to parse the Steam library/app data, etc), exit with a dialog asking users to run the Flatpak from a terminal to get a detailed error message [2]

[1] Screenshot_20240204_133356
[2] Screenshot_20240204_133224

Does that sound like a reasonable approach?

@KAMiKAZOW
Copy link

  * If there's also no `$HOME/.steam/steam/steamapps/common/Quake` (the default installation path on Linux)

Btw, the default changed to $HOME/.local/share/Steam/steamapps/common/Quake/ at some point. That's where it's on my fresh SteamOS installation.

Does that sound like a reasonable approach?

Yes, sounds great.

@fpiesche
Copy link

fpiesche commented Feb 7, 2024

Btw, the default changed to $HOME/.local/share/Steam/steamapps/common/Quake/ at some point. That's where it's on my fresh SteamOS installation.

Ah, I didn't realise that - fixed that :)

@mikae1
Copy link

mikae1 commented Jul 5, 2024

Really hoping for this to materialize as I'm on an atomic distro where ironwail depedencies can't be installed without drawbacks. 🙌 Right now I'm stuck with the Quakespasm Flatpak.

@mooreye
Copy link

mooreye commented Jul 31, 2024

What's the status of this? I really need this as my distro doesn't package ironwail 🫤

@fpiesche
Copy link

Just need #301 to get merged and @andrei-drexler to give approval for me to submit to Flathub... in the meantime if you don't urgently need Ironwail's improvements, there is already a flatpak for QuakeSpasm at least.

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

No branches or pull requests

7 participants