Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "Wine"

From PCGamingWiki, the wiki about fixing PC games
m (Robot: Cosmetic changes)
(47 intermediate revisions by 18 users not shown)
Line 1: Line 1:
Wine is a free and open source software application that aims to allow computer programs written for [[Windows (Operating System)|Windows]] to run on Unix-like operating systems.
+
{{Infobox non-game
 +
|cover        = Wine logo.png
 +
|developers  =
 +
{{Infobox game/row/developer|Wine authors}}
 +
|release dates =
 +
{{Infobox game/row/date|Linux|July 4, 1993}}
 +
{{Infobox game/row/date|macOS (OS X)}}
 +
|winehq      =
 +
|wikipedia    = Wine (software)
 +
}}
  
== Difference between emulation and wine ==
+
{{ii}} Note that it is recommended that you have at least basic knowledge of the Terminal/shell before using Wine. If you do not then try one of the available [[Wine#Front-Ends|front ends]].
Wine does not stand for "Windows Emulator", it specifically stands for "Wine is not an Emulator"
+
{{ii}} Be aware that some games may not work or have issues in WINE as well, especially older ones, either due to the missing DLL library which requires manual installation or just compatibility issues.
 +
{{--}} Due to the lack of OpenGL updates on MacOS, which is still using 4.0 version from 2010, there may be issues with running DirectX 11 games or worse, no support at all.
 +
 +
'''General information'''
 +
{{ii}} [https://www.winehq.org The Wine Website]
 +
{{ii}} [http://wiki.winehq.org/ The Wine Wiki]
 +
{{mm}} [https://appdb.winehq.org The Wine Application Database]
 +
 
 +
'''Communities'''
 +
{{ii}} [https://www.reddit.com/r/winehq/ /r/winehq] - General Wine Discussion
 +
{{ii}} [https://www.reddit.com/r/wine_gaming/ /r/wine_gaming] - Wine Gaming Discussion
 +
 
 +
'''Wrappers'''
 +
{{mm}} [https://www.gog.com/forum/general/adamhms_linux_wine_wrappers_news_faq_discussion Adamhm's Wrappers] (Linux)
 +
{{mm}} [https://wiki.dotslashplay.it//en/start ./play.it] (Linux)
 +
{{mm}} [https://lutris.net/games/ Lutris] - Contains Wine wrappers (Linux)
  
An emulator slows execution by emulating hardware with software, wine creates duplicate libraries which link through to native functions in your operating system of choice.
 
  
When a game asks [[DirectX]] to render a circle, the function it is accessing is actually a similarly named Wine function. This function then tells [[OpenGL]] to render a circle. This overhead is minimal, and is often offset by alternative operating systems not requiring anti-virus programs or firewalls, and their lesser bloat.
+
Wine is a free and open source compatibility layer that aims to allow computer programs written for [[Microsoft Windows|Windows]] to run on [[Linux]] and [[OS X]] by translating Windows system calls into POSIX-compliant system calls, recreating the directory structure of Windows systems, and providing alternative implementations of Windows system libraries, system services through <code>wineserver</code> and various other components (such as Internet Explorer, the Windows Registry Editor, and msiexec).<br />
 +
<br />
 +
 +
The software is not by all means an emulator, hence its acronym is '''W'''ine '''I'''s '''N'''ot an '''E'''mulator. The main advantage it gives is the ability to run any software regardless of the Windows system was made for, so if an older Windows 95 game does not work in a native OS such as Windows 10 or has compatibility issues which renders the game broken, it will most likely work on WINE. A full DirectX 10 and 11 support has been added since version 3.0 along with it's own CSMT.<br />
  
== Mac usage ==
+
==Versions and Editions==
Mac users can download and install Wine using [http://www.macports.org/ MacPorts].  
+
===Versions===
 +
Upon entering the WineHQ page you may have noticed the '''Stable''' and '''Development''' versions. The Development version is more often updated as the improvements and bugfixes are released in small packages, while the Stable's update process is slow as it relies on releasing the update as one large package containing the features from previous Development versions. Do not be confused with the version numbers though as for example the Stable 2.0.2 version contains a wide range of features from Development 2.17 version and below.
 +
===Editions===
 +
 +
* [https://www.winehq.org/ Normal]
 +
* [https://wine-staging.com/ Staging]
 +
* [https://wiki.ixit.cz/d3d9 Gallium Nine]
 +
 +
The Staging one contains community-made patches to make sure the game works properly, but be aware that sometimes a software may not work in Staging, but it'll work in normal one. It always uses the Development version of Wine.<br />
 +
 +
Gallium Nine is a special one, besides being based on Wine Staging it is very beneficial for AMD and Nouveau as it uses the Gallium 3D API, which is a part of the Mesa library and gives a greater performance for games using DirectX 9, as compared to the other versions, it doesn’t translate Direct3D signals into OpenGL. It won't bring any improvements for NVIDIA users that rely on proprietary drivers, as the manufacturer uses their own driver library.  Be aware that depending on Linux distribution, you might need to compile Mesa with ```enable_nine``` variable to use Gallium3D Nine. <br />
 +
 +
Other versions also exists, some contain additional features such as Wine Rt which runs programs in real-time, or the ones that are made specifically for one game, for example wine-starcraft allows you to run Starcraft Anniversary 1.16 without any issues, compared to the official build.<br />
 +
 +
Before installing make sure to enable the multilib support, if you are on a 64-bit system and always install WINE Gecko and WINE Mono for applications that need support for Internet Explorer and .NET Frameworks. They may not be required, but it will prevent downloading them each time you create a new Wineprefix.
  
A detailed tutorial for Mac download, installation and usage can be found at [http://www.davidbaumgold.com/tutorials/wine-mac/ davidbaumgold.com].
+
==Installation==
 +
===Linux===
 +
To install Wine on your Linux distribution, check your package manager. Some Linux distros DON'T come with Wine pre-installed, but it can be installed just with a single command or a few clicks depending on the distro.
  
=== GUI applications ===
+
====Debian====
There are also GUI applications for those who do not want to get into the nitty-gritty of terminal-based computing:
+
On a 32-bit system run:<br />
* '''[http://wineskin.doh123.com/ {{Anchor|Wineskin}}]''' is an easy to use application, that created applications with simple a simple installer for Windows programs. Most, if not all, gamers can get away with simply using Wineskin.
 
  
== Tutorial ==
+
<code>sudo apt install wine</code><br />
This is a beginners guide on getting Windows programs to run in Wine, some games may require manual compilation or other tweaks.
 
  
The techniques listed here are designed for [[GNU/Linux|Linux]], but other operating systems such as [[Mac OS X (Operating System)|Mac OS X]] can implement them in much the same way.
+
or if you want the development version.<br />
  
Note that several programs can be installed and run with tools such as [http://www.playonlinux.com PlayOnLinux], but this tutorial will teach you to do things manually, which comes in handy if the tools do not support a game, or do not work properly.
+
<code>sudo apt install wine-development</code>
  
=== Linux installation ===
+
If you are on a 64-bit system you need to use this command before installing Wine:<br />
While most Linux distributions come with a version of Wine, more often than not you'll want to use a bleeding edge version to get newer games working.
 
  
You can [http://sourceforge.net/projects/wine/files/Source/ download the source code] and compile it yourself, or [http://www.playonlinux.com/wine/binaries/ download a pre-compiled version] from PlayOnLinux. Unless specifically stated otherwise, you should use a 32-bit version of wine.
+
<code>sudo dpkg --add-architecture i386 && sudo apt update</code>
  
=== Starter script ===
+
====SteamOS====
The following script can be used as a base to launch windows applications in wine.
+
[https://github.com/mdeguzis/SteamOS-Tools SteamOS Tools] is required in order to get Debian's repositories and sources. Follow the documentation to learn how to add and install a software from Debian.
  
#!/bin/bash
+
====Debian-based system such as Ubuntu, Linux Mint etc.====
 +
Type <code>sudo apt-get install wine</code>
 
   
 
   
PATH="/home/$USER/wine/versions/1.3.24/bin:$PATH"
+
To get the latest Wine release, use these commands in this order:
# This line prefixes a directory to your $PATH. Basically, when you run a command like "wine"
 
# it will look in that folder to run it. This lets you use different wine versions for different games.
 
# Replace the directory with whatever is the location of your wine version's binary files
 
 
   
 
   
export WINEPREFIX="/home/$USER/wine/prefixes/mygame"
+
<pre>
# Every prefix contains it's own settings, it's own installed programs, and it's own "Hard drive"
+
wget https://dl.winehq.org/wine-builds/Release.key
# This allows you to install different games with widely ranging settings, without messing up other ones.
+
sudo apt-key add Release.key
 +
sudo apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/
 +
</pre>
 
   
 
   
export WINEDEBUG="-all"
+
====Fedora====
# This option should be disabled during install, or debugging. It stops wine from outputting errors, which
+
Run this command<br />
# can increase performance as there are often large amounts of data it attempts to output.
+
<code>sudo dnf install wine</code><br />
 +
or<br />
 +
<code>sudo dnf install wine-devel</code><br />
 +
For developer version.<br />
 +
 
 +
Please follow [https://wiki.winehq.org/Fedora these] instructions if you want the latest version.
 
   
 
   
cd "$WINEPREFIX/drive_c/Program Files/mygame"
+
====ArchLinux and distributions based on it such as Antergos, Manjaro etc.====
# Change to the directory your game is installed in
+
If running a 64-bit system, make sure you have enabled the multilib repository. Then run:
 
   
 
   
wine mygame.exe
+
Type <code>sudo pacman -S <wine edition></code>.
# And run it in wine
 
 
   
 
   
# Other things you may want to keep in the file for convenience
+
Replace <code><wine edition></code> with:
 +
* <code>wine</code> - Standard version
 +
* <code>wine-staging</code> - For Wine Staging
 +
* <code>wine-staging-nine</code> - For Wine Staging with Gallium Nine patches.
 
   
 
   
#winecfg
+
Other versions of Wine are available in the AUR.
# This allows you to configure the prefix, set up video settings, audio settings, and other options
 
 
   
 
   
#wineserver -k
+
====Solus====
# This will terminate all processes on the wineprefix, nice for stopping uncooperative windows programs.
+
Type <code>sudo eopkg install wine</code>
 
   
 
   
#winetricks
+
====OpenSUSE====
# Winetricks is used for many tweaks to wine, which you will probably be using for some of the games you install.
+
Run <code>sudo zypper install wine</code><br />
  
Make sure to make the script executable before you try to run it:
+
 +
'''For other distros, please follow the documentation/wiki of the distribution or [[Wine#Compile_from_source_code|compile the software from the source code]].'''
 +
 +
===OS X===
 +
{{ii}} It is recommended to have both [https://brew.sh/ Homebrew] and [https://www.macports.org/install.php MacPort] installed
 +
{{ii}} Gatekeeper must be set to accept unsigned packages and [https://www.xquartz.org/ XQuartz] version 2.7.7 or higher must be installed.
 +
{{--}} Due to Apple's decision to drop the support for 32-bit applications after Mojave, there is a chance that Wine may not work.
 +
 +
To install Wine on Mac OS, you can either download the PKG file (Recommended) or the TAR archive, they can be found [https://dl.winehq.org/wine-builds/macosx/download.html here].
 +
 +
After installing it from the PKG file, the Wine shortcut will appear in the Launchpad. Upon running it, it will display terminal with a short introduction to important commands.
 +
 +
====Uninstalling====
 +
If using Homebrew:<br />
 +
<code>brew rm wine && brew rm $(join <(brew leaves) <(brew deps wine))</code>
 +
 +
If using MacPorts:<br />
 +
<code>sudo port uninstall --follow-dependencies wine</code>
 +
 +
If compiled from the source code: <code>sudo make install</code> at the directory with Makefile and then delete the local Wine source code.
 +
 +
Aftere one of these steps remove any WINEPREFIX and remove the <code>.local</code> from your Home folder
  
<code>$ chmod +x script</code>
+
===Compile from source code===
 +
If you wish to compile Wine from it's source code please follow these pages:
 +
[https://wiki.winehq.org/Building_Wine Building Wine]
 +
[https://wiki.winehq.org/MacOS/Building Building Wine in MacOS]
  
=== Tweaks ===
+
==Graphics==
Several tweaks to wine can provide functionality ranging from the .NET framework to Internet Explorer.
+
If you are on a 64-bit Linux system and depending on the distro, make sure you have 32 bit drivers installed. WIthout it you will receive the “Direct rendering is disabled, most likely your OpenGL drivers have not been installed correctly” message.<br />
 +
 +
If installed, make sure to reset the display server.
 +
 +
==Audio==
 +
Currently, Wine best supports ALSA if you are on Linux, but on a 64-bit system you must install the 32-bit versions, this also counts for PulseAudio and OSS (In this case, all you need is the ALSA-OSS package, as the OSS kernel will not suffice).
 +
 +
Keep in mind that for some games, such as Skyrim, will use an advanced sound system. For this case you need the 32 bit version of OpenAL as well.
 +
 +
In MIDI’s case, Wine has an excellent support for it. You should either use Timidity or Fluidsynth and set one of them up.
 +
 +
As for audio in Mac OS, CoreAudio works out of the box with the software.
 +
 +
==Command Stream Multi-Threading (CSMT)==
 +
Since 2013, Wine developers have been experimenting with the stream/worker thread optimization, which is exclusive to both Wine Staging and Wine Staging Gallium Nine. Depending on the game, enabling it from the <code>winecfg</code> will give a performance boost (for some even bigger than running it natively on Windows!) and fixes graphical issues, if present. Wine Team officially added their own CSMT since the release of 3.0 version.
 +
 +
==General==
 +
By default, Wine will be already set to handle Windows files such as <code>.exe</code>,<code>.bat</code>,<code>.msi</code> etc. Running one of them will invoke the software and handle the rest in it's default <code>WINEPREFIX</code> folder located at <code>~/.wine</code>. If you are required to run the program in Terminal however, this can be done by using the <code>wine</code> command.<br />
 +
 +
'''Wineprefix''' is the directory used for managing your Windows files, by default it will use the .wine folder in your Home directory, if using Linux, and depending on the architecture of your system, it will be made for 64-bit applications or 32-bit. If the game you currently wish to run works only on 16-bit system, you may wish to create a 32-bit Wineprefix folder. This can be done with this command line: <br />
 +
 +
<code>WINEARCH=win32 WINEPREFIX=~/<new folder name></code>
 +
 +
<code>WINEARCH</code> is responsible for changing the environment, there are only two options to choose from:
 +
* win32 - Create a 32-bit environment
 +
* win64 - Create a 64-bit environment.
 +
 +
<code>WINEPREFIX</code> command is used to create a new folder or use one which will store Windows program.<br />
 +
 +
===Wine AppDB Rating System===
 +
While checking WineHQ's [https://appdb.winehq.org/ Application Database] you may encounter these ratings and here are their meanings.
  
==== Wine versions ====
+
====Platinum====
A list of precompiled versions of Wine is available at [http://www.playonlinux.com/wine/binaries/ PlayOnLinux]
+
The program installs and works flawlessly out of the box, without any changes in <code>winecfg</code>.
 +
====Gold====
 +
The application works without any problem once you make some DLL override or change some settings in <code>winecfg</code> or installing a third-party software.
 +
====Silver====
 +
The program works great for "normal" use with some of the exceptions such as issues with handling the DRM, the game works in singleplayer but not in multiplayer etc.
 +
====Bronze====
 +
The software works, but has some issues for normal use such as graphical glitches/issues, run slower than it should, font issues etc.
 +
====Garbage====
 +
The application does not work, cannot be installed or it will run but will show many errors that will make it unusable regardless of used settings.
 +
<br />
  
Later versions are supposed to be "Unstable" - however, later versions are usually required to get newer games to work.
+
'''It's best to check the information, comments or the bug list for the current software to learn how to get it to work or even check if it's fixed when it comes to Gold, Silver or even Bronze rating.'''
  
If a game doesn't work with a specific version of Wine, try a different one.
+
==Tweaking Wine==
 +
 +
===Winecfg===
 +
Winecfg is a GUI (graphical user interface) configuration tool for Wine. It allows you to change options for both the default setting and for specific applications. These options include the way Wine loads DLLs, graphical settings (including Window settings, screen resolution/DPI), desktop integration, drives and audio). It can be accessed with <code>winecfg</code> command, you can use it with <code>WINEPREFIX</code> to specify which Wine folder you wish to configure.
 +
 +
A run down on the different tabs of Winecfg is [http://wiki.winehq.org/winecfg available on the Wine Wiki].
 +
 +
===[https://winetricks.org Winetricks]===
 +
Winetricks is a script which allows you to install base requirements for running Windows applications. It is mainly used to install additional DLL libraries to make the program work, in case if it doesn’t. Besides that it also contains other stuff such as launching the Winecfg, installing the benchmark, install the game using pre-compiled script etc. from the default Wine folder. The program can be run with the <code>winetricks</code> command to launch the GUI version by default (Using <code>-h</code> argument will show additional options), you can combine with other Wine commands to be more specific. For example:<br />
 +
 +
<code>WINEPREFIX=~/.wine32 winetricks</code><br />
 +
 +
This will launch Winetricks, but all the changes or installations are done in the .wine32 folder.<br />
 +
 +
If you do not wish to constantly go through menus to install the required library or a program, you can specify it after the command.
 +
 +
<code>WINEPREFIX=~/.wine32 winetricks steam</code><br />
 +
 +
This command will let Winetricks to install Steam on a .wine32 folder.
 +
 +
Of course you can specify multiple libraries you wish to install and combine it with some arguments available for this software.<br />
 +
 +
<code>WINEPREFIX=~/.wine32 winetricks -q steam dotnet40</code><br />
 +
 +
This will let Winetricks not only to install Steam, but .NET Framework 4.0 as well and the <code>-q</code> argument will make sure not to ask any questions for each application/library.
 +
 +
==Front-Ends==
 +
If you do not wish to use the Terminal, there are some front-ends which will make your Wine experience much easier.
  
==== Winecfg ====
+
===Steam Play/Proton===
This is the default wine configuration tool, and allows you to change options ranging from the version of Windows, to the graphical capabilities, to the virtual hard drives in use by the prefix.
+
Linux [[Steam]] client has integrated fork of Wine for games, that lack native Linux version.<ref>[https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561 Introducing a new version of Steam Play]</ref>
  
The tool can be accessed with the command:
+
===[https://www.playonlinux.com PlayOnLinux]/[https://www.playonmac.com/en PlayOnMac]===
 +
This Python-based program allows you to install any Windows program using the pre-made scripts which makes the process automatic or perform it manually in case if the script does not exist. The main advantage of it is the ability to download and use multiple Wine version and ease of managing and configuring the prefixes. The main drawback however, is in it’s slow development time and outdated libraries that are available in the Additional Libraries. This program was made for simplicity in mind.
 +
 +
===[https://www.codeweavers.com/ Crossover]===
 +
A commercial version of Wine which includes scripts, patches, GUI and third-party softwares (Which are never accepted by Wine Project). It is available for both Mac and Linux. Despite being a paid product, the patches are later added to the Wine Staging and buying the software will support Wine developer.
 +
 +
===[http://wineskin.urgesoftware.com/tiki-index.php Wineskin]===
 +
A Mac exclusive tool used to make wrappers to run Windows software in Mac OS X. Which converts it into an .app file which allows you to run the converted program into a native system.
 +
 +
===[http://q4wine.brezblock.org.ua/ Q4Wine]===
 +
Front-end made in Qt4 environment for Linux system. It’s main advantage is the ability to use libraries from the Winetricks, built in WineApp Database, additional options such as mounting the ISO and it’s simplicity. The drawback of it however are no pre-compiled scripts which will automatically install the game along with required libraries and in some cases, specific Wine version which the game works without any major issues and requiring you to compile/install the specific Wine version of your choice if you want to use multiple Wine versions.
  
<code>$ winecfg</code>
+
==Improvements==
 +
===Run the game in OpenGL/Vulkan mode===
 +
{{Fixbox|description=Run the game in OpenGL/Vulkan mode|fix=
 +
If the game supports OpenGL/Vulkan, it is recommended to run it to avoid any performance issue. Many games accept the <code>-opengl</code> parameter, however in case of recent games you may have to set it up to run in Vulkan through the game’s options or using the <code>-vulkan</code> command prompt.
 +
 +
{{--}}Mac OS does not support Vulkan API.
 +
}}
 +
 +
===Show FPS overlay in games===
 +
{{Fixbox|description=Show FPS overlay in games|fix=
 +
Wine features an embedded FPS monitor which works for all graphical applications once you use <code>WINEDEBUG=fps</code> command. You can also use [https://gist.github.com/anonymous/844aefd70bb50bf72b35 this script] with the <code>xosd</code> package installed in order to display the FPS counter on top of the window.
 +
}}
  
==== Winetricks ====
 
Winetricks is a script that automatically downloads, installs, and configures many tools for Wine. It also contains scripts to automatically install games.
 
  
Installation instructions can be found at [http://wiki.winehq.org/winetricks the wine wiki].
+
===Enable CSMT===
 +
{{ii}} Depending on the game it may improve the performance when enabled.
 +
{{ii}} Command Stream Multi-Threading has been officially added since Wine 2.6, in case of Staging since 1.7.33
 +
{{Fixbox|description=Official Wine 2.6 or higher|fix=
 +
# Open up Wine's RegEdit with `regedit` in Terminal.
 +
# Go to the <code>HKCU/Software/Wine/Direct3D/</code> folder and create the DWORD key called <code>csmt</code> and put 1 as a value.
 +
}}
 +
{{Fixbox|description=Wine Staging/Wine Staging Gallium Nine|fix=
 +
# Open up the WineCFG with <code>winecfg</code> command
 +
# Go to Staging tab and check '''Enable CSMT for better graphics performance''' and accept the changes
 +
}}
  
Use is very simple.
+
==Issues Fixed==
 
+
===.NET/Mono===
winetricks -h          # Help menu
+
Some Windows applications require the [[Wikipedia:.NET Framework|.NET software framework]] to run (Wine will instruct you to install if an application you try to run requires it), which is not compatible with Wine. However, an open source piece of software called [http://mono-project.com/ Mono] was made to replace it. You can install it via installing [[Wine#Winetricks|winetricks]] and entering this line into the Terminal/shell:
winetricks ie6        # Installs internet explorer 6
+
winetricks mwo=force  # Forces mouse warp (For first person shooters where the mouse escapes the window)
+
<code>winetricks mono210</code>
winetricks vcrun2010  # Installs Visual C++ 2010 libraries
+
winetricks dotnet35    # Installs .NET 3.5
+
If the <code>wine-mono</code> is already installed from the distribution's repository, then it is not required.
 
 
==== Manual compilation ====
 
The most advanced tweak is to [http://sourceforge.net/projects/wine/files/Source/ manually download the source code], patch it, and compile it.
 
 
 
This last-ditch-effort allows you to run games that simply don't work with wine without alterations to the source code.
 
 
 
Compilation takes quite a while, and is very complicated, so I will only make one alteration to the [http://www.winehq.org/docs/wineusr-guide/installing-wine-source pre-existing tutorials].
 
 
 
When you run the configure script, give it a prefix, that way it will be compiled to it's own folder, ready to be used in the script above.
 
 
 
<code>$ ./configure --prefix=/home/$USER/wine/versions/custombuild</code>
 
<!-- arguable, but it puts it in categories so people can find it easier -->
 
  
 +
===D-Bus (OS X)===
 +
{{Fixbox|description=D-Bus Issue (Mac OS)|fix=
 +
Some Windows applications require the [http://www.freedesktop.org/wiki/Software/dbus D-bus process] to run, in order to communicate with certain other applications. While it is installed alongside Macports, it will not run unless you tell it to. You only need to do this once, and then the process will run every time on startup:
 +
 +
<code>sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist</code>
 +
 +
<code>launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist</code>
 +
}}
 +
 +
===Fonts do not show properly===
 +
{{Fixbox|description=Fonts do not show properly|fix=
 +
Install <code>corefonts</code>, if that does not work, use <code>allfonts</code> as a last resort from winetricks.
 +
}}
 +
 +
==="16-bit LDT support may be missing." error===
 +
{{Fixbox|description="16-bit LDT support may be missing." error|fix=
 +
Use <code>sudo echo 1 > /proc/sys/abi/ldt16</code> command
 +
}}
 +
 +
===Dual Head Setup/ Different Resolution Issue on a 64 bit Linux system===
 +
{{Fixbox|description=Dual Head Setup/ Different Resolution Issue on a 64 bit Linux system|fix=
 +
Install the 32 bit package of XRandR, if the dual-head issue still persists, install 32 bit LibXinerama as well.
 +
}}
 +
 +
===Nothing appears after running a game patch/patched game===
 +
{{Fixbox|description=Nothing appears after running a game patch/patched game|fix=
 +
Use <code>wineconsole cmd</code> command and from there, navigate to the game/patch folder and run the EXE file.
 +
}}
 +
 +
===Winecfg fails to detect the audio driver despite being installed (Linux)===
 +
{{Fixbox|description=Winecfg fails to detect the audio driver despite being installed (Linux)|fix=
 +
On a 32-bit architecture of the Wineprefix in a 64-bit system:
 +
# Open the Registry Editor with <code>regedit</code> command
 +
# Navigate to HKEY_CURRENT_USER → Software → Wine → Drivers
 +
# Add the Audio string and use “alsa” as it’s value
 +
 +
If the Wineprefix is in 64-bit architecture, you may have to recreate the prefix.
 +
}}
 +
 
[[Category:Hack]]
 
[[Category:Hack]]
[[Category:Wine]]
 
[[Category:Emulation]]
 

Revision as of 03:56, 25 February 2020

Wine
Wine cover
Developers
Wine authors
Release dates
Linux July 4, 1993
macOS (OS X) This value is not permitted.
Wine at Wikipedia
Note that it is recommended that you have at least basic knowledge of the Terminal/shell before using Wine. If you do not then try one of the available front ends.
Be aware that some games may not work or have issues in WINE as well, especially older ones, either due to the missing DLL library which requires manual installation or just compatibility issues.
Due to the lack of OpenGL updates on MacOS, which is still using 4.0 version from 2010, there may be issues with running DirectX 11 games or worse, no support at all.

General information

The Wine Website
The Wine Wiki
The Wine Application Database

Communities

/r/winehq - General Wine Discussion
/r/wine_gaming - Wine Gaming Discussion

Wrappers

Adamhm's Wrappers (Linux)
./play.it (Linux)
Lutris - Contains Wine wrappers (Linux)


Wine is a free and open source compatibility layer that aims to allow computer programs written for Windows to run on Linux and OS X by translating Windows system calls into POSIX-compliant system calls, recreating the directory structure of Windows systems, and providing alternative implementations of Windows system libraries, system services through wineserver and various other components (such as Internet Explorer, the Windows Registry Editor, and msiexec).

The software is not by all means an emulator, hence its acronym is Wine Is Not an Emulator. The main advantage it gives is the ability to run any software regardless of the Windows system was made for, so if an older Windows 95 game does not work in a native OS such as Windows 10 or has compatibility issues which renders the game broken, it will most likely work on WINE. A full DirectX 10 and 11 support has been added since version 3.0 along with it's own CSMT.

Versions and Editions

Versions

Upon entering the WineHQ page you may have noticed the Stable and Development versions. The Development version is more often updated as the improvements and bugfixes are released in small packages, while the Stable's update process is slow as it relies on releasing the update as one large package containing the features from previous Development versions. Do not be confused with the version numbers though as for example the Stable 2.0.2 version contains a wide range of features from Development 2.17 version and below.

Editions

The Staging one contains community-made patches to make sure the game works properly, but be aware that sometimes a software may not work in Staging, but it'll work in normal one. It always uses the Development version of Wine.

Gallium Nine is a special one, besides being based on Wine Staging it is very beneficial for AMD and Nouveau as it uses the Gallium 3D API, which is a part of the Mesa library and gives a greater performance for games using DirectX 9, as compared to the other versions, it doesn’t translate Direct3D signals into OpenGL. It won't bring any improvements for NVIDIA users that rely on proprietary drivers, as the manufacturer uses their own driver library. Be aware that depending on Linux distribution, you might need to compile Mesa with ```enable_nine``` variable to use Gallium3D Nine.

Other versions also exists, some contain additional features such as Wine Rt which runs programs in real-time, or the ones that are made specifically for one game, for example wine-starcraft allows you to run Starcraft Anniversary 1.16 without any issues, compared to the official build.

Before installing make sure to enable the multilib support, if you are on a 64-bit system and always install WINE Gecko and WINE Mono for applications that need support for Internet Explorer and .NET Frameworks. They may not be required, but it will prevent downloading them each time you create a new Wineprefix.

Installation

Linux

To install Wine on your Linux distribution, check your package manager. Some Linux distros DON'T come with Wine pre-installed, but it can be installed just with a single command or a few clicks depending on the distro.

Debian

On a 32-bit system run:

sudo apt install wine

or if you want the development version.

sudo apt install wine-development

If you are on a 64-bit system you need to use this command before installing Wine:

sudo dpkg --add-architecture i386 && sudo apt update

SteamOS

SteamOS Tools is required in order to get Debian's repositories and sources. Follow the documentation to learn how to add and install a software from Debian.

Debian-based system such as Ubuntu, Linux Mint etc.

Type sudo apt-get install wine

To get the latest Wine release, use these commands in this order:

wget https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/

Fedora

Run this command
sudo dnf install wine
or
sudo dnf install wine-devel
For developer version.

Please follow these instructions if you want the latest version.

ArchLinux and distributions based on it such as Antergos, Manjaro etc.

If running a 64-bit system, make sure you have enabled the multilib repository. Then run:

Type sudo pacman -S <wine edition>.

Replace <wine edition> with:

  • wine - Standard version
  • wine-staging - For Wine Staging
  • wine-staging-nine - For Wine Staging with Gallium Nine patches.

Other versions of Wine are available in the AUR.

Solus

Type sudo eopkg install wine

OpenSUSE

Run sudo zypper install wine


For other distros, please follow the documentation/wiki of the distribution or compile the software from the source code.

OS X

It is recommended to have both Homebrew and MacPort installed
Gatekeeper must be set to accept unsigned packages and XQuartz version 2.7.7 or higher must be installed.
Due to Apple's decision to drop the support for 32-bit applications after Mojave, there is a chance that Wine may not work.

To install Wine on Mac OS, you can either download the PKG file (Recommended) or the TAR archive, they can be found here.

After installing it from the PKG file, the Wine shortcut will appear in the Launchpad. Upon running it, it will display terminal with a short introduction to important commands.

Uninstalling

If using Homebrew:
brew rm wine && brew rm $(join <(brew leaves) <(brew deps wine))

If using MacPorts:
sudo port uninstall --follow-dependencies wine

If compiled from the source code: sudo make install at the directory with Makefile and then delete the local Wine source code.

Aftere one of these steps remove any WINEPREFIX and remove the .local from your Home folder

Compile from source code

If you wish to compile Wine from it's source code please follow these pages: Building Wine Building Wine in MacOS

Graphics

If you are on a 64-bit Linux system and depending on the distro, make sure you have 32 bit drivers installed. WIthout it you will receive the “Direct rendering is disabled, most likely your OpenGL drivers have not been installed correctly” message.

If installed, make sure to reset the display server.

Audio

Currently, Wine best supports ALSA if you are on Linux, but on a 64-bit system you must install the 32-bit versions, this also counts for PulseAudio and OSS (In this case, all you need is the ALSA-OSS package, as the OSS kernel will not suffice).

Keep in mind that for some games, such as Skyrim, will use an advanced sound system. For this case you need the 32 bit version of OpenAL as well.

In MIDI’s case, Wine has an excellent support for it. You should either use Timidity or Fluidsynth and set one of them up.

As for audio in Mac OS, CoreAudio works out of the box with the software.

Command Stream Multi-Threading (CSMT)

Since 2013, Wine developers have been experimenting with the stream/worker thread optimization, which is exclusive to both Wine Staging and Wine Staging Gallium Nine. Depending on the game, enabling it from the winecfg will give a performance boost (for some even bigger than running it natively on Windows!) and fixes graphical issues, if present. Wine Team officially added their own CSMT since the release of 3.0 version.

General

By default, Wine will be already set to handle Windows files such as .exe,.bat,.msi etc. Running one of them will invoke the software and handle the rest in it's default WINEPREFIX folder located at ~/.wine. If you are required to run the program in Terminal however, this can be done by using the wine command.

Wineprefix is the directory used for managing your Windows files, by default it will use the .wine folder in your Home directory, if using Linux, and depending on the architecture of your system, it will be made for 64-bit applications or 32-bit. If the game you currently wish to run works only on 16-bit system, you may wish to create a 32-bit Wineprefix folder. This can be done with this command line:

WINEARCH=win32 WINEPREFIX=~/<new folder name>

WINEARCH is responsible for changing the environment, there are only two options to choose from:

  • win32 - Create a 32-bit environment
  • win64 - Create a 64-bit environment.

WINEPREFIX command is used to create a new folder or use one which will store Windows program.

Wine AppDB Rating System

While checking WineHQ's Application Database you may encounter these ratings and here are their meanings.

Platinum

The program installs and works flawlessly out of the box, without any changes in winecfg.

Gold

The application works without any problem once you make some DLL override or change some settings in winecfg or installing a third-party software.

Silver

The program works great for "normal" use with some of the exceptions such as issues with handling the DRM, the game works in singleplayer but not in multiplayer etc.

Bronze

The software works, but has some issues for normal use such as graphical glitches/issues, run slower than it should, font issues etc.

Garbage

The application does not work, cannot be installed or it will run but will show many errors that will make it unusable regardless of used settings.

It's best to check the information, comments or the bug list for the current software to learn how to get it to work or even check if it's fixed when it comes to Gold, Silver or even Bronze rating.

Tweaking Wine

Winecfg

Winecfg is a GUI (graphical user interface) configuration tool for Wine. It allows you to change options for both the default setting and for specific applications. These options include the way Wine loads DLLs, graphical settings (including Window settings, screen resolution/DPI), desktop integration, drives and audio). It can be accessed with winecfg command, you can use it with WINEPREFIX to specify which Wine folder you wish to configure.

A run down on the different tabs of Winecfg is available on the Wine Wiki.

Winetricks

Winetricks is a script which allows you to install base requirements for running Windows applications. It is mainly used to install additional DLL libraries to make the program work, in case if it doesn’t. Besides that it also contains other stuff such as launching the Winecfg, installing the benchmark, install the game using pre-compiled script etc. from the default Wine folder. The program can be run with the winetricks command to launch the GUI version by default (Using -h argument will show additional options), you can combine with other Wine commands to be more specific. For example:

WINEPREFIX=~/.wine32 winetricks

This will launch Winetricks, but all the changes or installations are done in the .wine32 folder.

If you do not wish to constantly go through menus to install the required library or a program, you can specify it after the command.

WINEPREFIX=~/.wine32 winetricks steam

This command will let Winetricks to install Steam on a .wine32 folder.

Of course you can specify multiple libraries you wish to install and combine it with some arguments available for this software.

WINEPREFIX=~/.wine32 winetricks -q steam dotnet40

This will let Winetricks not only to install Steam, but .NET Framework 4.0 as well and the -q argument will make sure not to ask any questions for each application/library.

Front-Ends

If you do not wish to use the Terminal, there are some front-ends which will make your Wine experience much easier.

Steam Play/Proton

Linux Steam client has integrated fork of Wine for games, that lack native Linux version.[1]

PlayOnLinux/PlayOnMac

This Python-based program allows you to install any Windows program using the pre-made scripts which makes the process automatic or perform it manually in case if the script does not exist. The main advantage of it is the ability to download and use multiple Wine version and ease of managing and configuring the prefixes. The main drawback however, is in it’s slow development time and outdated libraries that are available in the Additional Libraries. This program was made for simplicity in mind.

Crossover

A commercial version of Wine which includes scripts, patches, GUI and third-party softwares (Which are never accepted by Wine Project). It is available for both Mac and Linux. Despite being a paid product, the patches are later added to the Wine Staging and buying the software will support Wine developer.

Wineskin

A Mac exclusive tool used to make wrappers to run Windows software in Mac OS X. Which converts it into an .app file which allows you to run the converted program into a native system.

Q4Wine

Front-end made in Qt4 environment for Linux system. It’s main advantage is the ability to use libraries from the Winetricks, built in WineApp Database, additional options such as mounting the ISO and it’s simplicity. The drawback of it however are no pre-compiled scripts which will automatically install the game along with required libraries and in some cases, specific Wine version which the game works without any major issues and requiring you to compile/install the specific Wine version of your choice if you want to use multiple Wine versions.

Improvements

Run the game in OpenGL/Vulkan mode

Run the game in OpenGL/Vulkan mode

If the game supports OpenGL/Vulkan, it is recommended to run it to avoid any performance issue. Many games accept the -opengl parameter, however in case of recent games you may have to set it up to run in Vulkan through the game’s options or using the -vulkan command prompt.

Mac OS does not support Vulkan API.

Show FPS overlay in games

Show FPS overlay in games

Wine features an embedded FPS monitor which works for all graphical applications once you use WINEDEBUG=fps command. You can also use this script with the xosd package installed in order to display the FPS counter on top of the window.


Enable CSMT

Depending on the game it may improve the performance when enabled.
Command Stream Multi-Threading has been officially added since Wine 2.6, in case of Staging since 1.7.33
Official Wine 2.6 or higher
  1. Open up Wine's RegEdit with `regedit` in Terminal.
  2. Go to the HKCU/Software/Wine/Direct3D/ folder and create the DWORD key called csmt and put 1 as a value.
Wine Staging/Wine Staging Gallium Nine
  1. Open up the WineCFG with winecfg command
  2. Go to Staging tab and check Enable CSMT for better graphics performance and accept the changes

Issues Fixed

.NET/Mono

Some Windows applications require the .NET software framework to run (Wine will instruct you to install if an application you try to run requires it), which is not compatible with Wine. However, an open source piece of software called Mono was made to replace it. You can install it via installing winetricks and entering this line into the Terminal/shell:

winetricks mono210

If the wine-mono is already installed from the distribution's repository, then it is not required.

D-Bus (OS X)

D-Bus Issue (Mac OS)

Some Windows applications require the D-bus process to run, in order to communicate with certain other applications. While it is installed alongside Macports, it will not run unless you tell it to. You only need to do this once, and then the process will run every time on startup:

sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist

launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

Fonts do not show properly

Fonts do not show properly

Install corefonts, if that does not work, use allfonts as a last resort from winetricks.

"16-bit LDT support may be missing." error

"16-bit LDT support may be missing." error

Use sudo echo 1 > /proc/sys/abi/ldt16 command

Dual Head Setup/ Different Resolution Issue on a 64 bit Linux system

Dual Head Setup/ Different Resolution Issue on a 64 bit Linux system

Install the 32 bit package of XRandR, if the dual-head issue still persists, install 32 bit LibXinerama as well.

Nothing appears after running a game patch/patched game

Nothing appears after running a game patch/patched game

Use wineconsole cmd command and from there, navigate to the game/patch folder and run the EXE file.

Winecfg fails to detect the audio driver despite being installed (Linux)

Winecfg fails to detect the audio driver despite being installed (Linux)

On a 32-bit architecture of the Wineprefix in a 64-bit system:

  1. Open the Registry Editor with regedit command
  2. Navigate to HKEY_CURRENT_USER → Software → Wine → Drivers
  3. Add the Audio string and use “alsa” as it’s value

If the Wineprefix is in 64-bit architecture, you may have to recreate the prefix.