Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Flatpakization #157

Closed
wants to merge 3 commits into from
Closed

Flatpakization #157

wants to merge 3 commits into from

Conversation

mattiasb
Copy link
Contributor

Make it possible to ship Gnome Twitch as a flatpak.

This pull request is made in haste, and there might be issues with it
but I prefer getting it out there as soon as possible since the changes
touches a lot of code.

The main thing is to use more idiomatic ways of doing things in regards
to the app id, dbus channel, icons, settings and resources etc to make
flatpak-builder happily make packages without complaining.

This was done at GUADEC as part of the flatpak workshop there. A lot
of GNOME people here has been impressed by the quality of gnome-twitch
when I've shown them, so congrats on a great application! :)

@mattiasb
Copy link
Contributor Author

Bastien was interested in this PR so @hadess

@vinszent
Copy link
Owner

Awesome, thanks for investing your time into this! I was at GUADEC last year (when it was close hehe).

I'm able to build and install it, but I get errors when trying to run it:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

Which seems to be related to this.

Seeing as GT is an app related to games, a large amount of people using GT would have either NVIDIA or ATI graphics cards, so this is a blocker.

Personally I've been looking into Snap packages a bit, which seems promising although I've had most success with AppImage in the past. Either way having some kind of universal package is definitely a requirement to be ready for the future.

@mattiasb
Copy link
Contributor Author

Awesome, thanks for investing your time into this!
I was at GUADEC last year (when it was close hehe).

Oh nice! I was part of the organizing team that year. :)

Seeing as GT is an app related to games, a large amount of people using GT
would have either NVIDIA or ATI graphics cards, so this is a blocker.

I personally see no harm in shipping a flatpak as a tech preview until this is sorted out. We don't really have an app store in place yet anyways so it's still early. :)

I'll try to revisit these patches soonish and clean them up a bit. Thanks for the enthusiasm! :)

@vinszent
Copy link
Owner

Well I actually got it working 🎉 . The new default backend player in v0.3.0 is actually the new GStreamer-Cairo one which doesn't use any OpenGL. I was able to make both a FlatPak package (with some modifications to your script) and a Snap package. I'll integrate your PR as soon as I get the app id sorted out (I think I'll usecom.vinszent.GnomeTwitch ).

@mattiasb
Copy link
Contributor Author

Wohoo! :)

@mattiasb
Copy link
Contributor Author

I think I'll usecom.vinszent.GnomeTwitch

Do you plan on registering that domain btw? Not that the risk of namespace clashes are big, but the namespace are supposed (I think) to reflect a domain you own.

@vinszent
Copy link
Owner

vinszent commented Aug 18, 2016

Ya I'm going to register it tonight ;)

EDIT: Done

@probonopd
Copy link

I've had most success with AppImage in the past

If ppa:samoilov-lex/gnome-twitch could provide a deb for trusty, then it would be relatively easy to make an AppImage out of it that would run on more than just the very latest distributions.

@vinszent
Copy link
Owner

@probonopd Probably won't happen for Trusty because GT depends on a recent version of Meson to build and GTK+ 3.20 which aren't available in 14.04.

@mattiasb
Copy link
Contributor Author

mattiasb commented Sep 8, 2016

Updated this for latest master.

For testing check out my branch and do:

$ git reset HEAD^ --hard
$ flatpak-builder --repo=../repo flatpak com.vinszent.GnomeTwitch.json

Before merge do

$ git rebase --interactive --autosquash HEAD^^

@mattiasb
Copy link
Contributor Author

Rebased against master again. Any chance this will get merged? :)

@vinszent
Copy link
Owner

Yes of course! I'm trying to get a fileserver up and running (on VPS) to be able to host the OStree. Once I'm done with that I will merge this.

Also I kinda don't want to rename the icon... It seems to be pretty split on whether it should have it or not (looking at GNOME's git). Some icon themes already have variants for the gnome-twitch icon and renaming it would just cause them to break.

Plus it's technically not included in this list https://wiki.gnome.org/HowDoI/ChooseApplicationID 😛

@mattiasb
Copy link
Contributor Author

mattiasb commented Sep 15, 2016

That's awesome!! Regarding the hosting! :)

Hm. It seems important for flatpak-builder though, as it won't export it otherwise.

In the old days of "one distro, one set of packages"-world, not namespacing kind of works but since flatpaks are meant to be installed directly from upstream I see conflicts happening rather fast. Hm.

@mattiasb
Copy link
Contributor Author

Regarding gnome git most of them should probably just rename their icons. I know nautilus did just recently as part of becoming a flatpak. :)

@vinszent
Copy link
Owner

Oh well, I guess it's better to do it now rather than later then.

@mattiasb
Copy link
Contributor Author

Yeah, sorry for the trouble. We're walking into new territory here...

- Emacs temp files
- flatpak-builder files
Since the app icon needs to exist on the host file system it needs to be
properly name spaced, otherwise it might conflict with other
applications.

In a non-flatpak world this is just good style.
{
"type": "script",
"dest-filename": "configure",
"commands": [
Copy link

Choose a reason for hiding this comment

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

Why not add those as files on the local filesystem instead? I'd create a separate flatpak directory, and put all the files in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, yeah makes sense.

"sources": [
{
"type": "git",
"url": "https://github.com/mattiasb/gnome-twitch.git",
Copy link

Choose a reason for hiding this comment

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

Wrong URL for merging.

Copy link
Contributor Author

@mattiasb mattiasb Oct 14, 2016

Choose a reason for hiding this comment

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

Yeah I know. I had a !fixup-commit for that, but I must have dropped it.

}
]
}, {
"name": "gst-libav",
Copy link

Choose a reason for hiding this comment

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

Could be in a separate package as well. See flatpak/flatpak#123

@mattiasb mattiasb mentioned this pull request Oct 15, 2016
@mattiasb
Copy link
Contributor Author

mattiasb commented Oct 15, 2016

Made a separate PR for an alternate solution based on hadess suggestions #202.

@vinszent vinszent closed this Oct 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants