blob: ef87134135c0f5f2a1ff93e8ccb327efda3c0524 (
plain)
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
|
#!/bin/sh
set -ex pipefail
if [[ $UID == 0 ]]; then
echo "cannot run as root"
fi
make
if [ $? -ne 0 ]; then
echo "make failed"
exit 1
fi
mkdir -p ~/.local/lib64/
if [ $? -ne 0 ]; then
echo "mkdir -p ~/.local/lib64/ failed"
exit 1
fi
cp ./libfhvkov_layer.so ~/.local/lib64/
if [ $? -ne 0 ]; then
echo "cp ./libfhvkov_layer.so ~/.local/lib64/ failed"
exit 1
fi
mkdir -p ~/.local/share/vulkan/implicit_layer.d/
if [ $? -ne 0 ]; then
echo "mkdir -p ~/.local/share/vulkan/implicit_layer.d/ failed"
exit 1
fi
cat >> ~/.local/share/vulkan/implicit_layer.d/fhvkov_layer.json << EOF
{
"file_format_version": "1.0.0",
"layer": {
"name": "VK_LAYER_fhrpm_overlay",
"type": "GLOBAL",
"library_path": "$HOME/.local/lib64/libfhvkov_layer.so",
"api_version": "1.3.0",
"implementation_version": "1",
"description": "forza horizon vulkan telemetry overlay",
"enable_environment": { "FHVKOV": "1" },
"disable_environment": { "FHVKOV_DISABLE": "1" }
}
}
EOF
if [ $? -ne 0 ]; then
echo "failed to install layer"
exit 1
fi
echo "done."
|