forked from SveSop/nvidia-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnvml_setup.sh
More file actions
executable file
·43 lines (34 loc) · 1.17 KB
/
Copy pathnvml_setup.sh
File metadata and controls
executable file
·43 lines (34 loc) · 1.17 KB
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
#!/bin/bash
nvlibs_dir="$(dirname "$(readlink -fm "$0")")"
arch='x86_64'
bits='x64'
if [ ! -f "$nvlibs_dir/$bits/wine/$arch-unix/nvml.so" ]; then
echo "Files not found in $nvlibs_dir/$bits/wine/$arch-unix" >&2
exit 1
fi
if [ -z "$WINE_BIN" ]; then
echo -ne "WINE_BIN is not set!\n"
echo -ne "Example: WINE_BIN='/home/user/winebinaries/wine-staging/'\n"
echo -ne "OBS. Installing to system wine install is not recommended.\n"
echo -ne "Better use custom wine binary.\n"
exit 1
fi
if [[ -d "$WINE_BIN/lib/wine/$arch-windows" ]]; then
lib="lib/wine"
elif [[ -d "$WINE_BIN/lib64/wine/$arch-windows" ]]; then
lib="lib64/wine"
fi
if [ ! -f "$WINE_BIN/$lib/$arch-windows/dxgi.dll" ]; then
echo -ne "Wine binaries not found in $WINE_BIN! Wine not installed or wrong path!\n" >&2
exit 1
fi
function win_install {
cp -f "$nvlibs_dir/$bits/wine/$arch-windows/$1" "$WINE_BIN/$lib/$arch-windows/"
}
function install {
cp -f "$nvlibs_dir/$bits/wine/$arch-unix/$1" "$WINE_BIN/$lib/$arch-unix/"
}
win_install nvml.dll
install nvml.so
echo -ne "All done - NVML copied to $WINE_BIN\n"
echo -ne "You need to run wineboot -u with a wineprefix to use nvml!\n"