guiscrcpy
is delivered to users by building from source. It is not relatively complicated because, most of the build functions are handled by Python’s setuptools
and make
.
To understand how the build works, it is important to understand the components of guiscrcpy
- External dependencies (
PyQt5
,psutil
, ...) - User Interface files
- Source Code
The order of the build is important for the successful build and deploy of guiscrcpy
to your system, which is given above.
From v3.8 onwards, the entire process has been simplified, to a single MakeFile
.
make
make install
make
sudo make install
NOTE:
- You should run
make
withoutsudo
, otherwise, it might create permission conflicts.- At most times, only
make install
is necessary;make
is only necessary, if you tried to edit the files related toguiscrcpy
make
is important and is required, if your system installation ofPyQt5
does not match the5.14.x
version.- It is possible to build a custom version of
guiscrcpy
which works withPyQt5==5.13
,PyQt5==5.12
,PyQt5==5.11
by appropriately runningmake
and patching files (if necessary)
If you do not want to build guiscrcpy
‘s UI on your system; you can only do
pip3 install .
Use --user
parameter if necessary.
Macs with Apple Silicon chips need to follow these steps to build. Watch this video for aid.
-
Install
scrcpy
from homebrew andpoetry
from python-poetry. -
Delete
[email protected]
dependency that comes along with scrcpy becauseqtpy
andpyside2
conflict with it. As long as you have any other python version in yourPATH
, it won't affect other dependencies.brew uninstall --ignore-dependencies [email protected]
-
Clone the repository.
-
cd
into the directory with a Rosetta2 emulated terminal. -
Download
guiscrcpy
dependencies.poetry install -E PySide2
-
Launch
guiscrcpy
:poetry run guiscrcpy
A typical build (v3.5+) has a sequence of commands as:
# Install deps
pip3 install -r requirements.txt
# Regenerate the User Interface
pyrcc5 guiscrcpy/ui/rsrc.qrc -o guiscrcpy/ui/rsrc_rc.py
pyuic5 guiscrcpy/ui/mainwindow.ui -o guiscrcpy/ui/main.py --from-imports
pyuic5 guiscrcpy/ui/downloader.ui -o guiscrcpy/ui/downloader.py --from-imports
pyuic5 guiscrcpy/ui/bottompanelui.ui -o guiscrcpy/ui/panel.py --from-imports
pyuic5 guiscrcpy/ui/toolkit_ui.ui -o guiscrcpy/ui/toolkit.py --from-imports
pyuic5 guiscrcpy/ui/network.ui -o guiscrcpy/ui/network.py --from-imports
pyuic5 guiscrcpy/ui/settings.ui -o guiscrcpy/ui/settings.py --from-imports
# Install it to system
pip3 install .