Creating Windows Installer On Mac


#1

Hey everyone,

I was curious, what is the best utility to use to make a windows installer of my app on Mac? I have been trying to use grunt-electron-installer but, I’ve been having a lot of issues with it and haven’t been able to get it to function. Thanks for the help in advance!

-Alec


#2

I use electron-packager for this. I use npm as a build tool, this is from package.json:

"scripts"{
    "pack:win": "rm -rf build dist && electron-packager . yeti-desktop --asar --prune --platform=win32 --arch=x64 --version=0.33.0 --icon=src/images/favicon.ico --out=build",
    ...
},

If you need to ship an installer, check out electron-builder


#3

Hey @erikbean,
Thanks for the reply. I ended up going with electron-packager and electron-builder and its works pretty well! Thanks again.

-Alec


#4

Awesome! Feel free to continue this thread if you have any questions on configuration, etc.
One thing to be aware of is that Windows paths are limited (to 260 chars I believe), which doesn’t mesh well with the deeply-nested node_modules directory structure. That’s why we package as an asar archive.


#5

Good to know! Thanks again for the help. I do actually have one more question. Do you know if Electron is compatible with the Windows Store? Thanks again!

-Alec


#6

if you need a windows installer, you should make it on windows with grunt-electron-installer