作者 : LZHD
日期 : 2018-12-01
版本 : 0.0.3
scrcpy配置(手机屏幕共享)
1.前期准备参考
以Ubuntu16.04为例
# runtime dependencies(编译依赖)
sudo apt install ffmpeg libsdl2-2.0.0
# client build dependencies
sudo apt install make gcc pkg-config meson ninja-build \
libavcodec-dev libavformat-dev libavutil-dev \
libsdl2-dev
sudo apt install python3-pip
pip3 install meson
备注:
- Ubuntu16.04安装libsdl2-dev的过程中可能会有依赖问题,将源切换到主服务器执行以下命令
sudo apt-get update
sudo apt-get install -f
sudo apt-get libsdl2-dev
2.开始编译(借助已编译好的scrcpy-server.jar)
meson dir --buildtype release --strip -Db_lto=true \
-Dprebuilt_server=/path/to/scrcpy-server.jar
cd dir
ninja
3.从头编译
meson dir --buildtype release --strip -Db_lto=true
cd dir
ninja
4.安装
sudo ninja install
备注:
- 此操作在scrcpy源代码目录下进行
- dir为自己所创建的编译输出目录
- scrcpy-server.jar所在路径必须为系统绝对路径
- 操作2和操作3只需要执行一个