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

macOS Catalina: wine doesn't work #51

Closed
antelle opened this issue Oct 8, 2019 · 29 comments
Closed

macOS Catalina: wine doesn't work #51

antelle opened this issue Oct 8, 2019 · 29 comments

Comments

@antelle
Copy link

antelle commented Oct 8, 2019

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.

@MarshallOfSound
Copy link
Member

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

@malept
Copy link
Member

malept commented Oct 8, 2019

@MarshallOfSound I think the answer is to add the x64 binary to node-rcedit (#50).

@antelle
Copy link
Author

antelle commented Oct 8, 2019

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

@malept
Copy link
Member

malept commented Oct 8, 2019

Then I suppose the workaround is to either run Windows in a VM, or Linux (with Wine) in a container/VM.

@cap10morgan
Copy link

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.

@alexluoli
Copy link

  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!!!

@maximilianschmidt
Copy link

maximilianschmidt commented Oct 25, 2019

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

@AndreiSoroka
Copy link

AndreiSoroka commented Oct 25, 2019

@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?

@maximilianschmidt
Copy link

@AndreiSoroka you should target the node_modules folder in your project

@AndreiSoroka
Copy link

AndreiSoroka commented Oct 25, 2019

@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

@maximilianschmidt
Copy link

@AndreiSoroka i think its a peer-dependency and thus not listed in the package.json. just use Finder for navigating to /node_modules/rcedit

@AndreiSoroka
Copy link

AndreiSoroka commented Oct 25, 2019

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

@antelle
Copy link
Author

antelle commented Oct 26, 2019

Nice, question to authors: what about rebuilding the package? 😉
(oops, haven't noticed that a PR is already there)

@paul-piro
Copy link

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

@charmer1989
Copy link

  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 macOS Catalina: wine doesn't work #51 (comment))

It works!!!

@esigalas
Copy link

... and replace "node_modules/rcedit/bin/rcedit.exe" ...

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

@unbreakableglass
Copy link

... 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

@esigalas
Copy link

esigalas commented Dec 2, 2019

... 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?

@kylekrzeski
Copy link

  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 #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?

@esigalas
Copy link

esigalas commented Dec 8, 2019

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

@unhuman
Copy link

unhuman commented Feb 26, 2020

After you homebrew, just alias wine to wine64

It won't run 32 bit apps though.

@hggz
Copy link

hggz commented Jul 17, 2020

After you homebrew, just alias wine to wine64

It won't run 32 bit apps though.

my life is meaningless

@getmahbub
Copy link

wine64 start instate of wine start

@OlyDLG
Copy link

OlyDLG commented Aug 24, 2020

  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!!!

Please elaborate on Step 1 (I've heard of homebrew, but never used it: is "brew upgrade wine" a terminal command?) Thanks!

@OlyDLG
Copy link

OlyDLG commented Aug 24, 2020

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. :-)

@jordanlewis
Copy link

@OlyDLG https://brew.sh/

@anishagg17
Copy link

... 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

@imclint21
Copy link

Good one, just use wine64 instead!

@coserei
Copy link

coserei commented Oct 12, 2020

  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!!!

I can't find wine at line 42, however I can find it at line 40, is this right, or is my install wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests