Skip to content

Bundling Electron apps

probonopd edited this page May 2, 2020 · 4 revisions

electron-builder has native AppImage generation, and there is a electron-builder appimage target for electron-forge. For Electron Packager and please see https://github.com/electron-userland/electron-builder#pack-only-in-a-distributable-format.

Don't forget to set a window icon (which will also be used for the Dock) with

win = new BrowserWindow({
   ...
   icon: path.join(__dirname, '/icon/Icon-512x512.png')
})

FATAL:setuid_sandbox_host.cc issue

Some distributions, e.g., Debian, don't set sysctl kernel.unprivileged_userns_clone=1 by default. Here is a workaround:

https://github.com/probonopd/nativefier-test/blob/e38bc4b39def3c27046de512e24a220bb9c3ced2/nativefier.bash#L41-L52

We'd be happy to hear whether there are better solutions.

References