Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Flatpak
- - By Clonk-Karl [us] Date 2016-12-31 08:08
Flatpak is a relatively new package format for standalone apps on Linux. The advantage of it is that it is distribution-independent and therefore might fix those issues where someone could not use our Linux snapshots or release builds because they wouldn't work on their distribution.

I created an experimental OpenClonk flatpak which is based on the (also experimental) KDE flatpak runtime. It can be installed with the following commands when flatpak itself was installed with apt-get or friends:

flatpak remote-add kde --gpg-import=kdeflatpak.gpg
flatpak install --from

This should then make available an entry called "Openclonk (Snapshot)" in the list of installed applications, or one can run it from the command line with

flatpak run org.openclonk.openclonk

Would some Linuxers be willing to give this a try? If it works out I'm thinking of building these together with the snapshots and adding some instructions on the snapshots page, possibly replacing the Linux snapshots in the longer term.
Parent - By Maikel Date 2016-12-31 09:54
Flatpak only seems to be available for 16.04. As I am still on 14.04 for work reasons (i.e. don't change distro when working on projects!) I will test it later.
Parent - - By Luchs Date 2016-12-31 13:19
It doesn't work here due to this issue:

Apparently you have to bundle the NVIDIA driver as well to make it work? This is a bit weird.
Parent - By Clonk-Karl [us] Date 2016-12-31 23:04
That sucks :(. But yeah, I've only tried it on an Intel GPU so far.
Parent - - By Caesar [jp] Date 2018-03-03 06:08 Edited 2018-03-05 11:52
Does that problem still exist?

(I had all forgotten about this thread and made a flatpak build myself… :/ I don't have an Nvidia GPU either, in case anyone wants to try it with OC 8.0:

{{apt,dnf} install,pacman -S} flatpak-builder
flatpak remote-add --user --if-not-exists flathub
flatpak install --user flathub org.kde.Platform//5.10 org.kde.Sdk//5.10
git clone && cd openclonk-flatpak
flatpak-builder --force-clean app-dir org.openclonk.FlatApp.json
flatpak-builder --run app-dir org.openclonk.FlatApp.json openclonk

(and if sourceforge is still down: wget -O.flatpak-builder/downloads/04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95/glew-2.1.0.tgz))
Parent - - By Caesar [jp] Date 2018-03-05 10:24
I just tried this on a work computer. Seems like the problem is gone. So... whaddayall think about distributing Linux OC this way?
Parent - - By Fulgen [at] Date 2018-03-07 12:29
Does this mean OC starts shipping needed libraries, as Windows programs do? I don't wanna have 30 copies of the same library on my PC...
Parent - By Luchs Date 2018-03-07 14:25
You can still build from source just fine. Flatpak also limits the duplication by building on common platforms.
Parent - By Caesar [jp] Date 2018-03-07 16:42 Edited 2018-03-07 16:46
Currently, I need three extra libs on top of the base image, and they make up for very little of the of the total game size… (In theory, flatpak should be able to de-duplicate libraries between packages, but that's probably not going to help much, given that packages are going to use different versions…)
Parent - - By Caesar [jp] Date 2018-03-07 16:38
So on IRC, there were a few questions:

1) Can I make a version that is not compiled from source? — Yes: flatpak --user install
2) If we throw this into flathub, do we need a maintainer? — No.
The process is that you apply, and they give you write access to a repo from where apps are built by some CI.
That being said, the requirements are numerous, and especially our licensing with ISC, CC-BY-SA, Clonk-Trademark and the Ala-Music-License may cause a bit of a headache… Given that we can just distribute a flatpakref or flatpakrepo file, there is little incentive for us to do this right now.
3) What about nix? — It is awesome. We should write the main repo maintainers an e-mail and ask them about a version bump. But that's OT.

Apart from that: It would be really nice to have https for the downloads for this (because the flatpakref/repo files contain GPG public keys), but that goes for the rest of the files we distribute, too… Also, an extra .tar (not .ocg) file that contains only the ala's music may lessen the license headache a little bit; for the normal distro maintainers, too.
Parent - - By Caesar [jp] Date 2018-03-17 05:39
I think I have everything together for fulfilling at least the basic requirements for a submission. Any arguments for or against me making that application? (Of course, I'll have to maintain it…)
Parent - - By Zapper [de] Date 2018-03-17 11:43
I still have no idea about what the advantages would be. But I trust you and if you say, you'll maintain it. Sure, why not?
Parent - By Caesar [jp] Date 2018-03-18 05:19
Advantages of just using flatpak: It's available via many distros, and it gives OC an easy and distro-agnostic install path.
Advantages of flathub: Hm. A little bit of visibility. And that I don't have the additional hassle of building things myself and placing files on our download page.
Parent - By Caesar [jp] Date 2018-03-18 14:44
Btw, does anyone have any comments on my OARS-fillout?
- - By Caesar Date 2018-04-01 14:11
So this just happened, OC is now installable via flatpak from flathub, (or, as a front-end, GNOME Software). For now, I'm shipping it without the scenario editor, because the flatpak sandbox breaks the file open dialogue (There is a thing called portals which can be used to access outside files, but that would require some work, since we need entire folders. I suppose at some point, I'll reactivate the editor, but deactivate the button, so you can at least still use it to join network editor rounds?) I'd be happy if someone besides me could take it for a test drive.
flatpak remote-add --user --if-not-exists flathub
flatpak install --user flathub org.openclonk.OpenClonk
flatpak run org.openclonk.OpenClonk

I'll see if I can find the time to write a blog post this week…
Parent - - By Luchs Date 2018-04-01 15:30
Cool! We should probably also update the download page. Is there somewhere we could link to?
Parent - - By Caesar Date 2018-04-02 11:08 Edited 2018-04-02 12:05
We can directly link to the flatpakref. Their website is currently in a bit of a weird state, both and seem a bit broken to me… (and the github repo doesn't seem like such an interesting link target.)

[Edit:] Ah, exists. No idea whether we want to link that anywhere, though.
Parent - - By B_E Date 2018-04-14 12:11
They've now released their beta page, so you can probably just link it.
Parent - By Caesar [jp] Date 2018-04-14 16:10
Ty. (already happened on the blogpost draft… Still some woes with the editor before I post that one, though.)
Parent - - By Luchs Date 2018-04-15 17:08
Looks like they categorize applications in Free/Proprietary, and the OpenClonk flatpack package is now listed as proprietary due to the music. I wonder whether we should have a separate package without the non-free music?
Parent - By Caesar Date 2018-04-16 00:17
I don't know whether that's worth anything. Not like you could go and get the sources from flatpak anyway.

My personal preference for this would be to have the music on larrry and display a download hint upon first start.
Parent - - By Zapper [de] Date 2018-04-16 12:37
Yeah. Imo don't include the extended music then. I don't like OC being classified as proprietary :I

At some point, the music could be available on larry - and the author could upload it himself so it's clear that we don't violate any license.
Parent - By Caesar Date 2018-04-17 00:39
Meh, I didn't really want to do this. Few people less who'll get to hear it.
Parent - - By Clonkonaut Date 2018-04-17 12:39
OC for Linux got the music bundled in?
Parent - - By Luchs Date 2018-04-17 16:28
Caesar's flatpak package did. There's really no easy or obvious way to otherwise get the music.
Parent - - By K-Pone [de] Date 2018-04-18 17:51
Which one is included? Just mine or ala's music too?
Parent - By Caesar [jp] Date 2018-04-20 10:43
Just yours now. (Because it's free and I can. :p)
Up Topic Development / Developer's Corner / Flatpak

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill