Build tg_owt with desktop_capture support.

This commit is contained in:
John Preston 2021-05-10 13:13:09 +04:00
parent 2830049a53
commit 9ca6d0d893

View File

@ -17,7 +17,7 @@ RUN yum -y install centos-release-scl
RUN yum -y install git cmake3 meson ninja-build autoconf automake libtool \
zlib-devel gtk2-devel gtk3-devel libdrm-devel fontconfig-devel \
freetype-devel libX11-devel at-spi2-core-devel alsa-lib-devel \
pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel \
pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel libudev-devel \
webkitgtk4-devel pkgconfig bison yasm file which xorg-x11-util-macros \
devtoolset-9-make devtoolset-9-gcc devtoolset-9-gcc-c++ \
devtoolset-9-binutils
@ -209,6 +209,17 @@ RUN make DESTDIR="$LibrariesPath/libXext-cache" install
WORKDIR ..
RUN rm -rf libxext
FROM builder AS libXtst
RUN git clone -b libXtst-1.2.3 --depth=1 https://gitlab.freedesktop.org/xorg/lib/libxtst.git
WORKDIR libxtst
RUN ./autogen.sh --enable-static
RUN make -j$(nproc)
RUN make DESTDIR="$LibrariesPath/libXtst-cache" install
WORKDIR ..
RUN rm -rf libxtst
FROM builder AS libXfixes
RUN git clone -b libXfixes-5.0.3 --depth=1 https://gitlab.freedesktop.org/xorg/lib/libxfixes.git
@ -233,6 +244,50 @@ RUN make DESTDIR="$LibrariesPath/libXv-cache" install
WORKDIR ..
RUN rm -rf libxv
FROM builder AS libXrandr
RUN git clone -b libXrandr-1.5.2 --depth=1 https://gitlab.freedesktop.org/xorg/lib/libxrandr.git
WORKDIR libxrandr
RUN ./autogen.sh --enable-static
RUN make -j$(nproc)
RUN make DESTDIR="$LibrariesPath/libXrandr-cache" install
WORKDIR ..
RUN rm -rf libxrandr
FROM builder AS libXrender
RUN git clone -b libXrender-0.9.10 --depth=1 https://gitlab.freedesktop.org/xorg/lib/libxrender.git
WORKDIR libxrender
RUN ./autogen.sh --enable-static
RUN make -j$(nproc)
RUN make DESTDIR="$LibrariesPath/libXrender-cache" install
WORKDIR ..
RUN rm -rf libxrender
FROM builder AS libXdamage
RUN git clone -b libXdamage-1.1.5 --depth=1 https://gitlab.freedesktop.org/xorg/lib/libxdamage.git
WORKDIR libxdamage
RUN ./autogen.sh --enable-static
RUN make -j$(nproc)
RUN make DESTDIR="$LibrariesPath/libXdamage-cache" install
WORKDIR ..
RUN rm -rf libxdamage
FROM builder AS libXcomposite
RUN git clone -b libXcomposite-0.4.5 --depth=1 https://gitlab.freedesktop.org/xorg/lib/libxcomposite.git
WORKDIR libxcomposite
RUN ./autogen.sh --enable-static
RUN make -j$(nproc)
RUN make DESTDIR="$LibrariesPath/libXcomposite-cache" install
WORKDIR ..
RUN rm -rf libxcomposite
FROM builder AS wayland
COPY --from=libffi ${LibrariesPath}/libffi-cache /
@ -329,6 +384,8 @@ RUN git clone -b release/4.2 --depth=1 $GIT/FFmpeg/FFmpeg.git ffmpeg
WORKDIR ffmpeg
RUN ./configure \
--extra-cflags="-DCONFIG_SAFE_BITSTREAM_READER=1" \
--extra-cxxflags="-DCONFIG_SAFE_BITSTREAM_READER=1" \
--disable-debug \
--disable-programs \
--disable-doc \
@ -674,11 +731,15 @@ COPY --from=mozjpeg ${LibrariesPath}/mozjpeg-cache /
COPY --from=opus ${LibrariesPath}/opus-cache /
COPY --from=ffmpeg ${LibrariesPath}/ffmpeg-cache /
COPY --from=openssl ${LibrariesPath}/openssl-cache /
COPY --from=libXtst ${LibrariesPath}/libXtst-cache /
ADD https://api.github.com/repos/desktop-app/tg_owt/git/refs/heads/master tg_owt-version.json
RUN git clone --depth=1 --recursive $GIT/desktop-app/tg_owt.git
WORKDIR tg_owt
WORKDIR tg_owt/src/third_party/pipewire
RUN meson build
WORKDIR $LibrariesPath/tg_owt
RUN cmake3 -B out/Release . \
-DCMAKE_BUILD_TYPE=Release \
@ -717,6 +778,11 @@ COPY --from=xcb-render-util ${LibrariesPath}/xcb-render-util-cache /
COPY --from=libXext ${LibrariesPath}/libXext-cache /
COPY --from=libXfixes ${LibrariesPath}/libXfixes-cache /
COPY --from=libXv ${LibrariesPath}/libXv-cache /
COPY --from=libXtst ${LibrariesPath}/libXtst-cache /
COPY --from=libXrandr ${LibrariesPath}/libXrandr-cache /
COPY --from=libXrender ${LibrariesPath}/libXrender-cache /
COPY --from=libXdamage ${LibrariesPath}/libXdamage-cache /
COPY --from=libXcomposite ${LibrariesPath}/libXcomposite-cache /
COPY --from=wayland ${LibrariesPath}/wayland-cache /
COPY --from=libva ${LibrariesPath}/libva-cache /
COPY --from=libvdpau ${LibrariesPath}/libvdpau-cache /