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

Commit

Permalink
build 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
srevinsaju committed Jun 21, 2019
1 parent aad2aef commit 628f7dc
Show file tree
Hide file tree
Showing 38 changed files with 1,177 additions and 47 deletions.
75 changes: 41 additions & 34 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions README.md
Expand Up @@ -5,6 +5,25 @@ screen mirroring system -- `scrcpy`
located on `https://github.com/genymobile/scrcpy/`
by [@rom1v](https://github.com/rom1v)

GUIScrcPy is a Python 3.7 based script (haven't tested compatibility issues
so far, but it does not work on Python 3.8 because of incombatibility og PyAutoGUI module)

![image of GUIscrcpy](/screen.png)

**Why GUIscrcPy?**

I had Python as a subject for Class XI, so as a part of it's advanced learning experience,
and because of my daily use of scrcpy, wanted to integrate GUI into the CLIbased app!!
**GUI** stands for Graphical User Interface, and **Py** is not inherited from scrc<b>py</b> but rather from <b>Py</b> for Python


## Building from Source
Fortunately or Unfortunately, GUIscrcPy has to be built from source. But that's easy again!
1. (Also called Step 0). Put a star on my repo. Gives support to #opensource!!
2. Install python3. If you don't have it install it using
Python Software Website or on Linux by <p>`sudo apt install python3.7`
3. Clone my git repo. or copy paste this to your _bash_ <p>`git clone https://github.com/srevinsaju/guiscrcpy`
4. use **cd** to move to the downloaded directory. `/bin/`

## Dependencies
* `pyside2` (required)
Expand Down
25 changes: 23 additions & 2 deletions main.py
Expand Up @@ -24,7 +24,9 @@
ln4:: fullScreen
ln5:: showTouches
"""

import multiprocessing
import os
import platform
import subprocess
import sys
import time
Expand Down Expand Up @@ -220,4 +222,23 @@ def start_act(self):
app = QtGui.QApplication(sys.argv)
window = MyApp()
window.show()
sys.exit(app.exec_())


def launchmain():
sys.exit(app.exec_())


def launchtoolkit():
if platform.system() == "Windows":
p = subprocess.Popen("python " + str(os.getcwd()) + r"\toolkit.py", shell=True)
if platform.system() == "Linux":
p = subprocess.Popen("python3 " + str(os.getcwd()) + r"/toolkit.py", shell=True)
if platform.system() == "MacOS":
print("Hmm.. I don't know Mac stuff, please contribute on https://github.com/srevinsaju/guiscrcpy")


ltk = multiprocessing.Process(target=launchtoolkit)
main1 = multiprocessing.Process(target=launchmain)
main1.start()
time.sleep(1)
ltk.start()
2 changes: 2 additions & 0 deletions main.pyproject
@@ -0,0 +1,2 @@
main.pyproject
mainwindow.ui
53 changes: 48 additions & 5 deletions mainwindow.ui
Expand Up @@ -6,18 +6,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>517</width>
<height>626</height>
<width>506</width>
<height>632</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
<string>GUI Scrcpy</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>rsrc/android_circle.png</normaloff>rsrc/android_circle.png
</iconset>
</property>
<property name="statusTip">
<string>GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub
https://github.com/srevinsaju/guiscrcpy
</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
Expand Down Expand Up @@ -68,6 +73,9 @@
</disabled>
</palette>
</property>
<property name="statusTip">
<string>Progress Bar</string>
</property>
<property name="value">
<number>100</number>
</property>
Expand Down Expand Up @@ -102,6 +110,9 @@
<pointsize>24</pointsize>
</font>
</property>
<property name="statusTip">
<string>Uncheck 'Keep Default Dimensions' to change values</string>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style
Expand All @@ -110,7 +121,10 @@
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:24pt;
font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;DEFAULT&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
-qt-block-indent:0; text-indent:0px;&quot;&gt; &lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;DEFAULT&lt;/span&gt;
&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
</string>
</property>
</widget>
Expand Down Expand Up @@ -183,6 +197,8 @@
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:24pt;
font-weight:600; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;&quot;&gt; &lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;&quot;&gt;8000 KB/s &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
</string>
</property>
Expand Down Expand Up @@ -241,6 +257,11 @@
<bold>true</bold>
</font>
</property>
<property name="statusTip">
<string>GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub
https://github.com/srevinsaju/guiscrcpy
</string>
</property>
<property name="text">
<string>GUI ScrcPy</string>
</property>
Expand All @@ -257,6 +278,9 @@
<property name="cursor">
<cursorShape>SizeHorCursor</cursorShape>
</property>
<property name="statusTip">
<string>Adjust Bitrate. Leave it untouched for defualts</string>
</property>
<property name="minimum">
<number>64</number>
</property>
Expand Down Expand Up @@ -354,6 +378,9 @@
<height>31</height>
</rect>
</property>
<property name="statusTip">
<string>Start Scrcpy Executable right now. Please check if Scrcpy is added to path</string>
</property>
<property name="text">
<string>START SCRCPY</string>
</property>
Expand All @@ -372,6 +399,9 @@
<height>31</height>
</rect>
</property>
<property name="statusTip">
<string>quit GUI</string>
</property>
<property name="text">
<string>QUIT</string>
</property>
Expand Down Expand Up @@ -432,6 +462,9 @@
<height>31</height>
</rect>
</property>
<property name="statusTip">
<string>Shows the status of the Scrcpy Daemon</string>
</property>
<property name="text">
<string/>
</property>
Expand All @@ -445,6 +478,16 @@
<height>51</height>
</rect>
</property>
<property name="toolTip">
<string>GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub
https://github.com/srevinsaju/guiscrcpy
</string>
</property>
<property name="statusTip">
<string>GUI by srevinsaju, scrcpy engine by rom1v. Hosted on GitHub
https://github.com/srevinsaju/guiscrcpy
</string>
</property>
<property name="text">
<string/>
</property>
Expand All @@ -461,7 +504,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>517</width>
<width>506</width>
<height>22</height>
</rect>
</property>
Expand Down
Binary file added rsrc/android.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added rsrc/android.xcf
Binary file not shown.
Binary file added rsrc/android_circle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions toolkit.py
Expand Up @@ -124,7 +124,7 @@ def fullscreen():
os.system("wmctrl -x -a scrcpy && xdotool key --clearmodifiers ctrl+f")


class MyApp(QtGui.QMainWindow, Ui_MainWindow):
class MyAppv(QtGui.QMainWindow, Ui_MainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
Ui_MainWindow.__init__(self)
Expand All @@ -139,8 +139,7 @@ def __init__(self):
self.fullscreenUI.released.connect(fullscreen)


if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
window = MyApp()
window.show()
sys.exit(app.exec_())
appo = QtGui.QApplication(sys.argv)
window = MyAppv()
window.show()
sys.exit(appo.exec_())
Binary file added ui/android.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/android_circle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/battery.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/cancel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/cloud.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/correct.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/cut.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/download.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/file.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/folder.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/gallery.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/headphones.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/home.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/layout.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/left-arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/lightning.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 628f7dc

Please sign in to comment.