Help AO-Universe and support us on Pledgie! More Information Click here to lend your support to: AO-Universe - Support the Website and make a donation at pledgie.com !

How to play AO on Linux or Mac

Search:
Class: All Classes
Faction: All Factions
Level: All Levels
Item Links:
Quicklink (copy this):

Feedback: Feedback-Thread
Introduction

Anarchy Online can be played on Linux and Mac OS X using Wine. Of course, it is certainly possible to play AO on Linux or a Mac by dual-booting Windows or installing some sort of Virtual Machine software (like VirtualBox, VMWare, Parallels, etc...), but this guide describes how to get AO running in Wine.

Before Funcom introduced the in-game store and changed the way the mouse works in AO, it was easier to run AO in Wine because it was possible to just install Wine or Crossover (commercial version of Wine), then copy the Anarchy Online folder from a Windows PC and then run AO. The latest version of Wine now mostly works, but Wine doesn't yet support "Raw Input Devices" which is what AO now uses for mouse input.

This guide will provide step-by-step instructions for installing Wine and getting Anarchy Online running in Wine so you can play on a Linux or Mac OS X computer.

Background

What is "Wine"? Wine is a slick open-source project that provides binary compatibility for Windows executables. It acts sort of like a translator, so when a Windows programs asks for something (like drawing stuff to a window or getting the current mouse position) Wine translates it and asks for the equivalent thing in Linux or Mac. Because Microsoft Windows isn't running, many programs run nearly as fast in Wine as they do on a real Windows machine. Running programs in Wine means you don't need a Windows installation, you don't need to dual-boot into Windows, and you don't need to install any virtual machine software.

(Note: This only works on Intel Macs. Wine does not provide emulation, therefore, it will not work on older PowerPC based Macs. Also, Anarchy Online is a 32-bit application. You must install the 32-bit version of Wine. If at any point you are tempted to select any option that suggests building the 64-bit version of wine because you have a 64-bit operating system or processor, resist the urge! Anarchy Online will not run in the 64-bit version Wine.)

There is also a commercial version of Wine from Codeweavers. Their product is known as "Crossover", but if you're brave enough to install Wine, it's free (as in free beer!). On the Mac there is also the WineSkin package that comes with its own custom built version of Wine and an application that helps you bundle windows applications into a Mac OS X application bundle.

I recently discovered two projects that makes the process of installing Wine easier. You can go to http://www.playonlinux.com/en or http://www.playonmac.com/en and download a package that installs the latest version of wine that PlayOnLinux or PlayOnMac supports. Their packages include the Raw Input patch, and is supposed to make life easier. However, it is not altogether clear to me which version of Wine is included in which version of PlayOnLinux or PlayOnMac. Therefore, it behooves you to build your own version of wine that you know works. Besides, Linux itself is not for the faint of heart, so you might as well learn what's under the hood of your Linux machine, if you don't already know. (As of this writing, version 1.5.13 and later works perfectly.)

You will need some time and an internet connection to get Wine downloaded and installed.

Install Compilers (Both Linux and Mac)

The point of this exercise is to help you to compile Wine yourself. So before you begin, you're going to need to be somewhat familiar with package managers and you need to install a compiler on your computer.

For Mac OS X, install the Developer's Tools package from the DVD that came with your Mac. Alternatively you can download the appropriate version of Xcode from Apple Developer Center. After installing the Developer's Tools, you will also need to install the "Command-Line Tools" Package. How that is accomplished depends on which version Xcode you have installed (which is dictated by which version of Mac OS X you have installed). for Xcode 4.3 or later, you need only select the package from the optional packages in the Preferences dialog under the Downloads section.

On Linux, you should install the GNU gcc compiler package using whatever package manager your Linux distribution uses. Fedora, Red Hat, CentOS, Lineox, White Box Linux and many other distributions use the "yum" package manager. Debian, Ubuntu, Knoppix, Linspire, Mepis and some other distributions use "aptitude". Gentoo uses its own "emerge" system, and Slackware uses yet a different one, but the usage is basically the same across all package managers. You should consult the on-line manual for your specific package manager. We will use "yum" in our examples. If you don't already have GNU compilers installed, you should install them by typing the following command in a terminal window (you may need to be logged on as an administrator to install software using a package manager. If you're package manager isn't "yum" then you need to substitute "yum" with with whatever your package manager is. Again, consult your on-line manuals):


:
yum install gcc


Install a Package Manager (Mac only)

I said earlier, that all Linux distributions have some sort of package manager. Unfortunately Apple doesn't provide one for Mac OS X. Conveniently, there is an open-source solution to this problem. Go to the MacPorts web site and download and install MacPorts. I will be using "yum" as the package manager in my examples, but Mac users will substitute the "port" command for the "yum" command in my examples.

Install X11 (Mac only)

Basically every Linux distribution installs X11, because without X11 Linux would have no graphical user interface. On Mac OS X, you may already have an application named X11 in the Utilities subdirectory in the Applications directory. Unfortunately the version of X11 that Apple provides is severely out of date. Go to the XQuartz web site and download and install the latest version of XQuartz.

XQuartz will install as an application in the "/Applications/Utilities" directory, but it will also install a bunch of command-line programs and libraries in "/opt/X11".

Install Dependencies and Base Wine (Both Linux and Mac)

The hard-core programmer-types may want to go through the process of downloading every open-source software package that Wine depends on. For the rest of us, we will let the package manager do all that for us. Install Wine and everything that Wine depends on by typing the following command in a terminal window:


:
yum install wine


This step is a little tricky. You should install the latest developmental version of Wine (tested 1.5.13) but some package managers will only install the latest stable version of wine (1.4.1) if you install the "wine" package. The stable version will not allow you to look or steer using the mouse. If you must install the stable version, follow the additional instructions at the bottom of this guide regarding how to patch and build wine yourself.

Query your package manager's database to find out what package installs the developmental version of wine. Consult the on-line manuals for package manager for how to do that. For instance, on MacPorts, you would type the following at the terminal prompt to install the latest developmental version of wine (note that we need to install the "wine-devel" package instead of "wine", but if you did "yum install wine-devel" you would wine development libraries instead of wine.):


:
port install wine-devel


At this point, your package manager will download lots of packages from the internet and start building and installing them. For various reasons, sometimes the package manager will fail. Just try the install command again and usually the package manager will get further the next time.

After a long time the package manager will have installed Wine somewhere on your system. At this point you should have a working version of Wine.

Important Note: If your package manager has installed a version of wine equal to or newer than 1.5.13, then congratulations! You're nearly done! Here's how to tell what version of wine your package manager installed. Type the following command at your command-line prompt:


:
wine --version


You should get a response something like "wine-1.5.13" If, however, you have a version lower than 1.5.13, then jump to the bottom of this guide to the section that is entitled, "Download and Unpack Wine Source Code". When you've built the latest version of wine, return here to proceed.


Download and Install Winetricks (Both Linux and Mac)

We're almost there. Anarchy Online needs a few Windows Run-time libraries, and it would be a pain to have to install all those things yourself. Instead, I suggest you use winetricks. Download Winetricks here. If your web browser mangles up the winetricks script, you can download it using the curl or wget command:


:
wget http://winetricks.org/winetricks


or


:
curl http://winetricks.org/winetricks -o winetricks


You need to set the "executable" permission on winetricks:


:
chmod a+x winetricks


Winetricks can be run just from the command-line, but it also has a graphical user interface. If you want to use the graphical user interface you need to install zenity (completely optional):


:
yum install zenity


Also, in order to install some packages in wine you will need cabextract. Install cabextract using the package manager:


:
yum install cabextract


Set up a WINEPREFIX (Both Linux and Mac)

Now we need to set up a WINEPREFIX with everything that Anarchy Online needs. By default, wine will use a WINEPREFIX named ".wine" in your home directory. It is recommended that each windows application you use in wine is installed into its own WINEPREFIX. In this example, I will use a WINEPREFIX named ".wine_ao" in my home directory.

Type the following if you are using a tcsh variant shell:


:
setenv WINEPREFIX ${HOME}/.wine_ao


or this if you are using a bash variant shell:


:
export WINEPREFIX=${HOME}/.wine_ao


How do you know which is which? If you type one and get an error message, try the other. You can verify that the WINEPREFIX variable is set correctly by echoing it back:


:
echo $WINEPREFIX


You should see the path you set. Now let's create the WINEPREFIX:


:
wine notepad


Wine will now create the WINEPREFIX. It will ask you whether or not it should install "Gecko" and "Mono", which is an open-source web browser and open-source .NET implementation. Answer, "No" to both because we will install Internet Explorer and .NET from Microsoft. Once the WINEPREFIX is created, "notepad.exe" will pop up to indicate everything went well. Close Notepad and type the following command at a terminal window:


:
winetricks dotnet20 corefonts fontfix vcrun2005 vcrun6


This will install .NET 2.0, all the fonts you will generally need to use, Internet Explorer 6, Microsoft Visual C++ Runtime 6.0 and 2005. This should be everything you need in order to run Anarchy Online, Clicksaver, and Anarchy Online Inventory Assistant in Wine.

Install and Play Anarchy Online (Both Linux and Mac)

Now you need to install Anarchy Online. You can either download the installer or copy a previously installed Anarchy Online folder from a Windows installation.

To run a windows program in Wine make sure your WINEPREFIX environment variable is set correctly in the current terminal window (as shown in the previous section). Running the AO installer in wine would look something like this:


:
wine AnarchyOnline_18.5.3-Large.exe


Once AO is installed in the correct WINEPREFIX, you can start the game as follows:


:
cd "${WINEPREFIX}/drive_c/Program Files/Funcom/Anarchy Online"
wine Anarchy.exe


Congratulations! The AO Launcher should come up, and everything should work (including the new in-game store, mouse look and steer, patching, etc...)

Wine should be working for you now. You can stop reading here. The following couple of sections describe how to build wine from source code and apply patches. This is only necessary if your package manager did not install the latest developmental version of wine, the following section describes how to download and configure wine from source.







Download and Unpack Wine Source Code (Both Linux and Mac)

Because the fixes to Wine that allow it to correctly handle the mouse in Anarchy Online was not implemented in wine until version 1.5.13, if your package manager did not install the latest version, you need to download the Wine source code build wine yourself. Conveniently, your package manager, should have installed all the prerequisites for wine.

Begin by downloading wine by going to Wine's SourceForge site and downloading the latest developmental release. You should end up with a file named something like: "wine-1.5.13.tar.bz2"

Unpack the source code somewhere where you plan on working by typing the following at the terminal prompt:


:
bunzip2 < wine-1.5.13.tar.bz2 | tar xvf -


You will now have a directory named "wine-1.5.13" with lots of source code in it.

Build and Install Wine (Both Linux and Mac)

Now we will build the version of Wine that we just downloaded. There are a few things we need to decide and set up before we start compiling. First, where do you want this version of wine to get installed after it's built? You should not install this version of wine into the same location that your package manager installs stuff, because that is almost guaranteed to break your package manager's ability to update things in the future. In our example, I've chosen to install wine in a directory named "Projects" in my home directory.

Second, you need to set up your environment to find all those dependencies that your package manager installed. For some Linux distributions the package manager installs packages right in the directory where the Linux operating system keeps the rest of its programs ("/usr") while other package managers try to keep programs that the user has added in a separate location ("/usr/local" or "/opt"). MacPorts installs its software in "/opt". You can try to figure out where your package manager installs programs by seeing where the package manager installed the base version of wine earlier by typing the following command at the terminal window:


:
which wine


Hopefully you will get a message something like "/usr/local/bin/wine" or "/opt/bin/wine". That will tell you the package manager installed wine in "/usr/local" or "/opt" respectively. Next find out where X11 is located on your system. Type the next command in a terminal window:


:
which xterm


Usually X11 is installed in "/usr/X11R6" or "/usr/X11". On a Mac, if you installed XQuartz, it will be located in "/opt/X11"

Next we need to figure out which shell you are using. Type the following in a terminal window:


:
echo $SHELL


You will either receive a message something like "/bin/tcsh" or nothing at all. Once you know what shell we're running you need to set some environment variables. You need to tell the wine configure script where to find X11 and all the dependencies the package manager built. Replace the "/usr/local" part in the commands below with where your package manager installs software and "/usr/X11" with where X11 is installed. If your shell is tcsh, type the following at a terminal window:


:
setenv CFLAGS -I/usr/local/include -I/usr/X11/include
setenv LDFLAGS -L/usr/local/lib -L/usr/X11/lib
setenv PKG_CONFIG_PATH /opt/lib/pkgconfig


If your shell is bash (or you get the error "setenv: command not found", then set the environment by typing the following command in a terminal window:


:
export CFLAGS="-I/usr/local/include -I/usr/X11/include"
export LDFLAGS="-L/usr/local/lib -L/usr/X11/lib"
export PKG_CONFIG_PATH=/opt/lib/pkgconfig


Now you're ready to configure your build. Make sure you are inside the wine-1.5.13 directory and type the following command at a terminal window. Replace "$/Projects" in the example below with the directory into which you want to install this version of wine. Keep in mind that the directory must already exist. If it doesn't exist, then you should create an empty directory there now:


:
./configure --prefix=${HOME}/Projects


If the configure script runs to completion without any fatal errors you're ready to build and install. Type the following commands at a terminal window:


:
make


And if things build successfully then install your newly built wine:


:
make install


Now you should have built and installed wine. Now you can go back and install the necessary run-time libraries.

Last updated on 04.03.2013 by Llie
Written by Llie
Do you have questions about this article or found an error? 2 comment(s) - Click here to view them!