Saturday March 20, 2010 12:57 AM AEST

Installing WINE

  • Email a Friend
  • Print Page
«  »
Installing WINE
By Leigh Cook
May 9, 2008
Tags: Installing | WINE | howto | tutorial
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.

Want to check out the first Australian review of Final Fantasy XIII? We got in this month's Atomic!

Plus HD projectors, Napoleon: Total War, Intel's new six-core processor, PC upgrading guide, and a whole lot more.

ON SALE NOW!
Comments

Be the first to comment on this article.
Thoughts on this article? Add a comment below.
Login or register to submit a comment.
 
 
Atomic Magazine

Issue: 111 | April, 2010

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
"Or are the sales perhaps boosted by those who felt a little underwhelmed by the MW2 multiplayer ..."
by discoInferno | Mar 20, 2010 12:52 AM
 
"alex - bugger all. 78mg of caffeine. About the same as a cup of instant coffee. Taurine, Gurana ..."
by tantryl | Mar 20, 2010 12:51 AM
 
"Yummy yummy yummy om nom nom nom nom nom nom nom

GB"
by Ghost_Bear | Mar 19, 2010 11:59 PM
 
"Hawkeye: So if noone said anything about it you wouldn't think anyone cared and you would leave ..."
by fliptopia | Mar 19, 2010 10:05 PM
 
"I really want to try one of these out.
If anyone has one let me know how it goes."
by Dan_2 | Mar 19, 2010 7:24 PM
 
1) Apple iPhone 8GB43 plans 22%
2) Nokia N9740 plans 11%
3) HTC Touch HD28 plans 11%
4) HTC Magic5 plans 56%
5) Sony Ericsson Aino6 plans 11%
1) Netspace36 plans 100%
2) Optus41 plans 15%
3) Vodafone7 plans 9%
4) Telstra BigPond30 plans 4%
5) Dodo34 plans 1%

Mobiles | Broadband | Credit Cards

Haymarket - Atomic MPC
Latest User Reviews
Logitech MX518 Gaming-Grade Optical Mouse
90%
Good shape, design and Ergonomics
 
Coolermaster HAF 922
100%
A case to make a statment and give your pc the Heavy Hardcore Grunt it needs.
 
Coolermaster Excalibur
50%
Atomic is under attack
 
XFX 9300 Motherboard
40%
HUGE letdown
 
CM Storm Sentinel gaming mouse
90%
Sexy and instant geek respect.