1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
1. 安装msys2
https://www.msys2.org/

2. 安装环境
参考文档
https://blog.csdn.net/u012787710/article/details/130430216

pacman -S mingw-w64-x86_64-SDL2
pacman -S mingw-w64-x86_64-ffmpeg
pacman -S mingw-w64-x86_64-libusb
pacman -S mingw-w64-x86_64-make
pacman -S mingw-w64-x86_64-pkg-config
pacman -S mingw-w64-x86_64-meson

3.
pwd
git clone https://github.com/Genymobile/scrcpy.git

4.
# 进入代码仓
cd./ scrcpy/

# 编译scrcpy-server 如果慢 跳过 下载编译好的 https://github.com/Genymobile/scrcpy/releases/tag/v2.0
./server/scripts/build-wrapper.sh "server" "server/scrcpy-server" "release"

# 我放入了 scrcpy-server
scrcpy\server\scrcpy-server

# 编译Scrcpy.exe
meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=./server/scrcpy-server-v2.0

ninja.exe -Cx

./run x
--->ERROR: Command not found: [adb], [start-server]
--->解: 放入代码仓根目录 adb.exe AdbWinApi.dll AdbWinUsbApi.dll