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

Distribute via flatpak/flathub #132

Open
taaem opened this issue Jan 8, 2020 · 15 comments
Open

Distribute via flatpak/flathub #132

taaem opened this issue Jan 8, 2020 · 15 comments

Comments

@taaem
Copy link
Contributor

taaem commented Jan 8, 2020

Hello,
It would be very nice if there was an easier way of installing pympress on Linux, like more of a one-click-install instead of needing to hunt down dependencies.

My proposal would be to

  1. write a .desktop file so pympress is recognized by the operating system as graphical application and that it can be launched without a terminal
  2. Make a Flatpak, so you can include all (even operating system dependencies, like gstreamer,...) dependencies in a distributable format. For the flatpak manifest you can use the manifests on flathubs github repos as inspiration, there are python applications too.
  3. Submit the Flatpak to Flathub, so users on all Linux distributions can install pympress from their software center, and can find it from there if they're searching for presentation software.

I hope this is a possible way for pympress to be easier installable and get better visibility from users.

@Cimbali
Copy link
Owner

Cimbali commented Jan 8, 2020

A .desktop sure is a good starting point.

I don’t know flatpak, so I don’t know if that has any visibility or if the dependencies required can be properly expressed there. I’m a little wary of the following statement on their website, as I certainly don’t want to start distributing pygobject dependencies, introspection files, the gtk+ and poppler libraries, etc:

Full control over dependencies

Flatpak makes it easy to bundle your own libraries as part of your app.

The most proper way to distribute pympress on linux would be to build the deb/rpm/pacman packages and submit them to the appropriate distros. But I suppose every build process and every submission process are different, so I haven’t yet really looked into it.

@taaem
Copy link
Contributor Author

taaem commented Jan 8, 2020

Yes sure it would be the right way to use .deb/.rpm/...
but this is quite much to maintain and for Flatpak you could just maintain one package for all distributions (Fedora/Ubuntu/Arch/...) as they all have Flatpak available. And it should be possible to distribute the flatpak without Gtk,... libs as they are probably included in the base Gnome/Freedesktop image, but I'm not 100% sure on that.

@mans0954
Copy link
Contributor

mans0954 commented Jan 9, 2020

I'm very close to having a Debian/Ubuntu package ready: https://tracker.debian.org/pkg/pympress . A .desktop file would be good.

@FriedrichFroebel
Copy link
Contributor

I have been using the following .desktop file for quite some time now:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=pympress
Exec=python3 -m pympress
Icon=/opt/other-icons/pympress.png
Comment=A simple dual-screen PDF reader designed for presentations
Categories=Office
MimeType=application/pdf;

It probably is not perfect, but at least I did not have any problems with it.

@taaem
Copy link
Contributor Author

taaem commented Jan 9, 2020

I'm using:

[Desktop Entry]
Type=Application
Name=pympress
Comment=PDF presentation tool
Exec=pympress %f
Icon=pympress
Terminal=false
MimeType=application/pdf
Categories=Office;Viewer;Presentation;

@mans0954
Copy link
Contributor

Package now available in Debian Testing (Bullseye):

https://packages.debian.org/bullseye/pympress

And Ubuntu 20.04 (Focal):

https://packages.ubuntu.com/focal/pympress

@Cimbali
Copy link
Owner

Cimbali commented Jan 15, 2020

Looking real good, thanks @mans0954 ! I think on the dependencies side, you could add the ones that are listed in the README:

  • libgtk-3-0
  • libpoppler-glib8
  • libcairo2 (would already be an indirect dependency at this point)
  • python3-gi
  • python3-gi-cairo
  • gobject-introspection
  • libgirepository-1.0-1
  • gir1.2-gtk-3.0
  • gir1.2-poppler-0.18

Cimbali added a commit that referenced this issue Jan 26, 2020
@Cimbali
Copy link
Owner

Cimbali commented Jan 26, 2020

The README now contains simplified commands for more distros, and references @mans0954’s available packages. Please feel free to contribute a command for a missing linux system. It could be worth checking whether we can distribute/register with the system the .desktop as part of the pip installation.

On flatpak, I see there’s a lot of dependencies that are bundled together, as “runtimes”. This would take care of a lot of our dependencies, e.g. using org.gnome.Platform would provide Gtk, GObject Introspections, and PyGObject, which we need. However there is no mention of the other dependencies, in particular python and poppler.

It also does not seem easy to install this in a scratch prefix somewhere on my machine to explore the possibilities, even just adding repos asks for root permissions. I’d have to go through the trouble of making a virtual machine or install docker to be able to develop the package, so I’ll leave this open for now if someone else wants to take it up.

@taaem
Copy link
Contributor Author

taaem commented Jan 27, 2020

@Cimbali python should already be included in the org.gnome.Platform runtime afaik.
And for poppler you can look at: https://github.com/flathub/com.github.xournalpp.xournalpp/blob/master/com.github.xournalpp.xournalpp.yaml which also builds and includes poppler.

Also you shouldn't need root access to do anything with flatpak, try adding the --user flag which should force a user specific install directory instead of a global one.

@Cimbali
Copy link
Owner

Cimbali commented Jan 28, 2020

Ah thanks, that didn’t show up in the global help message. Will look into it then.

Cimbali added a commit that referenced this issue Feb 6, 2020
As part of improving installs, #132. For this, also rename the 128px
icon to simply pympress.png
Cimbali added a commit that referenced this issue Feb 6, 2020
As part of improving installs, #132. For this, also rename the 128px
icon to simply pympress.png
@Cimbali
Copy link
Owner

Cimbali commented Feb 6, 2020

Starting with version 1.5.2, pympress installed via pip also installs a desktop file and an icon file.

@Cimbali

This comment has been minimized.

@Cimbali
Copy link
Owner

Cimbali commented Apr 11, 2020

Better rpms now available on COPR

@mans0954
Copy link
Contributor

I've uploaded Pympress 1.5.3 to Debian (bullseye) https://packages.debian.org/bullseye/pympress .Sorry for not attending to this before now.

@Cimbali Cimbali changed the title Alternative way of distributing on Linux Distribute via flatpak/flathub Nov 26, 2022
@Cimbali
Copy link
Owner

Cimbali commented Nov 26, 2022

Refocused the issue as a .desktop file is included and installed in OS-specified place currently. If someone wants to package on flathub, they can, but I won’t have resources (mostly time) to do so myself.

smbct pushed a commit to smbct/pympress that referenced this issue Aug 4, 2023
smbct pushed a commit to smbct/pympress that referenced this issue Aug 4, 2023
As part of improving installs, Cimbali#132. For this, also rename the 128px
icon to simply pympress.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants