Electron-builder: Windows building Electron App for Mac

Created on 8 Aug 2018  路  4Comments  路  Source: electron-userland/electron-builder



20.26.1


20.26.1


Used a basic Electron template to put web application in place of the template code. Kept the main.js etc files mostly the same (save for changing icons, tooltips, etc).

When I go to the console and use npm run dist --win --mac despite having package.json with build.mac key value pairs, it still builds the windows version only. Although the windows version works perfectly, no mac version is created. What am I missing? My package.json has build.mac.target = "dmg", but I saw in examples online that that's all you needed (I might need some correction on this).

backlog

Most helpful comment

Try $ npm run dist -- --win --mac. Note the extra --, which is required in order for npm run to forward the rest of the arguments to the dist command.

Also, note that while you can only build dmg files on macOS, you can still build a .zip build for macOS using --mac zip or "mac": { "target": "zip" }.

All 4 comments

Try $ npm run dist -- --win --mac. Note the extra --, which is required in order for npm run to forward the rest of the arguments to the dist command.

Also, note that while you can only build dmg files on macOS, you can still build a .zip build for macOS using --mac zip or "mac": { "target": "zip" }.

@candelariajr I have the same problem, Did you solve a problem?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings