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

Flatpak fixes #145

Merged
merged 1 commit into from
Apr 20, 2019
Merged

Conversation

refi64
Copy link
Contributor

@refi64 refi64 commented Apr 19, 2019

Ref. #111.

This does a couple of changes:

  • Changes installation to use pip, otherwise the data_files are not installed correctly.
  • Removes the manual /app or /usr prefixing, this was also causing everything to go under /app/usr instead of /app, which is why you needed all those manual environment overrides everywhere.
  • Deleted the stub configure and autogen.sh, there are better ways to do custom installations.
  • Removed the TODO, because AFAIK checking /.flatpak-info is pretty much the best way to see if you're running inside a Flatpak.
  • Switch to flatpak-pip-generator for generating the files to install.

Some notes:

  • The JSON formatting is a bit of a mess, is there a reason you didn't use the YAML?
  • The renaming of bin/uberwriter to uberwriter.in unfortunately broke installation a bit, since now it's installed as /app/bin/uberwriter.in / /usr/bin/uberwriter.in; personally I think it would work better to just leave it in bin...
  • pyenchant and pygtkspellcheck have both been abandoned (the former officially, the latter simply hasn't received updates in almost three years.)
  • I believe you can drop --filesystem=host if you switch to Gtk.FileChooserNative instead of Gtk.FileChooserDialog.

@goncalossilva
Copy link
Contributor

pyenchant and pygtkspellcheck have both been abandoned (the former officially, the latter simply hasn't received updates in almost three years.)

Gspell could be an option to remedy this moving forward? It also uses Enchant under the hood, but is built-in and apparently more actively maintained.

@somas95
Copy link
Collaborator

somas95 commented Apr 20, 2019

Removes the manual /app or /usr prefixing, this was also causing everything to go under /app/usr instead of /app, which is why you needed all those manual environment overrides everywhere.

In Arch things usually go under /usr, hence my decision. Anyway, they shouldn't go under /app/usr in any case, something I've must done wrong 🤔

Deleted the stub configure and autogen.sh, there are better ways to do custom installations.

Yes, those were legacy files

Switch to flatpak-pip-generator for generating the files to install.

Great! Packaging is definitively not my strong point. The only thing that worries me is if that will work for the Flathub json

The JSON formatting is a bit of a mess, is there a reason you didn't use the YAML?

In Flathub a lot of manifestos are in the JSON format, and we toke inspiration from those

The renaming of bin/uberwriter to uberwriter.in unfortunately broke installation a bit, since now it's installed as /app/bin/uberwriter.in / /usr/bin/uberwriter.in; personally I think it would work better to just leave it in bin...

This is because in preparation to an ongoing meson port, we changed some file locations. Sadly setuptools doesn't allow to rename files in an easy way. Yesterday I was fixing some things precisely in this installation scripts, and that was one of those.

pyenchant and pygtkspellcheck have both been abandoned (the former officially, the latter simply hasn't received updates in almost three years.)

I'm aware of that. I already thought on GSpell: https://github.com/UberWriter/uberwriter/issues/93, @goncalossilva had good eye for this one :)

I believe you can drop --filesystem=host if you switch to Gtk.FileChooserNative instead of Gtk.FileChooserDialog.

This is worth investigating. It would allow to edit things outside /home/user?

@somas95 somas95 changed the base branch from master to flatpak-improvements April 20, 2019 11:37
@somas95 somas95 merged commit 32bb70a into ApostropheEditor:flatpak-improvements Apr 20, 2019
@refi64
Copy link
Contributor Author

refi64 commented Apr 21, 2019

In Arch things usually go under /usr, hence my decision. Anyway, they shouldn't go under /app/usr in any case, something I've must done wrong 🤔

pip automatically handles installing into a prefix, so the Flatpak just now passes --prefix=/app to change it from the normal prefix.

Great! Packaging is definitively not my strong point. The only thing that worries me is if that will work for the Flathub json

Afaik it should be accepted, I'm pretty sure other Flathub packages do the same thing.

In Flathub a lot of manifestos are in the JSON format, and we toke inspiration from those

Then the indentation should likely be fixed, it was killing me. 🤣

This is worth investigating. It would allow to edit things outside /home/user?

Yup, the file chooser portal lets you edit files from anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants