writeas / writeas-gtk

Write.as desktop app for elementaryOS (a fork of writeas-gtk)
https://write.as/apps/desktop
GNU General Public License v3.0
21 stars 7 forks source link

Create a Flatpak Package For GTK App #29

Open BrainBlasted opened 5 years ago

BrainBlasted commented 5 years ago

This creates a development flatpak package for the desktop app. Includes a rework of the non-elementary version's app ID and a fix for an issue introduced in #28

BrainBlasted commented 5 years ago

The current issues:

BrainBlasted commented 5 years ago

Once we get the last two worked out can we merge this? It will be much easier for me to work on number 1 after that

BrainBlasted commented 5 years ago

In addition: should I look into getting flatpak CI set up, or should I make that a separate task?

thebaer commented 5 years ago
  • There's no way to authenticate from the UI, which means you can't actually publish from the app

Hm, you should be able to publish -- the writeas-cli doesn't require authentication to publish. Maybe it's related to the flatpak sandbox? Because the CLI does need access to ~/.writeas

In addition: should I look into getting flatpak CI set up, or should I make that a separate task?

I'd say we address this as a separate task. Please feel free to create that in Phabricator

BrainBlasted commented 5 years ago

Ah, apologies. The xclip issue is the only one that blocks publishing, then.

BrainBlasted commented 5 years ago

Fixed the publishing issue, will look into the draft issue next.

BrainBlasted commented 5 years ago

For now I added a sandbox hole to the flatpak. In the future I think we should migrate to using xdg dirs instead of a directory in ~/. Flatpak properly handles that use case by default.

BrainBlasted commented 5 years ago

I'd say that this is ready now.

thebaer commented 5 years ago

Great, sounds good. How can I test this out?

BrainBlasted commented 5 years ago

There are a few ways:

$ flatpak-builder --repo=repo app flatpak/com.abunchtell.WriteAsDesktop.json

Or I can send you a flatpak bundle. Which way would you prefer?

thebaer commented 5 years ago

Thanks! I'd like to personally know how everything works, so I'm happy to build everything

ghost commented 4 years ago

I'm having a tough time getting this working, now it's an error when running the built flatpak with flatpak run com.abunchtell.WriteAsDesktop:

Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown

This was after adding the local repo and installing for my user.

@thebaer needed dependencies with flatpak:

@BrainBlasted I couldn't find an easy way to install required dependencies so just kept installing whatever the builder comlained was missing.

BrainBlasted commented 4 years ago

@robjloranger do you have xdg-desktop-portal & xdg-desktop-portal-gtk installed?

ghost commented 4 years ago

@BrainBlasted tried again today and found another error building:

[0/1] Installing files.
Installing src/wl-copy to /app/bin
Installing src/wl-paste to /app/bin
Installing /run/build/wl-clipboard/data/wl-copy.1 to /app/share/man/man1
Installing /run/build/wl-clipboard/data/wl-paste.1 to /app/share/man/man1
Installing /run/build/wl-clipboard/data/wl-clipboard.1 to /app/share/man/man1
Installing /run/build/wl-clipboard/completions/bash/wl-copy to /app/share/bash-completion/completions
Installing /run/build/wl-clipboard/completions/bash/wl-paste to /app/share/bash-completion/completions
Installing /run/build/wl-clipboard/completions/zsh/_wl-copy to /app/share/zsh/site-functions
Installing /run/build/wl-clipboard/completions/zsh/_wl-paste to /app/share/zsh/site-functions
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 122, in run
    return options.run_func(options)
  File "/usr/lib/python3.7/site-packages/mesonbuild/minstall.py", line 514, in run
    installer.do_install(datafilename)
  File "/usr/lib/python3.7/site-packages/mesonbuild/minstall.py", line 346, in do_install
    self.install_data(d)
  File "/usr/lib/python3.7/site-packages/mesonbuild/minstall.py", line 375, in install_data
    d.dirmaker.makedirs(outdir, exist_ok=True)
  File "/usr/lib/python3.7/site-packages/mesonbuild/minstall.py", line 55, in makedirs
    os.makedirs(path, exist_ok=exist_ok)
  File "/usr/lib/python3.7/os.py", line 211, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.7/os.py", line 221, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/usr/share/fish'
FAILED: meson-install 
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
Error: module wl-clipboard: Child process exited with code 1

What version of python is required to build?

Also, are there any python modules required to build?

BrainBlasted commented 4 years ago

This isn't a python issue by rather an idea where a dependency requires a new cli flag. Working on updating things.