Add install script for non ubuntu / (arch) distros

This commit is contained in:
dec05eba 2022-10-02 01:24:11 +02:00
parent b99652ee28
commit 5d92b53f1c
3 changed files with 14 additions and 4 deletions

View File

@ -17,9 +17,9 @@ Using NvFBC (recording the monitor/screen) is not faster than not using NvFBC (r
# Installation # 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 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`.\ If you are running an Ubuntu based distro then run `install_ubuntu.sh` as root: `sudo ./install_ubuntu.sh`.\
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.
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`.\ # Dependencies
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/).\ `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. 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 # How to use

10
install.sh Executable file
View File

@ -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"

View File

@ -20,7 +20,7 @@ libs="$(pkg-config --libs $dependencies) -ldl -pthread -lm"
g++ -c src/sound.cpp -O2 $includes g++ -c src/sound.cpp -O2 $includes
g++ -c src/main.cpp -O2 $includes g++ -c src/main.cpp -O2 $includes
g++ -o gpu-screen-recorder -O2 sound.o main.o -s $libs 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" 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" [ "$cuda_missing" -eq 1 ] && echo "You need to reboot your computer before using gpu-screen-recorder because cuda was installed"