Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows binary build issue #512

Closed
heapwolf opened this issue Oct 21, 2016 · 1 comment
Closed

Windows binary build issue #512

heapwolf opened this issue Oct 21, 2016 · 1 comment
Labels
question ❓ Question about using Electron Packager. Not supported in this issue tracker.

Comments

@heapwolf
Copy link

heapwolf commented Oct 21, 2016

On any version of electron-packager, when building a binary for win32 / x64 on macOS, i get the console error %1 is not a valid Win32 application after trying to run the app. This message relates to a native module (leveldown), but seems to be the same error with any native module.

electron-packager . ${PRODUCT} \
  --platform=win32 \
  --arch=x64 \
  --version=${ELECTRON_VERSION:1} \
  --overwrite \
  --icon="${PROJECT}/static/icon.icns" \
  --out=./pkg \
  --ignore="${IGNORE}"

Any ideas what might case this?

@malept malept added the question ❓ Question about using Electron Packager. Not supported in this issue tracker. label Oct 21, 2016
@malept
Copy link
Member

malept commented Oct 21, 2016

This is a limitation of the Node ecosystem rather than Electron Packager. In order to build Electron apps with native module dependencies, you need to be able to build the native module for the target platform/arch. Node (and by which I usually mean node-gyp) does not currently support cross compilation at the time of writing this comment. The workaround is to build apps on the same host platform as the target platform.

@malept malept closed this as completed Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❓ Question about using Electron Packager. Not supported in this issue tracker.
Projects
None yet
Development

No branches or pull requests

2 participants