Wine in Gentoo: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
= General Hints =
= General Hints =


* You may need to recreate your wine directory (~/.wine) if it is very old.
* You may need to recreate your Wine directory (~/.wine) if it is very old. The current Wine directory is controlled by the WINEPREFIX environment variable and is by default equal to ~/.wine. Making multiple Wine prefixes / installations can be useful to try out new Wine versions or Windows software. However the Program Files directory is also different, so it may be not convenient to have multiple copies / installs of heavy Windows games lying around.
* You *need* the loopback interface for wine to work correctly, so don't remove /etc/init.d/net.lo from the init scripts.
* You *need* the loopback interface for wine to work correctly, so don't remove /etc/init.d/net.lo from the init scripts.
== Building with PE (Portable Executable format) support ==
* Newest Wine releases use PE format, the old ELF formats are not really supported any longer. Some stuff only works with PE support, for instance 64-bit Blizzard game clients. For this reason, it is recommended to build Wine with PE support.
* On Gentoo this can be activated via the mingw USE flag (disabled by default as of Wine-6.9). For this you need to install the mingw toolchain (this is very easy by following instructions on this [https://wiki.gentoo.org/wiki/Mingw link]).


== Building latest Git ==
== Building latest Git ==
Line 13: Line 18:


  =app-emulation/wine-9999
  =app-emulation/wine-9999
= Direct3D, Vulkan, DXVK =
* By default, I think Wine translates Direct3D (versions 9, 10 and 11) calls to OpenGL calls. However you can also uses DXVK: this project replaces the Direct3D Windows DLLs by implementations that translate the calls to the Vulkan API (Vulkan is well supported on Linux). This can lead to improved performance or better stability for some games.
* On Gentoo, it is recommended to install the dxvk-bin package (only available via overlays), then run the install script. This script will symlink the Windows native DLLs to the replacement dxvk DLLs, and register wine to uses those native DLLs rather than the built-in ones.
* Note that for Direct3D 12, Wine uses vkd3d layer, which directly translates the Direct3D 12 calls to Vulkan (using the built-in Wine D3D DLLs). So DXVK is not needed for Direct3D 12.


= Russian Programs =
= Russian Programs =


* If text is garbled, try to run with a russian locale (be sure to have this locale available, check /etc/locale.gen):
* If text is garbled, try to run with a Russian locale (be sure to have this locale available, check /etc/locale.gen):


  LANG=ru_RU.UTF-8 wine Setup.exe
  LANG=ru_RU.UTF-8 wine Setup.exe

Revision as of 15:09, 24 May 2021

General Hints

  • You may need to recreate your Wine directory (~/.wine) if it is very old. The current Wine directory is controlled by the WINEPREFIX environment variable and is by default equal to ~/.wine. Making multiple Wine prefixes / installations can be useful to try out new Wine versions or Windows software. However the Program Files directory is also different, so it may be not convenient to have multiple copies / installs of heavy Windows games lying around.
  • You *need* the loopback interface for wine to work correctly, so don't remove /etc/init.d/net.lo from the init scripts.

Building with PE (Portable Executable format) support

  • Newest Wine releases use PE format, the old ELF formats are not really supported any longer. Some stuff only works with PE support, for instance 64-bit Blizzard game clients. For this reason, it is recommended to build Wine with PE support.
  • On Gentoo this can be activated via the mingw USE flag (disabled by default as of Wine-6.9). For this you need to install the mingw toolchain (this is very easy by following instructions on this link).

Building latest Git

  • Add to /etc/portage/package.accept_keywords:
app-emulation/wine **
  • Add to /etc/portage/package.unmask:
=app-emulation/wine-9999

Direct3D, Vulkan, DXVK

  • By default, I think Wine translates Direct3D (versions 9, 10 and 11) calls to OpenGL calls. However you can also uses DXVK: this project replaces the Direct3D Windows DLLs by implementations that translate the calls to the Vulkan API (Vulkan is well supported on Linux). This can lead to improved performance or better stability for some games.
  • On Gentoo, it is recommended to install the dxvk-bin package (only available via overlays), then run the install script. This script will symlink the Windows native DLLs to the replacement dxvk DLLs, and register wine to uses those native DLLs rather than the built-in ones.
  • Note that for Direct3D 12, Wine uses vkd3d layer, which directly translates the Direct3D 12 calls to Vulkan (using the built-in Wine D3D DLLs). So DXVK is not needed for Direct3D 12.

Russian Programs

  • If text is garbled, try to run with a Russian locale (be sure to have this locale available, check /etc/locale.gen):
LANG=ru_RU.UTF-8 wine Setup.exe
  • However, there may still be problems with fonts. I haven't been able to solve them yet.

AMD64 Profile

Wine does not yet play very well with the no-exec protection of recent Linux kernels. It may be necessary to disable no-exec at boot with the following kernel argument:

noexec32=off

Registry Keys

  • If you need to add or change keys to the Windows registry, you can use regedit which is a GUI for this task.
  • The following key is needed for Hearthstone (Wine 5.3, KDE), else the mouse is not recaptured as soon as you Alt-Tab out of Hearthstone:
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"UseTakeFocus"="N"

Specific Programs

  • If Hearthstone / Battle.net is "stuck", you can login using Diablo III. This will work.