Automate installation of DXVK, D9VK + Wine/Wine Staging & update GPU drivers + PlayonLinux wineprefixes (Debian/Ubuntu/Mint/Arch Linux/Manjaro)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

304 lines
12 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # Wine/Wine Staging + DXVK package builder & auto-installer
  2. ![](https://i.imgur.com/5WCPioZ.png)
  3. Boost up your Wine experience with a taste of DXVK and automate installation of [DXVK](https://github.com/doitsujin/dxvk) + [Wine](https://www.winehq.org/)/[Wine Staging](https://github.com/wine-staging/wine-staging/) on Debian/Ubuntu/Mint/Arch Linux/Manjaro. Additionally, update your GPU drivers + PlayonLinux wineprefixes to use the latest Wine & DXVK combination available.
  4. ## About
  5. One-click solution for accessing bleeding-edge Wine/Wine Staging & DXVK packages _system-widely_ on Debian/Ubuntu/Mint and on Arch Linux/Manjaro.
  6. ## Motivation
  7. **Accessibility, lower the barrier.** Help people to get their hands on the latest bleeding-edge Wine/Wine Staging & DXVK software on major Linux distribution platforms without hassle or headaches.
  8. There is not an easy way to auto-install bleeding-edge Wine/Wine Staging & DXVK, especially on Debian/Ubuntu/Mint. The newest Wine/Wine Staging is not easily accessible on Debian-based Linux distributions, and DXVK is practically bundled to Lutris or Steam gaming platform as a form of Proton. However, not all Windows programs, like MS Office or Adobe Photoshop, could run under Linux Steam client: Many Windows programs actually rely on system-wide Wine installation which is why system-wide Wine/Wine Staging & DXVK auto-installation this script offers becomes quite handy.
  9. The solution provided here _is independent from Steam client or any other Wine management platform_. The latest Wine/Wine Staging & DXVK bundle will be accessible system-widely, not just via Steam, Lutris or PlayOnLinux. Provided PlayOnLinux prefix update is optional, as well.
  10. ----------------
  11. ## Adapt system-wide Wine/DXVK to your Steam Windows games
  12. If you want to easily use Wine/Wine Staging and DXVK with your Steam Windows games on Linux, you may want to check out my helper script [steam-launchoptions](https://github.com/Fincer/steam-launchoptions).
  13. With the helper script, you can set launch options for a single game/selected group of games/all games you have on your Steam account. You can customize the launch options for both Windows and Linux games and clean all existing launch options, too.
  14. ----------------
  15. ## Contents
  16. - **Wine/Wine Staging & DXVK:** Install script for supported Linux distributions
  17. - **Nvidia drivers:** Install script for supported Debian-based distributions
  18. - **Patches:** Possibility to use your custom patches with Wine & DXVK
  19. ----------------
  20. ## Requirements
  21. - **Time:** it can take between 0.5-2 hours for the script to run. Compiling Wine takes a lot of time. You have been warned.
  22. - Debian, Ubuntu, Mint or any other Linux distribution which uses `dpkg` and `àpt` for package management
  23. - Arch Linux, Manjaro or any other Linux distribution which uses `pacman` for package management
  24. - **Not listed as a hard dependency, but recommended for DXVK**: The latest Nvidia or AMD GPU drivers (Nvidia proprietary drivers // AMDGPU)
  25. ----------------
  26. ## Why to compile from source?
  27. Latest version of Wine/Wine Staging & DXVK are only available via git as source code which must be compiled before usage. Note that compiling Wine takes a lot of time. Compiling from source has its advantages and disadvantages, some of them listed below.
  28. **Advantages:**
  29. - packages are directly adapted to your system
  30. - packages do not rely on PPAs which may be abandoned in time
  31. - using Git sources provide the latest packages available publicly
  32. **Disadvantages:**
  33. - takes time & CPU processing power
  34. - is unreliable in some cases, the script may break easily due to rapid DXVK development or distro changes
  35. - may break working already-working versions of the packages (use `--no-install` parameter to avoid installation of DXVK & Wine, just as precaution)
  36. ----------------
  37. ## Script usage
  38. For short help instructions, run:
  39. ```
  40. bash updatewine.sh --help
  41. ```
  42. on the main script folder.
  43. You can pass arguments like:
  44. ```
  45. bash updatewine.sh --no-staging --no-install
  46. ```
  47. All supported arguments are:
  48. - `--no-staging` = Compile Wine instead of Wine Staging
  49. - `--no-install` = Do not install Wine or DXVK, just compile them. Note that Wine must be installed for DXVK compilation.
  50. - `--no-wine` = Do not compile or install Wine/Wine Staging
  51. - `--no-dxvk` = Do not compile or install DXVK
  52. - `--no-pol` = Do not update current user's PlayOnLinux Wine prefixes
  53. ----------------
  54. ## Custom patches for Wine & DXVK
  55. You can apply your own patches for DXVK & Wine by dropping valid `.patch` or `.diff` files into `dxvk_custom_patches` (DXVK) or `wine_custom_patches` (Wine) folder.
  56. Folders `dxvk_disabled_patches` and `wine_disabled_patches` are just for management purposes, they do not have a role in script logic at all.
  57. Wine patches are not related to Wine Staging patchset. You can use your custom Wine patches either with Wine Staging or vanilla Wine.
  58. ----------------
  59. ## Compiled packages are stored for later usage
  60. Successfully compiled Wine & DXVK packages are stored in separate subfolders. Their locations are as follows.
  61. On Debian/Ubuntu/Mint:
  62. - `main-script-folder/debian/compiled_deb/`
  63. On Arch Linux:
  64. - `main-script-folder/arch/compiled_pkg/`
  65. The actual subfolders which hold compiled programs are generated according to buildtime timestamp, known as `build identifier`.
  66. ## DXVK usage
  67. **NOTE:** DXVK must be installed before applying these steps.
  68. To enable DXVK on existing wineprefixes, just run
  69. ```
  70. WINEPREFIX=/path/to/my/wineprefix setup_dxvk
  71. ```
  72. `winetricks` is required for this command.
  73. ## Add DXVK to PlayOnLinux Wine prefixes
  74. To install DXVK on specific PlayOnLinux wineprefix which uses a different than `system` version of Wine, apply the following command syntax:
  75. ```
  76. WINEPREFIX="$HOME/.PlayOnLinux/wineprefix/myprefix" WINEPATH=$HOME/.PlayOnLinux/wine/{linux-amd64,linux-x86}/wineversion/bin" setup_dxvk
  77. ```
  78. where you need to set either `linux-amd64` or `linux-x86`, and `wineversion` + `myprefix` to match real ones, obviously.
  79. system-wide `winetricks` executable (`/usr/bin/winetricks`) is required for this command.
  80. ### Manually uninstall temporary development packages (Debian/Ubuntu/Mint):
  81. Development packages can take extra space on your system so you may find useful to uninstall them. The script provides an automatic method for that but you can still use additional `debian_cleanup_devpkgs.sh` script which is targeted for uninstalling build time dependencies manually. The script uninstalls majority of Wine-Staging (Git), meson & glslang buildtime dependencies which may not be longer required. Be aware that while running the script, it doesn't consider if you need a development package for any other package compilation process (out of scope of Wine/DXVK)!
  82. To use `debian_cleanup_devpkgs.sh`, simply run:
  83. ```
  84. bash debian_cleanup_devpkgs.sh
  85. ```
  86. ---------------------------
  87. ### EXAMPLES:
  88. **NOTE:** If `--no-install` option is given, the script doesn't check for PlayOnLinux Wine prefixes.
  89. **NOTE:** PlayOnLinux Wine prefixes are checked for current user only.
  90. **1)** Compile Wine Staging & DXVK, and make installable packages for them. Install the packages:
  91. `bash updatewine.sh`
  92. **2)** Compile DXVK and make an installable package for it. Do not install:
  93. `bash updatewine.sh --no-wine --no-install`
  94. **3)** Compile Wine Staging and make an installable package for it. Do not install:
  95. `bash updatewine.sh --no-dxvk --no-install`
  96. **4)** Compile Wine and make an installable package for it. Do not install:
  97. `bash updatewine.sh --no-staging --no-dxvk --no-install`
  98. **5)** Compile Wine & DXVK, and make installable packages for them. Do not install:
  99. `bash updatewine.sh --no-staging --no-install`
  100. **6)** Compile Wine Staging & DXVK, and make installable packages for them. Do not install:
  101. `bash updatewine.sh --no-install`
  102. **7)** Compile Wine & DXVK, and make installable packages for them. Install the packages:
  103. `bash updatewine.sh --no-staging`
  104. **8)** Compile Wine, and make an installable package for it. Install the package, do not check PlayOnLinux wineprefixes:
  105. `bash updatewine.sh --no-staging --no-dxvk --no-pol`
  106. ----------------
  107. ## GPU drivers
  108. For DXVK, it is strongly recommended that you install the latest Nvidia/AMDGPU drivers on your Linux distribution. For that purpose, Arch Linux/Manjaro users can use Arch/AUR package database. Debian/Ubuntu/Mint users should use provided scripts files
  109. ### GPU drivers on Debian/Ubuntu/Mint
  110. **Nvidia users**
  111. Use `debian_install_nvidia.sh` by running `bash debian_install_nvidia.sh`
  112. **AMD users**
  113. Not a solution provided yet.
  114. **NOTE:** The latest GPU drivers are usually NOT available on official Debian/Ubuntu/Mint package repositories, thus these helper scripts are provided.
  115. **NOTE:** Nvidia & AMD driver installer shell script can be run individually, as well. It is not bundled to the rest of the scripts in this repository, so feel free to grab them for other purposes, as well.
  116. ---------------------------
  117. ### NOTES
  118. The following section contains important notes about the script usage.
  119. **Do not pause a virtual machine**. It is not recommended to run this script in a virtualized environment (Oracle VirtualBox, for instance) if you plan to `Pause` the virtual machine during script runtime. This causes an internal sudo validate loop to get nuts. In normal environments and in normal runtime cases, this doesn't happen. Validate loop is required to keep sudo permissions alive for the script since the execution time exceeds default system-wide sudo timeout limit (which is a normal case).
  120. ---------------------------
  121. ### Script validation test
  122. Validation test done for the script to ensure it works as expected. Occasional test-runs are mandatory due to rapid development of the packages (Wine/DXVK) it handles.
  123. **Latest test-run:** 13th November, 2018
  124. **Linux Distributions:**
  125. - Success: Arch Linux, Linux Mint 19
  126. - Partial failure: Debian 9 (DXVK), Ubuntu 18.04 (DXVK)
  127. #### Failure reasons:
  128. Debian:
  129. - DXVK uninstallable: no winetricks package available
  130. Ubuntu 18.04:
  131. - DXVK uninstallable: during compilation, the following error appears:
  132. ```
  133. ...
  134. [162/192] Compiling C++ object 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_swapchain.cpp.obj'.
  135. FAILED: src/d3d11/src@d3d11@@d3d11@sha/d3d11_swapchain.cpp.obj
  136. x86_64-w64-mingw32-g++ -Isrc/d3d11/src@d3d11@@d3d11@sha -Isrc/d3d11 -I../../../../src/d3d11 -I../../../.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O3 -DNOMINMAX -MD -MQ 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_swapchain.cpp.obj' -MF 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_swapchain.cpp.obj.d' -o 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_swapchain.cpp.obj' -c ../../../../src/d3d11/d3d11_swapchain.cpp
  137. {standard input}: Assembler messages:
  138. {standard input}:3269: Warning: end of file not at end of a line; newline inserted
  139. {standard input}: Error: open SEH entry at end of file (missing .seh_endproc)
  140. x86_64-w64-mingw32-g++: internal compiler error: Killed (program cc1plus)
  141. ...
  142. ```
  143. or
  144. ```
  145. ...
  146. [137/192] Compiling C++ object 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_view_uav.cpp.obj'.
  147. FAILED: src/d3d11/src@d3d11@@d3d11@sha/d3d11_view_uav.cpp.obj
  148. x86_64-w64-mingw32-g++ -Isrc/d3d11/src@d3d11@@d3d11@sha -Isrc/d3d11 -I../../../../src/d3d11 -I../../../.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O3 -DNOMINMAX -MD -MQ 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_view_uav.cpp.obj' -MF 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_view_uav.cpp.obj.d' -o 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_view_uav.cpp.obj' -c ../../../../src/d3d11/d3d11_view_uav.cpp
  149. x86_64-w64-mingw32-g++: internal compiler error: Killed (program cc1plus)
  150. Please submit a full bug report,
  151. with preprocessed source if appropriate.
  152. See <https://gcc.gnu.org/bugs/> for instructions.
  153. [144/192] Compiling C++ object 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_context.cpp.obj'.
  154. ninja: build stopped: subcommand failed.
  155. ...
  156. ```
  157. ---------------------------
  158. ### TODO
  159. - Provide winetricks package for pure Debian users (DXVK runtime dependency)
  160. - Add compilation/installation script for the latest AMDGPU on Debian/Ubuntu/Mint
  161. - Remove temp folders in case of failure (meson/glslang/dxvk-git/wine... temp build folders)
  162. - Better handling for sudo validation loop function
  163. - may cause the terminal output to get nuts
  164. - when interrupting the script, the exit functionality may not be handled correctly?
  165. - The script doesn't handle SIGINT correctly while executing 'pkgdependencies' function
  166. ---------------------------
  167. ### LICENSE
  168. This repository uses GPLv3 license. See [LICENSE](LICENSE) for details.