How to use guiscrcpy - 10 common examples

To help you get started, we’ve selected a few guiscrcpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
)
        pass
    elif platform.system() == "Linux":

        print(
            "LOG: Detected a Linux Operating System :: ",
            platform.release(),
            platform.version(),
        )
        print("LOG: Installing Trebuchet MS font ...")
        os.system("mkdir ~/.fonts/")
        os.system("cp -r fonts/* ~/.fonts/")

    else:
        print(
            bcolors.FAIL,
            " MacOS :: Untested OS detected. Continuing >>> " +
            bcolors.ENDC,
        )
        pass

if not fileExist:

    # Init json file for first time use
    config = {
        'dimension': None,
        'swtouches': False,
        'bitrate': 8000,
        'fullscreen': False,
        'dispRO': False,
        'extra': ""}
    with open(cfgpath + jsonf, 'w') as f:
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
# import pdb
# removed multiprocess modules

if not sha:
    commit1 = __version__
else:
    commit1 = __version__ + " commit" + sha

print(
    bcolors.UNDERLINE +
    "                                  " +
    bcolors.ENDC)
print()
print("guiscrcpy")
print("by srevinsaju")
print(bcolors.OKBLUE + commit1 + bcolors.ENDC)
print(
    bcolors.OKBLUE +
    "Licensed under GNU GPL v3 (c) 2019  " +
    bcolors.ENDC)
print(
    bcolors.UNDERLINE +
    "                                  " +
    bcolors.ENDC)
print(bcolors.OKBLUE + "" + bcolors.ENDC)

# chk version argument given or not
if(args.version):
    sys.exit(0)
# chk install value given
if(args.install):
    if platform.system() == "Linux":
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
stdout=subprocess.PIPE,
            stderr=subprocess.PIPE)
        a1 = inf.stdout.read().decode("utf-8")
        dirch = a1[:a1.find("guiscrcpy-src-installer.sh")]
        cmd = "cd " + dirch + " ; " + "./guiscrcpy-src-installer.sh"
        os.system(cmd)
        sys.exit()
    else:
        print("Installation supported on Linux only")
        sys.exit()


print()
print(
    "MSG: Please ensure you have enabled",
    bcolors.OKGREEN + "USB Debugging" + bcolors.ENDC,
    "on your device. See README.md for more details",
)
# print("LOG: Current Working Directory >> ", os.getcwd())
# print('LOG: __file__ name             >> ', str(__file__))
# print("LOG: os.path Absolute Path     >> ", os.path.abspath(__file__))
print("LOG: Current Working Directory", os.getcwd())
print(
    "LOG: Script       Path         >> ",
    str(os.path.abspath(__file__))[: -len(filename)],
)

print("")


# ******************************
# CONFIGURATION FILE CHECKER
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
commit1 = __version__ + " commit" + sha

print(
    bcolors.UNDERLINE +
    "                                  " +
    bcolors.ENDC)
print()
print("guiscrcpy")
print("by srevinsaju")
print(bcolors.OKBLUE + commit1 + bcolors.ENDC)
print(
    bcolors.OKBLUE +
    "Licensed under GNU GPL v3 (c) 2019  " +
    bcolors.ENDC)
print(
    bcolors.UNDERLINE +
    "                                  " +
    bcolors.ENDC)
print(bcolors.OKBLUE + "" + bcolors.ENDC)

# chk version argument given or not
if(args.version):
    sys.exit(0)
# chk install value given
if(args.install):
    if platform.system() == "Linux":
        # print("Supported on Linux only")

        import subprocess
        inf = subprocess.Popen(
            "find .. -iname 'guiscrcpy-src-installer.sh'",
            shell=True,
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
" ADB is not installed on your system" +
            bcolors.ENDC)

    # ------------------

    time.sleep(0.5)
    app.processEvents()

    rw = SwipeUX()  # Load swipe UI
    rw.show()  # show Swipe UI

    window = QtWidgets.QMainWindow()  # Create windwo
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    # windoww = QtWidgets.QMainWindow()
    # windowww = QtWidgets.QMainWindow()
    prog = MyApp(window)
    # panel = Panel(windoww)
    panel = Panel()
    progg = MyAppv()
    window.show()
    splash.hide()
    # windowww.show()
    # windoww.show()
    app.exec_()
    # appo.exec_()
    sys.exit()
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
# ------------------

    time.sleep(0.5)
    app.processEvents()

    rw = SwipeUX()  # Load swipe UI
    rw.show()  # show Swipe UI

    window = QtWidgets.QMainWindow()  # Create windwo
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    # windoww = QtWidgets.QMainWindow()
    # windowww = QtWidgets.QMainWindow()
    prog = MyApp(window)
    # panel = Panel(windoww)
    panel = Panel()
    progg = MyAppv()
    window.show()
    splash.hide()
    # windowww.show()
    # windoww.show()
    app.exec_()
    # appo.exec_()
    sys.exit()
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
# ------------------

    time.sleep(0.5)
    app.processEvents()

    rw = SwipeUX()  # Load swipe UI
    rw.show()  # show Swipe UI

    window = QtWidgets.QMainWindow()  # Create windwo
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    # windoww = QtWidgets.QMainWindow()
    # windowww = QtWidgets.QMainWindow()
    prog = MyApp(window)
    # panel = Panel(windoww)
    panel = Panel()
    progg = MyAppv()
    window.show()
    splash.hide()
    # windowww.show()
    # windoww.show()
    app.exec_()
    # appo.exec_()
    sys.exit()
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
deco8 = needed_output8.decode("utf-8")
        det8 = deco8.split("\t")
        print("ADB: ", deco8)

    except IndexError:
        print(
            bcolors.FAIL +
            " ADB is not installed on your system" +
            bcolors.ENDC)

    # ------------------

    time.sleep(0.5)
    app.processEvents()

    rw = SwipeUX()  # Load swipe UI
    rw.show()  # show Swipe UI

    window = QtWidgets.QMainWindow()  # Create windwo
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    # windoww = QtWidgets.QMainWindow()
    # windowww = QtWidgets.QMainWindow()
    prog = MyApp(window)
    # panel = Panel(windoww)
    panel = Panel()
    progg = MyAppv()
    window.show()
    splash.hide()
    # windowww.show()
    # windoww.show()
    app.exec_()
    # appo.exec_()
github srevinsaju / guiscrcpy / guiscrcpy / mapper.py View on Github external
def sth():
    import sys

    app = QtWidgets.QApplication(sys.argv)
    window = MapperUI()
    
    sys.exit(app.exec_())
github srevinsaju / guiscrcpy / guiscrcpy / __main__.py View on Github external
# panel = Panel(windoww)
    panel = Panel()
    progg = MyAppv()
    window.show()
    splash.hide()
    # windowww.show()
    # windoww.show()
    app.exec_()
    # appo.exec_()
    sys.exit()


if __name__ == "__main__":
    try:
        import guiscrcpy
        patz = list(guiscrcpy.__path__)[0]
        sys.path.append(patz)
        sys.path.append('')
    except ModuleNotFoundError:
        pass
    sys.path.append('')

    launch_main0()
    


def launch_main():
    import guiscrcpy
    patz1 = list(guiscrcpy.__path__)[0]
    sys.path.append(patz1)
    # print("SYS.path ==", sys.path)
    if(platform.system() == "Windows"):