Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create App installer for windows - Electron (electron-packager, electron-builder)

Can someone help me with the following queries.

Whats the difference between the two? electron-packager and electron-builder.


I have used both. And both of them creates a .exe file.
But the one created with builder can be used independently(requires no other files)

The problem with the app(created from electron-builder) is that, everytime I run the app(MyApp) on Windows OS, there's something else(interface) that loads up, and then it takes a while for the app to start(maybe around 7-8 secs).

Have attached an image: enter image description here

Why can't I create an installer like other windows application. Where I install it once, and then run it from Programs -> MyApp

Please help/guide

Thank you !!

like image 543
Anish Nair Avatar asked Sep 21 '16 07:09

Anish Nair


1 Answers

Whats the difference between the two? electron-packager and electron-builder.

electron-builder includes electron-packager. electron-packager only pack your app, but electron-builder pack, build in distributable format (e.g. dmg, setup exe, AppImage) and publish to GitHub Releases or Bintray.

The problem with the app(created from electron-builder) is that, everytime I run the app(MyApp) on

You should handle Squirrel.Windows events, please see https://github.com/electron/windows-installer#handling-squirrel-events

Why can't I create an installer like other windows application.

Using electron-builder, you can — just set build.win.target to nsis and build.nsis.perMachine to true. Please see all available options — https://github.com/electron-userland/electron-builder/wiki/Options#NsisOptions

like image 53
develar Avatar answered Sep 17 '22 23:09

develar