I'm cannot create Windows binaries on a Mac m1.
yishin opened this issue · comments
Summary
I just cloned the latest version of the source and created a binary,
but Windows binaries are not being created on my Mac M1.
Windows binaries were successfully created with my code from a previous source version.
What could be the problem?
-
clone
git clone --depth=1 https://github.com/electron-react-boilerplate/electron-react-boilerplate test
-
change directory
cd test
-
install & build
yarn && yarn build
-
package
yarn package --win --x64
To answer your question, please provide more information like a stacktrace.
First thing first, this command doesn't work as expected:
yarn package --win --x64
I made a change to the docs here: electron-react-boilerplate/docs#224
To build for a specific os, copy the package.json package
script and add an option for the os to electron-builder, in this case -w
.
E.g. to build for windows only the command should be:
ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build -w --publish never && npm run build:dll
Granted, I'm on an M2 Mac, not M1, but they should work the same.
Changing my package
command to ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build -w --x64 --publish never && npm run build:dll
works as expected.
@yishin I can confirm that I can create windows binaries, both ARM and X64 on a M1 Pro