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

Difference between revisions of "Wine"

From PCGamingWiki, the wiki about fixing PC games
(Taken from Wikipedia)
(Huge improvement for the article)
Line 2: Line 2:
 
|cover          = Wine logo.png
 
|cover          = Wine logo.png
 
|developer      = Wine authors
 
|developer      = Wine authors
|publisher      =  
+
|publisher      =
 
|release dates  = July 4, 2003}}
 
|release dates  = July 4, 2003}}
Wine is a free and open source software application that aims to allow computer programs written for [[Microsoft Windows|Windows]] to run on [[Linux]] and [[OS X]].
+
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 />
To achieve this goal, Wine emulates the Windows runtime environment 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).
+
 
+
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. Currently the developers are concentrating on getting DirectX 11 to work properly and it’s “proper” support has started since version 2.0 and gets improved in every release.<br />
{{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 [[Wine#Programs Built Ontop of Wine|Programs Built Ontop of 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]].
 +
{{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.
 +
{{ii}}The latest version of Wine won't be always the best performing version. Check the [https://appdb.winehq.org/ Wine AppDB] for detailed instructions, info and know bugs for your application.
 +
 
'''General information'''
 
'''General information'''
 
{{mm}} [https://www.winehq.org The Wine Website]
 
{{mm}} [https://www.winehq.org The Wine Website]
Line 15: Line 18:
 
{{mm}} [https://appdb.winehq.org The Wine Application Database]
 
{{mm}} [https://appdb.winehq.org The Wine Application Database]
 
{{mm}} [[Wikipedia:Wine (software)|The Wine Wikipedia Page]]
 
{{mm}} [[Wikipedia:Wine (software)|The Wine Wikipedia Page]]
 +
 +
 +
 +
==Versions==
 +
There are 3 mostly used Wine versions:
 +
 +
* [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, if the normal one fails and some additional features such as CSMT which may or may not improve the performance of the game.<br />
 +
 +
 +
Gallium Nine is a special one, which is very beneficial for AMD and Intel GPUs 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. NVIDIA users who have Nouveau drivers also benefit from it, as the proprietary drivers from NVIDIA uses it’s own library for 3D acceleration which doesn’t benefit anything from Gallium Nine version.<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.
 +
 +
==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.
  
==Linux==
+
====Debian====
 
+
On a 32-bit system run:<br />
===Wine: Wine Is Not an Emulator===
 
The name Wine is actually an acronym for "Wine Is Not an Emulator." Do take this name into account when attempting to use Windows software on non Windows operating systems, as Wine does not and never will run all non-native software perfectly, if at all. As a rule of thumb, never expect software to work (even if reported as fine by others), however, be grateful if it does.
 
 
 
===Installation===
 
  
To install Wine on your Linux distribution, check your package manager. Most Linux distros DON'T come with Wine pre-installed, but it can be installed just with a single command or a few clicks depending of the distro.
+
<code>sudo apt install wine</code><br />
  
Be aware that the latest version of Wine won't be always the best performing version. Check the [https://appdb.winehq.org/ Wine appdb] for detailed instructions, info and know bugs for your application.
+
or if you want the development version.<br />
  
====Ubuntu====
+
<code>sudo apt install wine-development</code>
Open the Ubuntu Software Centre, type wine and then install 'wine'.
 
  
====Linux Mint====
+
If you are on a 64-bit system you need to use this command before installing Wine:<br />
To get the latest Wine release, copy and paste the following two lines, one by one, into the terminal window:
 
  
<code> add-apt-repository ppa:ubuntu-wine/ppa && sudo apt-get update</code>
+
<code>sudo dpkg --add-architecture i386 && sudo apt update</code>
  
<code>sudo apt-get install wine1.5 winetricks</code>
+
====SteamOS====
 +
[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.
  
 +
====Debian-based system such as Ubuntu, Linux Mint etc.====
 +
Type <code>sudo apt-get install wine</code>
 +
 +
To get the latest Wine release, use these commands in this order:
 +
 +
<pre>
 +
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/
 +
</pre>
 +
 
====Fedora====
 
====Fedora====
Login as root, then run:
+
Run this command<br />
<code>dnf install wine</code>
+
<code>sudo dnf install wine</code><br />
 
+
or<br />
====Arch====
+
<code>sudo dnf install wine-devel</code><br />
If running a 64-bit system, you must enable the multilib repository as per the instructions on the Arch Wiki. Once enabled, just run:
+
For developer version.<br />
<code>pacman -S wine</code>
 
 
 
Other versions of Wine are available in the AUR with various patches for different features available for Wine.
 
 
 
====Other====
 
Most instructions for ANY distro can be found by Googling "wine in [your distro's name and version]".
 
 
 
==OS X==
 
===Installation===
 
{{ii}} Before following this section make sure that you have read both this and the [[Wine#Homebrew|Homebrew]] sections
 
Wine requires Xcode, which can be downloaded and installed [https://itunes.apple.com/app/xcode/id497799835 via the Mac App Store] on OS X 10.6 and above, or [https://developer.apple.com/downloads via the Apple Developer downloads section].
 
 
 
MacPorts is also required, which can be download and installed from http://www.macports.org/. It then needs to be configured by entering the following two commands into the Terminal:
 
 
 
<code>echo export PATH=/opt/local/bin:/opt/local/sbin:\$PATH$'\n'export MANPATH=/opt/local/man:\$MANPATH | sudo tee -a /etc/profile</code>
 
 
 
<code>if [ `sysctl -n hw.cpu64bit_capable` -eq 1 ] ; then echo "+universal" | sudo tee -a /opt/local/etc/macports/variants.conf; else echo "not 64bit capable"; fi</code>
 
 
 
After this, you may need to agree to the Xcode license, which you can do so by running the following in the Terminal:
 
 
 
<code>sudo xcodebuild -license</code>
 
 
 
Then enter "agree" before closing and reopening the Terminal window.
 
 
 
Now you need to install Wine using MacPorts, by entering the following command (which may take several hours to do):
 
 
 
<code>sudo port install wine</code>
 
 
 
And then Wine will be installed and ready to use!
 
 
 
====Homebrew====
 
[http://brew.sh Homebrew] is similar to MacPorts in that the source code to programs is downloaded and compiled. However, Homebrew opts to use the built-in libraries already available as part of the default OS X installation, rather than compiling new versions. This can save time and disk space.
 
 
 
You will, like MacPorts, need XCode to install the required compilers and header files.
 
 
 
Wine is available via Homebrew and can be installed (along with Winetricks) via:
 
 
 
<code>brew install wine winetricks</code>
 
 
 
===Making a Dock Icon===
 
To make a dock icon for a Wine program we need to write a program in AppleScript that launches the Windows program. Open the script editor that came with your OS (which can be found in the ''/Applications/Utilities'' folder of the computer and is called something like "Script Editor" or "AppleScript Editor" depending on your OS version).
 
 
 
Within the script editor enter the following (where ''$PATH_TO_PROGRAM'' is the path from the Program Files folder to your .exe file):
 
 
 
<code>tell application "Terminal"</code>
 
 
 
{{key|TAB}} <code>do script "/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/$PATH_TO_PROGRAM.exe"
 
 
 
end tell
 
</code>
 
 
 
Then press "Compile" and save the script where you like (making sure to select the "File Format: Application" in the save options, and leaving "Startup Screen" unchecked). Open up the Finder, go to where you saved the script and then drag the file to your Dock, where it will stay. You can then click on that Dock Icon to open up your Windows program.
 
 
 
===Updating===
 
To keep Wine up-to-date, it is recommended to run the following command every few months or so via the Terminal/shell:
 
 
 
<code>sudo port selfupdate && sudo port upgrade outdated</code>
 
 
 
===Uninstalling===
 
To uninstall both Wine and MacPorts, simply run the following command in the Terminal:
 
 
 
<code>sudo rm -rf /opt ~/.wine /Applications/MacPorts</code>
 
  
To uninstall just Wine, simply run the following command in the Termianl/shell:
+
Please follow [https://wiki.winehq.org/Fedora 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 <code>sudo pacman -S <wine edition></code>.
 +
 +
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.
 +
 +
Other versions of Wine are available in the AUR.
 +
 +
====Solus====
 +
Type <code>sudo eopkg install wine</code>
 +
 +
====OpenSUSE====
 +
Run <code>sudo zypper install wine</code><br />
  
<code>sudo port uninstall wine</code>
+
 +
'''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.
 +
 +
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
 +
 +
===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]
  
 +
==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.<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.
 +
 
==General==
 
==General==
===Installing Windows Programs===
+
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 />
Go to the folder where the Windows .exe installed file is in the Terminal/shell and then enter the following command (where ''INSTALLED.exe'' is the name of the .exe file):
+
 
+
'''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>wine $INSTALLER.exe</code>
+
 
+
<code>WINEARCH=win32 WINEPREFIX=~/<new folder name></code>
A regular graphical Windows installer will soon appear, which you can click through to complete the installation.
+
 
+
<code>WINEARCH</code> is responsible for changing the environment, there are only two options to choose from:
===Running Windows Programs===
+
* win32 - Create a 32-bit environment
Open the Terminal/shell and go to your Program Files folder via the following command:
+
* win64 - Create a 64-bit environment.
 
+
<code>cd ~/.wine/drive_c/Program\ Files/</code>
+
<code>WINEPREFIX</code> command is used to create a new folder or use one which will store Windows program.<br />
 
+
Run <code>ls</code> to see what Windows programs you have installed. To run a program enter its folder by using <code>cd folder_NAME</code> (where ''folder_NAME'' is the name of the folder with the program that you want to run. Within that folder there should be an .exe file which you can run with the following command (where ''PROGRAM.exe'' is the name of the .exe file):
+
==Tweaking Wine==
 
+
<code>wine $PROGRAM.exe</code>
+
===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.
The program will soon appear, ready to use.
+
 
+
A run down on the different tabs of Winecfg is [http://wiki.winehq.org/winecfg available on the Wine Wiki].
==Common Issues==
+
 +
===[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.
 +
===[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.
 +
 +
==Improvements==
 +
===Run the game in OpenGL/Vulkan mode===
 +
{{Fixbox|1=
 +
{{Fixbox/fix|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 <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|1=
 +
{{Fixbox/fix|Show FPS overlay in games}}
 +
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.
 +
}}
 +
 +
==Issues Fixed==
 
===.NET/Mono===
 
===.NET/Mono===
 
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:
 
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:
 
+
 
<code>winetricks mono210</code>
 
<code>winetricks mono210</code>
 
+
===D-bus (OS X)===
+
If the <code>wine-monoM</code> is already installed from the distribution's repository, then it is not required.
 +
===D-Bus (OS X)===
 +
{{Fixbox|1=
 +
{{Fixbox/fix|D-Bus Issue (Mac OS)}}
 
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:
 
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>sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist</code>
 
+
 
<code>launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist</code>
 
<code>launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist</code>
 
+
}}
==Tweaking Wine==
+
 
+
===Fonts do not show properly===
===Winecfg===
+
{{Fixbox|1=
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).
+
{{Fixbox/fix|Fonts do not show properly}}
 
+
Install <code>corefonts</code>, if that does not work, use <code>allfonts</code> as a last resort from winetricks.
The tool can be accessed with the command:
+
}}
 
+
<code>$ winecfg</code>
+
==="16-bit LDT support may be missing." error===
 
+
{{Fixbox|1=
A run down on the different tabs of Winecfg is [http://wiki.winehq.org/winecfg available on the Wine Wiki].
+
{{Fixbox/fix|"16-bit LDT support may be missing." error}}
 
+
Use <code>sudo echo 1 > /proc/sys/abi/ldt16</code> command
===Winetricks===
+
}}
[https://github.com/Winetricks/winetricks Winetricks] is a script that automatically downloads, installs, and configures many tools for Wine. It also contains scripts to automatically install games.
+
 
+
===Dual Head Setup/ Different Resolution Issue on a 64 bit Linux system===
Basic information on how to use winetricks is [http://wiki.winehq.org/winetricks available on the Wine Wiki].
+
{{Fixbox|1=
 
+
{{Fixbox/fix|Dual Head Setup/ Different Resolution Issue on a 64 bit Linux system}}
==Programs Built Ontop of Wine==
+
Install the 32 bit package of XRandR, if the dual-head issue still persists, install 32 bit LibXinerama as well.
===Wineskin===
+
}}
[http://wineskin.urgesoftware.com/tiki-index.php Wineskin] is a program based on Wine that acts as a GUI interface, so that the Terminal/shell does not have to be used.
+
 
+
===Nothing appears after running a game patch/patched game===
===PlayOnLinux/PlayOnMac===
+
{{Fixbox|1=
PlayOnLinux and PlayOnMac (referred to as PlayOn in this Wiki as both pieces of software are exactly the same and just refer to the operating system they run on) is a graphical-front end for Wine that provides wrapper shell scripts which specify the configuration of Wine in order to install and run a particular application. Using PlayOn is an easy way to use the functionality of Wine without having to worry about its complexity.
+
{{Fixbox/fix|Nothing appears after running a game patch/patched game}}
 
+
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|1=
 +
{{Fixbox/fix|Winecfg fails to detect the audio driver despite being installed (Linux)}}
 +
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]]

Revision as of 10:13, 5 June 2017

July 4, 2003
Wine
Wine cover
Release dates

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. Currently the developers are concentrating on getting DirectX 11 to work properly and it’s “proper” support has started since version 2.0 and gets improved in every release.

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.
The latest version of Wine won't be always the best performing version. Check the Wine AppDB for detailed instructions, info and know bugs for your application.

General information

The Wine Website
The Wine Wiki
The Wine Application Database
The Wine Wikipedia Page


Versions

There are 3 mostly used Wine versions:

The Staging one contains community-made patches to make sure the game works properly, if the normal one fails and some additional features such as CSMT which may or may not improve the performance of the game.


Gallium Nine is a special one, which is very beneficial for AMD and Intel GPUs 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. NVIDIA users who have Nouveau drivers also benefit from it, as the proprietary drivers from NVIDIA uses it’s own library for 3D acceleration which doesn’t benefit anything from Gallium Nine version.


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.

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.

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.

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.

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

Instructions

Show FPS overlay in games

Instructions

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-monoM is already installed from the distribution's repository, then it is not required.

D-Bus (OS X)

Instructions

Fonts do not show properly

Instructions

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

Instructions

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

Instructions

Nothing appears after running a game patch/patched game

Instructions

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

Instructions