[Solved] Installer for Electron app with native Node modules - possible?


#1

Hi community,

I’m an Electron noob and want to figure out whether I can use Electron for my purposes. I hope you can help me with my decision :slight_smile:

Here’s what I plan to develop:

  • an application for macOS and Windows
  • that resides in the system tray of the respective OS
  • and uses a Node package containing native code (namely, the midi package)

The midi library uses node-gyp to create the OS-dependent native code.

I found some info in the docs that in principle it is possible to include native libraries in Electron apps, using a tool called electron-rebuild.

But I could not figure out if it is possible to create installers for macOS and Windows where this “magic” has already been done, so that a user just has to install the app (drop it into the app folder on Mac / install via setup.exe on Windows) and can use it. Is there a way to do this? My target group is musicians not tech specialists, so the setup has to be as simple as possible.

Thanks in advance for sharing your insights, Tom


#2

I found out this is possible with electron-builder. Awesome.