Closed nils2614 closed 4 years ago
@nilsoffermann I have never used Flatpak-distributed app before. But I will try to learn and package it at the weekend.
I was going to flatpak this up but I couldn't get this working without a flatpak on Fedora 32.
So, maybe I'll save you some time with parts of flatpak manifest already built. believe the python pip dependency is complete, maybe you want to restrict on pip versions (the dependency generator doesn't support poetry).
cat com.github.hongquan.CoBang.json
{
"app-id": "com.github.hongquan.cobang",
"runtime": "org.gnome.Platform",
"runtime-version": "3.36",
"sdk": "org.gnome.Sdk",
"command": "cobang",
"finish-args": [
"--socket=wayland"
],
"modules": [
{
"name": "cobang",
"sources": [
"cobang-deps.json",
{
"type": "github",
"url": "https://github.com/hongquan/CoBang.git",
"commit": "c491f6b4b6cec1fd3080bfc6fe9913bc63284ee9"
}
]
}
]
}
1) Command will build the python dependencies 2) Command will build the flatpak
https://github.com/flatpak/flatpak-builder-tools/tree/master/pip
python flatpak-pip-generator \
pycairo \
regex \
pygobject \
toml \
typed-ast \
wcwidth \
black \
logbook \
pygobject-stubs \
pytest \
single-version \
zbar-py \
--output cobang-deps
flatpak-builder --force-clean --user --install --install-deps-from=flathub flatpak-build com.github.hongquan.CoBang.json
Thanks, I'm trying to Flatpak, too. But it turns out that it has some disadvantage:
The Python version is limited by the Sdk provided by Flatpak. The latest one provides Python 3.7, while if we build as *.deb for Ubuntu 20.04, we can use Python 3.8 (and hence, can drop some dependencies, whose feature is already provided by Python 3.8).
The developer (author) has to do more building job. For example, my app is using one utility from Cheese. If package as *.deb, I just specify gir1.2-cheese-3.0
in my dependency list, but for Flatpak, I am having to instruct Flatpak to build Cheese from source!
The Python version is limited by the Sdk provided by Flatpak.
Which SDK and version are you referring to?
@lightonflux I use the latest one. Here are what in my machine:
❯ flatpak list
Name Application ID Version Branch Installation
Foliate com.github.johnfactotum.Foliate 2.2.0 stable system
default org.freedesktop.Platform.GL.default 19.08 system
Intel org.freedesktop.Platform.VAAPI.Intel 19.08 system
openh264 org.freedesktop.Platform.openh264 2.0 system
Fractal org.gnome.Fractal 4.2.2 stable system
GNOME Application Platform version 3.36 org.gnome.Platform 3.36 system
GNOME Software Development Kit version 3.36 org.gnome.Sdk 3.36 system
Yaru Gtk Theme org.gtk.Gtk3theme.Yaru 3.22 system
Now it is possible to build as Flatpak from the source folder. Please checkout master
branch of today, then run:
flatpak-builder _build --force-clean vn.hoabinh.quan.CoBang.yaml
to build.
To test, run:
flatpak-builder --run _build vn.hoabinh.quan.CoBang.yaml cobang
I haven't published to FlatHub yet.
The Flatpak build script is not working if I am running it in an separate, empty folder (when testing before app submission). That is why it is not published to FlatHub yet.
Submitting app to FlatHub: https://github.com/flathub/flathub/pull/1565
After so many effort, CoBang is already published to FlatHub: https://github.com/flathub/vn.hoabinh.quan.CoBang
Release v0.4.0 is being built and should be available soon.
I really like this project and that it's a native GTK app without a dependency on X. Sadly I'm not on Ubuntu and I understand that I'd be too big of a hassle to package it for all the relevant distros out there. So could you package it as a Flatpak besides a native Ubuntu package please? That way all the people on the many distros that support Flatpak out of the box could easily find it in their software centers. That would also make it work on Silverblue :D