Windows Installer via Electron



A client requested to switch their target environment deliverable, so I’ve got to figure out how to install our app on Windows via Electron. I’ve got the app installed bundled via Electron using meteor-desktop, and it’s running on Windows.


So, that’s really good. But how do I bundle it into an .exe file??? And then bundle it into an .msi distributable? Electron Forge? electron/window-installer? frozeman/meteor-build-client? Are there any verified tutorials or gists on getting from the Electron build to a Microsoft .exe?

If anybody has some pointers, I’d be super grateful. (I’m on a deadline, and this was a somewhat last minute change.)


The go-to solution for packaging Electron apps is electron builder:

This beast works as a charm and can even package native code into the installer. Haven’t used it with Meteor, though, since my Electron app is a Node / Express / React app.


Hrmmm… yet a 3rd or 4th compile strategy that’s not confirmed. This actually increases my current problem by adding more options I have to sift through. :frowning:

I’m on a deadline, and need something that’s confirmed to work with Meteor. Thank you for the lead though.


No problem. I can only confirm that electron-builder is a great tool. I tried out a lot of approaches until I found it. Unfortunately, my app is not Meteor-based, so I don’t know how you could combine that. In principle, electron-builder takes the sources of a regular Electron app (based on Node) and compiles it into executables. What does a build of an meteor app created with the omega packages create? Maybe you could just wrap these build artefacts? Have you asked the maintainers of these packages about building an EXE? Should be a quite common use-case for these packages.


So, electron-builder turned out to be the solution. Turn’s out it’s a dependency of the omega:meteor-desktop-bundler and meteor-desktop packages, so it was already part of the build pipeline. It was just buried as a deep dependency, and required using tools from the broader npm ecosystem on a Windows system.

Final solution was the following:

# deploy server meteor deploy --settings settings.json

# build the calculator for the local machine, with a connection to the production server
meteor --settings settings.json --mobile-server  

# bundle the app into an installer
npm run desktop -- build-installer

And it produces a very nice one-click installer to run on Windows. Big thanks to @waldgeist for the help!


Hey, happy to hear it works :+1: