DEV Community

loading...
Cover image for Test an Electron built snap package

Test an Electron built snap package

lomby92 profile image Giacomo Lombardi ・1 min read

Context

Electron is a very powerful tool to develop cross-platform apps. It also simplify the building process thanks to the electron-builder that targets Windows, MacOS and Linux.

Linux builds have many choices, rpm and deb are the most common ones as they target Debian and Red-Hat distros.

In 2014 Canonical started to develop a new package manager, snap that now is supported by all main distributions.

One release to rule them all
Enter fullscreen mode Exit fullscreen mode

The electron-builder creates a .snap file, but it is not executable.


Test the .snap file

A snap file is basically a single compressed filesystem using SquashFS. In order to test it we need to mount/uncompress the file.

1) unpack the snap file: unsquashfs -d /tmp/ <folder that will be created> <.snap file>
2) move to the newly created folder with unpacked data
3) the app should be in the root, just execute it

Note: i choose /tmp folder but anyone can choose where to unpack the snap file


Try a snap file is really really easy but nowhere I found how to do it, hope that this short post will help you.

Maybe more posts about snap will follow

Discussion (0)

Forem Open with the Forem app