Compilez scrcpy sous Windows

Adresse de téléchargement du code source: https://github.com/Genymobile/scrcpy

Le fichier code source: BUILD.md présente la méthode de compilation de chaque système d'exploitation, ce chapitre ne concerne que Windows.

Téléchargez Msys2: http://www.msys2.org/

Après l'installation, ouvrez msys2.exe dans D: \ Msys2 (chemin d'installation), qui entrera dans une interface de type ligne de commande

Exécuter en séquence:

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

Après l'installation, fermez la ligne de commande, ouvrez mingw64.exe (s'il s'agit d'une version 32 bits, ouvrez mingw32.exe) et définissez les variables d'environnement

export JAVA_HOME="C:\Program Files\Java\jdk-15.0.1"
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mingw64/lib/pkgconfig
export ANDROID_SDK_ROOT="D:\android\SDK"
export PATH=$PATH:"D:\platform-tools_r28.0.1-windows\platform-tools"

Compilez la partie serveur de scrcpy

cd 进入scrcpy的代码目录:

./server/scripts/build-wrapper.sh  "server" "server/scrcpy-server" "release"

Compilez scrcpy.exe sur PC

meson x --buildtype release --strip -Db_lto=true

ninja -Cx    //x为目录名,可以更换

 

Problème commun:

Il indique que pkg-config et cmake sont introuvables. Vérifiez si l'installation est terminée. Vérifiez s'il existe un fichier exécutable correspondant sous D: \ Msys2 \ mingw64 \ bin.

Je suppose que tu aimes

Origine blog.csdn.net/weixin_41486477/article/details/111315058
conseillé
Classement