mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-07 15:19:55 +09:00
Experimental wayland support, test 1
This commit is contained in:
16
build.sh
16
build.sh
@@ -1,11 +1,19 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
script_dir=$(dirname "$0")
|
||||
cd "$script_dir"
|
||||
|
||||
CC=${CC:-gcc}
|
||||
CXX=${CXX:-g++}
|
||||
|
||||
opts="-O2 -g0 -DNDEBUG -Wall -Wextra"
|
||||
[ -n "$DEBUG" ] && opts="-O0 -g3 -Wall -Wextra";
|
||||
|
||||
#build_wayland_protocol() {
|
||||
# wayland-scanner private-code external/wlr-export-dmabuf-unstable-v1.xml external/wlr-export-dmabuf-unstable-v1-protocol.c
|
||||
# wayland-scanner client-header external/wlr-export-dmabuf-unstable-v1.xml external/wlr-export-dmabuf-unstable-v1-client-protocol.h
|
||||
#}
|
||||
|
||||
build_gsr_kms_server() {
|
||||
# TODO: -fcf-protection=full, not supported on arm
|
||||
extra_opts="-fstack-protector-all"
|
||||
@@ -17,7 +25,7 @@ build_gsr_kms_server() {
|
||||
}
|
||||
|
||||
build_gsr() {
|
||||
dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr xfixes libpulse libswresample libavfilter libva libcap libdrm"
|
||||
dependencies="libavcodec libavformat libavutil x11 xcomposite xrandr xfixes libpulse libswresample libavfilter libva libcap libdrm wayland-egl wayland-client"
|
||||
includes="$(pkg-config --cflags $dependencies)"
|
||||
libs="$(pkg-config --libs $dependencies) -ldl -pthread -lm"
|
||||
$CC -c src/capture/capture.c $opts $includes
|
||||
@@ -25,6 +33,7 @@ build_gsr() {
|
||||
$CC -c src/capture/xcomposite_cuda.c $opts $includes
|
||||
$CC -c src/capture/xcomposite_vaapi.c $opts $includes
|
||||
$CC -c src/capture/kms_vaapi.c $opts $includes
|
||||
$CC -c src/capture/kms_cuda.c $opts $includes
|
||||
$CC -c kms/client/kms_client.c $opts $includes
|
||||
$CC -c src/egl.c $opts $includes
|
||||
$CC -c src/cuda.c $opts $includes
|
||||
@@ -36,11 +45,14 @@ build_gsr() {
|
||||
$CC -c src/cursor.c $opts $includes
|
||||
$CC -c src/utils.c $opts $includes
|
||||
$CC -c src/library_loader.c $opts $includes
|
||||
$CC -c external/wlr-export-dmabuf-unstable-v1-protocol.c $opts $includes
|
||||
$CXX -c src/sound.cpp $opts $includes
|
||||
$CXX -c src/main.cpp $opts $includes
|
||||
$CXX -o gpu-screen-recorder -O2 capture.o nvfbc.o kms_client.o egl.o cuda.o xnvctrl.o overclock.o window_texture.o shader.o color_conversion.o cursor.o utils.o library_loader.o xcomposite_cuda.o xcomposite_vaapi.o kms_vaapi.o sound.o main.o $libs $opts
|
||||
$CXX -o gpu-screen-recorder -O2 capture.o nvfbc.o kms_client.o egl.o cuda.o xnvctrl.o overclock.o window_texture.o shader.o \
|
||||
color_conversion.o cursor.o utils.o library_loader.o xcomposite_cuda.o xcomposite_vaapi.o kms_vaapi.o kms_cuda.o wlr-export-dmabuf-unstable-v1-protocol.o sound.o main.o $libs $opts
|
||||
}
|
||||
|
||||
#build_wayland_protocol
|
||||
build_gsr_kms_server
|
||||
build_gsr
|
||||
echo "Successfully built gpu-screen-recorder"
|
||||
Reference in New Issue
Block a user