2022-03-22 12:08:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
script_dir=$(dirname "$0")
|
|
|
|
cd "$script_dir"
|
|
|
|
|
|
|
|
[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1
|
|
|
|
|
|
|
|
set -e
|
2022-10-06 13:27:45 +00:00
|
|
|
apt-get -y install build-essential\
|
2022-03-22 12:08:02 +00:00
|
|
|
libswresample-dev libavformat-dev libavcodec-dev libavutil-dev\
|
2022-09-27 23:03:06 +00:00
|
|
|
libgl-dev libx11-dev libxcomposite-dev\
|
2022-03-22 12:08:02 +00:00
|
|
|
libpulse-dev
|
|
|
|
|
2022-09-27 23:03:06 +00:00
|
|
|
dependencies="libavcodec libavformat libavutil x11 xcomposite libpulse libswresample"
|
|
|
|
includes="$(pkg-config --cflags $dependencies) -Iexternal"
|
2022-09-25 23:26:45 +00:00
|
|
|
libs="$(pkg-config --libs $dependencies) -ldl -pthread -lm"
|
2022-09-20 01:39:15 +00:00
|
|
|
g++ -c src/sound.cpp -O2 $includes
|
|
|
|
g++ -c src/main.cpp -O2 $includes
|
2022-03-22 12:08:02 +00:00
|
|
|
g++ -o gpu-screen-recorder -O2 sound.o main.o -s $libs
|
2022-10-03 23:37:08 +00:00
|
|
|
install -Dm755 "gpu-screen-recorder" "/usr/local/bin/gpu-screen-recorder"
|
2022-10-01 23:24:11 +00:00
|
|
|
install -Dm755 "gpu-screen-recorder" "/usr/bin/gpu-screen-recorder"
|
2022-03-22 12:08:02 +00:00
|
|
|
|
|
|
|
echo "Successfully installed gpu-screen-recorder"
|