macOS Catalina: wine doesn't work
antelle opened this issue ยท 29 comments
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: electron/packager#1055
Would be nice to find a mitigation.
This is an issue with your install of wine
, Catalina disables 32bit applications
@MarshallOfSound I think the answer is to add the x64 binary to node-rcedit (#50).
It won't work because there's no x64 version of wine for mac.
Then I suppose the workaround is to either run Windows in a VM, or Linux (with Wine) in a container/VM.
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.
- brew upgrade wine, make sure "/usr/local/bin/wine64" exist
- rm -rf ~/.wine
- edit "node_modules/rcedit/lib/rcedit.js", change "wine" to "wine64" at line 42
- 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!!!
thanks @alexluoli, works like a charme. i didn't even had to follow step 2 (rm -rf ~/.wine
). it seems that a fix is already waiting to be merged: #50
@alexluoli @maximilianschmidt can you write more details, please.
I'm from nklayman/vue-cli-plugin-electron-builder#468 (comment)
where I can find path by step 3?
@AndreiSoroka you should target the node_modules
folder in your project
@maximilianschmidt oh, but I didn't have rcedit.
"dependencies": {
"bootstrap": "^4.3.1",
"bootstrap-vue": "^2.0.4",
"core-js": "^3.3.2",
"cpisn": "^1.0.1",
"node-fetch": "^2.6.0",
"universal-analytics": "^0.4.20",
"vue": "^2.6.10",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0",
"@vue/cli-plugin-eslint": "^4.0.0",
"@vue/cli-plugin-vuex": "^4.0.0",
"@vue/cli-service": "^4.0.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"babel-eslint": "^10.0.3",
"electron": "^6.0.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"lint-staged": "^9.4.2",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"vue-cli-plugin-electron-builder": "^1.4.0",
"vue-template-compiler": "^2.6.10"
},
rcedit should be in the dependencies on vue-cli-plugin-electron-builder?
P.s. this is my first experience with electron
@AndreiSoroka i think its a peer-dependency and thus not listed in the package.json. just use Finder for navigating to /node_modules/rcedit
@maximilianschmidt yep.
I checked: ./node_modules/**
(with deep folders)
find ./node_modules -name rcedit
And not found
Nice, question to authors: what about rebuilding the package? ๐
(oops, haven't noticed that a PR is already there)
Why isn't anyone updating this repo with rcedit-x64 if that is the solution?
-
brew install homebrew/cask/wine-stable Then mv /usr/local/bin/wine64 /usr/local/bin/wine
-
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 #51 (comment))
It works!!!
... and replace "node_modules/rcedit/bin/rcedit.exe" ...
can I ask what is the full path for that file?
thanks
... 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
... 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?
- brew install homebrew/cask/wine-stable Then mv /usr/local/bin/wine64 /usr/local/bin/wine
- 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 #51 (comment))
It works!!!
rcedit wasn't in my project or /usr/local/lib/node_modules. I tried npm installing it and doing those steps though that didn't seem to work. Any idea what to do if it's not there?
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
After you homebrew, just alias wine
to wine64
It won't run 32 bit apps though.
After you homebrew, just alias
wine
towine64
It won't run 32 bit apps though.
my life is meaningless
wine64 start
instate of wine start
- brew upgrade wine, make sure "/usr/local/bin/wine64" exist
- rm -rf ~/.wine
- edit "node_modules/rcedit/lib/rcedit.js", change "wine" to "wine64" at line 42
- 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!!!
Please elaborate on Step 1 (I've heard of homebrew, but never used it: is "brew upgrade wine" a terminal command?) Thanks!
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. :-)
... 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
This path doesn't exist on my pc, even after running npm i -g rcedit
Good one, just use wine64
instead!
- brew upgrade wine, make sure "/usr/local/bin/wine64" exist
- rm -rf ~/.wine
- edit "node_modules/rcedit/lib/rcedit.js", change "wine" to "wine64" at line 42
- 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!!!
I can't find wine at line 42, however I can find it at line 40, is this right, or is my install wrong?