Apple - How to get Wine working on Catalina?

I was able to build Wine 64 bit from source on macOS Catalina and successfully run Notepad++ 64 bit on it.

My steps were more or less something like that:

  1. Download Wine 4.20 from https://dl.winehq.org/wine/source/4.x/wine-4.20.tar.xz
  2. Extract it
  3. In terminal go to extracted directory
  4. Run: ./configure --enable-win64
  5. It showed that it couldn't find bison, so I installed it with macports (sudo port install bison).
  6. After I was able to run ./configure --enable-win64 successfully without errors in terminal run: make
  7. It compiled after more than 30 minutes.
  8. I run it with: ./wine start
  9. It opened windows console and here I was able to cd to Notepad++ 64 bit directory (downloaded from https://notepad-plus-plus.org/repository/7.x/7.0/npp.7.bin.x64.zip note that newest version did not work and threw some errors about some dll's)
  10. I typed notepad++ to run exe file
  11. It showed some errors about freetype fonts so I installed them with macports and I had to copy them from /opt/X11/lib to /usr/local/lib before wine detected them
  12. After fixing freetype fonts problem I was able to run notepad++
  13. Also, you might want to run: sudo spctl --master-disable to disable gatekeeper if you will see some system alerts about loading app from an unknown developer.
  14. Also, note that instead of ./wine start you can run ./wine explorer for graphical file manager instead of console

Those steps might not be exactly precise, as I'm not sure if I did not miss something but hope it will help someone.

Also, note that obviously wine on macOS Catalina will be able to run only some 64-bit windows apps and all 32-bit windows app will not work. I also tested it with IrfanView 64 bit (https://www.fosshub.com/IrfanView.html?dwl=iview453_x64_setup.exe) and it also works fine.

In case you wanted to get wine working for purpose of running 32-bit games then unfortunately it will not work with wine but you can try with VirtualBox. You can check https://www.youtube.com/watch?v=3AO8dF0vviQ for some performance improvement tips (in brief: using VM with retina disabled, VboxVGA setup, disabled mouse integration, limiting FPS with RivaTuner).

You can also try commercial CrossOver software by CodeWeavers which provides wine that supports 32 bit apps on Catalina. You can download the trial version for free and test it for free for 14 days. Also probably 32 bit apps will be supported by a normal free version of wine at some point.

EDIT:

Since July 2020 PlayOnMac (https://www.playonmac.com/en/) works again on macOS Catalina so you can download it and run windows apps with it which I think is much simpler. Good news is that it also supports running 32bit windows apps on macOS Catalina. Installing apps with it is a little more complicated than with commercial CrossOver but it is free and worked with 2 apps which I tested. I checked it with Notepad++ 32bit and with 32bit game Tomb Raider Anniversary Demo and I was able to get both apps working on macOS Catalina. Also I was able to install RivaTuner 7.2.3 app (with dotnet35 winetrick and manual installation of Visual C++ 2008 Redistributable package) to limit FPS in game which I recommend if someone wants to limit cpu and cpu fan usage.


On Catalina/Big Sur/etc.. you can use homebrew to install either wine-stable or wine-devel (to see all available options run brew search wine):

At the moment of writing wine-stable was still too buggy so I went instead with wine-devel:

brew install homebrew/cask-versions/wine-devel

# OR (if the line above fails)
brew cask reinstall wine-devel

This will install /usr/local/bin/wine64 along with dependencies.

Now you should be able to run your 64bit PE executables with something like this:

# run the tc installer
wine64 ~/Downloads/tcmd922ax64.exe

# run the actual app
wine64 ~/.wine/drive_c/totalcmd/TOTALCMD64.EXE

NOTE: ❗️wine64 will only work with 64bit executables. You also need to make sure that your wine prefix is 64bit. If you have previously used a 32bit wine prefix (from pre-Catalina times) then make sure you remove/rename your old ~/.wine folder before you run wine64.


Also be aware that winecfg is gone and attempting to run it will throw an error — use instead wine64 winecfg.


Offtopic: If you need to run something more complicated than simple 64bit apps or 32bit apps then consider using Boot Camp or VirtualBox for maximum compatibility.


Currently Wine still requires 32-bit code to run 32-bit Windows software, which is a problem for Catalina (which dropped 32-bit code support almost completely), and cannot be solved with a simple recompilation. It's only possible to use Wine for some 64-bit Windows software.

CodeWeavers, who develops CrossOver and by extension Wine, has developed a solution for 32-bit software, and they've posted some updates on their blog about it.

  • Celebrating the difficult; the release of CrossOver 19
  • CrossOver 19 is progressing well and is now in beta!
  • Announcing a first Alpha build of CrossOver 19 for macOS Catalina
  • Quick Catalina Update
  • CrossOver for Catalina Progress
  • So We Don't Have a Solution for Catalina...Yet

Currently these changes are only available in their commercial CrossOver product, but apparently they release the source for every version they release.

According to a post by a moderator on forum.winehq.org, the CodeWeavers solution likely won't be merged into the official Wine. I'd take what they say with a grain of salt though because the things they say about ELF vs PE (or Mach-O vs PE in the case of macOS) don't really seem directly applicable to the issue at hand.

This was discussed at WineConf. Alexandre made it clear that the Codeweavers solution is a hack that will not be accepted into Wine's development branch. The long term solution for Wine is the change from ELF to PE. Work on that has already begun, but it is not going to be completed any time soon. When I asked Alexandre for an estimate, he said it will definitely not be ready for Wine 5.0, but might be ready for Wine 6.0.

Codeweavers has said they intend to release their Catalina code under a free software license, so anyone who wants to compile Wine with it can, but at present no one has volunteered to maintain that code.

They further said:

The new patched clang/llvm added -mwine32 (and some other additions) using that flag instead of the usual -m32 will have llvm doing the heavy lifting generating the trunking code.

Wine moving to PE is for various reasons. A simple reason Windows uses PE files not ELF files so any checks will fail on wine mostly due to the stub dll files that link to the real ELF.

Tags:

Wine

Catalina