Skip to content

[Packaging] Add experimental Flatpak support

Jente Hidskes requested to merge julianrichen:flatpak into master

Created by: julianrichen

This pr adds an initial flatpak manifest and should close #71 (closed). I would recommend changing the gcolor3.svg, gcolor3.desktop, & gcolor3.appdata.xml file from gcolor.* to org.unia.gcolor3.* since flatpak automatically looks for those files based on the application id. It would also be needed since the the shell will look for org.unia.gcolor3.svg but your application will look for gcolor3.svg in the About modal window.

Things seem to be working and I added --socket=wayland but obviously because of #67 it won't work 100% on wayland. Didn't try x11 since I use wayland.

Build

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub org.gnome.Platform//3.26
flatpak --user install flathub org.gnome.Sdk//3.26

flatpak-builder --force-clean --repo=repo gcolor3 org.unia.gcolor3.json
flatpak --user remote-add --no-gpg-verify --if-not-exists gcolor3 repo
flatpak --user install gcolor3 org.unia.gcolor3
flatpak --user update org.unia.gcolor3

flatpak run org.unia.gcolor3

Future

If you plan on following-up on #59 (closed) then you will need to add the following to finish-args:

"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",

Merge request reports