====== Tweaking Basics ======
This article aims to help assist in setting up wine for running win games on a linux host. This article assumes that you are a competent linux user and has a good knowledge of the system and command line.
===== Wine Basic Setup =====
Wine works by translating windows syscalls into their linux equivalent, so it acts as a comparability layer. Thus wine with emulate the windows filesystem with a //prefix//. This is either set as some system directory, or set by the individual user. Usually, an application is bootstrapped with wine similar to the following.
export WINEPREFIX=${PWD}/.pfx
wine executable.exe
Setting ''WINEPREFIX'' specifies where wine will put any filesystem-related things. This prefix will also symlink any linux-specific device files to a similar one in the prefix tree.
===== Basics of Tweaking =====
With wine, you have two main ways of applying tweaks without getting deeply involved: ''winecfg'' and ''winetricks''. The former is a tool bundled with wine that allows you to configure a whole host of settings from display, audio, input and many others. The latter is a script that helps wrap some of the more advanced kind of tweaks (such as installing windows libraries) and make them much easier to perform. WInetricks allows you to install windows .msi/.exe installers, download graphics libraries, and tweak registry entires without much effort on your part.
===== Other Tips =====
If you run many games, I would suggest making only one prefix, then wrapping the launch of each game with the following script. I usually have all my games in their own directors in ''~/games/'', then I have the shared prefix in ''~/games/.pfx/''. You can structure your setup however you want, but this is generally how I prefer to do it.
#!/bin/sh
export WINEPREFIX=/path/to/prefix
if [ $# -ge 1 ]; then
${@:1}
else
wine /path/to/exe
fi
This script is also very nice for debugging issues with your prefix, as you can easily specify environment variables without polluting your primary shell session, as well as quickly changing the location of the prefix the game is running on.