Skip to content

WINE BASICS

Wine is a tool that re-implements Win32/Win64 APIs in a fashion that allows for usage of them on many non-Windows platforms, including GNU/Linux, OS X, and BSD.

This guide will focus on GNU/Linux, and has been tested specifically on Fedora and Red Hat Enterprise Linux 7 (EL7). But the principles should be identical on other distributions. As I no longer use Mac OS, I cannot vouch for any specifics there, but there should be little changes to operation, rather its installation may be a bit more challenging than on any GNU/Linux as every stock install can quickly install wine and be ready to be used.

ACQUIRING WINE

There are a few different methods of getting wine onto your system. Each of these methods has its ups and downs. My recommendation is to pick up a license for Crossover, as it is rather fair priced to handle normal games and applications. For faster moving targets to use Lutris. This combination allows for funding wine's development (%90 of the wine devs are on Codeweavers payroll). Lutris is better suited for slightly more volatile software as it can upgrade wine revisions rather easily, Crossover is pegged to one version and patched with featuresets that Codeweavers opts into supporting. This means a major patch to Path Of Exile or World of Warcraft generally is not so big of a deal for vanilla/Lutris wine users, but can be for Crossover users. This lag time is generally due to the fact there is a high regard for QA at Codeweavers where the F/LOSS world is more willing to help with or overlook any issues that crop up, paying customers not so.

WINE

Vanilla wine from your package management tool on GNU/Linux.

CROSSOVER

Wine's corporate sponsor is Codeweavers, which flagship product is Crossover. Crossover is a commercially supported version of wine, with automation scripts (caled Crossties), official support, and a knowledgebase.

LUTRIS

Lutris is an open source tool specifically for GNU/Linux gaming. Their plugin system, called runners, includes wine support.

****PLAYONLINUX

PlayOnLinux is another open souce tool aimed at making wine's usage simpler.

USING VANILLA WINE

Altough powerful, wine can be a royal PITA to use and understand at first, turning many users off from using it. Although there are several tools, both open source and paid variations, one can do everything without them with little to no fuss. The following will go over the basics of wine and how to best maximize its power and tips to getting software to work correctly where it should.

WHAT ARE PREFIXES

As wine can simulate for applications a faked Windows environment, sometimes with the way applications are made to work, certain versions of software do not play well with each other. The best option is to run in it's own environment called a prefix. So generally speaking a game or an application should get its own prefix. Some exceptions include MS Office, which all components can share the same prefix, and likewise for the Blizzard App, all games can go into the same prefix. That said, you are asking for problems by mixing those two examples into the same prefix.

Without invoking wine in any special way, you will be using the default prefix. Its advised that you do not utilize the default prefix for much of anything.

Using prefixes in a sane way should also involve some organization of your data & files. For simplicity I will presume that you choose to use "/home/username/wine" as your folder for holding all the prefixes. A shortcut to your home directory in GNU/Linux is "~", so another way to express that is "~/wine".

PREFIX CREATION

Here is the simple way to create a fresh prefix with the name APPNAME.

    mkdir ~/wine/APPNAME
    WINEARCH=win64 WINEPREFIX=~/wine/APPNAME wineboot

Now to add software via "~/Downloads/INSTALLER.EXE" to it you simply do the following:

    WINEPREFIX=~/wine/APPNAME wine ~/Downloads/INSTALLER.EXE

For the best results in getting applications and games functional, you will want a helper tool called "winetricks" as well, as it can automate and sinplify certain addon software, as in DirectX DLLs for example, quite easily. To install winetricks, check your package manager first, as some distributions package it up, or do the following:

    wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
    chmod +x winetricks
    sudo mv winetricks /usr/local/bin/

To use winetricks on a prefix:

    WINEPREFIX=~/wine/APPNAME winetricks

The following will setup several things inside of a prefix:

    WINEPREFIX=~/wine/APPNAME winetricks corefonts vcrun2005 vcrun2008 vcrun2015

CREATING A DESKTOP LAUNCHER

So, like most things, you are hardly required to use the CLI to launch titles setup the aforementioned way. Just create a desktop launcher that includes the necessary bits to properly launch the title. So in my case I use GNOME3 Classic on RHEL7 and have desktop icons enabled. So I can create the launcher so that the executable is

    env "WINEPREFIX=/home/user/wine/APPNAME" wine /home/user/wine/APPNAME/drive_c/Program Files/APPNAME/APPNAME.EXE"

The executable and prefix paths will require quotes if you plan to avoid escape characters for restricted shell characters. Alternatively you could also create a shell script that does that and just invoke "sh ~/path/to/script/script.sh". Depending on how much is involved, the script is potentially a necessary element.

Creating a .desktop file is another option that is less difficult that one may imagine, but with some desktops (GNOME3) a simpler method due to overcomplications in the way things have to be (yes that was a slight jab at GNOME). Here is a sample desktop file entry that can be placed either on your desktop, or for inclusion in your applications menu "~/.local/share/applications/".

    [Desktop Entry]
    Type=Application
    Name=Battle.net
    Icon="/home/user/wine/battlenet/bnet.ico"
    Exec=env "WINEPREFIX=/home/user/wine/battlenet/" wine "home/user/wine/battlenet/drive_c/Program Files (x86)/Blizzard App/Battle.net Launcher.exe"
    Categories=Game

Take note that I did use quotes for not needing to escape the spaces and parenthesis characters and that there is the "env" parameter in the very beginning of the exec line. This fixes issues with passing variables, as normally the "=" character is forbidden. And as there is no standard icon file, I downloaded my own off the internet and placed it in the prefix, although anywhere would be sufficient, this is a personal taste, as I now have a fully contained "entity" that can be copied and passed around to other systems or friends even (be careful whith autologins and personal information when doing this)