from guiscrcpy.theme.style import darkstylesheet from guiscrcpy.ui.main import Ui_MainWindow from guiscrcpy.ui.toolkit import Ui_ToolbarPanel from guiscrcpy.ui.panel import Ui_HorizontalPanel from guiscrcpy.lib.toolkit import UXMapper from guiscrcpy.ux.panel import Panel from guiscrcpy.ux.swipe import SwipeUX from guiscrcpy.ux.toolkit import InterfaceToolkit try: os.chdir(os.path.dirname(__file__)) except FileNotFoundError: pass # Its a PyInstaller compiled package # initialize config manager cfgmgr = InterfaceConfig() config = cfgmgr.get_config() environment = platform.System() adb.path = config['adb'] scrcpy.path = config['scrcpy'] v = version() # Initialize argument parser parser = argparse.ArgumentParser('guiscrcpy v{}'.format(v.get_commit())) parser.add_argument('-i', '--install', action='store_true', help="Install guiscrcpy system wide on Linux") parser.add_argument('-s', '--start', action='store_true', help="Start scrcpy first before loading the GUI") parser.add_argument('-o', '--output', action='store_true', help="Show logging output in stdout as well as in .log file") parser.add_argument('-d', '--debug', default=3,
from subprocess import PIPE from subprocess import Popen from PyQt5 import QtGui, QtCore, QtWidgets from PyQt5.QtCore import Qt from PyQt5.QtGui import QPixmap from pynput import keyboard from guiscrcpy.lib.check import adb from guiscrcpy.lib.config import InterfaceConfig get1 = False fixed_pos = [0.0, 0.0] final_pos = [0.0, 0.0] cfgmgr = InterfaceConfig() config = cfgmgr.get_config() adb.path = config['adb'] jsong = 'guiscrcpy.mapper.json' print("+++++++++++++++++++++++++++++++++++++++") print("guiscrcpy ~ mapper by srevinsaju") print("=======================================") print("Make sure that your device is turned on, and connected to your PC") print('With USB debugging turned on.') print("+++++++++++++++++++++++++++++++++++++++") print("Waiting for device") adb.command(adb.path, 'wait-for-any-device') print("Device : OK!")