- Installing Wine on Mac
- What is Wine?
- Will My Program Work With Wine?
- Requirements
- Part 1: Install Homebrew
- Part 2: Install Wine Using Homebrew
- Part 3: Install Windows Programs Using Wine
- Part 4: Run Windows Programs Using Wine
- Making a Dock Icon
- Keeping Wine Up to Date
- Uninstalling Wine and Homebrew
- Wine mac os gui
Installing Wine on Mac
This tutorial is for intermediate users who want to install and use Wine on their computer running macOS. You should already know the basics of how to use the command line. If you don’t, read this tutorial first.
What is Wine?
Wine is awesome. No, I’m not talking about the kind you drink, I mean the kind that lets you run Windows apps without the Windows operating system. It’s kind of Zen, when you think about it. Oh, and did I mention it’s completely free, legal, and open source?
Nowadays, Windows and Mac play nicely together. You can install Windows and Mac side by side and switch between them using Boot Camp, but that requires a reboot every time, and you can only use one operating system at a time. You can also use a tool like Parallels Desktop or VMware Fusion to virtualize Windows and run it together with Mac, but virtualization is slow and it takes up a lot of memory. (Your physical computer creates an imaginary «virtual» computer within itself, and runs Windows on that. That takes a lot of resources!) On top of that, all of these solutions require you to own a legal copy of Windows, which isn’t cheap!
Wine is different. When any program runs, it requests resources like memory and disk space from the operating system. All that Wine does is make sure that those requests get answered so that the program can run correctly. As far as the program knows, everything is going smoothly because it has everything it needs. It never even realizes that it’s not running on Windows! It’s simpler than emulating a whole new computer, so it’s faster. Since it’s just translating requests, you don’t need a copy of the actual Windows operating system. Plus, Wine is open source, which means people are continually improving it and adding new features. And you can’t beat the price!
Will My Program Work With Wine?
A lot of people discover Wine because they have one specific Windows program that they need to use, and it’s the last thing preventing them from switching to a different operating system. So, the big question is, will it work? The short answer is: probably, but it’s worth checking.
The Wine project maintains a database called the AppDB that has user reviews of how well specific Windows programs work under Wine. Search for your program and find out! (If it’s not listed, that doesn’t necessarily mean that it won’t work — only that you’re apparently trying to use a very obscure program!)
Requirements
To install Wine on your Mac, you will need the following:
- macOS 10.10 (Yosemite) or above (but 10.15 Catalina is not recommended)
- Access to an Admin account, with password
- An internet connection
To check what version of macOS you’re running, click on the Apple logo on the far left side of the toolbar, select «About This Mac», and look at your version number under the big «macOS» or «OS X». If it’s 10.10 or higher, you’re all set.
Note that Wine does not work well with macOS 10.15 Catalina. Apple removed 32-bit support in Catalina, which is a critical part of the macOS system that almost all of Wine relies on. You can run 64-bit applications through Wine on Catalina, but very few applications for Windows are 64-bit. If you need to use Wine, you should not upgrade to Catalina.
You need an Admin account on your Mac because only Admins can install software. You will need to be logged in to this Admin account during the installation. If there is only one account on your computer, it is an Admin account. The account must have a password: if the account has no password, the sudo utility will fail. To set or change your password, go to the Accounts section in System Preferences.
Part 1: Install Homebrew
Homebrew is a package manager that makes installing open source programs much easier. In particular, trying to install a large program like Wine without the help of a package manager would be tremendously difficult. Fortunately, Homebrew itself is simple to install: just open up the Terminal and run this command:
The Terminal will tell you what it’s about to do, and ask you if you want to proceed: press Enter to do so. The Terminal may then ask for a password: this is the password to the Admin account on your computer. As a security measure, the Terminal does not display anything as you type, not even asterisks (*). Type your password anyway, and press Enter. If you get some kind of error, it might be because the Admin account doesn’t have a password set. Setting a password is required.
Installing Homebrew should only take a few seconds or minutes (depending on the speed of your internet connection). When it’s done, the Terminal will say that the installation was successful, and ask you to run brew doctor. Do as it suggests:
This will make Homebrew inspect your system and make sure that everything is set up correctly. If the Terminal informs you of any issues, you’ll need to fix them yourself, and then run brew doctor again to verify that you fixed them correctly. When everything is set up correctly, you’ll see the message Your system is ready to brew , and you can move on to the next part of the tutorial.
Note: If Homebrew tells you that you need to agree to the Xcode license, you can do that by running:
The Terminal window will fill up with the Xcode license: read it, type agree and hit enter to agree to the license.
Part 2: Install Wine Using Homebrew
Now we get to actually install Wine! We’ll let Homebrew do all the work, all you have to do is tell it what you want with this command:
Let’s break down this command into parts. brew refers to Homebrew, which you just installed. cask refers to Homebrew Cask, an extension to Homebrew that is used to install GUI application on your computer. (GUI stands for «Graphical User Interface». A GUI application is an app that you can see running, as opposed to invisibly running in the background.) install refers to the fact that you’re asking Homebrew Cask to install something on your computer, and wine-stable is the name of the thing that you want it to install. Wine has a «stable» version and a «devel» version: you probably want stable, since it should have fewer bugs.
When you run this command, Homebrew will start automatically downloading and installing software onto your computer. It might start by installing software that has a totally different name: that’s fine! Like most complex applications, Wine doesn’t work alone — it relies on several other pieces of software to run correctly. These are called «dependencies», and Homebrew is smart enough to install them for you automatically when necessary.
While it’s working, Homebrew will display messages and progress bars on the Terminal to let you know what it’s doing. When it’s done installing Wine, it will stop displaying messages and wait for you to type in a new command. When that happens, move on to the next step!
Part 3: Install Windows Programs Using Wine
To install a Windows program, first download the installer file: it should end with .exe. Remember the location you put it, and open up the Terminal again. cd to the location, and use ls to make sure you can see the installer file. (Note: if you do not know what cd and ls are, you should learn how to use the command line before using Wine.)
Once you are in the correct directory, run the installer through Wine by running the following command in the Terminal:
Where $INSTALLER is the name of the installer file. For example, if the installer file is named setup.exe , you would run:
A window will pop up with a regular graphical Windows installer. Click through it, and you’re done!
Part 4: Run Windows Programs Using Wine
Open up the Terminal and run this to get to your Program Files folder:
Run ls to see what programs you have installed. Pick a program, and enter its directory using cd. (If the folder has a space in it, you must type a \ before the space. For example, Program\ Files . If you’re having problems, try using tab autocomplete.) There should be a file that ends in .exe : this is the program file. Type this into Terminal:
Where $PROGRAM is the name of the .exe file. For example, if the program file is named STARCRAFT.EXE , you would run:
The program will pop up in a new window, ready to use! Enjoy using Windows on your Mac, freely and legally!
Making a Dock Icon
Many people want to be able to run Windows programs the same way they run other programs on the Mac: by clicking an icon in the Dock. Wine isn’t specifically designed to support this, but with a little trickery, we can make it do what we want.
Note: Wine prints out error messages in the Terminal when something goes wrong. By launching Windows programs via a Dock icon, you are sidestepping the Terminal, which means that if something does go wrong and Wine has to quit, it will not be able to tell you what the problem was. The first step to solving a problem is knowing what it is, so without running Wine from the Terminal, you won’t be able to fix it, and neither will anyone else. Running from the Dock is fine as long as your program seems to be working correctly, but if it crashes, the first thing you should try is running it from the Terminal instead: it won’t prevent the program from crashing, but it will give you some clues on how to fix the problem.
In order to launch a Windows program via the Dock, we’re going to write an AppleScript that launches the program for us, and then put that AppleScript in the Dock. Essentially, we’re writing a program ourselves! Don’t worry, it’s easy enough. There is a program on your computer that is designed for helping you write AppleScripts: it’s called «Script Editor», and you can find it in the /Applications/Utilities directory of your computer, same as the Terminal itself.
Open up the Script Editor. You should see a window with a large area you can type in near the top: this is where you write your AppleScript. In that area, type the following text:
You’ll need to replace $PATH_TO_PROGRAM with the path from the Program Files directory to your program executable. You can see that you’re simply telling the AppleScript to run a line of code in the Terminal: the same line of code that you could run to start your Windows program.
Next, press the Compile button at the top of the window. The text should become colored to indicate that Script Editor understands what you wrote. You can also try pressing the Run button to run your script: it should open the Windows program successfully.
Lastly, save your script. You can give it whatever name you’d like, but be sure to select File Format: Application in the save options, and leave Startup Screen unchecked.
Open up the Finder, go to where you saved your script, and drag that file to your Dock. It should stay there, just like a real application — because it is a real application! However, all it does is run that launcher command for you, so you can move the application around, rename it, or even delete it, and it won’t affect the Windows program that you’re running.
Keeping Wine Up to Date
Wine is an open source program. That means that programmers around the world are continually improving it, adding new features and squashing bugs. If you don’t update Wine, though, it will never get those improvements, so it’s generally a good idea to check for updates every so often. We can use Homebrew to keep Wine up to date: it’s easy! Just run this command:
With this command, Homebrew will first update itself, if any updates are available. It will then find all the outdated software it knows about (including Wine) and upgrade them all to the latest version. Checking for updates isn’t strictly necessary, as Wine runs quite well currently. However, it’s a good idea to run this command every few months or so.
Uninstalling Wine and Homebrew
If you try Wine and you don’t like it, uninstalling it is easy. Just run this command:
And Homebrew will helpfully remove Wine from your computer. However, in order to install Wine, Homebrew also had to install many other small programs that Wine relies upon to work correctly. (That’s why the install process takes so long!) If you want to remove these as well, run this script:
That script will remove everthing that you installed in this tutorial, including Homebrew, Wine, and all the other programs Homebrew installed to get Wine to work correctly.
Источник
Wine mac os gui
How to install/about wine on mac
As this question keeps appearing more recently I’m making this basic guide.
- Install XQuartz 2.7.7 or above
- Gatekeeper must allow block unsigned packages
- Running OS X 10.8 to macOS 10.14* (macOS Catalina & later)
Recommended way to install Winehq packages;
Installing wine using homebrew Once homebrew is installed you the following command to install your selected wine package
The above command will install XQuartz and the most recent wine-staging pkg available on winehq but it will also add wine for use in Terminal meaning you no longer need to launch the installed Wine Staging app each time you want to access wine.
Please Note;
Only a single wine package can be installed using brew
The —no-quarantine command is required as homebrew by default adds the quarantine flag to downloaded casks, this causes Gatekeeper to treat the bundle as damaged.
Winehq is currently not providing recent packages for macOS so I decided to upload my own builds.
This command will add my brew tap and the second command will install my custom cask of Wine Staging
The tap contains the following
- gcenx-wine-stable
- gcenx-wine-devel
- gcenx-wine-staging
- wine-crossover
How to manually install wine on mac using Winehq releases;
Grab a wine package usually using the latest wine-devel is recommended, but most agree it’s best to use the latest wine-staging due to additional patches.
If your intention is to have a more stable environment use wine-stable
The above is the Winehq way to install wine on mac but that makes it cumbersome to use considering you must launch the Wine Stable , Wine Devel or Wine Staging app each time to get access to wine within Terminal
The default WINEPREFIX will be
/.wine so anything you install will be placed into the hidden
/.wine folder. You can override this by using the WINEPREFIX command
The default architecture of a WINEPREFIX will be 64Bit meaning 32Bit and 64Bit applications & games are supported but that’s not always ideal for several reasons. A new WINEPREFIX can be created and also setting WINEARCH
Here is an example of using both commands to create a 32Bit only WINEPREFIX
The above command will create a new WINEPREFIX thats also 32Bit only and launch winecfg
Basic wine tools
- wine (32Bit loader)
- wine64 (64Bit loader)
- msiexec (execute msi files
- notepad
- regedit (Wines Registry editor)
- regsvr32 (Provides DLL registration services)
- wineboot
- winecfg (wine configuration utility)
- wineconsole (windows like shell aka cmd)
- winedbg (wine debug utility)
- winefile (wine file manager)
- winemine (wines version of the game mine)
- winepath
What’s this winetricks everyone keeps saying to use?
Winetricks is an easy way to work around problems in Wine.
While winetricks can be installed directly from GitHub you will be missing packages winetricks requires, instead install again using homebrew
Now you will also have access to winetricks command within Terminal
Why doesn’t Virtual Desktop work?
By default wine on mac uses what’s known as macDriver using winetricks run the following command
This will swap from macDriver to x11 now wine will make use of XQuartz
Why doesn’t my game work on mac but Winehq says it does?
This usually happens when the game uses DirectX10 or above, the version of OpenGL included on macOS hasn’t been updated in years so it’s missing some needed extensions.
Can I use DXVK on mac?
No not currently.
MoltenVK is Vulkan 1.1 compliant, but still missing additional extensions needed by DXVK.
MoltenVK uses Metal meaning only wine64 has Vulkan support (currently wine32on64 doesn’t support MoltenVK).
Please Note;
CrossOver-20 does include DXVK support, this provides DirectX10 and DirectX11 support. CodeWeavers patched MoltenVK to fake unsupported extensions and a custom version of DXVK that’s modified specifically for macOS.
macOS Catalina and later
Currently only CrossOver-19 and later will run
Here are some free alternatives;
- Unofficial Wineskin Use a WS11 Engine
- PortingKit Should automatically select a working Engine
- My brew tap
Gatekeeper will give a warning for each Windows binary that is ran as these won’t be code-signed in a way Apple expects, to avoid this you could disabled Gatekeeper using the following command
Please Note;
macOS Catalina 10.15.0 to 10.15.3, SIP needs to be disabled this will allow wine32on64 to change the state of i386_set_ldt
My current wine-crossover package can be downloaded directly WineCX19.02
Phoenicis has a build of WineCX19.0.0
Also;
wine32on64 currently does not support 16Bit executable so some things just won’t work
Apple Silicon support?
Only CrossOver-20.0.2 includes support for Apple Silicon at this time, this requires macOS Big Sur 11.1 and install Rosetta2.
I will be adding support for Apple Silicon into Wineskin once I’m able to obtain an M1 Mac mini, currently checking where would be the best place to purchase from.
Using wine in a macOS Virtual Machine
From Wine-4.15 to Wine-5.16 macDriver (the default display driver) won’t function within a Virtual Machine, however the X11 display driver works.
You can edit the wine registry manually or use winetricks
Please Note; The macDriver regression was resolved from Wine-5.17
Wine-5.9 to Wine-5.18 file limit regression;
The upstream patch was applied to my recently uploaded Wine-5.17 packages
The most commonly noticed issues was wine-gecko was always crashing.
Источник