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.

61 lines
2.2 KiB

  1. #!/bin/env bash
  2. # Update PoL Wine prefixes (DXVK & Wine Staging) on Debian/Ubuntu/Mint
  3. # Copyright (C) 2018, 2022 Pekka Helenius
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. ##############################################################################
  18. # Check existence of PoL default folder in user's homedir
  19. if [[ ! -d "$HOME/.PlayOnLinux" ]]; then
  20. echo -e "\e[1mWARNING:\e[0m Couldn't find PoL directories in $USER's homedir.\n"
  21. exit 0
  22. fi
  23. # Install dxvk-git to every PlayOnLinux wineprefix
  24. if [[ $? -eq 0 ]] && [[ ! -v NO_POL ]]; then
  25. for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
  26. if [[ -d ${wineprefix}/dosdevices ]]; then
  27. if [[ ! -v NO_DXVK ]]; then
  28. WINEPREFIX=${wineprefix} setup_dxvk install --symlink
  29. fi
  30. if [[ ! -v NO_NVAPI ]]; then
  31. WINEPREFIX=${wineprefix} setup_dxvk_nvapi install --symlink
  32. fi
  33. if [[ ! -v NO_VKD3D ]]; then
  34. WINEPREFIX=${wineprefix} setup_vkd3d_proton install --symlink
  35. fi
  36. fi
  37. done
  38. fi
  39. # If a new Wine Staging version was installed and 'System' version of Wine has been used in
  40. # PoL wineprefix configurations, update those existing PoL wineprefixes
  41. if [[ ! -v NO_POL ]]; then
  42. for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
  43. if [[ -d ${wineprefix}/dosdevices ]]; then
  44. # If VERSION string exists, skip updating that prefix.
  45. if [[ $(printf $(grep -ril "VERSION" ${wineprefix}/playonlinux.cfg &> /dev/null)$?) -ne 0 ]]; then
  46. WINEPREFIX=${wineprefix} wineboot -u
  47. fi
  48. fi
  49. done
  50. fi