diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-07-21 16:25:34 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-07-21 16:26:43 +0200 |
commit | d79ba55d8513536960fb050dc8a3f2e966dbbe74 (patch) | |
tree | b2b4273ff2adad812d52ad0b61e2db1bf231a6ef /build.sh | |
parent | 0993c5811f23c4601e8f5768ee48e8832cfdbec9 (diff) |
Support wlroots capture, without root (wayland)
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -9,9 +9,21 @@ CXX=${CXX:-g++} opts="-O2 -g0 -DNDEBUG -Wall -Wextra -Werror -s" [ -n "$DEBUG" ] && opts="-O0 -g3 -Wall -Wextra -Werror"; -dependencies="gtk+-3.0 x11 xrandr libpulse libdrm wayland-egl wayland-client" -includes="$(pkg-config --cflags $dependencies)" -libs="$(pkg-config --libs $dependencies) -ldl" -gcc -c src/egl.c $opts $includes -g++ -c src/main.cpp $opts $includes -g++ -o gpu-screen-recorder-gtk egl.o main.o $libs $opts +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_gtk() { + dependencies="gtk+-3.0 x11 xrandr libpulse libdrm wayland-egl wayland-client" + includes="$(pkg-config --cflags $dependencies)" + libs="$(pkg-config --libs $dependencies) -ldl" + gcc -c src/egl.c $opts $includes + $CC -c external/wlr-export-dmabuf-unstable-v1-protocol.c $opts $includes + g++ -c src/main.cpp $opts $includes + g++ -o gpu-screen-recorder-gtk egl.o wlr-export-dmabuf-unstable-v1-protocol.o main.o $libs $opts +} + +build_wayland_protocol +build_gsr_gtk +echo "Successfully built gpu-screen-recorder-gtk"
\ No newline at end of file |