Skip to content
Created Building from source (markdown) authored by Srevin Saju's avatar Srevin Saju
# Building `guiscrcpy` from source.
## Local build
Building guiscrcpy locally (user-level), is easier than a system-wide installation
```bash
git clone https://github.com/srevinsaju/guiscrcpy.git --depth=1
cd guiscrcpy
python3 setup.py install --user
```
If `~/.local/bin` is not on PATH, add it to your `~/.bashrc`, `~/.zshrc`
## System-wide build (Linux only)
Installing a python package with sudo always messes up the system. As an alternative, as suggested by @tukusejssirs, a possible solution is to install it to the `/opt` on Linux.
```bash
git clone https://github.com/srevinsaju/guiscrcpy --depth=1
sudo python3 -m pip install . --prefix=/opt/guiscrcpy
echo "
TEST_PYTHONPATH=$(grep -c '/opt/lib/python3.8/site-packages' <<< '$PYTHONPATH')
if [ -e /opt/lib/python3.8/site-packages ]; then
if [ '$TEST_PYTHONPATH' = '0' ]; then
if [ '$PYTHONPATH' ]; then
export PYTHONPATH='$PYTHONPATH:/opt/lib/python3.8/site-packages'
else
export PYTHONPATH='/opt/lib/python3.8/site-packages'
fi
fi
fi
"
>> ~/.bashrc
```
> NOTE: Use sudo wisely, unless you have a proper reason to install `guiscrcpy` system-wide, DO NOT do it.
\ No newline at end of file