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

Build a snapcraft.io package #1593

Closed
link2xt opened this issue May 3, 2020 · 10 comments
Closed

Build a snapcraft.io package #1593

link2xt opened this issue May 3, 2020 · 10 comments
Labels
packaging Packaging/distribution related issues

Comments

@link2xt
Copy link
Collaborator

link2xt commented May 3, 2020

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

@flub
Copy link
Member

flub commented May 3, 2020

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.

@Jikstra
Copy link
Contributor

Jikstra commented May 3, 2020

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.

@link2xt
Copy link
Collaborator Author

link2xt commented May 3, 2020

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)

@flub
Copy link
Member

flub commented May 3, 2020 via email

@link2xt
Copy link
Collaborator Author

link2xt commented May 3, 2020

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.

@Simon-Laux Simon-Laux added the packaging Packaging/distribution related issues label Oct 13, 2020
@link2xt
Copy link
Collaborator Author

link2xt commented Jul 4, 2023

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

@link2xt
Copy link
Collaborator Author

link2xt commented Sep 5, 2023

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

@link2xt link2xt closed this as completed Sep 5, 2023
@link2xt link2xt reopened this Sep 5, 2023
@link2xt
Copy link
Collaborator Author

link2xt commented Sep 5, 2023

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: 4c2b269 / nbuechner@4c2b269
Maybe related issue: electron/electron#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: snapcrafters/signal-desktop#143

Related issue about not visible tray icon: snapcrafters/signal-desktop#87

cc @nbuechner

@link2xt
Copy link
Collaborator Author

link2xt commented Sep 5, 2023

@Simon-Laux
Copy link
Member

if the tray icon stuff is still an issue, then please file and track it under the community snap issue tracker (https://github.com/nbuechner/deltachat-snap/) unless there is sth. to do in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Packaging/distribution related issues
Projects
None yet
Development

No branches or pull requests

4 participants