I use electron to create cross-platform application. For Windows and Mac it could be done by electron tools, like autoUpdate, Squirrel, so on.
The problem is only with Linux. I have built a .deb package for Ubuntu. But I can't find any "step-by-step" instruction or comprehensive info about it.
I'm not familiar with java and hadn't experience with creating apps for Linux.
So the main questions are:
All information will be helpful, even the it (info) will not be related to electron app.
Open Source Apps - update.electronjs.org Open Source apps hosted on github.com can use a free auto update service from the Electron team, update.electronjs.org . To use this with Forge, set up the GitHub publisher and add the update-electron-app module to your app.
Electron is a framework for building cross-platform desktop applications with JavaScript, HTML and CSS. Because it is cross-platform, we can run the app in Windows, macOS, and Linux operating systems.
If you already have an electron project, then you can skip the previous article and continue from this one. Before starting the development, I would like to explain the flow. With auto updater, the app will check updates from Github every 10 minutes.
To build app for Windows on Linux:Install Wine (2.0+ is required) — see WineHQ Binary Packages. Install Mono (4.2+ is required) if you want to use Squirrel. Windows (NSIS, default target, doesn't require mono).
You can try electron-simple-updater if AppImage format is ok for your project.
You can use electron-builder
to create Appimages to install or auto-update you application almost in any Linux distribution
AppImage is a universal software package format. By packaging the software in AppImage, the developer provides just one file ‘to rule them all’. End user, i.e. you, can use it in most (if not all) modern Linux distributions
If you want to auto-update your app you will also need electron-autoupdater
. Targets:
You can find an example of a project that uses this here. The important files: package.json
, updater.js
, updater_renderer.js
With some of these instruction you can create the installers:
yarn electron-builder --linux --x64
yarn dist_linux # shortcut in package.json
You can create packages such as deb or rpm with electron-builder
, but to autoupdate them depends on how you distribute them as Jens says in his answer. The final user may need to add an apt repository to keep up to date
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With