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.

258 lines
9.6 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
6 years ago
6 years ago
  1. # Wine/Wine Staging & DXVK package builder & auto-installer
  2. Automate installation of the newest DXVK + Wine Staging, and optionally update all your PlayonLinux wineprefixes (Ubuntu/Mint/Arch Linux/Manjaro)
  3. ## About
  4. This script bundle offers an easy-way solution to use the bleeding edge Wine Staging & DXVK packages system-wide on Ubuntu/Mint and Arch Linux based Linux distributions.
  5. ## Motivation
  6. **Accessibility, lower the barrier.** My personal motivation to develop this script bundle was to lower the barried to people to get their hands on the latest bleeding-edge Wine / Wine Staging & DXVK versions on major Linux distribution platforms.
  7. I have seen that there is not a clear way to install Wine Staging Git & DXVK, especially on Ubuntu/Mint. Therefore, I decided someone has to do something, so this script bundle was born.
  8. Additionally, the benefits of the bleeding-edge Wine/Wine Staging & DXVK versions are quite limited at the moment. Wine Staging is not easily available on Debian-based Linux distributions, and DXVK is practically bundled to Lutris or Steam gaming platform as a form of Proton. We have to keep in mind that not all Windows programs are run under Steam on Linux but many programs are run via PlayOnLinux or without relying on any other third-party management software.
  9. The solution I provide here _is not bundled to any commercial or other Wine management platform_. The latest Wine/Wine Staging & DXVK bundle is available system-wide, not just Steam, Lutris or PlayOnLinux.
  10. ----------------
  11. ## Requirements
  12. - Ubuntu, Mint or any other Linux distribution which uses `dpkg` and `àpt` for package management
  13. - pure Debian is not supported yet
  14. - Arch Linux, Manjaro or any other Linux distribution which uses `pacman` for package management
  15. - **Not listed as a hard dependency, but actually required by DXVK**: The latest Nvidia or AMD GPU drivers. Personally, I've used proprietary Nvidia drivers & AMDGPU (not AMDGPU Pro).
  16. ----------------
  17. ## Why to compile from source?
  18. **Advantages:**
  19. - packages are directly adapted to your system
  20. - packages do not rely on PPAs which may be abandoned in time
  21. - using Git sources provide the latest packages available publicly
  22. **Disadvantages:**
  23. - takes time & CPU processing
  24. - is unreliable in some cases, the script may break easily due to rapid DXVK development or distro changes
  25. - may break working already-working versions of the packages (use `--no-install` parameter to avoid installation of DXVK & Wine)
  26. ----------------
  27. ## Script usage
  28. For instructions, run:
  29. ```
  30. bash updatewine.sh --help
  31. ```
  32. on the main script folder.
  33. You can pass arguments like:
  34. ```
  35. bash updatewine.sh --no-staging --no-install
  36. ```
  37. All supported arguments are:
  38. - `--no-staging` = Build Wine instead of Wine Staging
  39. - `--no-install` = Do not install Wine or DXVK, just compile them. Note that Wine must be installed for DXVK compilation.
  40. - `--no-wine` = Do not compile or install Wine/Wine Staging
  41. - `--no-dxvk` = Do not compile or install DXVK
  42. - `--no-pol` = Do not update current user's PlayOnLinux Wine prefixes
  43. ----------------
  44. ## Compiled packages are stored for later usage
  45. Successfully compiled Wine & DXVK packages are stored as follows:
  46. On Ubuntu/Mint:
  47. - `main script folder/debian/compiled_deb/`
  48. On Arch Linux:
  49. - `main script folder/arch/compiled_pkg/`
  50. The subfolders there are generated according to buildtime timestamp, known as `build identifier`
  51. ## DXVK usage
  52. **NOTE:** DXVK must be installed before applying these steps!
  53. To enable DXVK on existing wineprefixes, just run
  54. ```
  55. WINEPREFIX=/path/to/my/wineprefix setup_dxvk
  56. ```
  57. `winetricks` is required for this command.
  58. ## Add DXVK to PlayOnLinux Wine prefixes
  59. To install DXVK on specific PlayOnLinux wineprefix which uses a different than `system` version of Wine, apply the following command syntax:
  60. ```
  61. WINEPREFIX="$HOME/.PlayOnLinux/wineprefix/myprefix" WINEPATH=$HOME/.PlayOnLinux/wine/{linux-amd64,linux-x86}/wineversion/bin" setup_dxvk
  62. ```
  63. where you need to set either `linux-amd64` or `linux-x86` and set `wineversion` to match a real one, obviously.
  64. system-wide `winetricks` executable (`/usr/bin/winetricks`) is required for this command.
  65. ### Uninstall temporary development packages (Ubuntu/Mint etc. only):
  66. Development packages can take extra space on your system so you may find useful to uninstall them.
  67. This package comes with `debian_devpkgremoval.sh` script which is targeted for that purpose.
  68. It uninstalls majority of Wine-Staging (Git), meson & glslang buildtime dependencies.
  69. To use `debian_devpkgremoval.sh`, simply run:
  70. ```
  71. bash debian_devpkgremoval.sh
  72. ```
  73. ---------------------------
  74. ### EXAMPLES:
  75. **NOTE:** If `--no-install` option is given, the script doesn't check for PlayOnLinux Wine prefixes.
  76. **NOTE:** PlayOnLinux Wine prefixes is checked for current user only.
  77. **1)** Compile Wine Staging & DXVK, and make installable packages for them. Install the packages:
  78. `bash updatewine.sh`
  79. **2)** Compile DXVK and make an installable package for it. Do not install:
  80. `bash updatewine.sh --no-wine --no-install`
  81. **3)** Compile Wine Staging and make an installable package for it. Do not install:
  82. `bash updatewine.sh --no-dxvk --no-install`
  83. **4)** Compile Wine and make an installable package for it. Do not install:
  84. `bash updatewine.sh --no-staging --no-dxvk --no-install`
  85. **5)** Compile Wine & DXVK, and make installable packages for them. Do not install:
  86. `bash updatewine.sh --no-staging --no-install`
  87. **6)** Compile Wine Staging & DXVK, and make installable packages for them. Do not install:
  88. `bash updatewine.sh --no-install`
  89. **7)** Compile Wine & DXVK, and make installable packages for them. Install the packages:
  90. `bash updatewine.sh --no-staging`
  91. **8)** Compile Wine, and make an installable package for it. Install the package, do not check PlayOnLinux wineprefixes:
  92. `bash updatewine.sh --no-staging --no-dxvk --no-pol`
  93. ---------------------------
  94. ### NOTES
  95. **NOTE: 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.
  96. ---------------------------
  97. ### Test-run validation
  98. This is validation test done for the script. This test is to ensure it works as expected. It is mandatory due to rapid development of the packages it handles.
  99. **Latest test-run:** 11th November, 2018
  100. **Linux Distributions:**
  101. - Success: Arch Linux, Linux Mint 19
  102. - Failure: Debian 9 (Wine), Ubuntu 18.04 (DXVK)
  103. #### Failure reasons:
  104. Debian:
  105. - conflicting amd64/i386 Wine build time dependency packages, must find workaround for this
  106. - no winetricks package
  107. Ubuntu 18.04:
  108. - during DXVK compilation, the following error appears:
  109. ```
  110. ...
  111. [162/192] Compiling C++ object 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_swapchain.cpp.obj'.
  112. FAILED: src/d3d11/src@d3d11@@d3d11@sha/d3d11_swapchain.cpp.obj
  113. 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
  114. {standard input}: Assembler messages:
  115. {standard input}:3269: Warning: end of file not at end of a line; newline inserted
  116. {standard input}: Error: open SEH entry at end of file (missing .seh_endproc)
  117. x86_64-w64-mingw32-g++: internal compiler error: Killed (program cc1plus)
  118. ...
  119. ```
  120. or
  121. ```
  122. ...
  123. [137/192] Compiling C++ object 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_view_uav.cpp.obj'.
  124. FAILED: src/d3d11/src@d3d11@@d3d11@sha/d3d11_view_uav.cpp.obj
  125. 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
  126. x86_64-w64-mingw32-g++: internal compiler error: Killed (program cc1plus)
  127. Please submit a full bug report,
  128. with preprocessed source if appropriate.
  129. See <https://gcc.gnu.org/bugs/> for instructions.
  130. [144/192] Compiling C++ object 'src/d3d11/src@d3d11@@d3d11@sha/d3d11_context.cpp.obj'.
  131. ninja: build stopped: subcommand failed.
  132. ...
  133. ```
  134. ---------------------------
  135. ### TODO
  136. - Add support for pure Debian. Main issue is conflicting amd64/i386 Wine buildtime packages
  137. - Workaround must be found, maybe split single Wine deb package into two, with suffixes amd64 & i386?
  138. - For pure Debian, package 'winetricks' must be compiled, too
  139. - Add compilation scripts for the latest AMDGPU & Nvidia drivers on Arch Linux/Debian/Ubuntu/Mint
  140. - Remove temp folders in case of failure (meson/glslang/dxvk-git/wine... temp build folders)
  141. - Add support for custom DXVK patches
  142. - Add proper license information for meson, glslang, Wine & DXVK
  143. - Add option (?): do not store compiled packages, just install them
  144. - Better handling for sudo validation loop function
  145. - may cause the terminal output to get nuts
  146. - when interrupting the script, the exit functionality may not be handled correctly?
  147. ---------------------------
  148. ### LICENSE
  149. This repository uses GPLv3 license. See [LICENSE](LICENSE) for details.