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.

48 lines
1.9 KiB

  1. #!/bin/env bash
  2. # Update PoL Wine prefixes (DXVK & Wine Staging) on Debian/Ubuntu/Mint
  3. # Copyright (C) 2018 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 "Warning: 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 NOPOL ]]; then
  25. for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
  26. if [[ -d ${wineprefix}/dosdevices ]]; then
  27. WINEPREFIX=${wineprefix} setup_dxvk
  28. fi
  29. done
  30. fi
  31. # If a new Wine Staging version was installed and 'System' version of Wine has been used in
  32. # PoL wineprefix configurations, update those existing PoL wineprefixes
  33. if [[ ! -v NOPOL ]]; then
  34. for wineprefix in $(find $HOME/.PlayOnLinux/wineprefix -mindepth 1 -maxdepth 1 -type d); do
  35. if [[ -d ${wineprefix}/dosdevices ]]; then
  36. # If VERSION string exists, skip updating that prefix.
  37. if [[ $(printf $(grep -ril "VERSION" ${wineprefix}/playonlinux.cfg &> /dev/null)$?) -ne 0 ]]; then
  38. WINEPREFIX=${wineprefix} wineboot -u
  39. fi
  40. fi
  41. done
  42. fi