Skip to content

Commit

Permalink
fix webrtc path
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Sep 11, 2024
1 parent 6d5280c commit 8cf69ea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \
&& mkdir /webrtc \
&& cd /webrtc \
&& mkdir ../webrtc \
&& cd ../webrtc \
&& fetch --no-history --nohooks webrtc \
&& sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS \
&& gclient sync \
&& cd /build/webrtc-streamer \
&& cd ../webrtc-streamer \
&& cmake -DCMAKE_INSTALL_PREFIX=/app . && make \
&& make install \
&& rm -rf /webrtc/src/out \
&& rm -rf ../webrtc/src/out \
&& apt-get clean && rm -rf /var/lib/apt/lists/

# run
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ WORKDIR /build/webrtc-streamer

COPY . .

ENV PATH /depot_tools:$PATH

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget git python3 python3-pkg-resources xz-utils cmake make pkg-config gcc-aarch64-linux-gnu g++-aarch64-linux-gnu build-essential \
&& mkdir /webrtc \
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \
&& export PATH=/depot_tools:$PATH \
&& cd /webrtc \
&& mkdir ../webrtc \
&& cd ../webrtc \
&& fetch --no-history --nohooks webrtc \
&& sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS \
&& src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 \
&& gclient sync \
&& cd /build/webrtc-streamer \
&& cmake -DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . && make \
&& cd ../webrtc-streamer \
&& cmake -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . && make \
&& make install \
&& rm -rf /webrtc && rm -f *.a && rm -f src/*.o \
&& rm -rf ../webrtc && rm -f *.a && rm -f src/*.o \
&& apt-get clean && rm -rf /var/lib/apt/lists/

# run
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile.rpi
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ WORKDIR /build/webrtc-streamer

COPY . .

ENV PATH /depot_tools:$PATH

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates build-essential gcc wget git python3 python3-pkg-resources xz-utils cmake make pkg-config \
&& mkdir /webrtc \
&& wget -qO- ${CROSSCOMPILER} | tar xz -C /webrtc \
&& export PATH=$(ls -d /webrtc/cross-pi-gcc-*/bin):$PATH \
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \
&& export PATH=/depot_tools:$PATH \
&& cd /webrtc \
&& mkdir ../webrtc \
&& cd ../webrtc \
&& fetch --no-history --nohooks webrtc \
&& sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS \
&& src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm \
&& gclient sync \
&& cd /build/webrtc-streamer \
&& cd ../webrtc-streamer \
&& cmake -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -DCMAKE_LIBRARY_ARCHITECTURE=arm-linux-gnueabihf -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . && make \
&& make install \
&& rm -rf /webrtc && rm -f *.a && rm -f src/*.o \
&& rm -rf ../webrtc && rm -f *.a && rm -f src/*.o \
&& apt-get clean && rm -rf /var/lib/apt/lists/

# run
Expand Down

0 comments on commit 8cf69ea

Please sign in to comment.