From 5d92b53f1c352b2629fc0b7dbd300b7a7609087b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 2 Oct 2022 01:24:11 +0200 Subject: Add install script for non ubuntu / (arch) distros --- README.md | 6 +++--- install.sh | 10 ++++++++++ install_ubuntu.sh | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100755 install.sh diff --git a/README.md b/README.md index 5c3df22..878b193 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ Using NvFBC (recording the monitor/screen) is not faster than not using NvFBC (r # Installation If you are running an Arch Linux based distro, then you can find gpu screen recorder on aur under the name gpu-screen-recorder-git (`yay -S gpu-screen-recorder-git`).\ If you are running an Ubuntu based distro then run `install_ubuntu.sh` as root: `sudo ./install_ubuntu.sh`.\ - -On other distros you need to install dependencies manually and run `build.sh`. Dependencies: `libgl (libglvnd), ffmpeg, libx11, libxcomposite, libpulse`. You need to additionally have `cuda` installed when you run `gpu-screen-recorder`.\ -If you use a distro that isn't friendly to nvidia, such as fedora, then you can also install gpu-screen-recorder-gtk with flatpak here: [gpu-screen-recorder-flatpak](https://git.dec05eba.com/gpu-screen-recorder-flatpak/about/).\ +If you are running another distro then you can run `install.sh` as root: `sudo ./install.sh`, but you need to manually install the dependencies, as described below. +# Dependencies +`libgl (libglvnd), ffmpeg, libx11, libxcomposite, libpulse`. You need to additionally have `cuda` installed when you run `gpu-screen-recorder`.\ Recording monitors requires a gpu with NvFBC support (note: this is not required when recording a single window!). Normally only tesla and quadro gpus support this, but by using [nvidia-patch](https://github.com/keylase/nvidia-patch) or [nvlax](https://github.com/illnyang/nvlax) you can do this on all gpus that support nvenc as well (gpus as old as the nvidia 600 series), provided you are not using outdated gpu drivers. # How to use diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..0d73bf7 --- /dev/null +++ b/install.sh @@ -0,0 +1,10 @@ +#!/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 + +./build.sh +install -Dm755 "gpu-screen-recorder" "/usr/bin/gpu-screen-recorder" +echo "Successfully installed gpu-screen-recorder" diff --git a/install_ubuntu.sh b/install_ubuntu.sh index 768475d..edc02ed 100755 --- a/install_ubuntu.sh +++ b/install_ubuntu.sh @@ -20,7 +20,7 @@ libs="$(pkg-config --libs $dependencies) -ldl -pthread -lm" g++ -c src/sound.cpp -O2 $includes g++ -c src/main.cpp -O2 $includes g++ -o gpu-screen-recorder -O2 sound.o main.o -s $libs -install -Dm755 "gpu-screen-recorder" "/usr/local/bin/gpu-screen-recorder" +install -Dm755 "gpu-screen-recorder" "/usr/bin/gpu-screen-recorder" echo "Successfully installed gpu-screen-recorder" [ "$cuda_missing" -eq 1 ] && echo "You need to reboot your computer before using gpu-screen-recorder because cuda was installed" -- cgit v1.2.3