更新Makefile

This commit is contained in:
gfdgd_xi 2023-01-12 22:29:12 +08:00
parent 8b3a95dbfd
commit f41036441c
11 changed files with 15 additions and 436 deletions

View File

@ -20,8 +20,8 @@ build:
cp -rv uengine-app-setting.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv uengine-app-install new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv uengine_logo.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv defult.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv defult.png new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv defult.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv defult.png new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv runner.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv root-uengine.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv menu.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
@ -34,7 +34,12 @@ build:
cp -rv Download.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv updatekiller.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv pkexec/* new-deb-build/usr/share/polkit-1/actions
python3 RemovePycacheFile.py
cp -rv AutoShell new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv UI new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv ConfigLanguareRunner-help.json new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv ConfigLanguareRunner.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv run-program-without-wayland.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
python3 RemovePycacheFile.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv new-deb-build /tmp/uengine-runner-builder
sudo chown -R root:root /tmp/uengine-runner-builder
dpkg -b /tmp/uengine-runner-builder com.gitee.uengine.runner.spark.deb

View File

@ -1,85 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KeyAddGui.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(692, 314)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.tips = QtWidgets.QLabel(self.centralwidget)
self.tips.setObjectName("tips")
self.verticalLayout.addWidget(self.tips)
self.keyBoardList = QtWidgets.QListView(self.centralwidget)
self.keyBoardList.setObjectName("keyBoardList")
self.verticalLayout.addWidget(self.keyBoardList)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.addButton = QtWidgets.QPushButton(self.centralwidget)
self.addButton.setObjectName("addButton")
self.horizontalLayout.addWidget(self.addButton)
self.editButton = QtWidgets.QPushButton(self.centralwidget)
self.editButton.setObjectName("editButton")
self.horizontalLayout.addWidget(self.editButton)
self.delectButton = QtWidgets.QPushButton(self.centralwidget)
self.delectButton.setObjectName("delectButton")
self.horizontalLayout.addWidget(self.delectButton)
self.verticalLayout.addLayout(self.horizontalLayout)
MainWindow.setCentralWidget(self.centralwidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 692, 33))
self.menuBar.setObjectName("menuBar")
self.menu = QtWidgets.QMenu(self.menuBar)
self.menu.setObjectName("menu")
MainWindow.setMenuBar(self.menuBar)
self.action = QtWidgets.QAction(MainWindow)
self.action.setObjectName("action")
self.serverTips = QtWidgets.QAction(MainWindow)
self.serverTips.setEnabled(False)
self.serverTips.setObjectName("serverTips")
self.startServer = QtWidgets.QAction(MainWindow)
self.startServer.setObjectName("startServer")
self.stopServer = QtWidgets.QAction(MainWindow)
self.stopServer.setObjectName("stopServer")
self.setAutoStart = QtWidgets.QAction(MainWindow)
self.setAutoStart.setObjectName("setAutoStart")
self.setUnautoStart = QtWidgets.QAction(MainWindow)
self.setUnautoStart.setObjectName("setUnautoStart")
self.menu.addAction(self.serverTips)
self.menu.addSeparator()
self.menu.addAction(self.startServer)
self.menu.addAction(self.stopServer)
self.menu.addSeparator()
self.menu.addAction(self.setAutoStart)
self.menu.addAction(self.setUnautoStart)
self.menuBar.addAction(self.menu.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "编辑快捷键"))
self.tips.setText(_translate("MainWindow", "<html><head/><body><p>此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键<br/>Deepin/UOS将会使用默认的快捷键服务其它发行版将使用此运行器提供的快捷键服务<br>Deepin/UOS将只会提供快捷键添加功能请在控制中心进行快捷键的修改管理</p></body></html>"))
self.addButton.setText(_translate("MainWindow", "添加"))
self.editButton.setText(_translate("MainWindow", "编辑"))
self.delectButton.setText(_translate("MainWindow", "删除"))
self.menu.setTitle(_translate("MainWindow", "设置快捷键服务"))
self.action.setText(_translate("MainWindow", "关于"))
self.serverTips.setText(_translate("MainWindow", "此内容只支持非Deepin/UOS发行版"))
self.startServer.setText(_translate("MainWindow", "启动服务"))
self.stopServer.setText(_translate("MainWindow", "停止服务"))
self.setAutoStart.setText(_translate("MainWindow", "设置开机自启"))
self.setUnautoStart.setText(_translate("MainWindow", "关闭开机自启动"))

View File

@ -1,127 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>692</width>
<height>314</height>
</rect>
</property>
<property name="windowTitle">
<string>编辑快捷键</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="tips">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键&lt;br/&gt;Deepin/UOS将会使用默认的快捷键服务其它发行版将使用此运行器提供的快捷键服务&lt;br&gt;Deepin/UOS将只会提供快捷键添加功能请在控制中心进行快捷键的修改管理&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QListView" name="keyBoardList"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>添加</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="editButton">
<property name="text">
<string>编辑</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="delectButton">
<property name="text">
<string>删除</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>692</width>
<height>33</height>
</rect>
</property>
<widget class="QMenu" name="menu">
<property name="title">
<string>设置快捷键服务</string>
</property>
<addaction name="serverTips"/>
<addaction name="separator"/>
<addaction name="startServer"/>
<addaction name="stopServer"/>
<addaction name="separator"/>
<addaction name="setAutoStart"/>
<addaction name="setUnautoStart"/>
</widget>
<addaction name="menu"/>
</widget>
<action name="action">
<property name="text">
<string>关于</string>
</property>
</action>
<action name="serverTips">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>此内容只支持非Deepin/UOS发行版</string>
</property>
</action>
<action name="startServer">
<property name="text">
<string>启动服务</string>
</property>
</action>
<action name="stopServer">
<property name="text">
<string>停止服务</string>
</property>
</action>
<action name="setAutoStart">
<property name="text">
<string>设置开机自启</string>
</property>
</action>
<action name="setUnautoStart">
<property name="text">
<string>关闭开机自启动</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,86 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KeyAddKeyboardGui.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 195)
icon = QtGui.QIcon.fromTheme("..")
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.addTips = QtWidgets.QLabel(self.centralwidget)
self.addTips.setObjectName("addTips")
self.verticalLayout.addWidget(self.addTips)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.exeNameTips = QtWidgets.QLabel(self.centralwidget)
self.exeNameTips.setObjectName("exeNameTips")
self.horizontalLayout_3.addWidget(self.exeNameTips)
self.exeName = QtWidgets.QLineEdit(self.centralwidget)
self.exeName.setObjectName("exeName")
self.horizontalLayout_3.addWidget(self.exeName)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.localTips = QtWidgets.QLabel(self.centralwidget)
self.localTips.setObjectName("localTips")
self.horizontalLayout.addWidget(self.localTips)
self.localKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
self.localKeyboardChoose.setObjectName("localKeyboardChoose")
self.horizontalLayout.addWidget(self.localKeyboardChoose)
self.addTips_2 = QtWidgets.QLabel(self.centralwidget)
self.addTips_2.setObjectName("addTips_2")
self.horizontalLayout.addWidget(self.addTips_2)
self.localKey = QtWidgets.QLineEdit(self.centralwidget)
self.localKey.setObjectName("localKey")
self.horizontalLayout.addWidget(self.localKey)
self.wineTips = QtWidgets.QLabel(self.centralwidget)
self.wineTips.setObjectName("wineTips")
self.horizontalLayout.addWidget(self.wineTips)
self.wineKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
self.wineKeyboardChoose.setObjectName("wineKeyboardChoose")
self.horizontalLayout.addWidget(self.wineKeyboardChoose)
self.addTipsWine = QtWidgets.QLabel(self.centralwidget)
self.addTipsWine.setObjectName("addTipsWine")
self.horizontalLayout.addWidget(self.addTipsWine)
self.wineKey = QtWidgets.QLineEdit(self.centralwidget)
self.wineKey.setObjectName("wineKey")
self.horizontalLayout.addWidget(self.wineKey)
self.verticalLayout.addLayout(self.horizontalLayout)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.addButton = QtWidgets.QPushButton(self.centralwidget)
self.addButton.setObjectName("addButton")
self.horizontalLayout_2.addWidget(self.addButton)
self.verticalLayout.addLayout(self.horizontalLayout_2)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "添加快捷键"))
self.addTips.setText(_translate("MainWindow", "暂时只支持特定组合\n"
"文本框内的只能输入单字母"))
self.exeNameTips.setText(_translate("MainWindow", "可这执行文件名称:"))
self.localTips.setText(_translate("MainWindow", "本地映射:"))
self.addTips_2.setText(_translate("MainWindow", "+"))
self.wineTips.setText(_translate("MainWindow", "Wine 容器映射内容:"))
self.addTipsWine.setText(_translate("MainWindow", "+"))
self.addButton.setText(_translate("MainWindow", "添加快捷键"))

View File

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>195</height>
</rect>
</property>
<property name="windowTitle">
<string>添加快捷键</string>
</property>
<property name="windowIcon">
<iconset theme="..">
<normaloff>../../../.designer/backup</normaloff>../../../.designer/backup</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="addTips">
<property name="text">
<string>暂时只支持特定组合
文本框内的只能输入单字母</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="exeNameTips">
<property name="text">
<string>可这执行文件名称:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="exeName"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="localTips">
<property name="text">
<string>本地映射:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="localKeyboardChoose"/>
</item>
<item>
<widget class="QLabel" name="addTips_2">
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="localKey"/>
</item>
<item>
<widget class="QLabel" name="wineTips">
<property name="text">
<string>Wine 容器映射内容:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="wineKeyboardChoose"/>
</item>
<item>
<widget class="QLabel" name="addTipsWine">
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="wineKey"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>添加快捷键</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -45,9 +45,9 @@ class APK:
def __init__(self, apkPath):
self.apkPath = apkPath
def install(self):
os.system("pkexec /usr/bin/uengine-session-launch-helper -- uengine install --apk='{}'".format(self.apkPath))
return os.system("uengine install --apk='{}'".format(self.apkPath))
def uninstall(self):
os.system("pkexec /usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg='{}'".format(self.packageName()))
return os.system("uengine uninstall --pkg='{}'".format(self.packageName()))
def information(self):
return subprocess.getoutput("aapt dump badging '{}'".format(self.apkPath))
def activityName(self):
@ -362,10 +362,11 @@ class UengineRunner:
if __name__ == "__main__":
print("本 API 不支持直接运行,请通过引入的方式使用此 API")
adb = Adb("192.168.250.2:5555")
print(adb.boolAndroidInstallOtherAppSetting())
#adb = Adb("192.168.250.2:5555")
#print(adb.boolAndroidInstallOtherAppSetting())
quit()
if not ROOT.GetRoot():
print("请获取 ROOT 权限以便更好的使用该 API")
pass
#print("请获取 ROOT 权限以便更好的使用该 API")

View File

@ -1,3 +1,4 @@
#!/bin/bash
export XDG_SESSION_TYPE=x11
export QT_QPA_PLATFORM=xcb
unset WAYLAND_DISPLAYCOPY