├── DXVKBUILD ├── vulkansdk │ ├── winevulkan.json │ └── vulkan.reg ├── patches │ └── README.md ├── setup_dxvk32.sh └── setup_dxvk64.sh ├── .gitignore ├── VKD3D_PROTONBUILD └── patches │ └── README.md ├── README.md ├── updxvk.cfg ├── upvkd3d-proton.cfg ├── upvkd3d-proton └── updxvk /DXVKBUILD/vulkansdk/winevulkan.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_format_version": "1.0.0", 3 | "ICD": { 4 | "library_path": "c:\\windows\\system32\\winevulkan.dll", 5 | "api_version": "1.3.224.1" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /DXVKBUILD/vulkansdk/vulkan.reg: -------------------------------------------------------------------------------- 1 | REGEDIT4 2 | 3 | [HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers] 4 | "C:\\Windows\\winevulkan.json"=dword:00000000 5 | 6 | [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Khronos\Vulkan\Drivers] 7 | "C:\\Windows\\winevulkan.json"=dword:00000000 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.gitignore 3 | *~ 4 | *.orig 5 | *.log 6 | *.run 7 | *.tgz 8 | *.xz 9 | *.pkg 10 | *.bak 11 | *.tar.gz 12 | *.tar.zst 13 | *.old 14 | *.db 15 | *.files 16 | */src/ 17 | */pkg/ 18 | dxvk-master/ 19 | vkd3d-proton-master/ 20 | DXVKBUILD/master/ 21 | VKD3D_PROTONBUILD/master/ 22 | *.dxvkdirty 23 | *.vkd3ddirty 24 | -------------------------------------------------------------------------------- /DXVKBUILD/patches/README.md: -------------------------------------------------------------------------------- 1 | # dxvk-tools userpatches 2 | 3 | 4 | You can make use of your own patches to dxvk by putting them in this folder before running updxvk 5 | 6 | They need to be diffs against the dxvk tree. 7 | 8 | 9 | You need to give your patch the appropriate extension : 10 | 11 | **!! Patches with unrecognized extension will get ignored !!** 12 | 13 | - You can use your own dxvk patches by giving them the .dxvkpatch extension. 14 | - You can also revert dxvk patches by giving them the .dxvkrevert extension. 15 | -------------------------------------------------------------------------------- /VKD3D_PROTONBUILD/patches/README.md: -------------------------------------------------------------------------------- 1 | # dxvk-tools userpatches 2 | 3 | 4 | You can make use of your own patches to vkd3d-proton by putting them in this folder before running upvkd3d-proton 5 | 6 | They need to be diffs against the vkd3d-proton tree. 7 | 8 | 9 | You need to give your patch the appropriate extension : 10 | 11 | **!! Patches with unrecognized extension will get ignored !!** 12 | 13 | - You can use your own vkd3d patches by giving them the .vkd3dpatch extension. 14 | - You can also revert vkd3d patches by giving them the .vkd3drevert extension. 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DXVK & vkd3d-proton script to build/patch/install/update, Lutris and Proton-tkg compatible. 2 | 3 | ### Requirements: 4 | - [wine 3.10](https://www.winehq.org/) or newer 5 | - [Meson](http://mesonbuild.com/) build system (at least version 0.43) 6 | - [MinGW64](http://mingw-w64.org/) 8.0 compiler and headers (I'm providing a distro-agnostic script to build it here: https://github.com/Frogging-Family/dxvk-tools ) 7 | - [glslang](https://github.com/KhronosGroup/glslang) compile 8 | - Optional : Installing ccache will greatly improve subsequent compilation times 9 | 10 | ### Building DXVK DLLs 11 | 12 | Inside the dxvk-tools directory, run: 13 | ``` 14 | ./updxvk build 15 | ``` 16 | 17 | ### Building vkd3d-proton DLLs 18 | 19 | Inside the dxvk-tools directory, run: 20 | ``` 21 | ./upvkd3d-proton build 22 | ``` 23 | 24 | ### Exporting DXVK DLLs for Proton-tkg 25 | 26 | Still inside the dxvk-tools directory, after you ran the command above, run: 27 | ``` 28 | ./updxvk proton-tkg 29 | ``` 30 | *DXVK files will be copied in a folder next to proton-tkg script, ready for building.* 31 | 32 | 33 | You'll find more details on the various functions (such as installation-related ones) of these scripts right inside them. 34 | 35 | # DXVK : https://github.com/doitsujin/dxvk 36 | # vkd3d-proton : https://github.com/HansKristian-Work/vkd3d-proton 37 | -------------------------------------------------------------------------------- /updxvk.cfg: -------------------------------------------------------------------------------- 1 | # External config file to use - If the given file exists in path, it will override default config (updxvk.cfg) - Default is ~/.config/frogminer/updxvk.cfg 2 | _EXT_CONFIG_PATH=~/.config/frogminer/updxvk.cfg 3 | 4 | # DXVK repo to use 5 | DXVK_REPO="https://github.com/doitsujin/dxvk.git" 6 | 7 | # DXVK branch to use 8 | DXVK_BRANCH=master 9 | 10 | # Set to 1 to enable custom commit checkout 11 | CUSTOM_COMMIT=0 12 | 13 | # targeted custom commit 14 | DXVK_COMMIT= 15 | 16 | # Git pull (Sync) with clean source before building 17 | DXVK_AUTOUPDATE=1 18 | 19 | # Enables auto-application of all patches present in ./DXVKBUILD/patches - It WILL make your tree dirty if any patch is applied 20 | PATCHIN=1 21 | 22 | # 0: Clear source dir only if marked as dirty from patching 23 | # 1: Always clear source dir and redownload from git (default) 24 | # 2: Always ignore source dir removal even if dirty 25 | DIRTYIN=1 26 | 27 | # Path to the root folder containing your wine prefixes for batch installing/updating 28 | PREFIXES_ROOT="$HOME"/wineprefixes 29 | 30 | # Set to a proton /dist dir to update the DXVK build of a proton build - Requires running ./updxvk proton-dist 31 | # Example: "$HOME/.local/share/Steam/steamapps/common/Proton 5.0/dist" 32 | _proton_dist_path="" 33 | 34 | # Custom compiler root dirs - Leave empty to use system compilers 35 | # Example: CUSTOM_MINGW_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/mingw-mostlyportable-9.2.0" 36 | # Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0" 37 | CUSTOM_MINGW_PATH="" 38 | CUSTOM_GCC_PATH="" 39 | 40 | 41 | ## LOCAL PATCHES 42 | 43 | # community patches - add patches (separated by a space) of your choice by name from the community-patches dir 44 | # example: _community_patches="asyncpresent.dxvkrevert dxvk-win32-thread-model-support.dxvkpatch" 45 | _community_patches="" 46 | 47 | -------------------------------------------------------------------------------- /upvkd3d-proton.cfg: -------------------------------------------------------------------------------- 1 | # External config file to use - If the given file exists in path, it will override default config (updxvk.cfg) - Default is ~/.config/frogminer/updxvk.cfg 2 | _EXT_CONFIG_PATH=~/.config/frogminer/upvkd3d-proton.cfg 3 | 4 | # VKD3D-PROTON repo to use 5 | VKD3D_PROTON_REPO="https://github.com/HansKristian-Work/vkd3d-proton" 6 | 7 | # VKD3D-PROTON branch to use 8 | VKD3D_PROTON_BRANCH=master 9 | 10 | # Set to 1 to enable custom commit checkout 11 | CUSTOM_COMMIT=0 12 | 13 | # targeted custom commit 14 | VKD3D_PROTON_COMMIT= 15 | 16 | # Git pull (Sync) with clean source before building 17 | VKD3D_PROTON_AUTOUPDATE=1 18 | 19 | # Enables auto-application of all patches present in ./VKD3D-PROTONBUILD/patches - It WILL make your tree dirty if any patch is applied 20 | PATCHIN=1 21 | 22 | # 0: Clear source dir only if marked as dirty from patching 23 | # 1: Always clear source dir and redownload from git (default) 24 | # 2: Always ignore source dir removal even if dirty 25 | DIRTYIN=1 26 | 27 | # Path to the root folder containing your wine prefixes for batch installing/updating 28 | PREFIXES_ROOT="$HOME"/wineprefixes 29 | 30 | # Set to a proton /dist dir to update the VKD3D-PROTON build of a proton build - Requires running ./updxvk proton-dist 31 | # Example: "$HOME/.local/share/Steam/steamapps/common/Proton 5.0/dist" 32 | _proton_dist_path="" 33 | 34 | # Custom compiler root dirs - Leave empty to use system compilers 35 | # Example: CUSTOM_MINGW_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/mingw-mostlyportable-9.2.0" 36 | # Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0" 37 | CUSTOM_MINGW_PATH="" 38 | CUSTOM_GCC_PATH="" 39 | 40 | 41 | ## LOCAL PATCHES 42 | 43 | # community patches - add patches (separated by a space) of your choice by name from the community-patches dir 44 | # example: _community_patches="asyncpresent.dxvkrevert dxvk-win32-thread-model-support.dxvkpatch" 45 | _community_patches="" 46 | -------------------------------------------------------------------------------- /DXVKBUILD/setup_dxvk32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export WINEDEBUG=-all 4 | 5 | dlls_dir=`dirname "$(readlink -f $0)"` 6 | build_arch='x86' 7 | winelib='False' 8 | 9 | if [ $winelib == 'True' ]; then 10 | dll_ext='dll.so' 11 | dlls_dir="$dlls_dir"/../lib 12 | else 13 | dll_ext='dll' 14 | fi 15 | 16 | if [ ! -f "$dlls_dir/d3d11.$dll_ext" ] || [ ! -f "$dlls_dir/dxgi.$dll_ext" ]; then 17 | echo "d3d11.$dll_ext or dxgi.$dll_ext not found in $dlls_dir" >&2 18 | exit 1 19 | fi 20 | 21 | if [ -z "$wine" ]; then 22 | if [ $build_arch == "x86_64" ]; then 23 | wine="wine64" 24 | else 25 | wine="wine" 26 | fi 27 | fi 28 | 29 | winever=`$wine --version | grep wine` 30 | if [ -z "$winever" ]; then 31 | echo "$wine:"' Not a wine executable. Check your $wine.' >&2 32 | exit 1 33 | fi 34 | 35 | quiet=false 36 | assume= 37 | 38 | function ask { 39 | echo "$1" 40 | if [ -z "$assume" ]; then 41 | read continue 42 | else 43 | continue=$assume 44 | echo "$continue" 45 | fi 46 | } 47 | 48 | POSITIONAL=() 49 | while [[ $# -gt 0 ]]; do 50 | 51 | case $1 in 52 | -y) 53 | assume='y' 54 | shift 55 | ;; 56 | -n) 57 | assume='n' 58 | shift 59 | ;; 60 | -q|--quiet) 61 | quiet=true 62 | assume=${assume:-'y'} 63 | shift 64 | ;; 65 | *) 66 | POSITIONAL+=("$1") 67 | shift 68 | ;; 69 | esac 70 | done 71 | set -- "${POSITIONAL[@]}" 72 | 73 | if [ "$quiet" = true ]; then 74 | exec >/dev/null 75 | fi 76 | 77 | if [ -z "$WINEPREFIX" ]; then 78 | ask "WINEPREFIX is not set, continue? (y/N)" 79 | if [ "$continue" != "y" ] && [ "$continue" != "Y" ]; then 80 | exit 1 81 | fi 82 | else 83 | if ! [ -f "$WINEPREFIX/system.reg" ]; then 84 | ask "WINEPREFIX does not point to an existing wine installation. Proceeding will create a new one, continue? (y/N)" 85 | if [ "$continue" != "y" ] && [ "$continue" != "Y" ]; then 86 | exit 1 87 | fi 88 | fi 89 | fi 90 | unix_sys_path="$($wine winepath -u 'C:\windows\system32')" 91 | unix_sys_path="${unix_sys_path/$'\r'/}" 92 | if [ $? -ne 0 ]; then 93 | exit 1 94 | fi 95 | 96 | 97 | ret=0 98 | 99 | function removeOverride { 100 | echo -n ' [1/2] Removing override... ' 101 | local out 102 | out=$($wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f 2>&1) 103 | if [ $? -ne 0 ]; then 104 | echo -e "\\e[1;31m$out\\e[0m" 105 | exit 1 106 | fi 107 | echo -e "$(sed -e 's|\r||g' <<< "\\e[1;32m$out\\e[0m.")" 108 | local dll="$unix_sys_path/$1.dll" 109 | echo -n ' [2/2] Removing link... ' 110 | if [ -h "$dll" ]; then 111 | out=$(rm "$dll" 2>&1) 112 | if [ $? -eq 0 ]; then 113 | echo -e '\e[1;32mDone\e[0m.' 114 | else 115 | ret=2 116 | echo -e "\\e[1;31m$out\\e[0m" 117 | fi 118 | else 119 | echo -e "\\e[1;33m'$dll' is not a link or doesn't exist\\e[0m." 120 | ret=2 121 | fi 122 | } 123 | 124 | function checkOverride { 125 | echo -n ' [1/2] Checking override... ' 126 | echo -en '\e[1;31m' 127 | local ovr 128 | ovr="$($wine reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1)" 129 | if [ $? -ne 0 ]; then 130 | echo -en '\e[1;0m' 131 | exit 1 132 | fi 133 | echo -en '\e[1;0m' 134 | if [[ $ovr == *native* ]] && ! [[ $ovr == *builtin,native* ]]; then 135 | echo -e '\e[1;32mOK\e[0m.' 136 | else 137 | echo -e '\e[1;31mnot set\e[0m.' 138 | ret=2 139 | fi 140 | echo -n " [2/2] Checking link to $1.$dll_ext... " 141 | if [ "$(readlink -f "$unix_sys_path/$1.dll")" == "$(readlink -f "$dlls_dir/$1.$dll_ext")" ]; then 142 | echo -e '\e[1;32mOK\e[0m.' 143 | else 144 | echo -e '\e[1;31mnot set\e[0m.' 145 | ret=2 146 | fi 147 | } 148 | 149 | function createOverride { 150 | echo -n ' [1/2] Creating override... ' 151 | local out 152 | out=$($wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f 2>&1) 153 | if [ $? -ne 0 ]; then 154 | echo -e "\\e[1;31m$out\\e[0m" 155 | exit 1 156 | fi 157 | echo -e "$(sed -e 's|\r||g' <<< "\\e[1;32m$out\\e[0m.")" 158 | echo -n " [2/2] Creating link to $1.$dll_ext... " 159 | ln -sf "$dlls_dir/$1.$dll_ext" "$unix_sys_path/$1.dll" 160 | if [ $? -eq 0 ]; then 161 | echo -e '\e[1;32mDone\e[0m.' 162 | else 163 | ret=2 164 | echo -e "\\e[1;31m$out\\e[0m" 165 | fi 166 | } 167 | 168 | case "$1" in 169 | reset) 170 | fun=removeOverride 171 | ;; 172 | check) 173 | fun=checkOverride 174 | ;; 175 | '') 176 | fun=createOverride 177 | ;; 178 | *) 179 | echo "Unrecognized option: $1" 180 | echo "Usage: $0 [reset|check] [-q|--quiet] [-y|-n]" 181 | exit 1 182 | ;; 183 | esac 184 | 185 | echo '[1/4] dxgi:' 186 | $fun dxgi 187 | echo '[2/4] d3d10core:' 188 | $fun d3d10core 189 | echo '[3/4] d3d11:' 190 | $fun d3d11 191 | echo '[4/4] d3d9:' 192 | $fun d3d9 193 | exit $ret 194 | -------------------------------------------------------------------------------- /DXVKBUILD/setup_dxvk64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export WINEDEBUG=-all 4 | 5 | dlls_dir=`dirname "$(readlink -f $0)"` 6 | build_arch='x86_64' 7 | winelib='False' 8 | 9 | if [ $winelib == 'True' ]; then 10 | dll_ext='dll.so' 11 | dlls_dir="$dlls_dir"/../lib 12 | else 13 | dll_ext='dll' 14 | fi 15 | 16 | if [ ! -f "$dlls_dir/d3d11.$dll_ext" ] || [ ! -f "$dlls_dir/dxgi.$dll_ext" ]; then 17 | echo "d3d11.$dll_ext or dxgi.$dll_ext not found in $dlls_dir" >&2 18 | exit 1 19 | fi 20 | 21 | if [ -z "$wine" ]; then 22 | if [ $build_arch == "x86_64" ]; then 23 | wine="wine64" 24 | else 25 | wine="wine" 26 | fi 27 | fi 28 | 29 | winever=`$wine --version | grep wine` 30 | if [ -z "$winever" ]; then 31 | echo "$wine:"' Not a wine executable. Check your $wine.' >&2 32 | exit 1 33 | fi 34 | 35 | quiet=false 36 | assume= 37 | 38 | function ask { 39 | echo "$1" 40 | if [ -z "$assume" ]; then 41 | read continue 42 | else 43 | continue=$assume 44 | echo "$continue" 45 | fi 46 | } 47 | 48 | POSITIONAL=() 49 | while [[ $# -gt 0 ]]; do 50 | 51 | case $1 in 52 | -y) 53 | assume='y' 54 | shift 55 | ;; 56 | -n) 57 | assume='n' 58 | shift 59 | ;; 60 | -q|--quiet) 61 | quiet=true 62 | assume=${assume:-'y'} 63 | shift 64 | ;; 65 | *) 66 | POSITIONAL+=("$1") 67 | shift 68 | ;; 69 | esac 70 | done 71 | set -- "${POSITIONAL[@]}" 72 | 73 | if [ "$quiet" = true ]; then 74 | exec >/dev/null 75 | fi 76 | 77 | if [ -z "$WINEPREFIX" ]; then 78 | ask "WINEPREFIX is not set, continue? (y/N)" 79 | if [ "$continue" != "y" ] && [ "$continue" != "Y" ]; then 80 | exit 1 81 | fi 82 | else 83 | if ! [ -f "$WINEPREFIX/system.reg" ]; then 84 | ask "WINEPREFIX does not point to an existing wine installation. Proceeding will create a new one, continue? (y/N)" 85 | if [ "$continue" != "y" ] && [ "$continue" != "Y" ]; then 86 | exit 1 87 | fi 88 | fi 89 | fi 90 | unix_sys_path="$($wine winepath -u 'C:\windows\system32')" 91 | unix_sys_path="${unix_sys_path/$'\r'/}" 92 | if [ $? -ne 0 ]; then 93 | exit 1 94 | fi 95 | 96 | 97 | ret=0 98 | 99 | function removeOverride { 100 | echo -n ' [1/2] Removing override... ' 101 | local out 102 | out=$($wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f 2>&1) 103 | if [ $? -ne 0 ]; then 104 | echo -e "\\e[1;31m$out\\e[0m" 105 | exit 1 106 | fi 107 | echo -e "$(sed -e 's|\r||g' <<< "\\e[1;32m$out\\e[0m.")" 108 | local dll="$unix_sys_path/$1.dll" 109 | echo -n ' [2/2] Removing link... ' 110 | if [ -h "$dll" ]; then 111 | out=$(rm "$dll" 2>&1) 112 | if [ $? -eq 0 ]; then 113 | echo -e '\e[1;32mDone\e[0m.' 114 | else 115 | ret=2 116 | echo -e "\\e[1;31m$out\\e[0m" 117 | fi 118 | else 119 | echo -e "\\e[1;33m'$dll' is not a link or doesn't exist\\e[0m." 120 | ret=2 121 | fi 122 | } 123 | 124 | function checkOverride { 125 | echo -n ' [1/2] Checking override... ' 126 | echo -en '\e[1;31m' 127 | local ovr 128 | ovr="$($wine reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1)" 129 | if [ $? -ne 0 ]; then 130 | echo -en '\e[1;0m' 131 | exit 1 132 | fi 133 | echo -en '\e[1;0m' 134 | if [[ $ovr == *native* ]] && ! [[ $ovr == *builtin,native* ]]; then 135 | echo -e '\e[1;32mOK\e[0m.' 136 | else 137 | echo -e '\e[1;31mnot set\e[0m.' 138 | ret=2 139 | fi 140 | echo -n " [2/2] Checking link to $1.$dll_ext... " 141 | if [ "$(readlink -f "$unix_sys_path/$1.dll")" == "$(readlink -f "$dlls_dir/$1.$dll_ext")" ]; then 142 | echo -e '\e[1;32mOK\e[0m.' 143 | else 144 | echo -e '\e[1;31mnot set\e[0m.' 145 | ret=2 146 | fi 147 | } 148 | 149 | function createOverride { 150 | echo -n ' [1/2] Creating override... ' 151 | local out 152 | out=$($wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f 2>&1) 153 | if [ $? -ne 0 ]; then 154 | echo -e "\\e[1;31m$out\\e[0m" 155 | exit 1 156 | fi 157 | echo -e "$(sed -e 's|\r||g' <<< "\\e[1;32m$out\\e[0m.")" 158 | echo -n " [2/2] Creating link to $1.$dll_ext... " 159 | ln -sf "$dlls_dir/$1.$dll_ext" "$unix_sys_path/$1.dll" 160 | if [ $? -eq 0 ]; then 161 | echo -e '\e[1;32mDone\e[0m.' 162 | else 163 | ret=2 164 | echo -e "\\e[1;31m$out\\e[0m" 165 | fi 166 | } 167 | 168 | case "$1" in 169 | reset) 170 | fun=removeOverride 171 | ;; 172 | check) 173 | fun=checkOverride 174 | ;; 175 | '') 176 | fun=createOverride 177 | ;; 178 | *) 179 | echo "Unrecognized option: $1" 180 | echo "Usage: $0 [reset|check] [-q|--quiet] [-y|-n]" 181 | exit 1 182 | ;; 183 | esac 184 | 185 | echo '[1/4] dxgi:' 186 | $fun dxgi 187 | echo '[2/4] d3d10core:' 188 | $fun d3d10core 189 | echo '[3/4] d3d11:' 190 | $fun d3d11 191 | echo '[4/4] d3d9:' 192 | $fun d3d9 193 | exit $ret 194 | -------------------------------------------------------------------------------- /upvkd3d-proton: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # TkGlitch's vkd3d-proton Updater - ti3nou@gmail.com 4 | 5 | # BUILD HEAD OF THE CHOSEN BRANCH WITH : ./upvkd3d-proton build - (Edit VKD3D_BRANCH to point to the branch you want) 6 | 7 | # LUTRIS UPDATE WITH : ./upvkd3d-proton lutris - (Put 'TkG' as VKD3D-PROTON version in lutris afterwards to use your fresh build) 8 | 9 | # PROTON UPDATE WITH : ./upvkd3d-proton proton-dist - Requires _proton_dist_path to be set in upvkd3d-proton.cfg 10 | 11 | # Putting patch files in VKD3D_PROTONBUILD/patches will auto-apply them if the extension is .vkd3dpatch, auto-revert them if the extension is .vkd3drevert, or ignore them if any other extension (or none) is used 12 | 13 | cat << 'EOM' 14 | .---.` `.---. 15 | `/syhhhyso- -osyhhhys/` 16 | .syNMdhNNhss/``.---.``/sshNNhdMNys. 17 | +sdMh.`+MNsssssssssssssssNM+`.hMds+ 18 | :syNNdhNNhssssssssssssssshNNhdNNys: 19 | /ssyhhhysssssssssssssssssyhhhyss/ 20 | .ossssssssssssssssssssssssssssso. 21 | :sssssssssssssssssssssssssssssssss: 22 | /sssssssssssssssssssssssssssssssssss/ 23 | :sssssssssssssoosssssssoosssssssssssss: 24 | osssssssssssssoosssssssoossssssssssssso 25 | osssssssssssyyyyhhhhhhhyyyyssssssssssso 26 | /yyyyyyhhdmmmmNNNNNNNNNNNmmmmdhhyyyyyy/ 27 | smmmNNNNNNNNNNNNNNNNNNNNNNNNNNNNNmmms 28 | /dNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNd/ 29 | `:sdNNNNNNNNNNNNNNNNNNNNNNNNNds:` 30 | `-+shdNNNNNNNNNNNNNNNdhs+-` 31 | `.-:///////:-.` 32 | 33 | EOM 34 | 35 | source upvkd3d-proton.cfg 36 | 37 | # Load external configuration file if present. Available variable values will overwrite upvkd3d-proton.cfg ones. 38 | if [ -e "$_EXT_CONFIG_PATH" ]; then 39 | source "$_EXT_CONFIG_PATH" && echo -e "External configuration file $_EXT_CONFIG_PATH will be used to override upvkd3d-proton.cfg values.\n" 40 | fi 41 | 42 | ROOT="$PWD" 43 | 44 | # Use custom compiler paths if defined 45 | if [ -n "${CUSTOM_MINGW_PATH}" ]; then 46 | PATH=${CUSTOM_MINGW_PATH}/bin:${CUSTOM_MINGW_PATH}/lib:${CUSTOM_MINGW_PATH}/include:${PATH} 47 | fi 48 | if [ -n "${CUSTOM_GCC_PATH}" ]; then 49 | PATH=${CUSTOM_GCC_PATH}/bin:${CUSTOM_GCC_PATH}/lib:${CUSTOM_GCC_PATH}/include:${PATH} 50 | fi 51 | 52 | _exit_cleanup() { 53 | rm -rf "$ROOT/VKD3D_PROTONBUILD/vkd3d-proton-$VKD3D_PROTON_BRANCH" 54 | echo -e "\nexit cleanup done" 55 | } 56 | 57 | build() { 58 | mkdir -p VKD3D_PROTONBUILD 59 | mkdir -p VKD3D_PROTONBUILD/patches 60 | 61 | if [ "$DIRTYIN" != "2" ]; then 62 | if [ -e "vkd3d-proton-$VKD3D_PROTON_BRANCH.vkd3ddirty" ] || [ "$DIRTYIN" == "1" ]; then 63 | ( cd vkd3d-proton-"$VKD3D_PROTON_BRANCH" && git reset --hard HEAD && git clean -xdf ) 64 | echo "#################" 65 | echo "" 66 | echo "YOUR TREE WAS CONSIDERED DIRTY AND HAS BEEN CLEARED" 67 | echo "" 68 | echo "#################" 69 | rm "$VKD3D_PROTON_BRANCH".vkd3ddirty 70 | fi 71 | else 72 | echo "#################" 73 | echo "" 74 | echo "YOU DIRTY BOI.." 75 | echo "" 76 | echo "#################" 77 | fi 78 | 79 | mkdir vkd3d-proton-"$VKD3D_PROTON_BRANCH" 80 | 81 | cd vkd3d-proton-"$VKD3D_PROTON_BRANCH" 82 | 83 | if [ ! -e package-release.sh ]; then 84 | git init . 85 | git remote add -t \* -f origin "$VKD3D_PROTON_REPO" 86 | git checkout "$VKD3D_PROTON_BRANCH" 87 | fi 88 | 89 | if [ "$VKD3D_PROTON_AUTOUPDATE" == "1" ]; then 90 | git pull 91 | fi 92 | 93 | if [ -n "$VKD3D_PROTON_COMMIT" ] && [ "$CUSTOM_COMMIT" == "1" ]; then 94 | git checkout "$VKD3D_PROTON_COMMIT" 95 | fi 96 | 97 | git submodule update --init --recursive 98 | ( cd subprojects/dxil-spirv && git pull origin master ) 99 | 100 | GIT_HEAD=$(git rev-parse HEAD)-`date '+%Y-%m-%d-%H:%M:%S'` 101 | 102 | # Community patches 103 | if [ -n "$_community_patches" ]; then 104 | _community_patches=($_community_patches) 105 | for _p in ${_community_patches[@]}; do 106 | ln -s $ROOT/../community-patches/vkd3d-proton/$_p $ROOT/VKD3D_PROTONBUILD/patches/ 107 | done 108 | fi 109 | 110 | if [ "$PATCHIN" == "1" ]; then 111 | for F in ../VKD3D_PROTONBUILD/patches/*vkd3drevert; do 112 | if [ -e "${F}" ]; then 113 | echo "#################" 114 | echo "" 115 | echo "REVERTING PATCH ${F}" 116 | echo "" 117 | echo "#################" 118 | patch -Np1 -R < ${F} && echo "This means that branch $VKD3D_PROTON_BRANCH was altered by patching and will be cleared next time you build" >> ../"$VKD3D_PROTON_BRANCH".vkd3ddirty || exit 1 119 | else 120 | echo "#################" 121 | echo "" 122 | echo "NO REVERT PATCH DETECTED - MOVING ON" 123 | echo "" 124 | echo "#################" 125 | fi 126 | done 127 | for F in ../VKD3D_PROTONBUILD/patches/*vkd3dpatch; do 128 | if [ -e "${F}" ]; then 129 | echo "#################" 130 | echo "" 131 | echo "APPLYING PATCH ${F}" 132 | echo "" 133 | echo "#################" 134 | patch -Np1 < ${F} && echo "This means that branch $VKD3D_PROTON_BRANCH was altered by patching and will be cleared next time you build" >> ../"$VKD3D_PROTON_BRANCH".vkd3ddirty || exit 1 135 | else 136 | echo "#################" 137 | echo "" 138 | echo "NO PATCH DETECTED - MOVING ON" 139 | echo "" 140 | echo "#################" 141 | fi 142 | done 143 | fi 144 | 145 | # Community patches cleanup 146 | if [ -n $_community_patches ]; then 147 | for _p in ${_community_patches[@]}; do 148 | rm -f $ROOT/VKD3D_PROTONBUILD/patches/${_p} 149 | done 150 | fi 151 | 152 | if pacman -Qq ccache &> /dev/null || dpkg -l ccache &> /dev/null; then 153 | echo 'ccache was found and will be used' 154 | sed -i "s|c = 'i686-w64-mingw32-gcc'|c = ['ccache', 'i686-w64-mingw32-gcc']|g" build-win32.txt 155 | sed -i "s|c = 'x86_64-w64-mingw32-gcc'|c = ['ccache', 'x86_64-w64-mingw32-gcc']|g" build-win64.txt 156 | sed -i "s|cpp = 'i686-w64-mingw32-g++'|cpp = ['ccache', 'i686-w64-mingw32-g++']|g" build-win32.txt 157 | sed -i "s|cpp = 'x86_64-w64-mingw32-g++'|cpp = ['ccache', 'x86_64-w64-mingw32-g++']|g" build-win64.txt 158 | else 159 | echo "" 160 | echo 'ccache was not found and will not be used' 161 | fi 162 | 163 | echo "#################" 164 | echo "" 165 | echo "BUILDING" 166 | echo "" 167 | echo "#################" 168 | ./package-release.sh "$VKD3D_PROTON_BRANCH" ../VKD3D_PROTONBUILD --no-package 169 | 170 | if [ -d ../VKD3D_PROTONBUILD/vkd3d-proton-"$VKD3D_PROTON_BRANCH"/x86 ] && [ -d ../VKD3D_PROTONBUILD/vkd3d-proton-"$VKD3D_PROTON_BRANCH"/x64 ]; then 171 | mkdir -p ../VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$GIT_HEAD" 172 | mv -v -T ../VKD3D_PROTONBUILD/vkd3d-proton-"$VKD3D_PROTON_BRANCH"/x86 ../VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$GIT_HEAD"/x86 173 | mv -v -T ../VKD3D_PROTONBUILD/vkd3d-proton-"$VKD3D_PROTON_BRANCH"/x64 ../VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$GIT_HEAD"/x64 174 | if [ -e ../vkd3d-proton-"$VKD3D_PROTON_BRANCH"/setup_vkd3d_proton.sh ]; then 175 | cp ../vkd3d-proton-"$VKD3D_PROTON_BRANCH"/setup_vkd3d_proton.sh ../VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$GIT_HEAD"/ 176 | fi 177 | rm -R -f ../VKD3D_PROTONBUILD/vkd3d-proton-"$VKD3D_PROTON_BRANCH" 178 | echo "Your files were built in $ROOT/VKD3D_PROTONBUILD/$VKD3D_PROTON_BRANCH/$GIT_HEAD" 179 | rm -f ../VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/last-HEAD 180 | echo "CURRENT_HEAD=$GIT_HEAD" >> ../VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/last-HEAD 181 | rm -f ../VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/latest 182 | ln -s "$GIT_HEAD" "$ROOT"/VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/latest 183 | else 184 | rm -rf ../VKD3D_PROTONBUILD/*-"$VKD3D_PROTON_BRANCH" 185 | fi 186 | 187 | } 188 | 189 | # Lutris 190 | if [ "$1" == "lutris" ]; then 191 | 192 | wineserver -k 193 | 194 | if [ ! -f ./VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH/"last-HEAD ]; then 195 | 196 | echo "You need to build before you can update ! Run upvkd3d-proton build first" 197 | 198 | else 199 | 200 | source "$ROOT/VKD3D_PROTONBUILD/$VKD3D_PROTON_BRANCH/last-HEAD" 201 | 202 | rm -rv "$HOME"/.local/share/lutris/runtime/vkd3d/TkG/x64/d3d12.dll 203 | rm -rv "$HOME"/.local/share/lutris/runtime/vkd3d/TkG/x32/d3d12.dll 204 | rm -rv "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x64/d3d12.dll 205 | rm -rv "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x32/d3d12.dll 206 | mkdir -p "$HOME"/.local/share/lutris/runtime/vkd3d/TkG/x64 207 | mkdir -p "$HOME"/.local/share/lutris/runtime/vkd3d/TkG/x32 208 | cp -rv ./VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$CURRENT_HEAD"/x64/* "$HOME"/.local/share/lutris/runtime/vkd3d/TkG/x64 209 | cp -rv ./VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$CURRENT_HEAD"/x86/* "$HOME"/.local/share/lutris/runtime/vkd3d/TkG/x32 210 | 211 | echo "" 212 | echo "###########################################################" 213 | echo "" 214 | echo "Put 'TkG' as DXVK version in lutris to use your fresh build" 215 | echo "" 216 | echo "###########################################################" 217 | 218 | fi 219 | 220 | fi 221 | 222 | # Proton (other) 223 | if [ "$1" == "proton-dist" ] && [ -n "$_proton_dist_path" ]; then 224 | 225 | wineserver -k 226 | 227 | if [ ! -f ./VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/last-HEAD ]; then 228 | 229 | echo "You need to build before you can update ! Run upvkd3d-proton build first" 230 | 231 | else 232 | 233 | source "$ROOT/VKD3D_PROTONBUILD/$VKD3D_PROTON_BRANCH/last-HEAD" 234 | 235 | chmod +w "$_proton_dist_path"/lib64/wine/vkd3d-proton/* 236 | chmod +w "$_proton_dist_path"/lib/wine/vkd3d-proton/* 237 | 238 | \cp -rv ./VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$CURRENT_HEAD"/x64/* "$_proton_dist_path"/lib64/wine/vkd3d-proton 239 | \cp -rv ./VKD3D_PROTONBUILD/"$VKD3D_PROTON_BRANCH"/"$CURRENT_HEAD"/x86/* "$_proton_dist_path"/lib/wine/vkd3d-proton 240 | 241 | echo "" 242 | echo "###############################################################" 243 | echo "" 244 | echo "This VKD3D_PROTON build will be used by the proton build in $_proton_dist_path" 245 | echo "" 246 | echo "###############################################################" 247 | 248 | fi 249 | 250 | fi 251 | 252 | # Build from latest master branch 253 | if [ "$1" == "build" ]; then 254 | 255 | time build 256 | 257 | fi 258 | 259 | trap _exit_cleanup EXIT SIGTERM 260 | -------------------------------------------------------------------------------- /updxvk: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # TkGlitch's DXVK Updater - ti3nou@gmail.com 4 | 5 | # BUILD HEAD OF THE CHOSEN BRANCH WITH : ./updxvk build - (Edit DXVK_BRANCH to point to the branch you want) 6 | 7 | # UPDATE WITH : ./updxvk /path/to/wine/prefix - (WINEARCH will be autodetected) - Adding "vulkansdk" after your path will also install vulkansdk to this prefix 8 | 9 | # BATCH UPDATE WITH : ./updxvk batch - (Edit PREFIXES_ROOT variable to point to your prefixes dir) 10 | 11 | # LUTRIS UPDATE WITH : ./updxvk lutris - (Put 'TkG' as DXVK version in lutris afterwards to use your fresh build) 12 | 13 | # PROTON UPDATE WITH : ./updxvk proton-dist - Requires _proton_dist_path to be set in updxvk.cfg 14 | 15 | # PROTON-TKG READY WITH : ./updxvk proton-tkg 16 | 17 | # FOR BOTH UPDATE AND BATCH UPDATE : optional - build number of the build you want to install 18 | # ex for UPDATE: ./updxvk /home/user/WinePrefixes/DEBUG f4a92a685f8b2f135dc6fe493ea9ce726aa79a52-2018-05-05-16:14:00 19 | # ex for BATCH UPDATE: ./updxvk batch f4a92a685f8b2f135dc6fe493ea9ce726aa79a52-2018-05-05-16:14:00 20 | 21 | # Putting patch files in DXVKBUILD/patches will auto-apply them if the extension is .dxvkpatch, auto-revert them if the extension is .dxvkrevert, or ignore them if any other extension (or none) is used 22 | 23 | cat << 'EOM' 24 | .---.` `.---. 25 | `/syhhhyso- -osyhhhys/` 26 | .syNMdhNNhss/``.---.``/sshNNhdMNys. 27 | +sdMh.`+MNsssssssssssssssNM+`.hMds+ 28 | :syNNdhNNhssssssssssssssshNNhdNNys: 29 | /ssyhhhysssssssssssssssssyhhhyss/ 30 | .ossssssssssssssssssssssssssssso. 31 | :sssssssssssssssssssssssssssssssss: 32 | /sssssssssssssssssssssssssssssssssss/ 33 | :sssssssssssssoosssssssoosssssssssssss: 34 | osssssssssssssoosssssssoossssssssssssso 35 | osssssssssssyyyyhhhhhhhyyyyssssssssssso 36 | /yyyyyyhhdmmmmNNNNNNNNNNNmmmmdhhyyyyyy/ 37 | smmmNNNNNNNNNNNNNNNNNNNNNNNNNNNNNmmms 38 | /dNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNd/ 39 | `:sdNNNNNNNNNNNNNNNNNNNNNNNNNds:` 40 | `-+shdNNNNNNNNNNNNNNNdhs+-` 41 | `.-:///////:-.` 42 | 43 | EOM 44 | 45 | source updxvk.cfg 46 | 47 | # Load external configuration file if present. Available variable values will overwrite updxvk.cfg ones. 48 | if [ -e "$_EXT_CONFIG_PATH" ]; then 49 | source "$_EXT_CONFIG_PATH" && echo -e "External configuration file $_EXT_CONFIG_PATH will be used to override updxvk.cfg values.\n" 50 | fi 51 | 52 | ROOT="$PWD" 53 | 54 | # Use custom compiler paths if defined 55 | if [ -n "${CUSTOM_MINGW_PATH}" ]; then 56 | PATH=${CUSTOM_MINGW_PATH}/bin:${CUSTOM_MINGW_PATH}/lib:${CUSTOM_MINGW_PATH}/include:${PATH} 57 | fi 58 | if [ -n "${CUSTOM_GCC_PATH}" ]; then 59 | PATH=${CUSTOM_GCC_PATH}/bin:${CUSTOM_GCC_PATH}/lib:${CUSTOM_GCC_PATH}/include:${PATH} 60 | fi 61 | 62 | _exit_cleanup() { 63 | rm -rf "$ROOT/DXVKBUILD/dxvk-$DXVK_BRANCH" 64 | echo -e "\nexit cleanup done" 65 | } 66 | 67 | build() { 68 | mkdir -p DXVKBUILD 69 | mkdir -p DXVKBUILD/patches 70 | 71 | if [ "$DIRTYIN" != "2" ]; then 72 | if [ -e "dxvk-$DXVK_BRANCH.dxvkdirty" ] || [ "$DIRTYIN" == "1" ]; then 73 | ( cd dxvk-"$DXVK_BRANCH" && git reset --hard HEAD && git clean -xdf ) 74 | echo "#################" 75 | echo "" 76 | echo "YOUR TREE WAS CONSIDERED DIRTY AND HAS BEEN CLEARED" 77 | echo "" 78 | echo "#################" 79 | rm "$DXVK_BRANCH".dxvkdirty 80 | fi 81 | else 82 | echo "#################" 83 | echo "" 84 | echo "YOU DIRTY BOI.." 85 | echo "" 86 | echo "#################" 87 | fi 88 | 89 | mkdir dxvk-"$DXVK_BRANCH" 90 | 91 | cd dxvk-"$DXVK_BRANCH" 92 | 93 | if [ ! -e package-release.sh ]; then 94 | git init . 95 | git remote add -t \* -f origin "$DXVK_REPO" 96 | git checkout "$DXVK_BRANCH" 97 | fi 98 | 99 | if [ "$DXVK_AUTOUPDATE" == "1" ]; then 100 | git pull 101 | fi 102 | 103 | if [ -n "$DXVK_COMMIT" ] && [ "$CUSTOM_COMMIT" == "1" ]; then 104 | git checkout "$DXVK_COMMIT" 105 | fi 106 | 107 | git submodule update --init --recursive 108 | 109 | GIT_HEAD=$(git rev-parse HEAD)-`date '+%Y-%m-%d-%H:%M:%S'` 110 | 111 | # Community patches 112 | if [ -n "$_community_patches" ]; then 113 | _community_patches=($_community_patches) 114 | for _p in ${_community_patches[@]}; do 115 | ln -s $ROOT/../community-patches/dxvk/$_p $ROOT/DXVKBUILD/patches/ 116 | done 117 | fi 118 | 119 | if [ "$PATCHIN" == "1" ]; then 120 | for F in ../DXVKBUILD/patches/*dxvkrevert; do 121 | if [ -e "${F}" ]; then 122 | echo "#################" 123 | echo "" 124 | echo "REVERTING PATCH ${F}" 125 | echo "" 126 | echo "#################" 127 | patch -Np1 -R < ${F} && echo "This means that branch $DXVK_BRANCH was altered by patching and will be cleared next time you build" >> ../"$DXVK_BRANCH".dxvkdirty || exit 1 128 | else 129 | echo "#################" 130 | echo "" 131 | echo "NO REVERT PATCH DETECTED - MOVING ON" 132 | echo "" 133 | echo "#################" 134 | fi 135 | done 136 | for F in ../DXVKBUILD/patches/*dxvkpatch; do 137 | if [ -e "${F}" ]; then 138 | echo "#################" 139 | echo "" 140 | echo "APPLYING PATCH ${F}" 141 | echo "" 142 | echo "#################" 143 | patch -Np1 < ${F} && echo "This means that branch $DXVK_BRANCH was altered by patching and will be cleared next time you build" >> ../"$DXVK_BRANCH".dxvkdirty || exit 1 144 | else 145 | echo "#################" 146 | echo "" 147 | echo "NO PATCH DETECTED - MOVING ON" 148 | echo "" 149 | echo "#################" 150 | fi 151 | done 152 | fi 153 | 154 | # Community patches cleanup 155 | if [ -n $_community_patches ]; then 156 | for _p in ${_community_patches[@]}; do 157 | rm -f $ROOT/DXVKBUILD/patches/${_p} 158 | done 159 | fi 160 | 161 | if pacman -Qq ccache &> /dev/null || dpkg -l ccache &> /dev/null; then 162 | echo 'ccache was found and will be used' 163 | sed -i "s|c = 'i686-w64-mingw32-gcc'|c = ['ccache', 'i686-w64-mingw32-gcc']|g" build-win32.txt 164 | sed -i "s|c = 'x86_64-w64-mingw32-gcc'|c = ['ccache', 'x86_64-w64-mingw32-gcc']|g" build-win64.txt 165 | sed -i "s|cpp = 'i686-w64-mingw32-g++'|cpp = ['ccache', 'i686-w64-mingw32-g++']|g" build-win32.txt 166 | sed -i "s|cpp = 'x86_64-w64-mingw32-g++'|cpp = ['ccache', 'x86_64-w64-mingw32-g++']|g" build-win64.txt 167 | else 168 | echo "" 169 | echo 'ccache was not found and will not be used' 170 | fi 171 | 172 | echo "#################" 173 | echo "" 174 | echo "BUILDING" 175 | echo "" 176 | echo "#################" 177 | ./package-release.sh "$DXVK_BRANCH" ../DXVKBUILD --no-package 178 | 179 | if [ -d ../DXVKBUILD/dxvk-"$DXVK_BRANCH"/x32 ] && [ -d ../DXVKBUILD/dxvk-"$DXVK_BRANCH"/x64 ]; then 180 | mkdir -p ../DXVKBUILD/"$DXVK_BRANCH"/"$GIT_HEAD" 181 | mv -v -T ../DXVKBUILD/dxvk-"$DXVK_BRANCH"/x32 ../DXVKBUILD/"$DXVK_BRANCH"/"$GIT_HEAD"/x32 182 | cp ../DXVKBUILD/setup_dxvk32.sh ../DXVKBUILD/"$DXVK_BRANCH"/"$GIT_HEAD"/x32/setup_symlink_dxvk.sh 183 | mv -v -T ../DXVKBUILD/dxvk-"$DXVK_BRANCH"/x64 ../DXVKBUILD/"$DXVK_BRANCH"/"$GIT_HEAD"/x64 184 | cp ../DXVKBUILD/setup_dxvk64.sh ../DXVKBUILD/"$DXVK_BRANCH"/"$GIT_HEAD"/x64/setup_symlink_dxvk.sh 185 | if [ -e ../DXVKBUILD/dxvk-"$DXVK_BRANCH"/setup_dxvk.sh ]; then 186 | cp ../DXVKBUILD/dxvk-"$DXVK_BRANCH"/setup_dxvk.sh ../DXVKBUILD/"$DXVK_BRANCH"/"$GIT_HEAD"/setup_dxvk.sh 187 | fi 188 | rm -R -f ../DXVKBUILD/dxvk-"$DXVK_BRANCH" 189 | echo "Your files were built in $ROOT/DXVKBUILD/$DXVK_BRANCH/$GIT_HEAD" 190 | rm -f ../DXVKBUILD/"$DXVK_BRANCH"/last-HEAD 191 | echo "CURRENT_HEAD=$GIT_HEAD" >> ../DXVKBUILD/"$DXVK_BRANCH"/last-HEAD 192 | rm -f ../DXVKBUILD/"$DXVK_BRANCH"/latest 193 | ln -s "$GIT_HEAD" "$ROOT"/DXVKBUILD/"$DXVK_BRANCH"/latest 194 | else 195 | rm -rf ../DXVKBUILD/*-"$DXVK_BRANCH" 196 | fi 197 | 198 | } 199 | 200 | update() { 201 | 202 | if [ -d "$ROOT/DXVKBUILD" ]; then 203 | 204 | source "$ROOT/DXVKBUILD/$DXVK_BRANCH/last-HEAD" 205 | 206 | # kill wineserver before installation to make sure correct wine version is used 207 | wineserver -k 208 | 209 | WINECMD=${WINE-wine} 210 | 211 | if [ $WINECMD = "wine" ]; then 212 | if [ $WINEARCH = "win64" ]; then 213 | WINECMD="wine64" 214 | else 215 | WINECMD="wine" 216 | fi 217 | fi 218 | 219 | if [ -z "$2" ]; then 220 | cd "$ROOT/DXVKBUILD/$DXVK_BRANCH/$CURRENT_HEAD" 221 | elif [ -d "$ROOT/DXVKBUILD/$2" ]; then 222 | cd "$ROOT/DXVKBUILD/$2" 223 | else 224 | echo "#################################" 225 | echo "" 226 | echo " DXVKBUILD/$2 directory not found !!" 227 | echo "" 228 | echo "#################################" 229 | fi 230 | 231 | if [ -d "x32" ] && [ -d "x64" ]; then 232 | WINEARCH="$WINEARCH" WINEPREFIX="$WINEPREFIX" bash "$_DXVKALIAS"/setup_symlink_dxvk.sh 233 | 234 | if [ $WINEARCH = "win64" ]; then 235 | WINEARCH="$WINEARCH" WINEPREFIX="$WINEPREFIX" bash x32/setup_symlink_dxvk.sh 236 | fi 237 | 238 | echo "#########################################" 239 | echo "" 240 | echo " DXVK updated in $WINEPREFIX - $WINEARCH" 241 | echo "" 242 | echo "#########################################" 243 | fi 244 | 245 | wineserver -k 246 | 247 | else 248 | echo "################################################################" 249 | echo "" 250 | echo "You need to build before you can update ! Run updxvk build first" 251 | echo "" 252 | echo "################################################################" 253 | fi 254 | } 255 | 256 | # External / Dynamic 257 | if [ -n "$1" ] && [ "$1" != "batch" ] && [ "$1" != "build" ] && [ "$1" != "lutris" ] && [ "$1" != "proton-tkg" ] && [ "$1" != "proton-dist" ]; then 258 | if [ -d "$1" ]; then 259 | WINEPREFIX="$1" 260 | if [ "$2" == "32" ]; then 261 | echo "x86 prefix" 262 | WINEARCH="win32" 263 | _DXVKALIAS="x32" 264 | elif [ "$2" == "64" ]; then 265 | echo "x64 prefix" 266 | WINEARCH="win64" 267 | _DXVKALIAS="x64" 268 | elif [ -d "$1/drive_c/Program Files (x86)" ]; then 269 | echo "assuming x64 prefix" 270 | WINEARCH="win64" 271 | _DXVKALIAS="x64" 272 | else 273 | echo "assuming x86 prefix" 274 | WINEARCH="win32" 275 | _DXVKALIAS="x32" 276 | fi 277 | if [ "$2" == "vulkansdk" ]; then 278 | WINEARCH="$WINEARCH" WINEPREFIX="$WINEPREFIX" "$WINECMD" regedit /S "$ROOT/DXVKBUILD/vulkansdk/vulkan.reg" 279 | 280 | if [ ! -f "$ROOT/DXVKBUILD/vulkansdk/VulkanSDK-1.3.224.1-Installer.exe" ]; then 281 | wget https://sdk.lunarg.com/sdk/download/1.3.224.1/windows/VulkanSDK-1.3.224.1-Installer.exe?Human=true -O "$ROOT/DXVKBUILD/vulkansdk/VulkanSDK-1.3.224.1-Installer.exe" 282 | fi 283 | 284 | WINEARCH="$WINEARCH" WINEPREFIX="$WINEPREFIX" "$WINECMD" "$ROOT/DXVKBUILD/vulkansdk/VulkanSDK-1.3.224.1-Installer.exe /S" 285 | cp "$ROOT/DXVKBUILD/vulkansdk/winevulkan.json" "$WINEPREFIX/drive_c/windows/winevulkan.json" 286 | echo "Vulkan SDK installation completed." 287 | fi 288 | fi 289 | update 290 | fi 291 | 292 | # Batch 293 | if [ "$1" == "batch" ] && [ ! -z "$PREFIXES_ROOT" ]; then 294 | for D in $PREFIXES_ROOT/*; do 295 | if [ -d "${D}" ]; then 296 | echo "${D}" 297 | if [ -d "${D}/drive_c" ]; then 298 | WINEPREFIX="${D}" 299 | if [ -d "${D}/drive_c/Program Files (x86)" ]; then 300 | WINEARCH="win64" 301 | _DXVKALIAS="x64" 302 | else 303 | WINEARCH="win32" 304 | _DXVKALIAS="x32" 305 | fi 306 | update 307 | fi 308 | fi 309 | done 310 | fi 311 | 312 | # Lutris 313 | if [ "$1" == "lutris" ]; then 314 | 315 | wineserver -k 316 | 317 | if [ ! -f ./DXVKBUILD/"$DXVK_BRANCH/"last-HEAD ]; then 318 | 319 | echo "You need to build before you can update ! Run updxvk build first" 320 | 321 | else 322 | 323 | source "$ROOT/DXVKBUILD/$DXVK_BRANCH/last-HEAD" 324 | 325 | find "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x64/ -type f -not -name 'd3d12.dll' -delete 326 | find "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x32/ -type f -not -name 'd3d12.dll' -delete 327 | mkdir -p "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x64 328 | mkdir -p "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x32 329 | cp -rv ./DXVKBUILD/"$DXVK_BRANCH"/"$CURRENT_HEAD"/x64/* "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x64 330 | cp -rv ./DXVKBUILD/"$DXVK_BRANCH"/"$CURRENT_HEAD"/x32/* "$HOME"/.local/share/lutris/runtime/dxvk/TkG/x32 331 | 332 | echo "" 333 | echo "###########################################################" 334 | echo "" 335 | echo "Put 'TkG' as DXVK version in lutris to use your fresh build" 336 | echo "" 337 | echo "###########################################################" 338 | 339 | fi 340 | 341 | fi 342 | 343 | # Proton-tkg 344 | if [ "$1" == "proton-tkg" ]; then 345 | 346 | wineserver -k 347 | 348 | if [ ! -f ./DXVKBUILD/"$DXVK_BRANCH"/last-HEAD ]; then 349 | 350 | echo "You need to build before you can update ! Run updxvk build first" 351 | 352 | else 353 | 354 | source "$ROOT/DXVKBUILD/$DXVK_BRANCH/last-HEAD" 355 | 356 | if [ "$_proton_tkg_path" = "proton-tkg" ]; then 357 | _proton_tkg_path=".." 358 | else 359 | _proton_tkg_path="../wine-tkg-git/proton-tkg/external-resources" 360 | fi 361 | 362 | rm -rf "$_proton_tkg_path"/dxvk 363 | mkdir -p "$_proton_tkg_path"/dxvk/x64 364 | mkdir -p "$_proton_tkg_path"/dxvk/x32 365 | cp -rv ./DXVKBUILD/"$DXVK_BRANCH"/"$CURRENT_HEAD"/x64/* "$_proton_tkg_path"/dxvk/x64 366 | cp -rv ./DXVKBUILD/"$DXVK_BRANCH"/"$CURRENT_HEAD"/x32/* "$_proton_tkg_path"/dxvk/x32 367 | 368 | echo "" 369 | echo "###############################################################" 370 | echo "" 371 | echo "This DXVK build will be integrated to your next Proton-tkg build" 372 | echo "" 373 | echo "###############################################################" 374 | 375 | fi 376 | 377 | fi 378 | 379 | # Proton (other) 380 | if [ "$1" == "proton-dist" ] && [ -n "$_proton_dist_path" ]; then 381 | 382 | wineserver -k 383 | 384 | if [ ! -f ./DXVKBUILD/"$DXVK_BRANCH"/last-HEAD ]; then 385 | 386 | echo "You need to build before you can update ! Run updxvk build first" 387 | 388 | else 389 | 390 | source "$ROOT/DXVKBUILD/$DXVK_BRANCH/last-HEAD" 391 | 392 | chmod +w "$_proton_dist_path"/lib64/wine/dxvk/* 393 | chmod +w "$_proton_dist_path"/lib/wine/dxvk/* 394 | 395 | \cp -rv ./DXVKBUILD/"$DXVK_BRANCH"/"$CURRENT_HEAD"/x64/* "$_proton_dist_path"/lib64/wine/dxvk 396 | \cp -rv ./DXVKBUILD/"$DXVK_BRANCH"/"$CURRENT_HEAD"/x32/* "$_proton_dist_path"/lib/wine/dxvk 397 | 398 | echo "" 399 | echo "###############################################################" 400 | echo "" 401 | echo "This DXVK build will be used by the proton build in $_proton_dist_path" 402 | echo "" 403 | echo "###############################################################" 404 | 405 | fi 406 | 407 | fi 408 | 409 | # Build from latest master branch 410 | if [ "$1" == "build" ]; then 411 | 412 | time build 413 | 414 | fi 415 | 416 | trap _exit_cleanup EXIT SIGTERM 417 | --------------------------------------------------------------------------------