Install Wine On Mac Using Brew

  1. Install Wine On Mac Using Brew Recipe
  2. Install Wine On Mac Using Brew Recipe
  3. Install Wine With Homebrew
  4. Brew Install Wine
  5. Mac Brew Install Wine

Open the downloaded DMG file. Drag and drop both Wine and WineBottler applications to your Applications folder to install them, just like you would any other Mac application. You can then launch WineBottler from your Applications folder. WineBottler lists a number of different programs you can easily install. Mar 16, 2020 Homebrew is a package manager designed for installing UNIX tools and other open-source applications on Mac OS X. It will quickly download and install them, compiling them from source. Homebrew Cask extends Homebrew with support for installing binary apps — the kind you normally drag to your Applications folder from DMG files. Jan 30, 2016 The install process for other distros should be fairly straightforward as well. The TL;DR for intsalling on Mac is to install XQuartz and wine via homebrew: brew install Caskroom/cask/xquartz wine. Create a new wineprefix. Commands executed using wine are executed in “Wine prefixes.

< Wikipedia:AutoWikiBrowser

Information about running AWB on Mono/Wine.

Mono[edit]

Status: Not yet usable for general use.

  • See http://tools.wmflabs.org/awb/mono/output.html
  • AWB can be built under mono, but raises exceptions at runtime during load, and does not open cleanly.

Mono setup[edit]

Mono install (Linux)[edit]

  • Get the packages/see the official guide at the Mono downloads page
  • Be sure to install mono, monodevelop, mono-devel, mono-nunit and any other packages for dependencies
  • perl is required for the build event to set the SVN revision number.

Mono install (macOS)[edit]

  • Read the guide, and install MonoDevelop. Be sure to have MDK.
  • Stop right here -- There's no libgluezilla. You can try compiling the lib for macOS. MonoMac or Monobjc may be a solution, still.

Building AWB[edit]

  • To run AWB under wine you must build under Mono version 3 (3.8 works). Mono version 4 enforces use of .NET 4 libraries that wine isn't happy with.
  • Open the AutoWikiBrowser no plugins project solution
  • Manually create the SvnInfo.cs file in WikiFunctions directory (copy the SvnInfo.template.cs file, write the version code if you want to).
    • An incomplete shell version of SubWCRev: http://stackoverflow.com/questions/1954062/emulate-subwcrev-when-using-git-svn
  • If build fails due to WikiFunctions pre-build event, edit WikiFunctions.csproj to delete the text within the PreBuildEvent tags (at the end of the file)
  • rev 8712 and earlier: Make a change to the end of Resources.resx to fix the build error, then AWB will build (AWB rev 7686, opensuse 11.4 64-bit, MonoDevelop 2.4.2)
  • rev 8966 and later: download Microsoft.mshtml.dll and add a reference to the file in the AutoWikiBrowser project. Ensure the dll is placed alongside AutoWikiBrowser.exe when you run it.
  • Hint: Always try the Unit tests. Under Mono 3.8 around 5 sets of unit tests fail due to mono issues. Under Mono 4.2 all unit tests pass correctly.
  • If at runtime under Wine you get errors relating to System.Drawing version 4.0.0.0, disable the “use msbuild” option for WikiFunctions and AutoWikiBrowser projects in MonoDevelop and rebuild. If the build then fails due to missing .resources files, remove the obj directory in AWB/AWB/ (per MonoDevelop bug note) and rebuild.

Running under mono[edit]

  • Disabling a couple of references to webbrowser in Main.cs will allow AWB to open cleanly (Mono 3.8 or Mono 4.2). Things such as list comparer, list filter, database scanner (Mono 3.8 gives error on large files, Mono 4.2 works cleanly) can be used.
  • The web browser component is not working. Installing libgluezilla does not work as libgluezilla gives a stack trace.
    • Therefore cannot view diff or preview when editing pages.

Running unit tests (for developers)[edit]

  • Mono: Running unit tests under Mono using MonoDevelop all pass correctly with Mono 4.2.2 and rev 11894. With Mono 3.x some unit tests incorrectly fail.
  • NUnit via Wine Running unit tests using NUnit through wine works, all tests run and pass successfully, as of AWB rev 10524.
    • Download pre-compiled Windows binaries (zip) from NUnit website
    • Run using wine nunit-x86.exe, open the UnitTests.nunit file.

Wine[edit]

Status Known to be generally working.

  • See Wine AppDb entry for AWB

Setup and installation[edit]

Getting Wine and Winetricks[edit]

Ubuntu/Mint[edit]
  1. Install Wine. Use the package installation tool of your choice, such as apt-get. If you prefer, direct downloads of Wine are here.
  2. Install Winetricks using the same installation tool. You'll need this to install additional components and DLLs used by AWB. Some distributions of Wine include Winetricks; others do not. For more information, see the Winetricks on the Wine wiki.
Fedora[edit]
  1. Install Wine by running command sudo yum install wine
  2. Install Winetricks by running command wget http://winetricks.org/winetricks && chmod +x winetricks
openSUSE[edit]

Just install wine and winetricks and any required dependencies via YaST/zypper.

Arch Linux[edit]

Ensure the multilib repository is enabled by uncommenting or adding the following lines in /etc/pacman.conf:

Then, install wine and winetricks: pacman -S wine winetricks

macOS[edit]
  1. If you don't have X11 installed (check by trying startx), install a working X11 environment from XQuartz.
  2. Use your package manager to install wine. If you don't have a package manager, consider using Homebrew:
    1. Head to brew.sh, and follow its instructions for installing Homebrew.
    2. Run brew install wine to download and install wine. Append --devel for new bugfixes and potentially new bugs on the development branch. Read brew info wine for informations and suggestions.
  3. Install Winetricks by running command curl http://winetricks.org/winetricks > winetricks && chmod +x winetricks.

Setting up the Wine environment[edit]

  1. If your Wine environment is 64-bit (it is by default on 64-bit machines), you'll need to reconfigure it to 32-bit as .NET 2.0 requires a 32-bit environment. Use Terminal (i.e. the command-line) to adjust the WINEARCH variable by running the command WINEARCH=win32 winecfg. See this wiki section for more information. If you get the wine: WINEARCH set to win32 but '[PATH]' is a 64-bit installation. message, choose a different prefix in that previous command, or if this is your first time using WINE, delete the .wine folder specified by the path, then run the command again. This will recreate the Wine prefix with a 32-bit environment (i.e. WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/dotnet35 winetricks dotnet35).
  2. Use Winetricks to install dotnet35. You can use the Winetricks GUI to do this, although it can also be done in the command-line (winetricks dotnet35). This may require manual downloads, and make sure that all the required components are actually installed: you may need to rerun Winetricks to finish the installers.
    • .NET 4.5: with wine 1.7.39 and winetricks from March 2015, .NET 4.5 will install correctly. AWB appears to run fine under this .NET version as well.
    • November 2019 / TLS 1.2: from November 2019 it appears that Wikipedia requires HTTPS TLS 1.2 for connectivity, a known working setup for this is wine 4.19 and winetricks dotnet462 (wine 3.7 and dotnet462 did not work). If you're using an older Ubuntu/Debian package, you may need to get a newer version of winetricks otherwise it may fail to download the necessary files.

Starting AWB[edit]

  1. To start AWB, run command wine 'path/to/AutoWikiBrowser.exe', putting the location of AutoWikiBrowser in the quotes.

Install Wine On Mac Using Brew Recipe

  • AWB should be working, though there is a glitch in the diff view that is fixed by installing Internet Explorer. IE6 or IE8 have both been confirmed to be sufficient. As of September 2015, IE7 is the only version working well. Use winetricks ie7 to install it, and avoid installing IE8, as it would render AWB unusable.

Wine AppDb entry for AWB[edit]

Please update this page or the Wine AppDb entry for AWB with further information on your experience.

What works[edit]

  • Open AWB
  • Open Settings, save settings
  • General fixes, typo fixing, TypoScan plugin
  • Edit box, diff (with winetricks ie6), preview
  • Save pages
  • List comparer, list splitter
  • List providers (searches)
  • Custom modules
  • External processing
  • Logging

Known problem areas[edit]

  • Database scanner, often fails after a few minutes or seconds before the scan has completed (with error 'No access to memory location', Wine bug 40156). No current known workaround or solution for Wine. Database scanner works with wine 3.5 and winetricks dotnet40, was not working with wine 2.0.1 or earlier. Database scanner also works under Mono 4.2.
  • Find match/error/syntax highlightingwinetricks riched20 fixes this.
  • Tooltips
    • Focus change: AWB 5.6.0.0 and earlier, up to SVN 11269: Tooltips can cause application focus to switch to the tooltip (could be Wine bug 9512). Workaround: in wine config, Graphics section (winecfg) uncheck 'Allow the window manager to control the windows' and restart AWB, tooltips will then display without stealing focus, but this will mean AWB window isn't integrated with your system's window manager. Workaround implemented in AWB in rev 11270 and later, display of tooltip does not affect application focus.
    • Caching: there can sometimes be a caching/lag issue whereby tooltips fail to display the first time, or are shown once when they should not be. Focusing on another item that does have a tooltip generally causes the tooltip display to move on or catch up. No current known workaround or solution.
  • External Processing: in rev 11780 and earlier scripts may not work under Wine. Alternative solutions to running unix scripts with AWB. From rev 11780 scripts work using full Linux paths.

Tips & tricks[edit]

  • You may get more frequent connection errors, especially on login/the first save, but just try again.
  • If you sometimes encounter the exception 'attempted to read or write protected memory' and the wiki page you are processing has some Latin extended Unicode characters in it, change AWB's edit box font away from the Tahoma default to another TrueType font e.g. one of the Liberation sets. This should prevent the exception.

Wine on a Mac using homebrew[edit]

It has been suggested that this section be merged into Wikipedia:AutoWikiBrowser/Mono and Wine#Wine. (Discuss)

AWB can be installed to run under Wine on a Mac using the Homebrew package management software. It may be possible using other package management systems like Fink, Gentoo/Alt, MacPorts, Pkgsrc or Rudix. See the main WineHQ - macOS page.

  • Install Homebrew.
ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'
  • Or update homebrew and its formulas, if you already have Homebrew.
brew update
  • You may need to install XCode for brew to work fine and install the XCode command line tools. The brew installer will ask you to do so automatically.
xcode-select --install
  • Check for problems.
brew doctor and just in case, you may want to do it again: brew doctor
  • Make sure you have X11.
Install Wine On Mac Using Brew
Run startx. If there’s a “command not found” error—or similar—then you probably need an X11 client. Try XQuartz if you’re not sure which one to use: http://xquartz.org
  • Install wine and winetricks: brew install wine winetricks
    • Sometime the dependancies of wine may need to be reinstalled, systems older than OS X 10.9 may need them installed with the --universal option. e.g.
  • Sometimes you may want to change how the fonts are rendered so they look better. See manpage: fonts-conf for rendering stuffs and wine winecfg for changing the DPI setting of wine. — Preceding unsigned comment added by 222.65.178.5 (talk) 09:04, 11 September 2014 (UTC)
  • Install .NET Framework 3.5 in wine, following the steps in #Setting up the Wine environment.
    • It may fail on wine msiexec /i XPSEP XP and Server 2003 32 bit.msi. Don't worry.
    • If the installation looks like it got stuck the window might just be hidden. Click on the icon in the menu bar to bring it back to foreground and confirm the dialog to continue.
  • Run AWB
wine AutoWikiBrowser.exe
  • AWB runs fine but does not clear the diff window so you will need to scroll to the bottom of the page.

CrossOver[edit]

Wine's commercial version, CrossOver, has good and easy support for AWB. It works under Linux and Mac. (A free trial is available for 14 days.)

  • Download and install the trial version from https://www.codeweavers.com/products.
  • Install the .NET Framework 3.5 SP1 choosing Windows Vista or later
  • Run Command, browse to the AutoWikiBrowser.exe. Click Run.
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Wikipedia:AutoWikiBrowser/Mono_and_Wine&oldid=948827012'

This tutorial is for intermediate users who want to install and useWine 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 theWindows 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 usingBoot Camp, but that requiresa reboot every time, and you can only use one operating system at a time.You can also use a tool likeParallels Desktop orVMware Fusionto 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 copyof Windows, which isn't cheap!

Wine is different. When any program runs, it requests resourceslike memory and disk space from the operating system.All that Wine does is make sure that those requests get answered so thatthe program can run correctly. As far as the program knows, everythingis 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 ofthe 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?

Mac brew wine

A lot of people discover Wine because they have one specific Windows programthat they need to use, and it's the last thing preventing them from switchingto 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 theAppDB that hasuser reviews of how well specific Windows programs work under Wine.Search for your program and find out! (If it's not listed, that doesn'tnecessarily mean that it won't work — only that you're apparently tryingto 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 versionnumber 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 supportin 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 Windowsare 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 installingopen source programs much easier. In particular, trying to installa large program like Wine without the help of a package manager would betremendously difficult.Fortunately, Homebrew itself is simple to install: just open up theTerminal and run this command:

The Terminal will tell you what it's about to do, and ask youif you want to proceed: press Enter to do so.The Terminal may then ask for a password: this is the passwordto the Admin account on your computer. As a security measure,the Terminal does not display anything as you type, not evenasterisks (*). Type your password anyway, and press Enter. If you get somekind of error, it might be because the Admin account doesn't have apassword set. Setting a password is required.

Install Wine On Mac Using Brew

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 torun brew doctor. Do as it suggests:

This will make Homebrew inspect your system and make sure that everythingis set up correctly. If the Terminal informs you of any issues, you'll needto fix them yourself, and then run brew doctor again to verify that youfixed them correctly. When everything is set up correctly, you'll see themessage Your system is ready to brew, and you can move on to the next partof 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, whichyou just installed. cask refers toHomebrew Cask,an extension to Homebrew that is used to install GUI application on yourcomputer. (GUI stands for 'Graphical User Interface'. A GUI application isan app that you can see running, as opposed to invisibly runningin the background.) install refers to the fact that you're askingHomebrew Cask to install something on your computer, and wine-stableis the name of the thing that you want it to install. Wine has a 'stable' versionand a 'devel' version: you probably want stable, since it should have fewer bugs.

When you run this command, Homebrew will start automatically downloadingand installing software onto your computer. It might start by installingsoftware that has a totally different name: that's fine! Like most complexapplications, Wine doesn't work alone -- it relies on several other pieces of software torun correctly. These are called 'dependencies', and Homebrew is smart enoughto 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 upthe Terminal again. cd to the location, and use ls to make sure you cansee the installer file. (Note: if you do not know what cd and ls are,you should learn how to use the command linebefore using Wine.)

Once you are in the correct directory, run the installer through Wineby 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 programfile 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 waythey 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 theTerminal, 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 stepto solving a problem is knowing what it is, so without running Winefrom 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 workingcorrectly, but if it crashes, the first thing you should try is running itfrom 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 towrite an AppleScriptthat launches the program for us, and then putthat AppleScript in the Dock. Essentially, we're writing a program ourselves!Don't worry, it's easy enough. There is a program on your computerthat 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 areayou 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 theProgram Files directory to your program executable. You can see thatyou'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 Editorunderstands what you wrote. You can also try pressing the Run buttonto 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.

Install Wine On Mac Using Brew Recipe

Open up the Finder, go to where you saved your script, and drag thatfile to your Dock. It should stay there, just like a real application — because it is a real application! However, all it does is runthat launcher command for you, so you can move the application around,rename it, or even delete it, and it won't affect the Windows programthat you're running.

Install Wine With Homebrew

Keeping Wine Up to Date

Wine is an open source program. That means that programmersaround the world are continually improving it, adding new featuresand squashing bugs. If you don't update Wine, though, it will neverget those improvements, so it's generally a good idea to check for updatesevery 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 updatesare 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 wellcurrently. However, it's a good idea to run this command every few monthsor so.

Brew Install Wine

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 othersmall 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 installedto get Wine to work correctly.

Mac Brew Install Wine

Please enable JavaScript to view the comments powered by Disqus.