Friday February 10, 2012 8:02 AM AEST

Installing WINE

By Leigh Cook
11:17 May 9, 2008
Tags: Installing | WINE | howto | tutorial
«  »
Installing WINE
Wine configuration
All good Linux tools are loaded with options, and like the blood in an anime character, Wine is filled to bursting point. The first port of call is, unsurprisingly, the Wine configuration tool, ‘winecfg’:

wine winecfg


Some of the key settings include:
Setting the version of Windows that Wine reports itself as, under the ‘Applications’ tab. You can set this on a global or per-application basis. This can be handy for getting specific applications running – 3DMark05, for instance, works with the ‘Windows 98’ setting, but not the 2000 or XP settings.

Audio acceleration options, in the ‘Audio’ tab. Many games only work when the ‘Hardware Acceleration’ option is set to ‘Emulation’, so try this if you have any in-game sound issues. It’s also best to pick one sound driver API to use (ALSA, generally), and disable the others.

click to view full size image


The ‘Enable a virtual desktop’ option, in the Graphics tab. This creates a single window on your desktop that all of Wine’s windows sit inside, which can help avoid window management issues with some applications. It’s also great for troubleshooting full-screen games, since the game is limited to the virtual desktop window, giving you full access to any Wine error messages.

DLL override options, in the ‘Libraries’ tab. Some of Wine’s built-in DLLs can be replaced with the original Windows versions for improved compatibility, but to use them, you need to add a manual override for the specific DLL involved. Civilization IV is a good example – you need to install a genuine ‘msxml3.dll’ file in to your ‘system32’ folder and add a DLL override to get it running.

You can find further options in the registry, which you can edit using Wine’s built-in version of ‘regedit’:

wine regedit


For instance, if you’re happy running Source engine games in DirectX 8 mode, you can improve performance by disabling Wine’s DirectX 9 shader support and using the older, but more heavily optimised, DirectX 8-only shader code. To do this, use ‘regedit’ to set the ‘HKEY_CURRENT_USER/Software/Wine/Direct3D/UseGLSL’ to ‘disabled’.

Home Wine-making
To get the best from Wine, building it from source is the way to go. It’s a little more complicated than installing packages since you need to install all of the libraries that Wine depends on before it’ll build, but it’s quite straightforward after that, and it’s a great way to give multi-core CPUs a workout.

1) Install the development packages required for building Wine, which includes the libraries and headers for X, OpenGL, ALSA, libjpeg, libgif, and libXML, among others. On Ubuntu, there’s a great shortcut for this using APT, since by default it tracks the build dependencies for each package. This means that you can install all of the build dependencies with one command:

sudo apt-get build-dep wine


2) Grab the latest Wine source code archive from the WineHQ download page, extract its contents, and change in to the newly-created directory:

tar jxf wine-0.9.55.tar.bz2
cd wine-0.9.55


3) Configure and build the source:

./configure --prefix=/usr/local/wine
make depend
make -j3


The ‘-j3’ option specifies the number of threads to use while building. This should be one more than your number of CPU cores to ensure that each core is always kept busy, so ‘-j3’ is perfect for a dual-core CPU, while ‘-j5’ would be best for a quad-core system.

4) Install the compiled copy of Wine:

sudo make install


Rather than overwriting any packaged versions of Wine you have installed, this version will be installed under ‘/usr/local/wine’. This folder won’t be searched for executables by default, so you’ll need to either specify the full path to the Wine executable when running it (‘/usr/local/wine/bin/wine’), or add this folder to your path, so that running ‘wine’ will find the new version:

export PATH=/usr/local/wine/bin:$PATH


You can add this to your ‘.bash_profile’ file to permanently modify your path.


click to view full size image


There are two main benefits to building from source, and the first is the ability to handle regressions. Wine is an incredibly complex product, and there are often times when a change in one part of the code can have unintended consequences elsewhere, or when a new implementation of something that may be an overall improvement is weaker in particular areas than the old version. In either case, you can get situations where a game that ran well with an earlier version of Wine runs poorly, or not at all, on the latest version, which is particularly annoying when the latest version includes fixes for other titles.

By building from source, you can have multiple versions of Wine installed simultaneously, simply by changing the prefix used in the ‘./configure’ command for each installation. For instance, you could install each version in to its own, version-numbered folder:

./configure --prefix=/usr/local/wine-0.9.55


To help manage this, you can use a symlink to point ‘/usr/local/wine’ to the most compatible version of Wine that you have installed:

cd /usr/local
sudo ln wine-0.9.55 wine


This way, you can run ‘wine’ as normal for the most part, while still having the flexibiltiy of using the full path to specify exactly which version to run when needed. Each time you install a new version of Wine, you can make the new version the default by updating the symlink, and if you run into problems, you can point it back to the previous version just as easily. The only catch is that you can’t actually run multiple versions of Wine simultaneously, so you’ll have to close down any applications running on one version of Wine before you can launch any with another.

 
«  »
 
This article appeared in the April, 2008 issue of Atomic.

Behind the scenes with Mass Effect 3! GTX 560 VGA round-up! Essential Skyrim tweaks to improve your game! Plus reviews, news, hardware, more games, and easy to following modding guides for PC builders. ON SALE NOW!
 
Latest Competitions
 
Atomic Magazine

Issue: 133 | February, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop
 
 
Close Get the February, 2012 issue of Atomic mailed to you for $8.95, including postage.

SubscribeBuy nowDigital Version