Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #138 from srevinsaju/beta-qtpy
Browse files Browse the repository at this point in the history
Beta qtpy
  • Loading branch information
srevinsaju authored Aug 2, 2020
2 parents 35de535 + 19a5a0c commit 0373528
Show file tree
Hide file tree
Showing 47 changed files with 64,434 additions and 24,062 deletions.
108 changes: 107 additions & 1 deletion .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,72 @@ jobs:
path: guiscrcpy-x86_64.AppImage


AppImage-PySide2:
runs-on: ubuntu-18.04
strategy:
matrix:
version: ['3.8']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.version }}
- name: Download dependencies
run: |
sudo apt install libxkbcommon0 libxcb-xkb-dev libxkbcommon-x11-0 libxcb-xkb1
- name: Test AppImage
run: |
sed -i 's,PyQt5,PySide2,g' requirements.txt
sed -i 's,PyQt5,PySide2,g' setup.py
python -m pip install python-appimage
echo $(realpath .) > appimage/requirements.txt
python -m python_appimage build app appimage \
--linux-tag=manylinux1_x86_64
- name: Extract AppImage
run: |
./guiscrcpy-x86_64.AppImage --appimage-extract
mv squashfs-root AppDir
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x ./appimagetool-x86_64.AppImage
- name: Patch PyQt5
run: |
cp -L /usr/lib/x86_64-linux-gnu/libxkbcommon* AppDir/usr/lib/.
cp -L /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 AppDir/usr/lib/.
- name: Download adb
run: |
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip platform-tools-latest-linux.zip -d adb
cp adb/platform-tools/adb AppDir/usr/bin/.
- name: Download scrcpy
run: |
wget https://dl.bintray.com/srevinsaju/guiscrcpy/scrcpy/scrcpy113.tar.gz
tar -xf scrcpy113.tar.gz
mkdir -p AppDir/usr/bin
cp scrcpy113/scrcpy AppDir/usr/bin/.
chmod +x AppDir/usr/bin/scrcpy
mkdir -p AppDir/usr/share/scrcpy
cp scrcpy113/scrcpy-server AppDir/usr/share/scrcpy/.
- name: Download scrcpy binary deps
run: |
cp scrcpy113/lib/* AppDir/usr/lib/.
- name: Reimage AppImage
run: |
rm ./guiscrcpy-x86_64.AppImage
./appimagetool-x86_64.AppImage --comp gzip AppDir -n
mv guiscrcpy-x86_64.AppImage guiscrcpy-PySide2-x86_64.AppImage
- name: Upload artifact
uses: actions/[email protected]
with:
name: guiscrcpy-PySide2-continuous-x86_64.AppImage
path: guiscrcpy-PySide2-x86_64.AppImage


Windows:
name: Windows
runs-on: windows-latest
Expand All @@ -115,8 +181,40 @@ jobs:
name: guiscrcpy-continuous.exe
# Directory containing files to upload
path: dist/guiscrcpy.exe


Windows-PySide2:
name: Windows-PySide2
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install dependencies
run: |
sed -i 's,PyQt5,PySide2,g' requirements.txt
sed -i 's,PyQt5,PySide2,g' setup.py
python -m pip install --upgrade pip
pip3 install PyInstaller
pip3 install -r requirements.txt
pip3 install .
echo Done
- name: Create .exe
run: |
python -m PyInstaller guiscrcpy-windows.spec
mv dist/guiscrcpy.exe dist/guiscrcpy-pyside2.exe
- name: Upload artifact
uses: actions/[email protected]
with:
# Artifact name
name: guiscrcpy-pyside2-continuous.exe
# Directory containing files to upload
path: dist/guiscrcpy-pyside2.exe


Release:
needs: [Windows, AppImage, Wheel]
needs: [Windows, AppImage, Wheel, Windows-PySide2, AppImage-PySide2]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -126,12 +224,18 @@ jobs:
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-pyside2-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-continuous-none-any-py3.whl
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-continuous-x86_64.AppImage
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PySide2-continuous-x86_64.AppImage

- name: Release
uses: marvinpinto/action-automatic-releases@latest
Expand All @@ -141,6 +245,8 @@ jobs:
title: continuous
files: |
guiscrcpy-continuous.exe
guiscrcpy-pyside2-continuous.exe
guiscrcpy-PySide2-continuous-x86_64.AppImage
guiscrcpy-continuous-x86_64.AppImage
guiscrcpy-continuous-none-any-py3.whl
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,103 @@ jobs:
path: guiscrcpy-x86_64.AppImage



AppImage-PySide2:
runs-on: ubuntu-18.04
strategy:
matrix:
version: ['3.8']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.version }}
- name: Download dependencies
run: |
sudo apt install libxkbcommon0 libxcb-xkb-dev libxkbcommon-x11-0 libxcb-xkb1
- name: Test AppImage
run: |
sed -i 's,PyQt5,PySide2,g' requirements.txt
sed -i 's,PyQt5,PySide2,g' setup.py
python -m pip install python-appimage
echo $(realpath .) > appimage/requirements.txt
python -m python_appimage build app appimage \
--linux-tag=manylinux1_x86_64
- name: Extract AppImage
run: |
./guiscrcpy-x86_64.AppImage --appimage-extract
mv squashfs-root AppDir
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x ./appimagetool-x86_64.AppImage
- name: Patch PyQt5
run: |
cp -L /usr/lib/x86_64-linux-gnu/libxkbcommon* AppDir/usr/lib/.
cp -L /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 AppDir/usr/lib/.
- name: Download adb
run: |
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip platform-tools-latest-linux.zip -d adb
cp adb/platform-tools/adb AppDir/usr/bin/.
- name: Download scrcpy
run: |
wget https://dl.bintray.com/srevinsaju/guiscrcpy/scrcpy/scrcpy113.tar.gz
tar -xf scrcpy113.tar.gz
mkdir -p AppDir/usr/bin
cp scrcpy113/scrcpy AppDir/usr/bin/.
chmod +x AppDir/usr/bin/scrcpy
mkdir -p AppDir/usr/share/scrcpy
cp scrcpy113/scrcpy-server AppDir/usr/share/scrcpy/.
- name: Download scrcpy binary deps
run: |
cp scrcpy113/lib/* AppDir/usr/lib/.
- name: Reimage AppImage
run: |
rm ./guiscrcpy-x86_64.AppImage
./appimagetool-x86_64.AppImage --comp gzip AppDir -n
mv guiscrcpy-x86_64.AppImage guiscrcpy-PySide2-x86_64.AppImage
- name: Upload artifact
uses: actions/[email protected]
with:
name: guiscrcpy-PySide2-continuous-x86_64.AppImage
path: guiscrcpy-PySide2-x86_64.AppImage


Windows-PySide2:
name: Windows-PySide2
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install dependencies
run: |
sed -i 's,PyQt5,PySide2,g' requirements.txt
sed -i 's,PyQt5,PySide2,g' setup.py
python -m pip install --upgrade pip
pip3 install PyInstaller
pip3 install -r requirements.txt
pip3 install .
echo Done
- name: Create .exe
run: |
python -m PyInstaller guiscrcpy-windows.spec
mv dist/guiscrcpy.exe dist/guiscrcpy-pyside2.exe
- name: Upload artifact
uses: actions/[email protected]
with:
# Artifact name
name: guiscrcpy-pyside2-continuous.exe
# Directory containing files to upload
path: dist/guiscrcpy-pyside2.exe


Windows:
name: Windows
runs-on: windows-latest
Expand Down
45 changes: 34 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,39 @@ endif

export PYTHON # pass the variable to sub-makefiles through the environment

default: uic

uic:
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
default: pyuic5

pyuic5:
pyrcc5 guiscrcpy/ui/rsrc.qrc -o guiscrcpy/ui/pyqt5/rsrc_rc.py
pyuic5 guiscrcpy/ui/mainwindow.ui -o guiscrcpy/ui/pyqt5/main.py --from-imports
pyuic5 guiscrcpy/ui/downloader.ui -o guiscrcpy/ui/pyqt5/downloader.py --from-imports
pyuic5 guiscrcpy/ui/bottompanelui.ui -o guiscrcpy/ui/pyqt5/panel.py --from-imports
pyuic5 guiscrcpy/ui/toolkit_ui.ui -o guiscrcpy/ui/pyqt5/toolkit.py --from-imports
pyuic5 guiscrcpy/ui/network.ui -o guiscrcpy/ui/pyqt5/network.py --from-imports
pyuic5 guiscrcpy/ui/settings.ui -o guiscrcpy/ui/pyqt5/settings.py --from-imports
rm guiscrcpy/theme/desktop_shortcut.py
echo '#!/usr/bin/env/python\n' > guiscrcpy/theme/desktop_shortcut.py
echo '# flake8: noqa' >> guiscrcpy/theme/desktop_shortcut.py
echo 'def desktop_device_shortcut_svg():' >> guiscrcpy/theme/desktop_shortcut.py
printf ' a="""' >> guiscrcpy/theme/desktop_shortcut.py
cat guiscrcpy/ui/ui/guiscrcpy_shortcut.svg >> guiscrcpy/theme/desktop_shortcut.py
echo '"""' >> guiscrcpy/theme/desktop_shortcut.py
echo ' return a' >> guiscrcpy/theme/desktop_shortcut.py
sed -i 's/#ffdc00/{}/g' guiscrcpy/theme/desktop_shortcut.py
cp ./README.md docs/README.md
sed -i 's/docs\// /g' docs/README.md

pysideuic:
pyside2-rcc guiscrcpy/ui/rsrc.qrc -o guiscrcpy/ui/pyside2/rsrc_rc.py
pyside2-uic guiscrcpy/ui/mainwindow.ui -o guiscrcpy/ui/pyside2/main.py --from-imports
pyside2-uic guiscrcpy/ui/downloader.ui -o guiscrcpy/ui/pyside2/downloader.py --from-imports
pyside2-uic guiscrcpy/ui/bottompanelui.ui -o guiscrcpy/ui/pyside2/panel.py --from-imports
pyside2-uic guiscrcpy/ui/toolkit_ui.ui -o guiscrcpy/ui/pyside2/toolkit.py --from-imports
pyside2-uic guiscrcpy/ui/network.ui -o guiscrcpy/ui/pyside2/network.py --from-imports
pyside2-uic guiscrcpy/ui/settings.ui -o guiscrcpy/ui/pyside2/settings.py --from-imports
sed -i '/from PySide2.QtWidgets import */ifrom PySide2.QtGui import QGradient' guiscrcpy/ui/pyside2/main.py
sed -i 's/self.verticalLayout.setSpacing(0())/self.verticalLayout.setSpacing(0)/g' guiscrcpy/ui/pyside2/toolkit.py
sed -i 's/self.verticalLayout.setMargin(0())/self.verticalLayout.setMargin(0)/g' guiscrcpy/ui/pyside2/toolkit.py
rm guiscrcpy/theme/desktop_shortcut.py
echo '#!/usr/bin/env/python\n' > guiscrcpy/theme/desktop_shortcut.py
echo '# flake8: noqa' >> guiscrcpy/theme/desktop_shortcut.py
Expand All @@ -43,7 +66,7 @@ uic:
sed -i 's/#ffdc00/{}/g' guiscrcpy/theme/desktop_shortcut.py
cp ./README.md docs/README.md
sed -i 's/docs\// /g' docs/README.md

install:
$(PYTHON) setup.py install --user
rm -f -R build
Expand Down
15 changes: 8 additions & 7 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev - packages]
[dev-packages]
GitPython = "*"

[packages]
fonttools = "*"
psutil = "5.7.0"
pynput = "1.6"
pyshortcuts = "1.7"
pystray = "0.14.4"
GitPython = "3.1.1"
PyQt5 = "*"
psutil = "*"
pynput = "*"
pystray = "*"
PyQt5 = "~=5.15"
qtpy = "*"
cairosvg = "~=2.4.2"

[requires]
python_version = "3.8"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,4 @@ All rights reserved.
---------------------

Copyright © [Srevin Saju](https://github.com/srevinsaju) 2019 - 2020

41 changes: 39 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# guiscrcpy

![Linux](https://github.com/srevinsaju/guiscrcpy/workflows/Linux/badge.svg)![Windows](https://github.com/srevinsaju/guiscrcpy/workflows/Windows/badge.svg)![Mac OS](https://github.com/srevinsaju/guiscrcpy/workflows/Mac%20OS/badge.svg)
[![Financial Contributors on Open Collective](https://opencollective.com/guiscrcpy/all/badge.svg?label=financial+contributors)](https://opencollective.com/guiscrcpy) ![Linux](https://github.com/srevinsaju/guiscrcpy/workflows/Linux/badge.svg)![Windows](https://github.com/srevinsaju/guiscrcpy/workflows/Windows/badge.svg)![Mac OS](https://github.com/srevinsaju/guiscrcpy/workflows/Mac%20OS/badge.svg)

[![Updates](https://pyup.io/repos/github/srevinsaju/guiscrcpy/shield.svg)](https://pyup.io/repos/github/srevinsaju/guiscrcpy/)[![Python 3](https://pyup.io/repos/github/srevinsaju/guiscrcpy/python-3-shield.svg)](https://pyup.io/repos/github/srevinsaju/guiscrcpy/)[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/guiscrcpy?style=flat-square)![PyPI](https://img.shields.io/pypi/v/guiscrcpy?style=flat-square)![PyPI - Wheel](https://img.shields.io/pypi/wheel/guiscrcpy?style=flat-square)![PyPI - Downloads](https://img.shields.io/pypi/dm/guiscrcpy?color=dark%20green&logo=PYPI&logoColor=Green&style=flat-square)](https://pypi.org/project/guiscrcpy)

Expand Down Expand Up @@ -66,6 +66,42 @@ Thanks to users around the world, guiscrcpy is one of the trending apps this mon
* [guiscrcpy = OpenCollective](https://opencollective.com/guiscrcpy)


## Acknowledgements

Special thanks to [Jetbrains](https://www.jetbrains.com/?from=guiscrcpy) for sponsoring `guiscrcpy` with
a professional PyCharm IDE; It works fantastic!!3

[![jetbrains]( img/jetbrains.svg)](https://www.jetbrains.com/?from=guiscrcpy)

## Contributors

### Code Contributors

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/srevinsaju/guiscrcpy/graphs/contributors"><img src="https://opencollective.com/guiscrcpy/contributors.svg?width=890&button=false" /></a>

### Financial Contributors

Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/guiscrcpy/contribute)]

#### Individuals

<a href="https://opencollective.com/guiscrcpy"><img src="https://opencollective.com/guiscrcpy/individuals.svg?width=890"></a>

#### Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/guiscrcpy/contribute)]

<a href="https://opencollective.com/guiscrcpy/organization/0/website"><img src="https://opencollective.com/guiscrcpy/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/1/website"><img src="https://opencollective.com/guiscrcpy/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/2/website"><img src="https://opencollective.com/guiscrcpy/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/3/website"><img src="https://opencollective.com/guiscrcpy/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/4/website"><img src="https://opencollective.com/guiscrcpy/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/5/website"><img src="https://opencollective.com/guiscrcpy/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/6/website"><img src="https://opencollective.com/guiscrcpy/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/7/website"><img src="https://opencollective.com/guiscrcpy/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/8/website"><img src="https://opencollective.com/guiscrcpy/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/guiscrcpy/organization/9/website"><img src="https://opencollective.com/guiscrcpy/organization/9/avatar.svg"></a>

## License

Expand Down Expand Up @@ -102,4 +138,5 @@ All rights reserved.

---------------------

Copyright &copy; [Srevin Saju](https://github.com/srevinsaju) 2019 - 2020
Copyright &copy; [Srevin Saju](https://github.com/srevinsaju) 2019 - 2020

Loading

0 comments on commit 0373528

Please sign in to comment.