deltachat-desktop icon indicating copy to clipboard operation
deltachat-desktop copied to clipboard

Build a snapcraft.io package

Open link2xt opened this issue 5 years ago • 9 comments
trafficstars

electron-builder seems to be able to build snap packages: https://snapcraft.io/docs/electron-apps

link2xt avatar May 03 '20 02:05 link2xt

This builds by adding a "dist": "electron-builder build --linux snap" line to the scripts in package.json. The result ends up in dists/deltachat-desktop_*.snap and can be installed with sudo snap install dists/deltachat-desktop*.snap --dangerous --devmode. However when running it does not seem to be able to access an existing $XDG_CONFIG_DIR/DeltaChat directory. And even worse after configuring an account the chatview is entirely broken.

flub avatar May 03 '20 15:05 flub

We're already having problems with the AppImage and windows builds. It feels like it's just adding an option to electron builder but in reality it's nothing that easy. The AppImage is lacking dependencies and whatnot. Also i'm neither using snap or flatpak and don't really want to maintain another platform. If somebody maintains it i'm happy to get it in.

Jikstra avatar May 03 '20 16:05 Jikstra

Resulting snap package does not work for me:

Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /snap/deltachat-desktop/x1/resources/app.asar.unpacked/node_modules/deltachat-node/build/Release/deltachat.node)

link2xt avatar May 03 '20 16:05 link2xt

Best would be to find someone who is interested in properly maintaining this, and preferably out of the main repo like flatpak is imho. I was only playing with it a bit to see if I could gets something to work easily, turns out not.

flub avatar May 03 '20 18:05 flub

Looks like electron-builder is doing it wrong. It is better to build it on Ubuntu 20.04 with snapcraft and https://multipass.run/ and then hand it over to CI, rather than building on dev machines.

link2xt avatar May 03 '20 19:05 link2xt

Electron Forge also supports Snapcraft: https://www.electronforge.io/config/makers/snapcraft

link2xt avatar Jul 04 '23 17:07 link2xt

There is now an unofficial snap package at https://snapcraft.io/deltachat-desktop

link2xt avatar Sep 05 '23 11:09 link2xt

Let's reopen it to track necessary fixes.

Repository with snapcraft.yml: https://github.com/nbuechner/deltachat-snap/ It does not use electron-builder ability to create snaps, but repackages .deb instead.

Currently snap is built with a patch to disable tray icon: https://github.com/deltachat/deltachat-desktop/commit/4c2b26904bcea6ee1d6ecf66347951919d24fe9a / https://github.com/nbuechner/deltachat-desktop/commit/4c2b26904bcea6ee1d6ecf66347951919d24fe9a Maybe related issue: https://github.com/electron/electron/issues/26854

Probably makes sense to look at signal-desktop snap: https://github.com/snapcrafters/signal-desktop They set environment variable GTK_USE_PORTAL: "1" which may be necessary to have working tray icon. Here users complain about closing turning signal into (invisible?) tray icon: https://github.com/snapcrafters/signal-desktop/issues/143

Related issue about not visible tray icon: https://github.com/snapcrafters/signal-desktop/issues/87

cc @nbuechner

link2xt avatar Sep 05 '23 19:09 link2xt

@nbuechner Could you try the solution proposed in https://github.com/signalapp/Signal-Desktop/issues/6243#issuecomment-1574063892 ?

Currently you install libappindicator: https://github.com/nbuechner/deltachat-snap/blob/8416dda9a94ec92cd906d588c53644b64f3acb52/snapcraft.yaml#L36

link2xt avatar Sep 05 '23 20:09 link2xt