node-rcedit: macOS Catalina: wine doesn't work

Hi!

Looks like wine doesn’t work on macOS Catalina: https://forum.winehq.org/viewtopic.php?f=9&t=32590

% wine
zsh: bad CPU type in executable: wine

So, this package throws an error indeed. Example: https://github.com/electron/electron-packager/issues/1055

Would be nice to find a mitigation.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 39
  • Comments: 29 (3 by maintainers)

Most upvoted comments

When I install wine on my Mac via Homebrew, I get a /usr/local/bin/wine64 that works. If there were a 64-bit version of rcedit.exe, it would likely work with that wine binary.

  1. brew upgrade wine, make sure “/usr/local/bin/wine64” exist
  2. rm -rf ~/.wine
  3. edit “node_modules/rcedit/lib/rcedit.js”, change “wine” to “wine64” at line 42
  4. download “https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe”, rename to “rcedit.exe” and replace “node_modules/rcedit/bin/rcedit.exe”

It works!!!

ok actually I found a solution to my problem.

I have installed wine-stable using brew cask. when I run the wine command I get the known error % wine zsh: bad CPU type in executable: wine

but there is a proper binary installed as well, so I just used the command wine64 instead

Why isn’t anyone updating this repo with rcedit-x64 if that is the solution?

It won’t work because there’s no x64 version of wine for mac.

This is an issue with your install of wine, Catalina disables 32bit applications

After you homebrew, just alias wine to wine64

It won’t run 32 bit apps though.

… and replace “node_modules/rcedit/bin/rcedit.exe” …

can I ask what is the full path for that file? thanks

  1. brew install homebrew/cask/wine-stable Then mv /usr/local/bin/wine64 /usr/local/bin/wine

  2. download “https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe”, rename to “rcedit.exe” and replace “node_modules/rcedit/bin/rcedit.exe” (Thanks from https://github.com/electron/node-rcedit/issues/51#issuecomment-546234084)

It works!!!

@maximilianschmidt yep. I checked: ./node_modules/** (with deep folders) find ./node_modules -name rcedit And not found

wine64 start instate of wine start

… and replace “node_modules/rcedit/bin/rcedit.exe” …

can I ask what is the full path for that file? thanks

/usr/local/lib/node_modules/nativefier/node_modules/rcedit/bin/rcedit.exe

now I am confused why do I have to have npm installed?

Good one, just use wine64 instead!

Also: where/how does one acquire homebrew: I tried Google, all I get is Homebrew CPU, and the App Store only gives me brewing apps. 😃

After you homebrew, just alias wine to wine64

It won’t run 32 bit apps though.

my life is meaningless