Skip to content

Commit

Permalink
Update proton script
Browse files Browse the repository at this point in the history
Make the script slightly lighter, and should make it work when using
Proton9 (Tested with GE-Proton-9.1).
  • Loading branch information
SveSop committed Mar 13, 2024
1 parent 2a360af commit 59af3fc
Showing 1 changed file with 11 additions and 52 deletions.
63 changes: 11 additions & 52 deletions proton_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,61 +20,20 @@ if [ ! -f "$PROTON_LIBS/files/$lib/$arch-windows/dxgi.dll" ]; then
exit 1
fi

function fake_install {
cp -f "$nvlibs_dir/$lib/$arch-windows/$1" "$PROTON_LIBS/files/$lib/$arch-windows/"
chmod -w,+x "$PROTON_LIBS/files/$lib/$arch-windows/$1"
}

function install {
cp -f "$nvlibs_dir/$lib/$arch-unix/$1" "$PROTON_LIBS/files/$lib/$arch-unix/"
chmod -w,+x "$PROTON_LIBS/files/$lib/$arch-unix/$1"
}

function nvapi {
cp -f "$nvlibs_dir/$lib/$arch-windows/$1" "$PROTON_LIBS/files/$lib/nvapi/"
chmod -w,+x "$PROTON_LIBS/files/$lib/nvapi/$1"
}

function default_pfx {
if [ "$arch" == "i386" ]; then
cd "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/syswow64"
ln -sf "../../../../../lib/wine/$arch-windows/$1" "$1"
else
cd "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/system32"
ln -sf "../../../../../lib64/wine/$arch-windows/$1" "$1"
fi
}

fun=fake_install
$fun nvcuda.dll

fun=install
$fun nvcuda.dll.so

fun=nvapi
$fun nvapi.dll

fun=default_pfx
$fun nvcuda.dll
cp -f "$nvlibs_dir/$lib/$arch-unix/nvcuda.dll.so" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuda.dll"
cp -f "$nvlibs_dir/$lib/$arch-windows/nvapi.dll" "$PROTON_LIBS/files/$lib/nvapi"

arch='x86_64'
lib='lib64/wine'
fun=fake_install
$fun nvcuda.dll
$fun nvml.dll
$fun nvoptix.dll

fun=install
$fun nvcuda.dll.so
$fun nvml.so
$fun nvoptix.dll.so

fun=nvapi
$fun nvapi64.dll

fun=default_pfx
$fun nvcuda.dll
$fun nvml.dll
$fun nvoptix.dll
cp -f "$nvlibs_dir/$lib/$arch-unix/nvcuda.dll.so" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuda.dll"
cp -f "$nvlibs_dir/$lib/$arch-unix/nvoptix.dll.so" "$PROTON_LIBS/files/$lib/$arch-windows/nvoptix.dll"
cp -f "$nvlibs_dir/$lib/$arch-unix/nvml.so" "$PROTON_LIBS/files/$lib/$arch-unix"
cp -f "$nvlibs_dir/$lib/$arch-windows/nvml.dll" "$PROTON_LIBS/files/$lib/$arch-windows"
cp -f "$nvlibs_dir/$lib/$arch-windows/nvapi64.dll" "$PROTON_LIBS/files/$lib/nvapi"
cd "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/system32"
ln -sf "../../../../../lib64/wine/$arch-windows/nvml.dll" "nvml.dll"
ln -sf "../../../../../lib64/wine/$arch-windows/nvoptix.dll" "nvoptix.dll"
cd "$nvlibs_dir"

echo -ne "All done - Files dropped in $PROTON_LIBS\n"

0 comments on commit 59af3fc

Please sign in to comment.