electron-api-demos icon indicating copy to clipboard operation
electron-api-demos copied to clipboard

How to build for distribution?

Open ghost opened this issue 5 years ago • 2 comments

  • What operating system are you using? Mac OSX
  • What version of Node.js is on your system? 13.8

In the package.json are various scripts like package and package:mac

What's the process for building the application for mac and windows?

ghost avatar Feb 17 '20 09:02 ghost

No I don't have macosx

kiranchhetri1 avatar Apr 11 '20 18:04 kiranchhetri1

Hi @petervandeput, you can use electron-builder for distribution.

npm i -D electron-builder

After that, you can create scripts in package.json like this:

"script": {
     "mac:build": "electron-builder --macos --dir",
     "build:windows": "electron-builder --win --dir"
}

It will create a directory called dist with program-name.app and if you want to create *.dmg file, you must execute electron-builder --macos.

I hope that it can help you.

victorhsn avatar May 07 '20 16:05 victorhsn