-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Can not build the windows installer on macOS Catalina version 10.15 #4305
Comments
I think to build Windows app you need Window machine and to build mac app you need Mac machine. |
it works on older macOS |
@pashvin I have been able to build Windows apps on my macOS until the Catalina update. |
Same here.. Worked fine till Catalina update, now throwing same error as above. |
Catalina removed support for 32 bit apps (you can still create 64 bit builds). |
@jsgv Can not build with 64 bit either. |
You are building for win64, but the the software used to emulate windows on mac is called wine, and wine is 32bit. |
how to fix? |
That's a real bummer. I hoped to at least be able to build Windows x64 releases from macOS. Wine itself comes in x64 variant but it must use some 32 bit libraries that are not working on Catalina anymore. I guess I have to get VirtualBox going again. |
I was able to use Docker with the info provided in the docs to build a Windows (NSIS) release from my Mac (running Catalina). It was my first time using Docker. I am amazed. For convenience, the Docker script provided in the docs is as follows:
For my use case, I decided to separate release scripts for each platform my app supports (Mac and Windows) because I ran into a problem building a DMG from the Docker container. Instead, I can use the image above just to build and publish my Windows builds. After having previously relied upon 32-bit Wine, which always seemed less polished, I am thoroughly impressed with this new solution. For reference, my project is here. UPDATE: Fixed the formatting issue. Thanks @agrublev |
For those who try to copy your improperly formatted comment docker run --rm -ti \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine |
Hi I am new to docker and I have created an account and install the docker and all but can you please provide me the steps that I need to after that? |
After installing Docker, you should run the application on your computer. Then, in your terminal, you can paste the script above. That will get a Docker container configured with the environment needed to package your Electron app. From there, you can run the script you have defined in your app's package.json file to build your application. Electron Builder accepts flags to identify the target (e.g. "-w" as Windows). |
when i went to the second step : yarn & yarn electron-builder -w Why it pop up this error: Command "electron-builder" not found. |
|
I need to say that it is miracle. I couldn't even imagine that it will be fixed (because Windows is not OS). Thanks to @lutzroeder . |
It works for me. |
It works for me! Thank you! |
It works for me too! Thank you |
@HemalR I ran the 3 commands above on macOS and got a 45 MB installer? |
I'm lost for explanations 😕 I set up a new project (using my own repo) and the instructions as you did and got the same results as you. Why the discrepancy with my original project, I have no idea. 😕 Edit - Did some more testing (on the new repo vs the old one) The build command causing the big builds is:
Vs
I don't know what exactly the difference is nor its significance. Another point of note is that on the new test repo, the 'bigger' build is 86.6MB vs 149MB on the original - and I don't even have a suspicion about why that would be. |
@HemalR |
Yup agreed, not related. @lutzroeder Thanks a lot for the help (and for the Catalina fix). Much appreciated 👍 |
@lutzroeder Many thanks for the tips about |
Good for me |
Isn’t ia32 a separate architecture ? |
I'm 99% sure that electron by default builds only x64, not ia32, so it's expected that build for two architectures will be around twice in size. |
I build success in 22.6.1. |
• electron-builder version=22.7.0 os=19.5.0 Why? Just delete "msi" from "target", it works. |
@psiservices-ccounterman were you able to resolve this issue on your 10.13? |
Also waiting for that one |
@pedro-surf |
I installed the newest dev-build of wine and it supports 64-bit (wine64). Is here a dev-Version of electron-builder wich provide wine64? I linked wine to wine64 but I got this error |
I can create an nsis package (
Using versions: Electron Builder Version: 22.2.0 and this command:
BUT I cannot create an msi target. If I try with this configuration:
I get this error:
|
Same for me. Did you found any workaround? |
@pavelustenko I'm having to do msi builds on a VirtualBox VM. 😢 |
How do i update if using |
With yarn you can use "resolutions" |
@mmaietta thanks for that. I looked it up after your post and found |
• electron-builder version=21.2.0 os=19.0.0
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=6.0.12 appOutDir=dist/win-unpacked
• signing file=dist/win-unpacked/BUZZ.exe certificateFile=/Users/xling/buzzcodesigning/dialogic2018.pfx
• building target=nsis file=dist/buzz-installer-4.1.0.exe archs=x64 oneClick=true perMachine=false
• signing file=dist/win-unpacked/resources/elevate.exe certificateFile=/Users/xling/buzzcodesigning/dialogic2018.pfx
⨯ Exit code: ENOENT. spawn prlctl ENOENT stackTrace=
Error: Exit code: ENOENT. spawn prlctl ENOENT
at /Users/xling/workspace/git_bit/main/buzz_desktop/electron_app/node_modules/builder-util/src/util.ts:125:16
at exithandler (child_process.js:295:5)
at ChildProcess.errorhandler (child_process.js:307:5)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:236:12)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
The text was updated successfully, but these errors were encountered: