deltachat-desktop
deltachat-desktop copied to clipboard
Build a snapcraft.io package
electron-builder seems to be able to build snap packages: https://snapcraft.io/docs/electron-apps
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.
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.
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)
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.
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.
Electron Forge also supports Snapcraft: https://www.electronforge.io/config/makers/snapcraft
There is now an unofficial snap package at https://snapcraft.io/deltachat-desktop
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
@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