Created
January 7, 2021 23:22
-
-
Save mrister/656b8999ca9d23bf110f6b0c7507360d to your computer and use it in GitHub Desktop.
Steps to install scrcpy to Ubuntu 16.04 from source
This file contains hidden or 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
#!/usr/bin/env bash | |
# fail if any commands fails | |
set -e | |
# debug log | |
set -x | |
echo "starting install" | |
add-apt-repository main | |
add-apt-repository universe | |
add-apt-repository restricted | |
add-apt-repository multiverse | |
add-apt-repository -y ppa:deadsnakes/ppa | |
apt -yq update | |
apt install -y ffmpeg libsdl2-2.0-0 wget | |
apt install -y gcc git pkg-config meson ninja-build \ | |
libavcodec-dev libavformat-dev libavutil-dev \ | |
libsdl2-dev | |
apt install -yq openjdk-8-jdk | |
apt install -yq software-properties-common python-setuptools python3-setuptools python3-pip | |
apt install -yq python3.7 | |
python3.7 -m pip install --upgrade pip | |
python3.7 -m pip install meson ninja | |
#pip install meson | |
export ANDROID_SDK_ROOT=$ANDROID_HOME | |
git clone https://github.com/Genymobile/scrcpy || true | |
cd scrcpy | |
wget https://github.com/Genymobile/scrcpy/releases/download/v1.17/scrcpy-server-v1.17 | |
meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=scrcpy-server-v1.17 | |
cd x | |
ninja | |
sudo ninja install | |
command -v scrcpy | |
scrcpy --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment