-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproton_setup.sh
executable file
·63 lines (53 loc) · 2.7 KB
/
proton_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
nvlibs_dir="$(dirname "$(readlink -fm "$0")")"
lib='lib/wine'
arch='i386'
if [ ! -f "$nvlibs_dir/x32/nvcuda.dll" ]; then
echo "Files not found in $nvlibs_dir" >&2
exit 1
fi
if [ -z "$PROTON_LIBS" ]; then
echo -ne "PROTON_LIBS is not set!\n"
echo -ne "Example: PROTON_LIBS='$HOME/.steam/steam/steamapps/common/Proton - Experimental'\n"
exit 1
fi
if [ ! -f "$PROTON_LIBS/files/$lib/$arch-windows/dxgi.dll" ]; then
echo -ne "Proton files not found in $PROTON_LIBS! Proton not installed or wrong path!\n" >&2
exit 1
fi
cp -f "$nvlibs_dir/x32/nvcuda.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuda.dll"
cp -f "$nvlibs_dir/x32/nvapi.dll" "$PROTON_LIBS/files/$lib/nvapi"
cp -f "$nvlibs_dir/x32/nvcuvid.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuvid.dll"
cp -f "$nvlibs_dir/x32/nvencodeapi.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvencodeapi.dll"
cd "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/syswow64"
ln -sf "../../../../../lib/wine/$arch-windows/nvcuvid.dll" "nvcuvid.dll"
ln -sf "../../../../../lib/wine/$arch-windows/nvencodeapi.dll" "nvencodeapi.dll"
arch='x86_64'
lib='lib64/wine'
cd "$nvlibs_dir"
cp -f "$nvlibs_dir/x64/nvcuda.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuda.dll"
cp -f "$nvlibs_dir/x64/nvcuvid.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuvid.dll"
cp -f "$nvlibs_dir/x64/nvencodeapi64.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvencodeapi64.dll"
cp -f "$nvlibs_dir/x64/nvoptix.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvoptix.dll"
cp -f "$nvlibs_dir/x64/nvofapi64_cuda.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvofapi64_cuda.dll"
cp -f "$nvlibs_dir/x64/nvapi64.dll" "$PROTON_LIBS/files/$lib/nvapi"
cp -f "$nvlibs_dir/x64/nvofapi64.dll" "$PROTON_LIBS/files/$lib/nvapi"
cd "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/system32"
ln -sf "../../../../../lib64/wine/$arch-windows/nvcuvid.dll" "nvcuvid.dll"
ln -sf "../../../../../lib64/wine/$arch-windows/nvencodeapi64.dll" "nvencodeapi64.dll"
ln -sf "../../../../../lib64/wine/$arch-windows/nvoptix.dll" "nvoptix.dll"
ln -sf "../../../../../lib64/wine/$arch-windows/nvofapi64_cuda.dll" "nvofapi64_cuda.dll"
echo -n "Do you want to copy NVML files to proton? (This can break games like Portal RTX!) (Y/N): "
read -n 1 -r response
echo
if [[ "$response" =~ ^[Yy]$ ]]; then
echo "Copying NVML files..."
cp -f "$nvlibs_dir/x64/wine/$arch-unix/nvml.so" "$PROTON_LIBS/files/$lib/$arch-unix"
cp -f "$nvlibs_dir/x64/wine/$arch-windows/nvml.dll" "$PROTON_LIBS/files/$lib/$arch-windows"
ln -sf "../../../../../lib64/wine/$arch-windows/nvml.dll" "nvml.dll"
echo "NVML Copied successfully"
else
echo "Skipping NVML files"
fi
cd "$nvlibs_dir"
echo -ne "All done - Files dropped in $PROTON_LIBS\n"