forked from Genymobile/scrcpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add isolated build environment based on Docker; implements Genymobile…
- Loading branch information
1 parent
5a6b831
commit fa28b8d
Showing
5 changed files
with
87 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
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 | ||
export BUILDDIR=build-auto | ||
|
||
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" | ||
meson setup "$BUILDDIR" --buildtype=release --strip -Db_lto=true \ | ||
-Dprebuilt_server=scrcpy-server | ||
cd "$BUILDDIR" | ||
ninja | ||
./build.sh | ||
|
||
echo "[scrcpy] Installing (sudo)..." | ||
sudo ninja install | ||
sudo ninja -C "$BUILDDIR" install |