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 manifest for building as a flatpak #13040

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cpba
Copy link
Contributor

@cpba cpba commented Aug 28, 2024

Includes the following:

  • org.DolphinEmu.dolphin-emu.metainfo.xml.in this file contains general information and metadata that is used by most linux based app stores (kde discover, gnome software, flathub.org, etc) to showcase dolphin.

  • fill_release_node.sh a script to automatically fill in the release information in the metainfo file when building the flatpak.

  • SDL2.json manifest to build the vendored version of SDL from the Exports directory, it's only temporarily needed until the kde runtime is updated with the current SDL2 version and should be deleted after.

  • org.DolphinEmu.dolphin-emu.yml the manifest itself.

@cpba
Copy link
Contributor Author

cpba commented Aug 28, 2024

Some other things I'm not sure about:

Regarding the metainfo file, it contains a releases node that can be used to hold some data on the current release. On flathub this node was automatically updated by the flathub-checker bot using data read from https://dolphin-emu.org/update/latest/beta but that wouldn't make sense here.

Perhaps the best solution would be to place it in the data directory and fill the release node during the cmake build. The file itself is an xdg standard and not flatpak specific so it would also be useful for deb/rpm and other kinds of builds.

Would this be a good solution?

The file also includes links to some screenshots, this are the screenshots that are shown on flathub and other app stores: https://flathub.org/apps/org.DolphinEmu.dolphin-emu
These screenshots are currenly hosted on flathub, but it would make more sense to move them somewhere on dolphin-emu.org. They are also quite old and low res, so it might be good to replace them with newer ones.

Are there any that you'd like to use?

@ColinKinloch
Copy link

SDL2-no-libdecor shouldn't be needed any more.
There are a few updates since 23.08 but I'm not sure any are relevant to dolphin.

@cpba
Copy link
Contributor Author

cpba commented Aug 29, 2024

SDL2-no-libdecor shouldn't be needed any more. There are a few updates since 23.08 but I'm not sure any are relevant to dolphin.

It's not necessary for dolphin-emu 2407, but versions 2407-232 and newer depend on 2.30.6, which made me bundle it because org.kde.Platform was only shipping 2.28.5 which I assumed was the same version as fdo 23.08.

Do you know if it has been updated recently?

@ColinKinloch
Copy link

Ah, never mind then.
I wonder what aspect of 2.30.6 specifically dolphin depends on.
It looks like freedesktop 24.08beta is shipping with 2.30 so it may only be a matter of days.

@cpba
Copy link
Contributor Author

cpba commented Aug 30, 2024

I wonder what aspect of 2.30.6 specifically dolphin depends on.

This is all I could find: #12144 (comment)

Most likely talking about the crash when a controller is disconnected mentioned in the release notes.

It looks like freedesktop 24.08beta is shipping with 2.30 so it may only be a matter of days.

Do you know if there'll be a 6.7-24.08 runtime?

@ColinKinloch
Copy link

Looking at the output of flatpak install org.kde.Platform: the 5.15 is the version that gets a suffix.
Which I guess implies that 24.08 will be the base for 6.8 or 6.7 will get updated.
The answer is probably here somewhere: https://invent.kde.org/packaging/flatpak-kde-runtime

@ColinKinloch
Copy link

I'd guess its more a matter of a couple of months rather than days 😅

Copy link
Member

@OatmealDome OatmealDome left a comment

Choose a reason for hiding this comment

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

Sorry about the delay. I've been occupied by other projects.

Also, extremely minor nitpick: I think we should name the containing folder Flatpak to match the capitalization of the other folders.

flatpak/org.DolphinEmu.dolphin-emu.yml Outdated Show resolved Hide resolved
flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml Outdated Show resolved Hide resolved
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2016 Jeremy Newton -->
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we need to update the copyright. We'll probably need to leave this part at the very least (metadata is CC-BY-SA 3.0).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Jeremy Newton is the maintainer of the fedora package from where this file was originally copied back in 2017, It's very likely that it has been entirely rewritten since then.

Changing the copyright is unlikely to be an issue if need be.

flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml Outdated Show resolved Hide resolved
flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml Outdated Show resolved Hide resolved
flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml Outdated Show resolved Hide resolved
flatpak/org.DolphinEmu.dolphin-emu.yml Outdated Show resolved Hide resolved
flatpak/org.DolphinEmu.dolphin-emu.yml Outdated Show resolved Hide resolved
@OatmealDome
Copy link
Member

Could you drop the final commit and squash everything?

About the release node commit: I believe you copied the generate-metainfo.sh script near verbatim from PCSX2. Unfortunately, that codebase is licensed under GPLv3, while Dolphin's code is GPLv2+. This might pose a licensing problem. I don't want to hold up this PR any further, so I think we should leave that out for now and fix it in a later PR.

includes the following:

- org.DolphinEmu.dolphin-emu.metainfo.xml.in this file contains general
  information and metadata that is used by most linux based app stores
  (kde discover, gnome software, flathub.org, etc) to showcase dolphin.
- fill_release_node.sh a script to automatically fill in the release
  information in the metainfo file when building the flatpak.
- SDL2.json manifest to build the vendored version of SDL from the
  Exports directory, it's only temporarily needed until the kde runtime
  is updated with the current SDL2 version and should be deleted after.
- org.DolphinEmu.dolphin-emu.yml the manifest itself.
@cpba
Copy link
Contributor Author

cpba commented Sep 11, 2024

Sorry I made a mess of the rebase, my tracking branch was on the wrong commit. I'll fix it.

@cpba
Copy link
Contributor Author

cpba commented Sep 11, 2024

Could you drop the final commit and squash everything?

About the release node commit: I believe you copied the generate-metainfo.sh script near verbatim from PCSX2. Unfortunately, that codebase is licensed under GPLv3, while Dolphin's code is GPLv2+. This might pose a licensing problem. I don't want to hold up this PR any further, so I think we should leave that out for now and fix it in a later PR.

Apologies I didn't realise the licensing would be incompatible.

It's a rather trivial shell script so I've written a simple four liner to replace it, I hope that's fine, if it isn't I can just delete it and squash again.

Thank you for your help, what's the next step? Should I be looking into integrating it with the ci?

@OatmealDome
Copy link
Member

I'll handle the CI infrastructure, so don't worry about that. Thanks for your work on the PR. Let me ask around and see if anyone has any problems with this. If there aren't, I'll merge.

this matches the version currently being served on flathub
git describe --tags appends the short hash, this cleans up the output so
that we only print the actual version string.
@cpba
Copy link
Contributor Author

cpba commented Sep 12, 2024

I fixed two small issues:

  • libevdev was one point release behind the one currently being used on flathub.
  • fill_release_node.sh would produce a version string that included the short hash of the commit.

I haven't squashed again in case you'd rather drop them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants