mirror of https://github.com/Genymobile/scrcpy
Merge fa28b8de88
into 125b1103e1
commit
9637afb2a5
@ -0,0 +1,15 @@
|
|||||||
|
FROM ubuntu:focal-20220302
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update -qq
|
||||||
|
RUN apt-get install -qy \
|
||||||
|
ffmpeg libsdl2-2.0-0 adb wget \
|
||||||
|
gcc git pkg-config meson ninja-build libsdl2-dev \
|
||||||
|
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
|
||||||
|
libusb-1.0-0 libusb-1.0-0-dev
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
ENV BUILDDIR=build-auto
|
||||||
|
|
||||||
|
CMD ["/src/build.sh"]
|
@ -0,0 +1,15 @@
|
|||||||
|
FROM ubuntu:jammy
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update -qq
|
||||||
|
RUN apt-get install -qy \
|
||||||
|
ffmpeg libsdl2-2.0-0 adb wget \
|
||||||
|
gcc git pkg-config meson ninja-build libsdl2-dev \
|
||||||
|
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
|
||||||
|
libusb-1.0-0 libusb-1.0-0-dev
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
ENV BUILDDIR=build-auto
|
||||||
|
|
||||||
|
CMD ["/src/build.sh"]
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# Build the current state depending on a prebuld server.
|
||||||
|
# Rquired env paramter "BUILDDIR": target path of the build
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
# fetch the prebuilt server
|
||||||
|
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.3.1/scrcpy-server-v2.3.1
|
||||||
|
PREBUILT_SERVER_SHA256=f6814822fc308a7a532f253485c9038183c6296a6c5df470a9e383b4f8e7605b
|
||||||
|
|
||||||
|
echo "[scrcpy] Downloading prebuilt server..."
|
||||||
|
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
||||||
|
echo "[scrcpy] Verifying prebuilt server..."
|
||||||
|
echo "$PREBUILT_SERVER_SHA256 scrcpy-server" | sha256sum --check
|
||||||
|
|
||||||
|
echo "[scrcpy] Building client..."
|
||||||
|
rm -rf "$BUILDDIR"
|
||||||
|
|
||||||
|
# prepare the build
|
||||||
|
meson setup "$BUILDDIR" --buildtype=release --strip -Db_lto=true \
|
||||||
|
-Dprebuilt_server=scrcpy-server
|
||||||
|
|
||||||
|
# build
|
||||||
|
ninja -C "$BUILDDIR"
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
rm scrcpy-server
|
@ -1,21 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
# This script executes three steps:
|
||||||
|
# - fetch the latest prebuild_server
|
||||||
|
# - invoke the build script
|
||||||
|
# - run the install process
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
BUILDDIR=build-auto
|
export BUILDDIR=build-auto
|
||||||
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.3.1/scrcpy-server-v2.3.1
|
|
||||||
PREBUILT_SERVER_SHA256=f6814822fc308a7a532f253485c9038183c6296a6c5df470a9e383b4f8e7605b
|
|
||||||
|
|
||||||
echo "[scrcpy] Downloading prebuilt server..."
|
./build.sh
|
||||||
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
|
||||||
echo "[scrcpy] Verifying prebuilt server..."
|
|
||||||
echo "$PREBUILT_SERVER_SHA256 scrcpy-server" | sha256sum --check
|
|
||||||
|
|
||||||
echo "[scrcpy] Building client..."
|
|
||||||
rm -rf "$BUILDDIR"
|
|
||||||
meson setup "$BUILDDIR" --buildtype=release --strip -Db_lto=true \
|
|
||||||
-Dprebuilt_server=scrcpy-server
|
|
||||||
cd "$BUILDDIR"
|
|
||||||
ninja
|
|
||||||
|
|
||||||
echo "[scrcpy] Installing (sudo)..."
|
echo "[scrcpy] Installing (sudo)..."
|
||||||
sudo ninja install
|
sudo ninja -C "$BUILDDIR" install
|
||||||
|
Loading…
Reference in New Issue