Compare commits
74 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ab330418e | |||
| 6fc64a1f23 | |||
| b0fc890af8 | |||
| 0a8f3b384f | |||
| 4065f19fa9 | |||
| 010722bd9b | |||
| 6196d4a7a4 | |||
| 30c833c6b9 | |||
| f98eae1d70 | |||
| 226838f5a7 | |||
| aeb3bb0310 | |||
| a1d87a6365 | |||
| f6aae5ab2b | |||
| 0fb2e24047 | |||
| cb23aedbfa | |||
| 00a5d148f1 | |||
| c4c4ee8722 | |||
| f30560bd6e | |||
| fc19480aa1 | |||
| 8d4da8c4cf | |||
| e7e391600b | |||
| 3f756fd680 | |||
| ef0f359fa5 | |||
| 1b6b9e61c4 | |||
| ca7ec5e7ad | |||
| a5104f8d03 | |||
| 1a2e6e1b8f | |||
| 9dd677cff5 | |||
| 20517ecdca | |||
| db6cc69be3 | |||
| 4862b7c464 | |||
| 0802cff1d5 | |||
| 1caf7fc577 | |||
| 1939b7afa1 | |||
| 940014952f | |||
| f3d1a1e932 | |||
| 167f286c88 | |||
| d8ddf03094 | |||
| b025cb0095 | |||
| 6bd0b0d624 | |||
| 810cedb117 | |||
| 54df9ae1cb | |||
| 41887ef2a2 | |||
| 201b46d8b4 | |||
| 04a5b76181 | |||
| f41036441c | |||
| 8b3a95dbfd | |||
| 413a32b453 | |||
| c95112ab09 | |||
| d92b7e7626 | |||
| ffdedddb27 | |||
| 271eef3d2a | |||
| 9e00e622b7 | |||
| f31ababaa9 | |||
| 3f9a3a7b9f | |||
| 9aafc85f2f | |||
| b459ee6db0 | |||
|
|
3dfa0f37d1 | ||
|
|
d37c400c08 | ||
| 596eaf689f | |||
| 2b99554e02 | |||
| 37340dd3e9 | |||
| 6a22b1c170 | |||
| 951f41d57e | |||
| 33be2db48f | |||
| 1d7bd94908 | |||
|
|
ee49dcb19e | ||
| ea813fcc37 | |||
|
|
2485438303 | ||
|
|
b5e7884913 | ||
|
|
cee4ab77e2 | ||
|
|
efacc353d7 | ||
|
|
144c030036 | ||
| b028bbd8fa |
599
AutoConfig.py
Executable file
@@ -0,0 +1,599 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.4.0
|
||||
# 更新时间:2022年10月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
import os
|
||||
import sys
|
||||
import base64
|
||||
import json
|
||||
import traceback
|
||||
import urllib.request
|
||||
import requests
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
from UI.AutoConfig import *
|
||||
from Model import *
|
||||
try:
|
||||
import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
|
||||
webeng = True
|
||||
except:
|
||||
print("未安装此依赖库")
|
||||
webeng = False
|
||||
print("""太常引·建康中秋夜为吕叔潜赋
|
||||
一轮秋影转金波,飞镜又重磨。把酒问姮娥:被白发、欺人奈何?
|
||||
乘风好去,长空万里,直下看山河。斫去桂婆娑,人道是、清光更多。""")
|
||||
print("")
|
||||
print("""译文:一轮缓缓移动的秋月洒下万里金波,就像那刚磨亮的铜镜又飞上了天廓。我举起酒杯问那月中的嫦娥:怎么办呢?白发日增,好像故意欺负我。
|
||||
我要乘风飞上万里长空,俯视祖国的大好山河。还要砍去月中摇曳的桂树枝柯,人们说,这将使月亮洒下人间的光辉更多。""")
|
||||
print("================================")
|
||||
urlSourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/uengine-runner-list/raw/branch/master/auto", # Gitlink 源
|
||||
"https://gitee.com/gfdgd-xi/uengine-wine-runner-auto-configuration-script/raw/master/", # Gitee 源
|
||||
"https://gfdgd-xi.github.io/uengine-wine-runner-auto-configuration-script/", # Github 源
|
||||
"http://gfdgdxi.msns.cn/uengine-runner-list/auto/", # 备用源1,纯 IPv6 源
|
||||
"http://gfdgdxi.free.idcfengye.com/uengine-runner-auto-configuration-script/", # 备用源2
|
||||
"http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3
|
||||
"http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源
|
||||
]
|
||||
urlSources = urlSourcesList[0]
|
||||
lists = []
|
||||
|
||||
class ProgramRunStatusUpload():
|
||||
msgWindow = None
|
||||
starLayout = None
|
||||
fen = None
|
||||
starList = []
|
||||
sha1Value = ""
|
||||
programName = None
|
||||
def ChangeStar():
|
||||
if ProgramRunStatusUpload.fen.currentIndex() > 5:
|
||||
for i in ProgramRunStatusUpload.starList:
|
||||
i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>")
|
||||
return
|
||||
for i in range(ProgramRunStatusUpload.fen.currentIndex()):
|
||||
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>")
|
||||
head = ProgramRunStatusUpload.fen.currentIndex()
|
||||
end = len(ProgramRunStatusUpload.starList)
|
||||
for i in range(head, end):
|
||||
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>")
|
||||
|
||||
def ShowWindow(sha="", title=""):
|
||||
ProgramRunStatusUpload.starList = []
|
||||
ProgramRunStatusUpload.sha1Value = sha
|
||||
ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow()
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
ProgramRunStatusUpload.programName = QtWidgets.QLineEdit()
|
||||
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
|
||||
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
|
||||
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
|
||||
upload.clicked.connect(ProgramRunStatusUpload.Upload)
|
||||
if title != "":
|
||||
ProgramRunStatusUpload.programName.setText(title)
|
||||
ProgramRunStatusUpload.programName.setDisabled(True)
|
||||
# 生成星星列表
|
||||
for i in [1, 1, 1, 1, 0]:
|
||||
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
|
||||
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
|
||||
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
|
||||
ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可"))
|
||||
ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"])
|
||||
ProgramRunStatusUpload.fen.setCurrentIndex(4)
|
||||
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0)
|
||||
msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1)
|
||||
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
|
||||
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
|
||||
msgWidgetLayout.addWidget(upload, 3, 1)
|
||||
msgWidget.setLayout(msgWidgetLayout)
|
||||
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
|
||||
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
|
||||
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ProgramRunStatusUpload.msgWindow.show()
|
||||
|
||||
def Upload():
|
||||
try:
|
||||
#if ProgramRunStatusUpload.sha1Value == "":
|
||||
#ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
|
||||
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2Jhc2g=").decode("utf-8"), {
|
||||
"BashName": ProgramRunStatusUpload.sha1Value,
|
||||
"Fen": ProgramRunStatusUpload.fen.currentIndex()
|
||||
}).json()["Error"])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
|
||||
|
||||
class InformationWindow():
|
||||
def ShowWindow():
|
||||
#webeng = False
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
aboutHtml = ""
|
||||
try:
|
||||
get = requests.get(f"{urlSources}/information/{fileName}.txt")
|
||||
if get.status_code / 100 != 2 and get.status_code / 100 != 3:
|
||||
int("Bad")
|
||||
about = get.text
|
||||
aboutHtml = str(about)
|
||||
if not "<" in about:
|
||||
# 非 Html 标签
|
||||
for i in about.splitlines():
|
||||
about += f"<p>{i}</p>\n"
|
||||
#about = f"<pre>{about}</pre>"
|
||||
about = f"<h1>关于“{choose}”的介绍</h1>\n{about}"
|
||||
except:
|
||||
traceback.print_exc()
|
||||
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
|
||||
try:
|
||||
import requests as r
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
|
||||
maxHead = fenlists.index(max(fenlists))
|
||||
allNumber = 0
|
||||
for i in fenlists:
|
||||
allNumber += i
|
||||
try:
|
||||
maxNumber = max(fenlists) / allNumber * 100
|
||||
if tipsInfo == "":
|
||||
tipsInfo = f"有{maxNumber}%的用户选择了这个评分"
|
||||
except:
|
||||
pass
|
||||
end = 5
|
||||
starHtml = ""
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/BadStar.svg' width=50>\n"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
|
||||
else:
|
||||
for i in range(maxHead):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/Star.svg' width=50>\n"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
|
||||
head = maxHead
|
||||
for i in range(head, end):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/UnStar.svg' width=50>"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
|
||||
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
|
||||
message = QtWidgets.QDialog()
|
||||
messageLayout = QtWidgets.QVBoxLayout()
|
||||
if webeng:
|
||||
informationText = QtWebEngineWidgets.QWebEngineView()
|
||||
print(aboutHtml)
|
||||
if aboutHtml[:7] == "Visit: ":
|
||||
url = aboutHtml[7:].splitlines()[0]
|
||||
print(url)
|
||||
informationText.setUrl(QtCore.QUrl(url.strip()))
|
||||
else:
|
||||
#informationText.linkClicked.connect(lambda: print("a"))
|
||||
try:
|
||||
with open("/tmp/deepin-wine-runner-information.html", "w") as file:
|
||||
file.write(about)
|
||||
informationText.setUrl(QtCore.QUrl("file:///tmp/deepin-wine-runner-information.html"))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
informationText.setHtml(about)
|
||||
#informationText.urlChanged.connect(lambda: informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io")))
|
||||
else:
|
||||
informationText = QtWidgets.QTextBrowser()
|
||||
informationText.setHtml(about)
|
||||
uploadFen = QtWidgets.QPushButton("提交评分")
|
||||
uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
|
||||
|
||||
#informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io"))
|
||||
messageLayout.addWidget(informationText)
|
||||
messageLayout.addWidget(uploadFen)
|
||||
message.setWindowTitle(f"关于“{choose}”的介绍")
|
||||
message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
|
||||
message.setLayout(messageLayout)
|
||||
#message.setWindowModality(ApplicationModal);
|
||||
message.show()
|
||||
message.exec_()
|
||||
|
||||
def Add(lists: list):
|
||||
global pinLunLayout
|
||||
pinLunLayout1 = QtWidgets.QVBoxLayout()
|
||||
pinLunLayout = QtWidgets.QWidget()
|
||||
pinLunLayout.setLayout(pinLunLayout1)
|
||||
for i in range(pinLunLayout1.count()):
|
||||
pinLunLayout1.removeItem(pinLunLayout1.itemAt(i))
|
||||
for i in lists:
|
||||
widget = QtWidgets.QWidget()
|
||||
inLayout = QtWidgets.QGridLayout()
|
||||
inLayout.addWidget(QtWidgets.QLabel("<hr>"), 0, 0, 1, 3)
|
||||
inLayout.addWidget(QtWidgets.QLabel(f"<b>{i[0]}</b>"), 1, 0)
|
||||
inLayout.addWidget(QtWidgets.QLabel(f"<p align='right'><b>第{i[1]}层</b></p>"), 1, 2)
|
||||
inLayout.addWidget(QtWidgets.QLabel(i[2]), 2, 0, 1, 3)
|
||||
widget.setLayout(inLayout)
|
||||
pinLunLayout1.addWidget(widget)
|
||||
#pinLunLayout.addWidget(QtWidgets.QLabel("<hr/>"))
|
||||
# pinLunLayout = widget
|
||||
|
||||
all = 0
|
||||
now = 0
|
||||
class ProgramRunStatusShow():
|
||||
msgWindow = None
|
||||
pingLunLayout = None
|
||||
def ShowWindow():
|
||||
global lists
|
||||
global all
|
||||
global now
|
||||
global leftButton
|
||||
global rightButton
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
try:
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
#traceback.print_exc()
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
tipsInfo = "暂时无人提交此脚本评分,是否立即提交?"
|
||||
|
||||
maxHead = fenlists.index(max(fenlists))
|
||||
allNumber = 0
|
||||
for i in fenlists:
|
||||
allNumber += i
|
||||
try:
|
||||
maxNumber = max(fenlists) / allNumber * 100
|
||||
if tipsInfo == "":
|
||||
tipsInfo = f"有{maxNumber}%的用户选择了这个评分"
|
||||
except:
|
||||
pass
|
||||
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
starLayout = QtWidgets.QHBoxLayout()
|
||||
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此提交评分"))
|
||||
uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0, 2, 1)
|
||||
msgWidgetLayout.addLayout(starLayout, 0, 1, 2, 1)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 0, 2)
|
||||
#msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
|
||||
msgWidgetLayout.addWidget(uploadButton, 1, 2)
|
||||
end = 5
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>"))
|
||||
else:
|
||||
for i in range(maxHead):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>"))
|
||||
head = maxHead
|
||||
for i in range(head, end):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>"))
|
||||
pingLun = QtWidgets.QWidget()
|
||||
msgWidgetLayout.addWidget(pingLun, 4, 0, 1, 3)
|
||||
pingLunLayout = QtWidgets.QGridLayout()
|
||||
pingLunInfo = QtWidgets.QTextEdit()
|
||||
#pingLunInfo.document().setMaximumBlockCount(5)
|
||||
uploadButton = QtWidgets.QPushButton("评论")
|
||||
pingLunLayout.addWidget(pingLunInfo, 0, 0, 1, 3)
|
||||
pingLunLayout.addWidget(uploadButton, 1, 2)
|
||||
pingLunInfo.setPlaceholderText("""在此输入评论,须知:
|
||||
※1、不得含有色情、暴力、侮辱等违法内容以及不得有广告推广等内容
|
||||
※2、字数至少 15 字,但不得超过 250 字,评论内容最多 5 行,且评论内容将会进行审核,意味着评论不会实时生效显示
|
||||
※3、如果审核不通过将会被屏蔽并拉入黑名单,以及公开发布 IP 地址,评论前请三思!""")
|
||||
leftButton = QtWidgets.QPushButton("上一页")
|
||||
rightButton = QtWidgets.QPushButton("下一页")
|
||||
if maxHead == 0:
|
||||
#pingLun.setDisabled(True)
|
||||
pass
|
||||
else:
|
||||
# 显示最新的3条评论
|
||||
try:
|
||||
all = int(requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/data.txt").text)
|
||||
now = all - 3
|
||||
print(all)
|
||||
if all < 3:
|
||||
start = 0
|
||||
rightButton.setDisabled(True)
|
||||
else:
|
||||
start = all - 3
|
||||
uploadList = []
|
||||
for i in range(all - 1, start - 1, -1):
|
||||
print(f"第 {i + 1} 条评论:")
|
||||
info = requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
print(info)
|
||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||
Add(uploadList)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
try:
|
||||
ProgramRunStatusShow.pingLunLayout = pingLunLayout
|
||||
pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
|
||||
except:
|
||||
leftButton.setDisabled(True)
|
||||
rightButton.setDisabled(True)
|
||||
leftButton.clicked.connect(Left)
|
||||
rightButton.clicked.connect(Right)
|
||||
pingLunLayout.addWidget(leftButton, 3, 0)
|
||||
pingLunLayout.addWidget(rightButton, 3, 2)
|
||||
leftButton.setDisabled(True)
|
||||
pingLun.setLayout(pingLunLayout)
|
||||
msgWidget.setLayout(msgWidgetLayout)
|
||||
uploadButton.clicked.connect(lambda: ProgramRunStatusShow.Upload(pingLunInfo.toPlainText(), fileName))
|
||||
ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
|
||||
ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况")
|
||||
ProgramRunStatusShow.msgWindow.show()
|
||||
|
||||
def Upload(info, name):
|
||||
print(f"脚本:{name}")
|
||||
print(f"评论:{info}")
|
||||
try:
|
||||
res = requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL1BpbmdMdW4=").decode("utf-8"), {"PinLun": info, "Version": name}).json()
|
||||
print(res)
|
||||
if res["ExitCode"]:
|
||||
QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", res["Error"])
|
||||
return
|
||||
QtWidgets.QMessageBox.information(ProgramRunStatusShow.msgWindow, "提示", res["Error"])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", "提交失败")
|
||||
|
||||
|
||||
def UpdateFen():
|
||||
global now
|
||||
fileName = ""
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
uploadList = []
|
||||
for i in range(now + 2, now - 1, -1):
|
||||
print(f"第 {i + 1} 条评论:")
|
||||
info = requests.get(f"https://code.gitlink.org.cn/gfdgd-xi-org/bashpinlun/raw/branch/master/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
print(info)
|
||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||
#ProgramRunStatusShow.pingLunLayout.removeItem(ProgramRunStatusShow.pingLunLayout.itemAt(2))
|
||||
ProgramRunStatusShow.pingLunLayout.removeWidget(pinLunLayout)
|
||||
pinLunLayout.hide()
|
||||
#pinLunLayout.
|
||||
Add(uploadList)
|
||||
#l = QtWidgets.QGridLayout()
|
||||
#l.removeWidget(pinLunLayout)
|
||||
ProgramRunStatusShow.pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
|
||||
|
||||
def Left():
|
||||
global now
|
||||
global all
|
||||
|
||||
if now + 6 >= all:
|
||||
now = all - 3
|
||||
leftButton.setDisabled(True)
|
||||
rightButton.setEnabled(True)
|
||||
else:
|
||||
now += 3
|
||||
leftButton.setEnabled(True)
|
||||
rightButton.setEnabled(True)
|
||||
UpdateFen()
|
||||
print(all)
|
||||
print(now)
|
||||
|
||||
def Right():
|
||||
global now
|
||||
if now - 3 < 0:
|
||||
now = 0
|
||||
rightButton.setDisabled(True)
|
||||
leftButton.setEnabled(True)
|
||||
else:
|
||||
now -= 3
|
||||
leftButton.setEnabled(True)
|
||||
rightButton.setEnabled(True)
|
||||
UpdateFen()
|
||||
|
||||
def UploadFen():
|
||||
global lists
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
ProgramRunStatusUpload.ShowWindow(fileName, choose)
|
||||
|
||||
class Connect:
|
||||
def SearchBotton_Clicked():
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
if ui.searchThings.text() == "":
|
||||
# 显示全部内容
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
return
|
||||
for i in lists:
|
||||
# 显示筛选的内容
|
||||
if ui.searchThings.text().upper() in i[0].upper():
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
|
||||
def RunBotton_Clicked():
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
# 下载脚本
|
||||
things = ""
|
||||
try:
|
||||
print(f"{urlSources}/{fileName}")
|
||||
file = open("/tmp/wine-runner-auto-config.wsh", "w")
|
||||
things = requests.get(f"{urlSources}/{fileName}").text
|
||||
file.write(things)
|
||||
file.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "无法获取配置文件")
|
||||
return
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
if "($" in things:
|
||||
print("a")
|
||||
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
|
||||
print(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
|
||||
# 执行脚本
|
||||
print(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '/tmp/wine-runner-auto-config.wsh'")
|
||||
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '/tmp/wine-runner-auto-config.wsh'")
|
||||
#process = QtCore.QProcess()
|
||||
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", "/tmp/wine-runner-auto-config.wsh", "--system"])
|
||||
#process.waitForFinished()
|
||||
|
||||
def OpenFile_Triggered():
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(window, "提示", homePath, "配置文件(*.sh *.wsh);;全部文件(*.*)")
|
||||
if path[0] == "":
|
||||
return
|
||||
try:
|
||||
things = ""
|
||||
with open(path) as file:
|
||||
things = file.read()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
if "($" in things:
|
||||
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system")
|
||||
# 执行脚本
|
||||
OpenTerminal(f"env WINEARCH='{os.getenv('WINEARCH')}' WINEDEBUG='{os.getenv('WINEDEBUG')}' WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")
|
||||
#process = QtCore.QProcess()
|
||||
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", path[0], "--system"])
|
||||
#process.waitForFinished()
|
||||
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
|
||||
def ChangeSources():
|
||||
global urlSources
|
||||
sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
|
||||
for i in range(0, len(sources)):
|
||||
if sources[i].isChecked():
|
||||
urlSources = urlSourcesList[i]
|
||||
# 解析云列表
|
||||
try:
|
||||
# 获取列表
|
||||
lists = json.loads(requests.get(f"{urlSources}/list.json").text)
|
||||
# 解释列表并显示在 GUI 上
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
break
|
||||
|
||||
if __name__ == "__main__":
|
||||
homePath = os.path.expanduser('~')
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
information = json.loads(readtxt(f"{programPath}/information.json"))
|
||||
version = information["Version"]
|
||||
wine = "deepin-wine6-stable"
|
||||
wineprefix = f"{homePath}/.wine"
|
||||
try:
|
||||
wine = sys.argv[1]
|
||||
wineprefix = sys.argv[2]
|
||||
except:
|
||||
pass
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
pinLunLayout = QtWidgets.QHBoxLayout()
|
||||
ui.setupUi(window)
|
||||
window.setWindowTitle(f"UEngine 运行器 {version}——微型应用商店")
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
iconPath = "{}/runner.svg".format(programPath)
|
||||
window.show()
|
||||
#ui.actionGitlink.setExclusive(True)
|
||||
sourcesGroup = QtWidgets.QActionGroup(window)
|
||||
sourcesGroup.addAction(ui.actionGitlink)
|
||||
sourcesGroup.addAction(ui.actionGitee)
|
||||
sourcesGroup.addAction(ui.actionGithub)
|
||||
sourcesGroup.addAction(ui.action_IPv6)
|
||||
sourcesGroup.addAction(ui.action_2)
|
||||
sourcesGroup.addAction(ui.action_3)
|
||||
sourcesGroup.addAction(ui.action)
|
||||
sourcesGroup.triggered.connect(ChangeSources)
|
||||
sourcesGroup.setExclusive(True)
|
||||
#for i in [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action]:
|
||||
#i.triggered.connect(ChangeSources)
|
||||
#pass
|
||||
# 连接信号和槽
|
||||
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
||||
#ui.uploadFen.clicked.connect(UploadFen)
|
||||
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
|
||||
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
|
||||
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
|
||||
ui.exitProgram.triggered.connect(window.close)
|
||||
ui.getFen.clicked.connect(ProgramRunStatusShow.ShowWindow)
|
||||
# 解析云列表
|
||||
try:
|
||||
# 获取列表
|
||||
lists = json.loads(requests.get(f"{urlSources}/list.json").text)
|
||||
# 解释列表并显示在 GUI 上
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
|
||||
app.exec_()
|
||||
14
AutoShell/command/download
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/error
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/info
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/installapk
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/pause
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/programforum
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/thank
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/version
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/warning
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
75
AutoShell/main.py
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import platform
|
||||
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
information = json.loads(readtxt(f"{programPath}/../information.json"))
|
||||
version = information["Version"]
|
||||
thankText = ""
|
||||
for i in information["Contribute"]:
|
||||
thankText += f"{i}\n"
|
||||
programEnv = [
|
||||
["WINEPREFIX", f"{os.path.expanduser('~')}/.wine"],
|
||||
["WINE", "deepin-wine6-stable"],
|
||||
["DANGER", "0"],
|
||||
["PROGRAMPATH", programPath],
|
||||
["VERSION", version],
|
||||
["THANK", thankText.replace("\n", "\\n")],
|
||||
["MAKER", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["COPYRIGHT", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["PLATFORM", platform.system()],
|
||||
["DEBUG", str(int("--debug" in sys.argv))]
|
||||
]
|
||||
'''programEnv = [
|
||||
["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
|
||||
["($WINE)", "deepin-wine6-stable"],
|
||||
["($DANGER)", "0"],
|
||||
["($HOME)", os.path.expanduser('~')],
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["?", "0"],
|
||||
["PLATFORM)", platform.system()],
|
||||
["DEBUG)", str(int("--debug" in sys.argv))]
|
||||
]'''
|
||||
optionAll = 0
|
||||
if "--debug" in sys.argv:
|
||||
optionAll += 1
|
||||
if "--system" in sys.argv:
|
||||
programEnv.append(["DANGER", "1"])
|
||||
optionAll += 1
|
||||
if os.getenv("WINE") != None:
|
||||
programEnv.append(["WINE", os.getenv("WINE")])
|
||||
if os.getenv("WINEPREFIX") != None:
|
||||
programEnv.append(["WINEPREFIX", os.getenv("WINEPREFIX")])
|
||||
# 生成可以使用的参数
|
||||
commandEnv = ""
|
||||
for i in programEnv:
|
||||
commandEnv += f"{i[0]}=\"{i[1]}\" "
|
||||
commandEnv += f"PATH=\"{programPath}/command:$PATH\" "
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
os.system(f"{commandEnv} bash ")
|
||||
exit()
|
||||
command = ""
|
||||
for i in sys.argv[1:]:
|
||||
command += f"\"{i}\" "
|
||||
print("UEngine 运行器自动配置文件解析器(基于 Bash)")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
os.system(f"{commandEnv} bash {command}")
|
||||
47
ConfigLanguareRunner-help.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"installdll": "安装指定 dll 在指定容器\n参数数量:1\n参数介绍:dll名称或在从互联网获取DLL工具的编号,如 7012 xolehlp.dll 平台:2003 架构:64 的 7012",
|
||||
"stopdll": "不允许指定 dll/exe 运行\n参数数量:1\n参数介绍:dll/exe 名称,如 example.exe",
|
||||
"installfont": "安装指定字体到指定容器\n参数数量:1\n在字体商店的编号,如 5 msyhbd.ttc 的 5",
|
||||
"installsparkcorefont": "安装星火应用商店的“微软核心字体”\n参数数量:0\n参数介绍:无",
|
||||
"installmono": "安装最新版本的 mono 到指定容器\n参数数量:0\n参数介绍:无",
|
||||
"installgecko": "安装最新版本的 gecko 到指定容器\n参数数量:0\n参数介绍:无",
|
||||
"installvcpp": "安装指定的 VCPP 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Studio C++ 工具的编号,如 10 Visual Studio C++ 2015、2017、2019 和 2022 X64 的 10",
|
||||
"installnet": "安装指定的 .net framework 运行库到指定容器\n参数数量:1\n参数介绍:在安装 .net framework 工具的编号,如 3 .net framework 4.5.1 Offline Installer 的 3",
|
||||
"installmsxml": "安装指定的 MSXML 运行库到指定容器\n参数数量:1\n参数介绍:在安装 MSXML 工具的编号,如 1、MSXML 4.0 SP3 的 1",
|
||||
"echo": "显示内容\n参数数量:≥1\n参数介绍:接要显示的内容",
|
||||
"info": "显示提示对话框\n参数数量:2\n参数介绍:标题+显示内容",
|
||||
"error": "显示错误对话框\n参数数量:2\n参数介绍:标题+显示内容",
|
||||
"warning": "显示警告对话框\n参数数量:2\n参数介绍:标题+显示内容",
|
||||
"exit": "退出程序\n参数数量:0\n参数介绍:无",
|
||||
"bat": "执行 cmd 命令在 Wine 容器内(在 Windows 将在系统执行命令)\n参数数量:≥1\n参数介绍:接要执行的命令",
|
||||
"bash": "执行 bash 命令(在 Windows 系统将执行 cmd 命令)\n参数数量:≥1\n参数介绍:接要执行的命令",
|
||||
"version": "显示解释器版本(Wine 运行器版本)\n参数数量:0\n参数介绍:无",
|
||||
"thank": "显示谢明列表\n参数数量:0\n参数介绍:无",
|
||||
"pause": "按回车键后继续\n参数数量:0\n参数介绍:无",
|
||||
"download": "使用 aria2 下载文件\n参数数量:≥1 && ≤3\n参数介绍:下载URL+保存在的文件夹+保存的文件名",
|
||||
"installdxvk": "安装 dxvk 到指定容器\n参数数量:0\n参数介绍:无",
|
||||
"createbotton": "在指定目录创建容器\n参数数量:0\n参数介绍:无",
|
||||
"reg": "导入 .reg 文件\n参数数量:0\n参数介绍:reg 文件路径",
|
||||
"enabledopengl": "开启 OpenGL\n参数数量:0\n参数介绍:无",
|
||||
"disbledopengl": "关闭 OpenGL\n参数数量:0\n参数介绍:无",
|
||||
"winecfg": "显示“Wine 设置”\n参数数量:0\n参数介绍:无",
|
||||
"winver": "显示“关于 Wine”\n参数数量:0\n参数介绍:无",
|
||||
"changeversion": "更改 Wine 容器系统版本(未实现)\n参数数量:无\n参数介绍:无",
|
||||
"cat": "显示指定文件(只支持显示编码为UTF-8的文件)\n参数数量:1\n参数介绍:无",
|
||||
"enabledhttpproxy": "设置指定容器代理\n参数数量:2\n参数介绍:代理服务器地址+端口",
|
||||
"disbledhttpproxy": "禁用指定容器代理\n参数数量:0\n参数介绍:无",
|
||||
"enabledwinecrashdialog": "启用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无",
|
||||
"disbledwinecrashdialog": "禁用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无",
|
||||
"disbledWinebottlecreatelink": "禁止 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无",
|
||||
"enabledWinebottlecreatelink": "允许 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无",
|
||||
"killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名",
|
||||
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
||||
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
||||
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无",
|
||||
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6",
|
||||
"installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库",
|
||||
"decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径",
|
||||
"programforum": "打开程序论坛\n参数数量:0\n参数介绍:无",
|
||||
"installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径",
|
||||
"installapk": "安装 APK 文件到 UEngine\n参数数量:1\n参数介绍:apk 文件路径"
|
||||
}
|
||||
673
ConfigLanguareRunner.py
Executable file
@@ -0,0 +1,673 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:3.0.1
|
||||
# 更新时间:2022年10月05日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import random
|
||||
import api as uengineapi
|
||||
import platform
|
||||
import traceback
|
||||
import webbrowser
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
information = json.loads(readtxt(f"{programPath}/information.json"))
|
||||
version = information["Version"]
|
||||
thankText = ""
|
||||
helpList = json.loads(readtxt(f"{programPath}/ConfigLanguareRunner-help.json"))
|
||||
for i in information["Contribute"]:
|
||||
thankText += f"{i}\n"
|
||||
programEnv = [
|
||||
["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
|
||||
["($WINE)", "deepin-wine6-stable"],
|
||||
#["($DANGER)", "0"],
|
||||
["($DANGER)", "1"],
|
||||
["($HOME)", os.path.expanduser('~')],
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($?)", "0"],
|
||||
["($PLATFORM)", platform.system()],
|
||||
["($DEBUG)", "1"]
|
||||
#["($DEBUG)", str(int("--debug" in sys.argv))]
|
||||
]
|
||||
readOnlyEnv = [
|
||||
"($DANGER)",
|
||||
"($HOME)",
|
||||
"($PROGRAMPATH)",
|
||||
"($VERSION)",
|
||||
"($THANK)",
|
||||
"($MAKER)",
|
||||
"($COPYRIGHT)",
|
||||
"($?)",
|
||||
"($SYSTEM)",
|
||||
"($DEBUG)"
|
||||
]
|
||||
|
||||
def FindFile(file, name):
|
||||
for i in os.listdir(file):
|
||||
path = f"{file}/{i}"
|
||||
if os.path.isdir(path):
|
||||
returnPath = FindFile(path, name)
|
||||
if returnPath != None:
|
||||
return returnPath.replace("//", "/")
|
||||
if os.path.isfile(path):
|
||||
if i == name:
|
||||
return path
|
||||
return None
|
||||
|
||||
def Debug():
|
||||
if "--debug" in sys.argv:
|
||||
traceback.print_exc()
|
||||
|
||||
class Command():
|
||||
# 有风险的命令
|
||||
dangerCommand = [
|
||||
"bash",
|
||||
"bat",
|
||||
"download",
|
||||
"reg"
|
||||
]
|
||||
# 可以被使用的命令
|
||||
commandList = [
|
||||
"installdll",
|
||||
"installfont",
|
||||
"installsparkcorefont",
|
||||
"installmono",
|
||||
"installgecko",
|
||||
"installvcpp",
|
||||
"installnet",
|
||||
"installmsxml",
|
||||
"echo",
|
||||
"info",
|
||||
"error",
|
||||
"warning",
|
||||
"exit",
|
||||
"bash",
|
||||
"bat",
|
||||
"version",
|
||||
"thank",
|
||||
"pause",
|
||||
"download",
|
||||
"installdxvk",
|
||||
"createbotton",
|
||||
"reg",
|
||||
"enabledopengl",
|
||||
"disbledopengl",
|
||||
"winecfg",
|
||||
"winver",
|
||||
"changeversion",
|
||||
"stopdll",
|
||||
"cat",
|
||||
"taskmgr",
|
||||
"control",
|
||||
"killall",
|
||||
"killallwineserver",
|
||||
"enabledhttpproxy",
|
||||
"disbledhttpproxy",
|
||||
"enabledwinecrashdialog",
|
||||
"disbledwinecrashdialog",
|
||||
"disbledWinebottlecreatelink",
|
||||
"enabledWinebottlecreatelink",
|
||||
"installvb",
|
||||
"installother",
|
||||
"decompressionbottle",
|
||||
"programforum",
|
||||
"installmsi",
|
||||
"installapk"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
self.commandString = commandString
|
||||
|
||||
# 解析器
|
||||
# 命令字符串转可供解析的列表
|
||||
def GetCommandList(self) -> list:
|
||||
shellList = []
|
||||
shellFirstShell = self.commandString.split("\n")
|
||||
# 转换成可以执行的数组
|
||||
for l in range(0, len(shellFirstShell)):
|
||||
i = shellFirstShell[l]
|
||||
# 判断有没有注释
|
||||
if "#" in i:
|
||||
# 忽略注释
|
||||
i = i[:i.index("#")]
|
||||
# 删除前后空格
|
||||
i = i.strip()
|
||||
# 如果是空行
|
||||
if i == "":
|
||||
# 忽略此行,此行不做处理
|
||||
continue
|
||||
# 空格转义
|
||||
i = i.replace("\\ ", "@Space@")
|
||||
# 解析
|
||||
i = i.split()
|
||||
# 判断是否为合法的参数,否则提示并忽略
|
||||
if not i[0] in self.commandList and i[0][0] != "(":
|
||||
print(f"行{l + 1}命令{i[0]}不存在,忽略")
|
||||
programEnv[9][1] = "-2"
|
||||
continue
|
||||
if programEnv[2][1] == "0" and i[0] in self.dangerCommand:
|
||||
print(f"行{l + 1}命令{i[0]}目前解析器不允许运行,忽略")
|
||||
print("如果需要运行,可以在配置面板开启“允许修改系统”选项(针对GUI用户)")
|
||||
print("或添加参数 --system(终端调用运行用户)")
|
||||
programEnv[9][1] = "-1"
|
||||
continue
|
||||
rightList = []
|
||||
for k in i:
|
||||
# 处理符号转义
|
||||
rightList.append(k.replace("@Space@", " ").replace("\\n", "\n").replace("\\r", "\r"))
|
||||
shellList.append(rightList)
|
||||
return shellList
|
||||
|
||||
# 运行器
|
||||
class Run():
|
||||
close = False
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
def Exit(self):
|
||||
self.close = True
|
||||
return 0
|
||||
|
||||
def InstallDll(self) -> int:
|
||||
import InstallDll
|
||||
# 如果是数字
|
||||
number = False
|
||||
try:
|
||||
int(self.command[1])
|
||||
number = True
|
||||
except:
|
||||
pass
|
||||
if number:
|
||||
return InstallDll.Download(self.wineBottonPath, InstallDll.GetNameByNumber(int(self.command[1])), InstallDll.GetUrlByNumber(int(self.command[1])), self.wine)
|
||||
return InstallDll.Download(self.wineBottonPath, self.command[1], InstallDll.GetUrlByName(self.command[1]), self.wine)
|
||||
|
||||
def InstallDxvk(self):
|
||||
if not os.path.exists(f"{programPath}/dxvk"):
|
||||
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
print("错误:无法解压资源")
|
||||
return 1
|
||||
os.remove(f"{programPath}/dxvk.7z")
|
||||
return os.system(f"env 'WINE={self.wine}' 'WINE64={self.wine}' 'WINEPREFIX={self.wineBottonPath}' bash '{programPath}/dxvk/auto.sh' install")
|
||||
|
||||
def Thank(self) -> int:
|
||||
for i in information["Contribute"]:
|
||||
print(i)
|
||||
return 0
|
||||
|
||||
def InstallFont(self) -> int:
|
||||
import InstallFont
|
||||
return InstallFont.Download(self.wineBottonPath, int(self.command[1]))
|
||||
|
||||
def InstallMono(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' mono")
|
||||
|
||||
def InstallGecko(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' gecko")
|
||||
|
||||
def InstallVCPP(self) -> int:
|
||||
import InstallVisualCPlusPlus
|
||||
return InstallVisualCPlusPlus.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallNet(self) -> int:
|
||||
import InstallNetFramework
|
||||
return InstallNetFramework.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallMsxml(self) -> int:
|
||||
import InstallMsxml
|
||||
return InstallMsxml.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def Info(self) -> int:
|
||||
QtWidgets.QMessageBox.information(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def StopDll(self) -> int:
|
||||
return os.system(f"WINEPREFIX='{self.wineBottonPath}' '{self.wine}' reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v {os.path.splitext(self.command[1])[0]} /f")
|
||||
|
||||
def CreateBotton(self):
|
||||
self.command = ["bat", "exit"]
|
||||
self.Bat()
|
||||
return 0
|
||||
|
||||
def InstallSparkCoreFont(self):
|
||||
if not os.system("which aptss"):
|
||||
# 最新版本星火应用商店处理
|
||||
os.system("pkexec bash aptss ssupdate")
|
||||
return os.system("pkexec bash aptss install ms-core-fonts")
|
||||
if not os.system("which ss-apt-fast"):
|
||||
# 稍久的版本
|
||||
os.system("pkexec ss-apt-fast update")
|
||||
return os.system("pkexec bash ss-apt-fast install ms-core-fonts")
|
||||
# 不知道什么版本的处理方法
|
||||
if not os.system("which apt-fast"):
|
||||
# 稍久的版本
|
||||
os.system("pkexec apt-fast update")
|
||||
return os.system("pkexec apt-fast install ms-core-fonts")
|
||||
os.system("pkexec apt update")
|
||||
return os.system("pkexec apt install ms-core-fonts")
|
||||
|
||||
def Echo(self) -> int:
|
||||
del self.command[0]
|
||||
print(" ".join(self.command))
|
||||
return 0
|
||||
|
||||
def Warning(self):
|
||||
QtWidgets.QMessageBox.warning(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def Error(self):
|
||||
QtWidgets.QMessageBox.critical(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def Bash(self):
|
||||
command = ""
|
||||
for i in self.command[1:]:
|
||||
command += f"'{i}' "
|
||||
return os.system(command)
|
||||
|
||||
def Bat(self) -> int:
|
||||
# Windows 直接转换为以 cmd 运行
|
||||
if platform.system() == "Windows":
|
||||
# 直接调用 Bash 函数
|
||||
return self.Bash()
|
||||
command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)"]
|
||||
for i in programEnv:
|
||||
for k in range(len(command)):
|
||||
command[k] = command[k].replace(i[0], i[1])
|
||||
for i in self.command[1:]:
|
||||
command.append(i)
|
||||
commandStr = command[0] + " "
|
||||
for i in command[1:]:
|
||||
commandStr += f"'{i}' "
|
||||
return os.system(commandStr)
|
||||
|
||||
def Version(self):
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
return 0
|
||||
|
||||
def Pause(self) -> int:
|
||||
input("按回车键继续……")
|
||||
return 0
|
||||
|
||||
def Download(self) -> int:
|
||||
command = f"aria2c -x 16 -s 16 -c '{self.command[1]}' "
|
||||
try:
|
||||
command += f"-d '{self.command[2]}' "
|
||||
command += f"-o '{self.command[3]}' "
|
||||
except:
|
||||
pass
|
||||
return os.system(command)
|
||||
|
||||
def Reg(self) -> int:
|
||||
self.command = ["bat", "regedit", "/s", self.command[1]]
|
||||
return self.Bat()
|
||||
|
||||
def EnabledOpenGl(self) -> int:
|
||||
self.command = ["reg", f"z:{programPath}/EnabledOpengl.reg"]
|
||||
return self.Reg()
|
||||
|
||||
def DisbledOpenGl(self) -> int:
|
||||
self.command = ["reg", f"z:{programPath}/DisabledOpengl.reg"]
|
||||
return self.Reg()
|
||||
|
||||
def Winver(self):
|
||||
self.command = ["bat", "winver"]
|
||||
return self.Bat()
|
||||
|
||||
def Winecfg(self):
|
||||
self.command = ["bat", "winecfg"]
|
||||
return self.Bat()
|
||||
|
||||
def ChangeVersion(self):
|
||||
# 判断是否为正确的版本
|
||||
if not os.path.exists(f"{programPath}/ChangeWineBottonVersion/{self.command[1]}.reg"):
|
||||
print("错误:您选择的版本错误,目前只支持以下版本")
|
||||
for i in os.listdir(f"{programPath}/ChangeWineBottonVersion"):
|
||||
print(i.replace(".reg", ""), end=" ")
|
||||
print()
|
||||
return 1
|
||||
self.command = ["reg", f"z:/{programPath}/ChangeWineBottonVersion/{self.command[1]}.reg"]
|
||||
return self.Reg()
|
||||
|
||||
def Cat(self):
|
||||
try:
|
||||
file = open(self.command[1], "r")
|
||||
print(file.read())
|
||||
file.close()
|
||||
return 0
|
||||
except:
|
||||
print("文件读取错误")
|
||||
Debug()
|
||||
return 1
|
||||
|
||||
def Taskmgr(self):
|
||||
self.command = ["bat", "taskmgr"]
|
||||
return self.Bat()
|
||||
|
||||
def Control(self):
|
||||
self.command = ["bat", "control"]
|
||||
return self.Bat()
|
||||
|
||||
def Killall(self):
|
||||
return os.system(f"killall -9 {self.command[1]}")
|
||||
|
||||
def KillallWineServer(self):
|
||||
command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)", "-k"]
|
||||
for i in programEnv:
|
||||
for k in range(len(command)):
|
||||
command[k] = command[k].replace(i[0], i[1])
|
||||
if "box86" in command[1] or "exagear" in command[1] or "box64" in command[1]:
|
||||
print("不支持此 Wine")
|
||||
return 1
|
||||
if os.path.exists(command[1]):
|
||||
# 文件存在
|
||||
command[1] = f"{os.path.dirname(command[1])}/wineserver"
|
||||
else:
|
||||
# 读 which
|
||||
command[1] = f"{os.path.dirname(subprocess.getoutput(f'which {command[1]}').strip())}/wineserver"
|
||||
commandStr = command[0] + " "
|
||||
for i in command[1:]:
|
||||
commandStr += f"'{i}' "
|
||||
return os.system(commandStr)
|
||||
|
||||
def EnabledWineBottleCreateLink(self):
|
||||
self.command = ["bat", "reg", "delete", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def DisbledWineBottleCreateLink(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def DisbledWineCrashDialog(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def EnabledWineCrashDialog(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000001", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def EnabledHttpProxy(self):
|
||||
proxyServerAddress = self.command[1]
|
||||
port = self.command[2]
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000001", "/f"]
|
||||
self.Bat()
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyServer", "/d", f"{proxyServerAddress}:{port}", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def DecompressionBottle(self):
|
||||
tempDebDir = f"/tmp/wine-runner-unpack-deb-{random.randint(0, 1000)}"
|
||||
if os.system(f"dpkg -x '{self.command[1]}' '{tempDebDir}'"):
|
||||
return 1
|
||||
zippath = FindFile(tempDebDir, "files.7z")
|
||||
if zippath == None:
|
||||
return 2
|
||||
# 解压文件
|
||||
os.system(f"mkdir -p '{self.command[2]}'")
|
||||
fi = os.system(f"7z x -y '{zippath}' -o'{self.command[2]}'")
|
||||
os.system(f"rm -rfv '{tempDebDir}'")
|
||||
return fi
|
||||
|
||||
|
||||
def DisbledHttpProxy(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def InstallVB(self):
|
||||
import InstallVisualBasicRuntime
|
||||
return InstallVisualBasicRuntime.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallOther(self):
|
||||
import InstallOther
|
||||
return InstallOther.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def ProgramForum(self):
|
||||
webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")
|
||||
return
|
||||
|
||||
def InstallMSI(self):
|
||||
self.command = ["bat", "msiexec", "/i", self.command[1]]
|
||||
return self.Bat()
|
||||
|
||||
def InstallApk(self):
|
||||
if os.system("which uengine > /dev/null"):
|
||||
print("未安装 UEngine,无法使用该命令")
|
||||
return 1
|
||||
apk = uengineapi.APK(self.command[1])
|
||||
result = apk.install()
|
||||
homePath = os.getenv("HOME")
|
||||
if not os.path.exists(f"{homePath}/.local/share/applications/uengine"):
|
||||
os.makedirs(f"{homePath}/.local/share/applications/uengine")
|
||||
if not os.path.exists(f"{homePath}/.local/share/icons/hicolor/apps"):
|
||||
os.makedirs(f"{homePath}/.local/share/icons/hicolor/apps")
|
||||
package = apk.packageName()
|
||||
apk.saveApkIcon(f"{homePath}/.local/share/icons/hicolor/apps/{package}.png")
|
||||
apk.saveDesktopFile(f"{homePath}/.local/share/applications/uengine/{package}.desktop", f"{homePath}/.local/share/icons/hicolor/apps/{package}.png")
|
||||
return result
|
||||
|
||||
# 可以运行的命令的映射关系
|
||||
# 可以被使用的命令的映射
|
||||
commandList = {
|
||||
"installdll": InstallDll,
|
||||
"installfont": InstallFont,
|
||||
"installsparkcorefont": InstallSparkCoreFont,
|
||||
"installmono": InstallMono,
|
||||
"installgecko": InstallGecko,
|
||||
"installvcpp": InstallVCPP,
|
||||
"installnet": InstallNet,
|
||||
"installmsxml": InstallMsxml,
|
||||
"echo": Echo,
|
||||
"info": Info,
|
||||
"warning": Warning,
|
||||
"error": Error,
|
||||
"exit": Exit,
|
||||
"bash": Bash,
|
||||
"bat": Bat,
|
||||
"version": Version,
|
||||
"thank": Thank,
|
||||
"pause": Pause,
|
||||
"download": Download,
|
||||
"installdxvk": InstallDxvk,
|
||||
"createbotton": CreateBotton,
|
||||
"reg": Reg,
|
||||
"enabledopengl": EnabledOpenGl,
|
||||
"disbledopengl": DisbledOpenGl,
|
||||
"winecfg": Winecfg,
|
||||
"winver": Winver,
|
||||
"changeversion": ChangeVersion,
|
||||
"stopdll": StopDll,
|
||||
"cat": Cat,
|
||||
"taskmgr": Taskmgr,
|
||||
"control": Control,
|
||||
"killallwineserver": KillallWineServer,
|
||||
"enabledhttpproxy": EnabledHttpProxy,
|
||||
"disbledhttpproxy": DisbledHttpProxy,
|
||||
"enabledwinecrashdialog": EnabledWineCrashDialog,
|
||||
"disbledwinecrashdialog": DisbledWineCrashDialog,
|
||||
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
|
||||
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink,
|
||||
"installvb": InstallVB,
|
||||
"installother": InstallOther,
|
||||
"decompressionbottle": DecompressionBottle,
|
||||
"programforum": ProgramForum,
|
||||
"installmsi": InstallMSI,
|
||||
"installapk": InstallApk
|
||||
}
|
||||
|
||||
# 参数数列表
|
||||
commandInfo = {
|
||||
"killall": [1],
|
||||
"installdll": [1],
|
||||
"installfont": [1],
|
||||
"installsparkcorefont": [0],
|
||||
"installmono": [0],
|
||||
"installgecko": [0],
|
||||
"installvcpp": [1],
|
||||
"installnet": [1],
|
||||
"installmsxml": [1],
|
||||
"echo": [1],
|
||||
"info": [2],
|
||||
"warning": [2],
|
||||
"error": [2],
|
||||
"exit": [0],
|
||||
"bash": [1],
|
||||
"bat": [1],
|
||||
"version": [0],
|
||||
"thank": [0],
|
||||
"pause": [0],
|
||||
"download": [1],
|
||||
"installdxvk": [0],
|
||||
"createbotton": [0],
|
||||
"reg": [1],
|
||||
"enabledopengl": [0],
|
||||
"disbledopengl": [0],
|
||||
"winecfg": [0],
|
||||
"winver": [0],
|
||||
"changeversion": [1],
|
||||
"stopdll": [1],
|
||||
"cat": [1],
|
||||
"taskmgr": [0],
|
||||
"control": [0],
|
||||
"killallwineserver": [0],
|
||||
"enabledhttpproxy": [2],
|
||||
"disbledhttpproxy": [0],
|
||||
"enabledwinecrashdialog": [0],
|
||||
"disbledwinecrashdialog": [0],
|
||||
"disbledWinebottlecreatelink": [0],
|
||||
"enabledWinebottlecreatelink": [0],
|
||||
"installvb": [1],
|
||||
"installother": [1],
|
||||
"decompressionbottle": [2],
|
||||
"programforum": [0],
|
||||
"installmsi": [1],
|
||||
"installapk": [1]
|
||||
}
|
||||
windowsUnrun = [
|
||||
"createbotton",
|
||||
"installdll",
|
||||
"installmono",
|
||||
"installgecko",
|
||||
"winecfg",
|
||||
"stopdll",
|
||||
"changeversion",
|
||||
"enabledopengl",
|
||||
"disbledopengl",
|
||||
"installdxvk",
|
||||
"installfont",
|
||||
"installsparkcorefont",
|
||||
"decompressionbottle",
|
||||
"installapk"
|
||||
]
|
||||
# 解析
|
||||
def __init__(self, command: list, wineBottonPath: str, wine: str) -> int:
|
||||
self.wineBottonPath = wineBottonPath
|
||||
self.wine = wine
|
||||
for i in command:
|
||||
self.command = i
|
||||
# 变量解析
|
||||
if self.command[0][0] == "(" and "=" in self.command[0]:
|
||||
env = i[0][: i[0].index("=")]
|
||||
value = i[0][i[0].index("=") + 1:]
|
||||
# 判断是不是只读变量
|
||||
if env in readOnlyEnv:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误")
|
||||
print(f"变量 {env} 只读,无法修改,忽略")
|
||||
continue
|
||||
change = False
|
||||
for k in range(len(programEnv)):
|
||||
# 修改变量
|
||||
if env == programEnv[k][0]:
|
||||
programEnv[k][1] = value
|
||||
change = True
|
||||
break
|
||||
if not change:
|
||||
# 添加变量
|
||||
programEnv.append([f"{env}", value])
|
||||
continue
|
||||
# 解析命令是否可以在 Windows 使用(只限在 Windows 系统时)
|
||||
if platform.system() == "Windows" and i[0] in self.windowsUnrun:
|
||||
print("此命令不支持在 Windows 上运行")
|
||||
programEnv[9][1] = "-5"
|
||||
continue
|
||||
# 获取程序帮助信息
|
||||
try:
|
||||
if i[1] == "--help":
|
||||
print(helpList[i[0]].replace("\\n", "\n"))
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
# 正常命令解析
|
||||
if len(i) -1 < self.commandInfo[i[0]][0]:
|
||||
print("参数不足")
|
||||
programEnv[9][1] = "-3"
|
||||
continue
|
||||
# 替换环境变量
|
||||
for a in range(1, len(i)):
|
||||
for b in programEnv:
|
||||
if b[0] in i[a]:
|
||||
i[a] = i[a].replace(b[0], b[1])
|
||||
try:
|
||||
commandReturn = self.commandList[i[0]](self)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
commandReturn = 1
|
||||
if commandReturn:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误,返回值:", commandReturn)
|
||||
programEnv[9][1] = str(commandReturn)
|
||||
if self.close:
|
||||
break
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
if os.getenv("WINE") != None:
|
||||
programEnv[1][1] = os.getenv("WINE")
|
||||
if os.getenv("WINEPREFIX") != None:
|
||||
programEnv[0][1] = os.getenv("WINEPREFIX")
|
||||
if __name__ == "__main__":
|
||||
optionAll = 0
|
||||
if "--debug" in sys.argv:
|
||||
optionAll += 1
|
||||
if "--system" in sys.argv:
|
||||
programEnv[2][1] = "1"
|
||||
optionAll += 1
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
while True:
|
||||
commandLine = input(">")
|
||||
if commandLine == "exit":
|
||||
break
|
||||
com = Command(commandLine)
|
||||
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
|
||||
sys.exit(int(programEnv[9][1]))
|
||||
# 读取文件
|
||||
try:
|
||||
file = open(sys.argv[1], "r")
|
||||
com = Command(file.read())
|
||||
file.close()
|
||||
except:
|
||||
print("错误:无法读取该文件,无法继续")
|
||||
sys.exit(1)
|
||||
print("UEngine 运行器自动配置文件解析器")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
|
||||
sys.exit(int(programEnv[9][1]))
|
||||
11
Download.py
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import base64
|
||||
import requests
|
||||
print("""浣溪沙
|
||||
一曲新词酒一杯,去年天气旧亭台。夕阳西下几时回?
|
||||
无可奈何花落去,似曾相识燕归来。小园香径独徘徊。""")
|
||||
print("")
|
||||
print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。")
|
||||
print("================================")
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + sys.argv[1]).text)
|
||||
BIN
Help/1-1-1.png
Executable file → Normal file
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 28 KiB |
BIN
Help/1-1-2.png
Executable file → Normal file
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 57 KiB |
BIN
Help/1-1-4.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
Help/1-3-1.png
Executable file → Normal file
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 41 KiB |
BIN
Help/1-5-1.png
Executable file → Normal file
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 72 KiB |
BIN
Help/1-5-2.png
Executable file → Normal file
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 8.5 KiB |
BIN
Help/1-6-1.png
Executable file → Normal file
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 68 KiB |
BIN
Help/1-7-1.png
Executable file → Normal file
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 54 KiB |
BIN
Help/1-9-2.png
Executable file → Normal file
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 26 KiB |
BIN
Help/1-9-3.png
Executable file → Normal file
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 58 KiB |
BIN
Help/1-9-5.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 5.3 KiB |
BIN
Help/2-1-1.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
Help/2-1-2.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
Help/2-1-3.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
Help/2-1-4.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Help/2-1-5.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
337
Help/index.html
@@ -1,190 +1,159 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<meta name='viewport' content='width=device-width initial-scale=1'>
|
||||
<link rel="shortcut icon" href="../runner.svg">
|
||||
<title>UEngine 程序帮助</title>
|
||||
</head>
|
||||
|
||||
<body onload="UpdateTime();">
|
||||
<h1 id='uengine-运行器帮助'>UEngine 运行器帮助</h1>
|
||||
<hr />
|
||||
<h2 id='帮助简述'>帮助简述</h2>
|
||||
<blockquote>
|
||||
<p>安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮<br/>卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。<br/>保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可<br/>重置(删除)UEngine数据:点击菜单栏的“UEngine”的“清空UEngine数据”,输入密码重启即可<br/>注意:如果任何安卓一遍打不开,多打开几遍应该就可以重新加载UEngine配置了<br/>打开UEngine应用列表:打开系统已安装的应用列表(安卓界面)<br/><strong>提示:</strong>
|
||||
<br/><strong>※1、近期升级的 UEngine 安装时会自动把要安装的 apk 删除,如果这个 apk 文件非常重要请拷贝一个备份版并安装这个备份版</strong>
|
||||
<br/><strong>2、需要你有使用 root 权限的能力;</strong><br/><strong>3、需要安装 UEngine 才能使用;</strong><br/><strong>4、提取 apk
|
||||
图标的 apk 路径以“安装 apk”那栏为准;</strong><br/><strong>5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0
|
||||
以前的版本。(如需连接UEngine请安装adb补丁)</strong> </p>
|
||||
</blockquote>
|
||||
<hr />
|
||||
<h2 id='详细帮助'>详细帮助</h2>
|
||||
<h3 id='如何安装自己的-apk'>如何安装自己的 Apk</h3>
|
||||
<p><em>请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限</em></p>
|
||||
<h4 id='方法一-1'>方法一</h4>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击浏览按钮,找到想要安装的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击安装按钮,输入密码<br>
|
||||
<img src="1-1-3.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-1-5.png"
|
||||
referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h4 id='方法二-1'>方法二</h4>
|
||||
<ol start=''>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>点击安装按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-2-2.png"
|
||||
referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h3 id='卸载apk'>卸载Apk</h3>
|
||||
<h4 id='方法一-2'>方法一</h4>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击浏览按钮,找到想要卸载的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>提示“操作完成”,卸载完成 <br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h4 id='方法二-2'>方法二</h4>
|
||||
<ol start=''>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>提示“操作完成”,卸载完成<br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h3 id='查询apk信息'>查询Apk信息</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='查看程序评分'>查看程序评分</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息
|
||||
<br>
|
||||
<img src="1-3-1.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>点击“查看程序评分情况”即可查看其他用户对程序的评分</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-4-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='上传用户评分'>上传用户评分</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 </li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"> </p>
|
||||
<ol start='2'>
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='3'>
|
||||
<li>点击“上传程序评分情况”,按照要求进行评分</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-5-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='4'>
|
||||
<li>如果提示“提交成功!感谢您的提交”就代表评分成功</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-5-2.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='更新程序'>更新程序</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 </li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='2'>
|
||||
<li>点击“关于”=>“检查更新”,打开更新窗口</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-6-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='3'>
|
||||
<li><strong>保证您的电脑没有运行其它Python应用以及本程序所有工作都已经完成</strong>,再点击“更新(更新过程中会关闭所有Python应用,包括这个应用)”,输入密码以进行更新</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-6-2.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='4'>
|
||||
<li>提示“更新完毕!”后重新启动 UEngine 运行器就更新完毕了</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-6-3.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='保存图标'>保存图标</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 </li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='2'>
|
||||
<li>选择要保存图标的Apk,点击“保存图标”按钮,选择要保存的位置即可</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-7-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='打开已安装的程序列表'>打开已安装的程序列表</h3>
|
||||
<h4 id='方法一-3'>方法一</h4>
|
||||
<p>打开启动器=>UEngine 程序菜单 即可</p>
|
||||
<h4 id='方法二-3'>方法二</h4>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"></li>
|
||||
<li>点击“打开 UEngine 应用列表”即可</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-8-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='将-apk-打包成可以无需本应用即可安装的-deb-包'>将 Apk 打包成可以无需本应用即可安装的 deb 包</h3>
|
||||
<h4 id='打开-uengine-打包器的三种方法'>打开 UEngine 打包器的三种方法</h4>
|
||||
<h5 id='方法一-4'>方法一</h5>
|
||||
<p>启动器=>UEngine 应用打包器</p>
|
||||
<h5 id='方法二-4'>方法二</h5>
|
||||
<p>打开要打包的 Apk 所在目录,右击=>“打开方式”=>“打包 deb(UEngine 运行器)”(接下来可以略过步骤一)</p>
|
||||
<p><img src="1-9-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h5 id='方式三'>方式三</h5>
|
||||
<p>打开 UEngine 运行器,点击菜单栏的“UEngine”=>“UEngine 应用打包”</p>
|
||||
<p><img src="1-9-2.png" referrerpolicy="no-referrer"></p>
|
||||
<h4 id='打包-deb'>打包 deb</h4>
|
||||
<ol start=''>
|
||||
<li>打开“UEngine Apk 应用打包器”,点击“浏览按钮”选择apk</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-9-3.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='2'>
|
||||
<li>根据实际情况勾选选项,然后点击“打包”进行打包</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-9-4.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='3'>
|
||||
<li>当提示“打包完成”时,打包完成,可以在桌面(一般是<code>/home/XXX/Desktop</code>)找到您打包的 deb 包,可以双击安装</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-9-5.png" referrerpolicy="no-referrer"></p>
|
||||
<p> <img src="1-9-6.png" referrerpolicy="no-referrer"></p>
|
||||
<p> <img src="1-9-7.png" referrerpolicy="no-referrer"></p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<script>
|
||||
function UpdateTime() {
|
||||
var d = new Date();
|
||||
document.getElementById("time").innerHTML = "©2021~" + d.getFullYear() + " gfdgd xi、为什么您不喜欢熊出没和阿布呢";
|
||||
}
|
||||
</script>
|
||||
<hr>
|
||||
<h1 id="time"> ©2021-2022</h1>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<h1 id="uengine-运行器帮助">UEngine 运行器帮助</h1>
|
||||
<hr>
|
||||
<h2 id="帮助简述">帮助简述</h2>
|
||||
<blockquote>
|
||||
<p>安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮<br>卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。<br>保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可<br>重置(删除)UEngine数据:点击菜单栏的“UEngine”的“清空UEngine数据”,输入密码重启即可<br>注意:如果任何安卓一遍打不开,多打开几遍应该就可以重新加载UEngine配置了<br>打开UEngine应用列表:打开系统已安装的应用列表(安卓界面)<br><strong>提示:</strong><br><strong>※1、近期升级的 UEngine 安装时会自动把要安装的 apk 删除,如果这个 apk 文件非常重要请拷贝一个备份版并安装这个备份版</strong><br><strong>2、需要你有使用 root 权限的能力;</strong><br><strong>3、需要安装 UEngine 才能使用;</strong><br><strong>4、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;</strong><br><strong>5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)</strong> </p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h2 id="常见问题">常见问题</h2>
|
||||
<h3 id="出现如下图的情况如何修复?">出现如下图的情况如何修复?</h3>
|
||||
<p><img src="2-1-1.png" alt=""><br>出于安全考虑,您的平板电脑已设置为禁止安装来源不明的应用。 </p>
|
||||
<h4 id="修复方法">修复方法</h4>
|
||||
<ol>
|
||||
<li>打开“UEngine 程序列表”,打开设置<br><img src="2-1-2.png" alt=""> </li>
|
||||
<li>找到“安全”<br><img src="2-1-3.png" alt=""> </li>
|
||||
<li>开启“允许安装来自未知来源的应用”<br><img src="2-1-4.png" alt=""> </li>
|
||||
<li>点击确认即可<br><img src="2-1-5.png" alt=""></li>
|
||||
</ol>
|
||||
<h2 id="详细帮助">详细帮助</h2>
|
||||
<h3 id="如何安装自己的-apk">如何安装自己的 Apk</h3>
|
||||
<p><em>请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限</em></p>
|
||||
<h4 id="方法一">方法一</h4>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器<br><img src="1-1-1.png" alt=""> </li>
|
||||
<li>点击浏览按钮,找到想要安装的Apk<br><img src="1-1-2.png" alt=""> </li>
|
||||
<li>点击安装按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br><img src="1-1-4.png" alt=""><br><img src="1-1-5.png" alt=""></li>
|
||||
</ol>
|
||||
<h4 id="方法二">方法二</h4>
|
||||
<ol>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br><img src="1-2-1.png" alt=""> </li>
|
||||
<li>点击安装按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br><img src="1-1-4.png" alt=""><br><img src="1-2-2.png" alt=""></li>
|
||||
</ol>
|
||||
<h3 id="卸载apk">卸载Apk</h3>
|
||||
<h4 id="方法一-1">方法一</h4>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器<br><img src="1-1-1.png" alt=""> </li>
|
||||
<li>点击浏览按钮,找到想要卸载的Apk<br><img src="1-1-2.png" alt=""> </li>
|
||||
<li>点击卸载按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,卸载完成<br><img src="1-1-4.png" alt=""></li>
|
||||
</ol>
|
||||
<h4 id="方法二-1">方法二</h4>
|
||||
<ol>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br><img src="1-2-1.png" alt=""> </li>
|
||||
<li>点击卸载按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,卸载完成<br><img src="1-1-4.png" alt=""></li>
|
||||
</ol>
|
||||
<h3 id="查询apk信息">查询Apk信息</h3>
|
||||
<ol>
|
||||
<li><p>打开 UEngine 运行器<br> <img src="1-1-1.png" alt=""> </p>
|
||||
</li>
|
||||
<li><p>点击“Apk 信息” 按钮即可查询Apk信息</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" alt=""></p>
|
||||
<h3 id="查看程序评分">查看程序评分</h3>
|
||||
<ol>
|
||||
<li><p>打开 UEngine 运行器<br> <img src="1-1-1.png" alt=""> </p>
|
||||
</li>
|
||||
<li><p>点击“Apk 信息” 按钮即可查询Apk信息
|
||||
<img src="1-3-1.png" alt=""></p>
|
||||
</li>
|
||||
<li><p>点击“查看程序评分情况”即可查看其他用户对程序的评分</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p> <img src="1-4-1.png" alt=""></p>
|
||||
<h3 id="上传用户评分">上传用户评分</h3>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器</li>
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" alt=""> </p>
|
||||
<ol start="2">
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息</li>
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" alt=""></p>
|
||||
<ol start="3">
|
||||
<li>点击“上传程序评分情况”,按照要求进行评分</li>
|
||||
</ol>
|
||||
<p> <img src="1-5-1.png" alt=""></p>
|
||||
<ol start="4">
|
||||
<li>如果提示“提交成功!感谢您的提交”就代表评分成功</li>
|
||||
</ol>
|
||||
<p> <img src="1-5-2.png" alt=""></p>
|
||||
<h3 id="更新程序">更新程序</h3>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器</li>
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" alt=""></p>
|
||||
<ol start="2">
|
||||
<li>点击“关于”=>“检查更新”,打开更新窗口</li>
|
||||
</ol>
|
||||
<p> <img src="1-6-1.png" alt=""></p>
|
||||
<ol start="3">
|
||||
<li><strong>保证您的电脑没有运行其它Python应用以及本程序所有工作都已经完成</strong>,再点击“更新(更新过程中会关闭所有Python应用,包括这个应用)”,输入密码以进行更新</li>
|
||||
</ol>
|
||||
<p> <img src="1-6-2.png" alt=""></p>
|
||||
<ol start="4">
|
||||
<li>提示“更新完毕!”后重新启动 UEngine 运行器就更新完毕了</li>
|
||||
</ol>
|
||||
<p> <img src="1-6-3.png" alt=""></p>
|
||||
<h3 id="保存图标">保存图标</h3>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器</li>
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" alt=""></p>
|
||||
<ol start="2">
|
||||
<li>选择要保存图标的Apk,点击“保存图标”按钮,选择要保存的位置即可</li>
|
||||
</ol>
|
||||
<p> <img src="1-7-1.png" alt=""></p>
|
||||
<h3 id="打开已安装的程序列表">打开已安装的程序列表</h3>
|
||||
<h4 id="方法一-2">方法一</h4>
|
||||
<p>打开启动器=>UEngine 程序菜单 即可</p>
|
||||
<h4 id="方法二-2">方法二</h4>
|
||||
<ol>
|
||||
<li><p>打开 UEngine 运行器<br> <img src="1-1-1.png" alt=""></p>
|
||||
</li>
|
||||
<li><p>点击“打开 UEngine 应用列表”即可</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p> <img src="1-8-1.png" alt=""></p>
|
||||
<h3 id="将-apk-打包成可以无需本应用即可安装的-deb-包">将 Apk 打包成可以无需本应用即可安装的 deb 包</h3>
|
||||
<h4 id="打开-uengine-打包器的三种方法">打开 UEngine 打包器的三种方法</h4>
|
||||
<h5 id="方法一-3">方法一</h5>
|
||||
<p>启动器=>UEngine 应用打包器</p>
|
||||
<h5 id="方法二-3">方法二</h5>
|
||||
<p>打开要打包的 Apk 所在目录,右击=>“打开方式”=>“打包 deb(UEngine 运行器)”(接下来可以略过步骤一)</p>
|
||||
<p><img src="1-9-1.png" alt=""></p>
|
||||
<h5 id="方式三">方式三</h5>
|
||||
<p>打开 UEngine 运行器,点击菜单栏的“UEngine”=>“UEngine 应用打包”</p>
|
||||
<p><img src="1-9-2.png" alt=""></p>
|
||||
<h4 id="打包-deb">打包 deb</h4>
|
||||
<ol>
|
||||
<li>打开“UEngine Apk 应用打包器”,点击“浏览按钮”选择apk</li>
|
||||
</ol>
|
||||
<p> <img src="1-9-3.png" alt=""></p>
|
||||
<ol start="2">
|
||||
<li>根据实际情况勾选选项,然后点击“打包”进行打包</li>
|
||||
</ol>
|
||||
<p> <img src="1-9-4.png" alt=""></p>
|
||||
<ol start="3">
|
||||
<li>当提示“打包完成”时,打包完成,可以在桌面(一般是<code>/home/XXX/Desktop</code>)找到您打包的 deb 包,可以双击安装</li>
|
||||
</ol>
|
||||
<p> <img src="1-9-5.png" alt=""></p>
|
||||
<p> <img src="1-9-6.png" alt=""></p>
|
||||
<p> <img src="1-9-7.png" alt=""></p>
|
||||
<hr/>
|
||||
<h1 id="time">©2021-2023 gfdgd xi、为什么您不喜欢熊出没和阿布呢</h1>
|
||||
<script>
|
||||
function UpdateTime() {
|
||||
var d = new Date();
|
||||
document.getElementById("time").innerHTML = "©2021~" + d.getFullYear() + " gfdgd xi、为什么您不喜欢熊出没和阿布呢";
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,18 +15,32 @@
|
||||
> **5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)**
|
||||
|
||||
---
|
||||
## 常见问题
|
||||
### 出现如下图的情况如何修复?
|
||||

|
||||
出于安全考虑,您的平板电脑已设置为禁止安装来源不明的应用。
|
||||
#### 修复方法
|
||||
1. 打开“UEngine 程序列表”,打开设置
|
||||

|
||||
2. 找到“安全”
|
||||

|
||||
3. 开启“允许安装来自未知来源的应用”
|
||||

|
||||
4. 点击确认即可
|
||||

|
||||
|
||||
## 详细帮助
|
||||
### 如何安装自己的 Apk
|
||||
*请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限*
|
||||
#### 方法一
|
||||
1. 打开 UEngine 运行器
|
||||

|
||||
2. 点击浏览按钮,找到想要安装的Apk
|
||||
2. 点击浏览按钮,找到想要安装的Apk
|
||||

|
||||
3. 点击安装按钮,输入密码
|
||||
3. 点击安装按钮,输入密码
|
||||

|
||||
4. 提示“操作完成”,在启动器找到新安装的图标启动即可
|
||||

|
||||
4. 提示“操作完成”,在启动器找到新安装的图标启动即可
|
||||

|
||||

|
||||
#### 方法二
|
||||
1. 打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)
|
||||
@@ -57,7 +71,7 @@
|
||||
|
||||
### 查询Apk信息
|
||||
1. 打开 UEngine 运行器
|
||||

|
||||

|
||||
|
||||
2. 点击“Apk 信息” 按钮即可查询Apk信息
|
||||
|
||||
@@ -189,5 +203,6 @@
|
||||
|
||||
|
||||
|
||||
--------
|
||||
|
||||
©2021-2022
|
||||
# ©2021-2023 gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
22
Help/information/index.html
Executable file
@@ -0,0 +1,22 @@
|
||||
<head>
|
||||
<title>Wine 运行器程序公告</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>RacoonGX 团队招新了!</h3>
|
||||
<p>这是由@gfdgd xi带头的团队,gfdgd xi开发了UEngine运行器等好用的开源软件。</p>
|
||||
<p>只要你想加入RacoonGX团队,那么你就可以联系Allen</p>
|
||||
<p>基本上没有任何限制。只要你会电脑懂一些计算机知识,你就可以来!</p>
|
||||
<p>联系方式:</p>
|
||||
<p>邮件:DX-Allen@outlook.com</p>
|
||||
<p>qq:2849413304</p>
|
||||
<p>微信:HarryPotter-HGWC</p>
|
||||
<hr/>
|
||||
<h3>UEngine 运行器暂时在 Deepin/UOS 官方应用商店下架</h3>
|
||||
<p>暂时因为依赖缺失问题导致下载,当前还可以从星火应用商店或Gitee/Github/Gitlink等平台下载</p>
|
||||
<hr/>
|
||||
<h1>常见链接</h1>
|
||||
<p>程序论坛:<a href="https://gfdgdxi.flarum.cloud/">https://gfdgdxi.flarum.cloud/</a></p>
|
||||
<p>星火应用商店:<a href="https://spark-app.store/">https://spark-app.store/</a></p>
|
||||
<hr/>
|
||||
<p align="center"><img src="https://gitee.com/gfdgd-xi/uengine-runner/widgets/widget_card.svg?colors=eae9d7,2e2f29,272822,484a45,eae9d7,747571"></p>
|
||||
</body>
|
||||
81
Icon/BadStar.svg
Executable file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 67.733331 67.733331"
|
||||
version="1.1"
|
||||
id="svg3719"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="BadStar.svg">
|
||||
<defs
|
||||
id="defs3713" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4"
|
||||
inkscape:cx="2.1794989"
|
||||
inkscape:cy="208.04937"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="836"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3716">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-229.26667)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
id="path3737"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="151.91904"
|
||||
sodipodi:cy="166.98949"
|
||||
sodipodi:r1="158.97482"
|
||||
sodipodi:r2="79.487411"
|
||||
sodipodi:arg1="-0.32926921"
|
||||
sodipodi:arg2="0.29904932"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 302.35356,115.58473 -74.475,74.82269 19.41613,103.76885 L 153.12004,246.46782 60.429914,297 76.701777,192.69187 -6.9307488e-6,120.15362 104.23121,103.39609 149.51703,8.0328112 197.6636,101.98423 Z"
|
||||
inkscape:transform-center-x="0.16628225"
|
||||
inkscape:transform-center-y="-3.3924633"
|
||||
style="fill:none;stroke-width:11.54627375;stroke:#000000;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
transform="matrix(0.22402028,0,0,0.234398,-5.3781204e-6,227.3838)" />
|
||||
<path
|
||||
style="fill:none;stroke:#db0000;stroke-width:4.17411947;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 4.6835638,237.71432 60.365607,288.71648"
|
||||
id="path4588"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Icon/QR-WeChat.png
Executable file
|
After Width: | Height: | Size: 40 KiB |
BIN
Icon/QR-ZhiFuBao.png
Executable file
|
After Width: | Height: | Size: 717 KiB |
76
Icon/Star.svg
Executable file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 67.733331 67.733331"
|
||||
version="1.1"
|
||||
id="svg3719"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="Star.svg">
|
||||
<defs
|
||||
id="defs3713" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4"
|
||||
inkscape:cx="2.1794989"
|
||||
inkscape:cy="208.04937"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="836"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3716">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-229.26667)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
id="path3737"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="151.91904"
|
||||
sodipodi:cy="166.98949"
|
||||
sodipodi:r1="158.97482"
|
||||
sodipodi:r2="79.487411"
|
||||
sodipodi:arg1="-0.32926921"
|
||||
sodipodi:arg2="0.29904932"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 302.35356,115.58473 -74.475,74.82269 19.41613,103.76885 L 153.12004,246.46782 60.429914,297 76.701777,192.69187 -6.9307488e-6,120.15362 104.23121,103.39609 149.51703,8.0328112 197.6636,101.98423 Z"
|
||||
inkscape:transform-center-x="0.15367302"
|
||||
inkscape:transform-center-y="-3.1244574"
|
||||
style="fill:#ffff00;stroke:#000000;stroke-width:11.54627419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(0.20703169,0,0,0.21588,2.5808914,230.58088)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
76
Icon/UnStar.svg
Executable file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 67.733331 67.733331"
|
||||
version="1.1"
|
||||
id="svg3719"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="UnStar.svg">
|
||||
<defs
|
||||
id="defs3713" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="-87.142857"
|
||||
inkscape:cy="560"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="836"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3716">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-229.26667)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
id="path3737"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="151.91904"
|
||||
sodipodi:cy="166.98949"
|
||||
sodipodi:r1="158.97482"
|
||||
sodipodi:r2="79.487411"
|
||||
sodipodi:arg1="-0.32926921"
|
||||
sodipodi:arg2="0.29904932"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 302.35356,115.58473 -74.475,74.82269 19.41613,103.76885 L 153.12004,246.46782 60.429914,297 76.701777,192.69187 -6.9307488e-6,120.15362 104.23121,103.39609 149.51703,8.0328112 197.6636,101.98423 Z"
|
||||
inkscape:transform-center-x="0.16628225"
|
||||
inkscape:transform-center-y="-3.3924633"
|
||||
style="fill:none;stroke-width:11.54627375;stroke:#000000;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
transform="matrix(0.22402028,0,0,0.234398,-5.3781204e-6,227.3838)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
BIN
Icon/doge.png
Executable file
|
After Width: | Height: | Size: 11 KiB |
37
Makefile
@@ -1,5 +1,13 @@
|
||||
build:
|
||||
echo 别云间
|
||||
echo 三年羁旅客,今日又南冠。
|
||||
echo 无限山河泪,谁言天地宽。
|
||||
echo 已知泉路近,欲别故乡难。
|
||||
echo 毅魄归来日,灵旗空际看。
|
||||
echo
|
||||
echo 译文:三年为抗清兵东走西飘荡,今天兵败被俘作囚入牢房。无限美好河山失陷伤痛泪,谁还敢说天庭宽阔地又广。已经知道黄泉之路相逼近,想到永别故乡实在心犯难。鬼雄魂魄等到归来那一日,灵旗下面要将故乡河山看。
|
||||
echo "Build DEB..."
|
||||
cp -rv uengine-loading-ubuntu.desktop new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv information.json new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv mainwindow.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner
|
||||
cp -rv Language.json new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
@@ -19,8 +27,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.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/
|
||||
@@ -28,17 +36,36 @@ build:
|
||||
cp -rv getxmlimg.py 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 builer.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv uengine-apk-builder-more new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv api new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv Help new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
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
|
||||
dpkg -b new-deb-build com.gitee.uengine.runner.spark.deb
|
||||
cp -rv AutoShell new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv AutoConfig.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv Model 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/
|
||||
cp -rv ProgramFen.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv Icon new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
rm -rfv new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Help/information
|
||||
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
|
||||
sudo dpkg -b /tmp/uengine-runner-builder com.gitee.uengine.runner.spark.deb
|
||||
sudo rm -rfv /tmp/uengine-runner-builder
|
||||
|
||||
install:
|
||||
make build
|
||||
echo "Install..."
|
||||
sudo apt update
|
||||
sudo dpkg -i com.gitee.uengine.runner.spark.deb ; true
|
||||
sudo apt install -f
|
||||
#sudo dpkg -i com.gitee.uengine.runner.spark.deb | true
|
||||
#sudo apt install -f
|
||||
sudo apt reinstall ./com.gitee.uengine.runner.spark.deb
|
||||
sudo rm com.gitee.uengine.runner.spark.deb
|
||||
|
||||
depend:
|
||||
sudo apt install python3 python3-tk python3-pip aapt \
|
||||
|
||||
38
Model/__init__.py
Executable file
@@ -0,0 +1,38 @@
|
||||
import os
|
||||
import sys
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
def OpenTerminal(command):
|
||||
if terminalEnd[terminal][1]:
|
||||
os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" \"{command}\"")
|
||||
print(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" \"{command}\"")
|
||||
return
|
||||
os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" {command}")
|
||||
print(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" {command}")
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# 对终端的获取
|
||||
# 优先为深度终端
|
||||
terminal = ""
|
||||
terminalList = [
|
||||
"deepin-terminal",
|
||||
"mate-terminal",
|
||||
"gnome-terminal",
|
||||
"xfce4-terminal"
|
||||
]
|
||||
terminalEnd = {
|
||||
f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0],
|
||||
"mate-terminal": ["-e", 1],
|
||||
"gnome-terminal": ["--", 0],
|
||||
"xfce4-terminal": ["-e", 1]
|
||||
}
|
||||
for i in terminalList:
|
||||
if not os.system(f"which {i}"):
|
||||
if i == "deepin-terminal":
|
||||
i = f"{programPath}/../launch.sh\" \"deepin-terminal"
|
||||
terminal = i
|
||||
break
|
||||
if terminal == "":
|
||||
print("无法识别到以下的任意一个终端")
|
||||
print(" ".join(terminalList))
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
QtWidgets.QMessageBox.critical(None, "错误", "无法识别到以下的任意一个终端\n" + " ".join(terminalList))
|
||||
exit()
|
||||
BIN
Model/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
Model/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
Model/__pycache__/__init__.cpython-37.pyc
Normal file
131
ProgramFen.py
Executable file
@@ -0,0 +1,131 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import base64
|
||||
import traceback
|
||||
import requests
|
||||
import PyQt5.QtGui as QtGui
|
||||
import PyQt5.QtCore as QtCore
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
|
||||
print("""十五从军征
|
||||
十五从军征,八十始得归。道逢乡里人:家中有阿谁?
|
||||
遥看是君家,松柏冢累累。兔从狗窦入,雉从梁上飞。
|
||||
中庭生旅谷,井上生旅葵。舂谷持作饭,采葵持作羹。
|
||||
羹饭一时熟,不知饴阿谁!出门东向看,泪落沾我衣。""")
|
||||
print("")
|
||||
print("""译文:刚满十五岁的少年就出去打仗,到了八十岁才回来。路遇一个乡下的邻居,问:“我家里还有什么人?”你家那个地方,现在已是松树柏树林中的一片坟墓。走到家门前看见野兔从狗洞里出进,野鸡在屋脊上飞来飞去。院子里长着野生的谷子,野生的葵菜环绕着井台。用捣掉壳的野谷来做饭,摘下葵叶来煮汤。汤和饭一会儿都做好了,却不知赠送给谁吃。走出大门向着东方张望,老泪纵横,洒落在征衣上。""")
|
||||
print("================================")
|
||||
|
||||
class ProgramRunStatusShow():
|
||||
msgWindow = None
|
||||
def ShowWindow():
|
||||
try:
|
||||
fenlists = []
|
||||
for i in range(6):
|
||||
fenlists.append(int(requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Zlbi1VRW5naW5lL0Zlbg==").decode("utf-8") + f"{i}.txt").text))
|
||||
tipsInfo = ""
|
||||
except:
|
||||
traceback.print_exc()
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
|
||||
|
||||
maxHead = fenlists.index(max(fenlists))
|
||||
allNumber = 0
|
||||
for i in fenlists:
|
||||
allNumber += i
|
||||
try:
|
||||
#tipsInfo = ""
|
||||
for i in range(len(fenlists)):
|
||||
# 显示整数
|
||||
tipsInfo += f"有 {int(fenlists[i] / allNumber * 100)}% 的用户选择了 {i} 分({fenlists[i]}/{allNumber})\n"
|
||||
maxNumber = int(max(fenlists) / allNumber * 100)
|
||||
#if tipsInfo == "":
|
||||
# tipsInfo = f"有{maxNumber}%的用户选择了这个评分"
|
||||
except:
|
||||
pass
|
||||
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
starLayout = QtWidgets.QHBoxLayout()
|
||||
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况"))
|
||||
uploadButton.clicked.connect(ProgramRunStatusUpload.ShowWindow)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0)
|
||||
msgWidgetLayout.addLayout(starLayout, 0, 1)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2)
|
||||
msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2)
|
||||
end = 5
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>"))
|
||||
else:
|
||||
for i in range(maxHead):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>"))
|
||||
head = maxHead
|
||||
for i in range(head, end):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>"))
|
||||
msgWidget.setLayout(msgWidgetLayout)
|
||||
ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
|
||||
ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ProgramRunStatusShow.msgWindow.setWindowTitle(f"程序运行情况")
|
||||
ProgramRunStatusShow.msgWindow.show()
|
||||
|
||||
class ProgramRunStatusUpload():
|
||||
msgWindow = None
|
||||
starLayout = None
|
||||
fen = None
|
||||
starList = []
|
||||
sha1Value = ""
|
||||
programName = None
|
||||
def ChangeStar():
|
||||
if ProgramRunStatusUpload.fen.currentIndex() > 5:
|
||||
for i in ProgramRunStatusUpload.starList:
|
||||
i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>")
|
||||
return
|
||||
for i in range(ProgramRunStatusUpload.fen.currentIndex()):
|
||||
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>")
|
||||
head = ProgramRunStatusUpload.fen.currentIndex()
|
||||
end = len(ProgramRunStatusUpload.starList)
|
||||
for i in range(head, end):
|
||||
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>")
|
||||
|
||||
def ShowWindow():
|
||||
ProgramRunStatusUpload.starList = []
|
||||
ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow(ProgramRunStatusShow.msgWindow)
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
|
||||
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
|
||||
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
|
||||
upload.clicked.connect(ProgramRunStatusUpload.Upload)
|
||||
# 生成星星列表
|
||||
for i in [1, 1, 1, 1, 1]:
|
||||
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
|
||||
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
|
||||
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
|
||||
ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"])
|
||||
ProgramRunStatusUpload.fen.setCurrentIndex(5)
|
||||
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0)
|
||||
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
|
||||
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
|
||||
msgWidgetLayout.addWidget(upload, 3, 1)
|
||||
msgWidget.setLayout(msgWidgetLayout)
|
||||
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
|
||||
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
|
||||
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ProgramRunStatusUpload.msgWindow.show()
|
||||
|
||||
def Upload():
|
||||
try:
|
||||
QtWidgets.QMessageBox.information(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}-UEngine").json()["Error"])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
ProgramRunStatusShow.ShowWindow()
|
||||
app.exec_()
|
||||
556
README.md
@@ -1,43 +1,96 @@
|
||||
<p width=100px align="center"><img src="runner.svg"></p>
|
||||
<h1 align="center">UEngine 运行器 1.8.2</h1>
|
||||
<hr>
|
||||
|
||||
### 介绍
|
||||
<p width=100px align="center"><img src="runner.svg"></p>
|
||||
<h1 align="center">UEngine 运行器 2.0.0</h1>
|
||||
<hr>
|
||||
<p align='center'><a href='https://gitee.com/gfdgd-xi/uengine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi/uengine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
|
||||
<a href='https://gitee.com/gfdgd-xi/uengine-runner/members'><img src='https://gitee.com/gfdgd-xi/uengine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a>
|
||||
|
||||
## 介绍
|
||||
|
||||
新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。
|
||||

|
||||

|
||||
|
||||
(测试平台:UOS 家庭版 21.3.1,deepin 20.8,UOS 专业版 1050)
|
||||
|
||||
## 程序相关网站
|
||||
作者个人站:https://gfdgd-xi.gitee.io
|
||||
程序论坛:http://bbs.racoongx.cn
|
||||
查询 APK 运行情况:https://gfdgd-xi.gitee.io/uengine-runner-info/
|
||||
星火应用商店:https://spark-app.store/
|
||||
星火社区:https://www.deepinos.org
|
||||
Deepin 官网:https://www.deepin.org
|
||||
Deepin 论坛:https://bbs.deepin.org
|
||||
|
||||
(测试平台:UOS 家庭版 21.3.1,deepin 20.6,UOS 专业版 1050)
|
||||
|
||||
## 安装前必读
|
||||
## 安装前必读
|
||||
|
||||
+ **UEngine 安装时会自动把要安装的 apk 删除**,如果这个 apk 文件非常重要请**拷贝一个备份版并安装这个备份版或者在程序设置里面选择“备份APK包然后在安装后自动拷贝原先目录”选项**
|
||||

|
||||
|
||||
## 如何升级至最新版本
|
||||
### 一、使用星火应用商店更新到最新版本
|
||||
**1、打开星火应用商店并打开到对应的界面,点击“升级”**
|
||||

|
||||

|
||||
|
||||
## 如何升级至最新版本
|
||||
|
||||
### 一、使用星火应用商店更新到最新版本
|
||||
|
||||
**1、打开星火应用商店并打开到对应的界面,点击“升级”**
|
||||

|
||||
**2、然后安装**
|
||||

|
||||
**3、结束**
|
||||
### 二、通过源更新(需要添加星火应用商店源)
|
||||

|
||||
**3、结束**
|
||||
|
||||
### 二、通过源更新(需要添加星火应用商店源)
|
||||
|
||||
输入以下命令即可:
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||

|
||||
### 三、使用程序自带的更新程序更新
|
||||
**1、打开 UEngine 运行器然后点击“关于”=>“检查更新”,点击“更新(更新过程中会关闭所有Python应用,包括这个应用)”**
|
||||

|
||||
**2、输入密码进行更新**
|
||||

|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 三、使用程序自带的更新程序更新
|
||||
|
||||
**1、打开 UEngine 运行器然后点击“关于”=>“检查更新”,点击“更新(更新过程中会关闭所有Python应用,包括这个应用)”**
|
||||

|
||||
**2、输入密码进行更新**
|
||||

|
||||
**3、提示更新完毕即可**
|
||||

|
||||
|
||||
|
||||
|
||||
### 更新内容
|
||||
#### V1.8.2(2022年11月28日)
|
||||

|
||||
|
||||
### 更新内容
|
||||
#### V2.0.0(2023年01月22日,新春版)
|
||||
**※1、内置微型应用商店,支持评论、评分功能;**
|
||||
**※2、修复 UEngine 安装器在 Wayland 下无法正常运行的问题;**
|
||||
**※3、更新 UEngine 安装器安装的 UEngine 版本;**
|
||||
**※4、修复 UEngine 安装器安装后的 UEngine 无法正常安装 APK 的问题(包括从运行器和 deb 包安装);**
|
||||
**※5、UEngine 安装器支持安装使用 SuperSU Root 的镜像;**
|
||||
**※6、UEngine 安装器安装后的 UEngine 支持开机后自动加载运行环境,无需人手动打开终端运行;**
|
||||
**※7、放开原先程序内的程序安装量查询功能,并新增打开量查询功能(在程序的关于窗口里打开);**
|
||||
**※8、程序更新时不需要关闭所有 Python3 程序,只会关闭自己;**
|
||||
**※9、新增彩蛋(只在2023年1月22日生效);**
|
||||
**※10、修复 UEngine 打包器在部分系统无法打开的问题;**
|
||||
**※11、新增程序公告功能;**
|
||||
**※12、修复了程序更新功能从高版本降级到低版本的问题;**
|
||||
**※13、不强制依赖 Deepin 终端;**
|
||||
**※14、新增 UEngine 打包器(高级版);**
|
||||
15、更改程序论坛网址;
|
||||
16、新增程序评分功能;
|
||||
17、修复 UEngine 打包器在打包时无法正确禁用所有选项;
|
||||
18、UEngine 打包器打包的 deb 不再指定 `deepin-elf-verify` 依赖版本;
|
||||
19、“更多帮助”功能支持访问云端的帮助内容;
|
||||
20、更换程序接口;
|
||||
21、优化菜单栏分类,菜单栏新增图标;
|
||||
22、程序关于可以查看程序使用的开源协议;
|
||||
23、修复在 Ubuntu 下安装后启动器没有图标的问题。
|
||||

|
||||
|
||||
#### V1.8.3(2022年12月18日)
|
||||
**※1、修复安装/打包程序时出现找不到图标的问题;**
|
||||
**※2、修复部分无法正确获取程序中文名和 Activity 的问题;**
|
||||
**※3、修复在运行器内打开打包器不会自动填充打包器 APK 路径;**
|
||||
**※4、问题反馈新增论坛反馈入口。**
|
||||

|
||||
|
||||
#### V1.8.2(2022年11月28日)
|
||||
|
||||
**※1、重新恢复 uengine-installer For Ubuntu**
|
||||
**※2、修复 postrm 的问题**
|
||||
**※3、修复“添加UEngine应用快捷方式出现问题”的问题**
|
||||
@@ -45,66 +98,71 @@ sudo apt upgrade
|
||||
**※5、打包器默认勾选“使用 uengine-dc 前缀”**
|
||||
6、修复Python主版本号判断时潜在的问题(By Bail)
|
||||
7、新增部分资源入口
|
||||

|
||||
|
||||
#### V1.8.1-1(2022年09月03日)
|
||||
**※1、修复缺失依赖 python3-matplotlib 导致程序无法开启的问题**
|
||||
**※2、移除在 Ubuntu 上用于安装 UEngine 的安装工具**
|
||||
**※3、解决了未输入密码自动回车的 bug**
|
||||
|
||||
#### V1.8.1(2022年08月30日)
|
||||
**※1、修复在 APK 详细信息中图标可能过大导致无法正常使用的问题**
|
||||
**※2、修复 APK 路径带空格无法正常安装的问题**
|
||||
3、修复打包器打包的 APK 带下划线“_”无法正常打包的问题
|
||||
4、修复打包器下方命令返回过多空白行的问题
|
||||
5、修复程序生成的默认图标任然是旧版图标的问题
|
||||

|
||||
|
||||
#### V1.8.1-1(2022年09月03日)
|
||||
|
||||
**※1、修复缺失依赖 python3-matplotlib 导致程序无法开启的问题**
|
||||
**※2、移除在 Ubuntu 上用于安装 UEngine 的安装工具**
|
||||
**※3、解决了未输入密码自动回车的 bug**
|
||||
|
||||
#### V1.8.1(2022年08月30日)
|
||||
|
||||
**※1、修复在 APK 详细信息中图标可能过大导致无法正常使用的问题**
|
||||
**※2、修复 APK 路径带空格无法正常安装的问题**
|
||||
3、修复打包器打包的 APK 带下划线“_”无法正常打包的问题
|
||||
4、修复打包器下方命令返回过多空白行的问题
|
||||
5、修复程序生成的默认图标任然是旧版图标的问题
|
||||

|
||||
|
||||
#### V1.8.0(2022年07月27日)
|
||||
**※1、程序界面大部分由 Tkinter 转 PyQt5**
|
||||
|
||||
#### V1.8.0(2022年07月27日)
|
||||
|
||||
**※1、程序界面大部分由 Tkinter 转 PyQt5**
|
||||
**※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root)**
|
||||
**※3、增加了安装/卸载失败后的提示**
|
||||
**※4、补回谢明名单**
|
||||
**※5、支持免密安装/卸载 APK**
|
||||
6、pip 更换华为源,提升下载速度
|
||||
7、新增主题功能
|
||||
8、支持在安装 APK 后手动指定分类(手动指定需要在设置里手动开启)
|
||||

|
||||
|
||||
#### V1.7.0(2022年07月08日,暑假开始)
|
||||
7、新增主题功能
|
||||
8、支持在安装 APK 后手动指定分类(手动指定需要在设置里手动开启)
|
||||

|
||||
|
||||
#### V1.7.0(2022年07月08日,暑假开始)
|
||||
|
||||
**※1、新增暗黑主题**
|
||||
**※2、优化 deepin-terminal 在其它发行版显示奇奇怪怪的问题**
|
||||
**※3、修复 UEngine 安装脚本在安装时不让用户选择,直接默认 N 无法安装的问题**
|
||||
4、新增设置 UEngine 代理的功能
|
||||
5、将执行命令和打包器的返回输出从命令结束后显示输出内容改为实时显示内容
|
||||

|
||||
|
||||
#### V1.6.2(2022年06月21日,中考假期+即将期末考试)
|
||||
**※1、优化了 UEngine 运行器的英语翻译**
|
||||

|
||||
|
||||
#### V1.6.2(2022年06月21日,中考假期+即将期末考试)
|
||||
|
||||
**※1、优化了 UEngine 运行器的英语翻译**
|
||||
**※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)**
|
||||
**※3、新增加了 UEngine 的 Ubuntu 安装程序**
|
||||
**※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)**
|
||||
**※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)**
|
||||
5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题
|
||||
6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题
|
||||

|
||||
|
||||
|
||||
#### V1.6.1(2022年05月21日,521)
|
||||

|
||||
|
||||
#### V1.6.1(2022年05月21日,521)
|
||||
|
||||
**※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题**
|
||||
**※2、提供新版本的 UEngine Root 镜像**
|
||||
**※3、更新了 UEngine Root 的下载地址**
|
||||
**※4、修复了本程序的“UEngine 键盘映射”无法启动的问题**
|
||||
5、把构建 UEngine Root 镜像修改为多线程下载(wget=>aria2)
|
||||
6、提供了 UEngine 运行器的 API(可以从项目地址中获取)
|
||||
7、补上遗漏的项目参与者“星空露光”,新加参与者
|
||||
7、补上遗漏的项目参与者“星空露光”,新加参与者
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
#### V1.6.0(开学版,开学前一天完成)
|
||||
|
||||
#### V1.6.0(开学版,开学前一天完成)
|
||||
|
||||
**※1、更换了新的图标已完成(感谢[@星空露光](https://gitee.com/Cynorkyle))**
|
||||
**※2、支持程序的评分和查看分数详情的功能**
|
||||
**※3、修复了在安装奇奇怪怪的安装包(如格式、标识不正确的)时的快捷方式图标为空以及快捷方式文本的变化**
|
||||
@@ -113,39 +171,48 @@ sudo apt upgrade
|
||||
6、新填彩蛋(在“关于”=>“关于”显示的窗口双击“关于”开启)
|
||||
7、修复了“UEngine 打包器”前缀选项勾选设置不生效的问题
|
||||
8、修复了“UEngine 打包器” 打包的安装包版本号带 V 无法打包的情况
|
||||

|
||||
|
||||
#### V1.5.3(2021-12-12,DDUC11版):
|
||||
##### 更新内容
|
||||

|
||||
|
||||
#### V1.5.3(2021-12-12,DDUC11版):
|
||||
|
||||
##### 更新内容
|
||||
|
||||
**※1、修复了在 UOS 家庭版安装 apk 文件安装包信息为 None 的问题**
|
||||
**※2、“添加/删除 UEngine 图标”窗口的写入按钮在目录**`~/.local/share/icons/hicolor/256x256/apps`**不存在时点击无反应,参考报错1.5.3-1**
|
||||
**※3、修复了“UEngine APK 应用打包器”打包的deb包的.desktop文件的**`Icon`**和**`Exec`**字段有误的问题以及使用“使用前缀‘uengine-dc’”前缀的问题**
|
||||
**※2、“添加/删除 UEngine 图标”窗口的写入按钮在目录** `~/.local/share/icons/hicolor/256x256/apps`**不存在时点击无反应,参考报错1.5.3-1**
|
||||
**※3、修复了“UEngine APK 应用打包器”打包的deb包的.desktop文件的** `Icon`**和** `Exec`**字段有误的问题以及使用“使用前缀‘uengine-dc’”前缀的问题**
|
||||
4、“UEngine APK 应用打包器”支持打包完后自动删除临时目录
|
||||
5、“UEngine APK 应用打包器”以及“添加/删除 UEngine 图标”支持在运行出现错误时显示报错
|
||||
##### 报错:
|
||||
*1.5.3-1*
|
||||
```bash
|
||||
Exception in Tkinter callback
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
|
||||
return self.func(*args)
|
||||
File "/home/gfdgd_xi/Desktop/uengine-runner/main.py", line 865, in SaveDesktopLink
|
||||
shutil.copy(programPath + "/defult.png", iconSavePath)
|
||||
File "/usr/lib/python3.7/shutil.py", line 245, in copy
|
||||
copyfile(src, dst, follow_symlinks=follow_symlinks)
|
||||
File "/usr/lib/python3.7/shutil.py", line 121, in copyfile
|
||||
with open(dst, 'wb') as fdst:
|
||||
FileNotFoundError: [Errno 2] No such file or directory: '/home/gfdgd_xi/.local/share/icons/hicolor/256x256/apps/com.miHoYo.cloudgames.ys.png'
|
||||
```
|
||||
##### 截图
|
||||

|
||||
|
||||
#### V1.5.2(2021-11-28):
|
||||
|
||||
##### 报错:
|
||||
|
||||
*1.5.3-1*
|
||||
|
||||
```bash
|
||||
Exception in Tkinter callback
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
|
||||
return self.func(*args)
|
||||
File "/home/gfdgd_xi/Desktop/uengine-runner/main.py", line 865, in SaveDesktopLink
|
||||
shutil.copy(programPath + "/defult.png", iconSavePath)
|
||||
File "/usr/lib/python3.7/shutil.py", line 245, in copy
|
||||
copyfile(src, dst, follow_symlinks=follow_symlinks)
|
||||
File "/usr/lib/python3.7/shutil.py", line 121, in copyfile
|
||||
with open(dst, 'wb') as fdst:
|
||||
FileNotFoundError: [Errno 2] No such file or directory: '/home/gfdgd_xi/.local/share/icons/hicolor/256x256/apps/com.miHoYo.cloudgames.ys.png'
|
||||
```
|
||||
|
||||
##### 截图
|
||||
|
||||

|
||||
|
||||
#### V1.5.2(2021-11-28):
|
||||
|
||||
**※1、支持安装和构建带 Root 的 UEngine 的镜像**
|
||||
2、更新了反馈链接
|
||||

|
||||
|
||||
#### V1.5.1(2021-10-05,国庆节版):
|
||||
|
||||
#### V1.5.1(2021-10-05,国庆节版):
|
||||
|
||||
**※1、精简用户界面,合并安装和卸载输入框和浏览按钮等**
|
||||
**※2、修复安装以其的程序图标无法点击进入的问题(deepin 社区版不存在此问题)**
|
||||
**※3、支持在程序本体反馈问题**
|
||||
@@ -154,37 +221,42 @@ FileNotFoundError: [Errno 2] No such file or directory: '/home/gfdgd_xi/.local/s
|
||||
6、支持删除 UEngine 程序运行检查以及重新安装 UEngine 的功能
|
||||
7、自带有跳过家庭版必须有指定包名才能运行程序限制的脚本
|
||||
8、补回依赖包“adb”
|
||||

|
||||
|
||||
#### V1.5.0(2021-09-21,中秋节版):
|
||||

|
||||
|
||||
#### V1.5.0(2021-09-21,中秋节版):
|
||||
|
||||
**没有什么实质性的功能,只是开始有多语言支持**
|
||||
**※1、部分窗口支持英语**
|
||||
2、修复在英语状态下启动器图标名称异常的问题
|
||||

|
||||
|
||||
#### V1.4.3(2021-09-11,开学第一版):
|
||||
2、修复在英语状态下启动器图标名称异常的问题
|
||||

|
||||
|
||||
#### V1.4.3(2021-09-11,开学第一版):
|
||||
|
||||
**※1、支持打包器打包的包名带前缀“uengine-dc”**
|
||||
**※2、修复了两种情况可能导致程序卡住/出错无法继续运行的情况(配置文件夹不齐全和获取版本信息卡住两种情况)**
|
||||
**※3、修改了 UEngine 打包器打包的应用包名可能有大写的情况**
|
||||
4、支持一键使用 Scrcpy 连接 UEngine(①先安装 adb 破解补丁;②请确保是使用snap安装的 Scrcpy【目前只支持 snap 安装的 Scrcpy 进行连接】)
|
||||
5、支持右键打包 apk
|
||||

|
||||
|
||||
#### V1.4.2(2021-08-30,快开学了):
|
||||

|
||||
|
||||
#### V1.4.2(2021-08-30,快开学了):
|
||||
|
||||
**※1、添加adb破解补丁(用于可以让adb连接UEngine)并支持adb的部分操作;**
|
||||
2、菜单栏的项目添加以及外观优化;
|
||||
3、修复键盘映射无法添加新映射的问题并修改键盘映射启动方式;
|
||||
4、把 uengine 改为 UEngine;
|
||||
5、修改 pkexec 获取密码时显示的图标和文本;
|
||||
6、添加了 UEngine 系统设置的快捷方式;
|
||||

|
||||
|
||||
#### V1.4.1(2021-08-26):
|
||||

|
||||
|
||||
#### V1.4.1(2021-08-26):
|
||||
|
||||
**※1、初步支持键盘映射**
|
||||
2、修复新版包在发送uengine列表快捷方式时会提示找不到文件
|
||||

|
||||
|
||||
#### V1.4.0(2021-08-19):
|
||||

|
||||
|
||||
#### V1.4.0(2021-08-19):
|
||||
|
||||
**※1、添加新版打包方式(deepin打包方式);**
|
||||
**※2、支持测试运行/创建/删除uengine图标;**
|
||||
**※3、支持提取安装的apk;**
|
||||
@@ -193,163 +265,185 @@ FileNotFoundError: [Errno 2] No such file or directory: '/home/gfdgd_xi/.local/s
|
||||
6、支持打开uengine数据目录和用户数据目录;
|
||||
7、程序信息保存到json,非直接写入程序本体;
|
||||
8、更多命令操作;
|
||||

|
||||
|
||||
#### V1.3.2(2021-08-16):
|
||||

|
||||
|
||||
#### V1.3.2(2021-08-16):
|
||||
|
||||
**※1、支持uengine数据重置;**
|
||||
**※2、支持修改uengine网络桥接的启动状态;**
|
||||
**※3、支持右键安装/卸载;**
|
||||
**※4、支持启用或禁用uengine;**
|
||||
**※5、修复打包问题,不会出现“dpkg:警告:卸载spark-uengine-runner时,目录/opt/apps/uengine-runner非空,因而不会删除该目录”的错误;**
|
||||

|
||||
|
||||
#### V1.3.1(2021-08-12):
|
||||
|
||||
#### V1.3.1(2021-08-12):
|
||||
|
||||
**※1、修复打包问题,防止部分用户安装出错的问题;**
|
||||
**※2、修复了程序无法提取图标时可以提取默认图标使用;**
|
||||

|
||||
|
||||

|
||||
|
||||
#### V1.3.0(2021-08-08):
|
||||
|
||||
**※1、修改了界面布局;**
|
||||
**※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs;**
|
||||
3、删除少量冗余代码,调整代码顺序;
|
||||
4、支持提取 apk 图标。
|
||||

|
||||
|
||||
3、删除少量冗余代码,调整代码顺序;
|
||||
4、支持提取 apk 图标。
|
||||

|
||||
|
||||
#### V1.2.3(2021-08-02):
|
||||
|
||||
1、调整部分控件名称;
|
||||
2、调整界面布局及界面风格;
|
||||

|
||||
|
||||

|
||||
|
||||
#### V1.2.2(2021-07-11):
|
||||
|
||||
1、对程序错误的显示更加人性化;
|
||||
2、对 icon 的获取方式进行了升级;
|
||||
3、增加了注释、删除部分冗余代码。
|
||||

|
||||
|
||||

|
||||
|
||||
#### V1.2.1(2021-07-02):
|
||||
|
||||
**※1、进行了安装方式的修改(不使用 adb),修复原无法安装和卸载的问题;**
|
||||
2、进行了部分优化;
|
||||
3、进行了功能缩水;
|
||||
4、修复 deb 打包错误。
|
||||

|
||||
|
||||

|
||||
|
||||
#### V1.2.0(2021-06-06):
|
||||
|
||||
1、支持安装自动添加快捷方式、卸载删除快捷方式;
|
||||
2、支持使用包名或 APK 文件卸载程序;
|
||||
3、支持查看安装的所有包名;
|
||||
4、进行了部分优化
|
||||

|
||||
|
||||
#### V1.1.0(2021-05-30):
|
||||
1、修改了因编写时出现的中、英文混用的情况
|
||||
2、支持一键连接默认 IP
|
||||
3、修复在不连接设备直接选择 apk 安装时会卡住的问题
|
||||
4、修复在把“uengine 程序菜单”发送到桌面或启动器如果询问覆盖时点击取消会卡住的问题
|
||||
5、修改了程序界面为白色调,不和标题栏冲突矛盾
|
||||

|
||||
|
||||
#### V1.0.0(2021-05-29):
|
||||

|
||||
|
||||
### 源码安装教程
|
||||
按下 <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>T</kbd> 打开终端,按以下内容操作:
|
||||
1. 安装所需依赖
|
||||
|
||||
```bash
|
||||
sudo apt install make
|
||||
```
|
||||
|
||||
2. 下载本程序
|
||||
|
||||
```bash
|
||||
git clone https://gitee.com/gfdgd-xi/uengine-runner.git
|
||||
```
|
||||
|
||||
3. 运行本程序
|
||||
|
||||
```bash
|
||||
cd uengine-runner
|
||||
make run
|
||||
```
|
||||
|
||||

|
||||
|
||||
#### V1.1.0(2021-05-30):
|
||||
|
||||
1、修改了因编写时出现的中、英文混用的情况
|
||||
2、支持一键连接默认 IP
|
||||
3、修复在不连接设备直接选择 apk 安装时会卡住的问题
|
||||
4、修复在把“uengine 程序菜单”发送到桌面或启动器如果询问覆盖时点击取消会卡住的问题
|
||||
5、修改了程序界面为白色调,不和标题栏冲突矛盾
|
||||

|
||||
|
||||
#### V1.0.0(2021-05-29):
|
||||
|
||||

|
||||
|
||||
### 源码安装教程
|
||||
|
||||
按下 `<kbd>`Ctrl`</kbd>`+`<kbd>`Alt`</kbd>`+`<kbd>`T`</kbd>` 打开终端,按以下内容操作:
|
||||
|
||||
1. 安装所需依赖
|
||||
|
||||
```bash
|
||||
sudo apt install make
|
||||
```
|
||||
|
||||
2. 下载本程序
|
||||
|
||||
```bash
|
||||
git clone https://gitee.com/gfdgd-xi/uengine-runner.git
|
||||
```
|
||||
|
||||
3. 运行本程序
|
||||
|
||||
```bash
|
||||
cd uengine-runner
|
||||
make run
|
||||
```
|
||||
|
||||
如果你想要安装到系统,只需要输入:
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
|
||||
即可
|
||||
|
||||
### 使用说明
|
||||
|
||||
### 使用说明
|
||||
|
||||
1、需要你有使用 root 权限的能力;
|
||||
2、需要安装 UEngine 才能使用,UOS建议在商店安装一个安卓应用,让系统自动安装 UEngine 及相关的依赖包;
|
||||
3、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;
|
||||
4、如果报错是有关产生 .deksotp 文件有关,一般可以打开程序列表运行。如果想要连接其他手机,请使用 1.2.0 以前的版本,可以使用 adb 连接。
|
||||
|
||||
### 故障排除
|
||||
提 issue 最好,当然有些问题自己无法解决,请大佬 push 一下
|
||||
如果出现故障,尝试终端运行,如果是可以自行解决的问题,就**自行解决**,如果可以就**提 issues 并提供解决方案**,不行就**提 isscue 并提供程序和终端报错以及程序版本**
|
||||
|
||||
### 已知问题
|
||||
|
||||
### 故障排除
|
||||
|
||||
提 issue 最好,当然有些问题自己无法解决,请大佬 push 一下
|
||||
如果出现故障,尝试终端运行,如果是可以自行解决的问题,就**自行解决**,如果可以就**提 issues 并提供解决方案**,不行就**提 isscue 并提供程序和终端报错以及程序版本**
|
||||
|
||||
### 已知问题
|
||||
|
||||
<p align="center"><img src='https://bbs.deepin.org/assets/image/raccoon/[sad].gif'></p>
|
||||
|
||||
|
||||

|
||||
部分 app 无法读取出图片,已知:
|
||||
| 程序 | 下载链接 |
|
||||
| :-: | :-: |
|
||||
| Firefox For Android | https://www.firefox.com.cn/download/ |
|
||||
| 网易云音乐 For Android | https://music.163.com/#/download |
|
||||
| 抖音 | https://www.wandoujia.com/apps/7461948 |
|
||||
| 360 手机浏览器 | https://mse.360.cn/ |
|
||||
| E-Go | http://www.xiaojump.com/ |
|
||||
| 其他待测试…… | 其他待测试…… |
|
||||
Hyperbowl是电脑游戏,如果是手机版应该是HyperBowl Classic,但没官网
|
||||
**注意:提取不出图标不代表未安装成功!**
|
||||
|
||||
|
||||
### 贡献
|
||||
<p align="center"><img src='https://bbs.deepin.org/assets/image/raccoon/blush.gif'></p>
|
||||
|
||||
部分 app 无法读取出图片,已知:
|
||||
|
||||
| 程序 | 下载链接 |
|
||||
| :--------------------: | :------------------------------------: |
|
||||
| Firefox For Android | https://www.firefox.com.cn/download/ |
|
||||
| 网易云音乐 For Android | https://music.163.com/#/download |
|
||||
| 抖音 | https://www.wandoujia.com/apps/7461948 |
|
||||
| 360 手机浏览器 | https://mse.360.cn/ |
|
||||
| E-Go | http://www.xiaojump.com/ |
|
||||
| 其他待测试…… | 其他待测试…… |
|
||||
|
||||
**注意:提取不出图标不代表未安装成功!**
|
||||
|
||||
### 贡献
|
||||
|
||||
<p align="center"><img src='https://bbs.deepin.org/assets/image/raccoon/blush.gif'></p>
|
||||
|
||||
非常欢迎大家的贡献
|
||||
贡献的开发者列表:
|
||||
| 开发者 | 邮箱 |
|
||||
| :-: | :-: |
|
||||
| gfdgd xi | 3025613752@qq.com |
|
||||
| actionchen | 917981399@qq.com |
|
||||
| 柚子 | https://gitee.com/Limexb |
|
||||
| 星空露光 | https://gitee.com/Cynorkyle |
|
||||
| 为什么您不喜欢熊出没和阿布呢 | https://weibo.com/u/7755040136 |
|
||||
|
||||
贡献的开发者列表:
|
||||
|
||||
| 开发者 | 邮箱 |
|
||||
| :--------------------------: | :----------------------------: |
|
||||
| gfdgd xi | 3025613752@qq.com |
|
||||
| actionchen | 917981399@qq.com |
|
||||
| 柚子 | https://gitee.com/Limexb |
|
||||
| 星空露光 | https://gitee.com/Cynorkyle |
|
||||
| 为什么您不喜欢熊出没和阿布呢 | https://weibo.com/u/7755040136 |
|
||||
|
||||
### 相关项目
|
||||
| 项目名称 | 项目地址 |
|
||||
| :-: | :-:|
|
||||
| uengine-installer | https://gitee.com/Maicss/uengine-installer |
|
||||
| UEngine APK 打包器 | https://gitee.com/gfdgd-xi/uengine-apk-builder |
|
||||
| Root UEngine | https://gitee.com/Limexb/root-uengine |
|
||||
|
||||
### UEngine 运行器的部分技术介绍
|
||||
|
||||
| 项目名称 | 项目地址 |
|
||||
| :----------------: | :--------------------------------------------: |
|
||||
| uengine-installer | https://gitee.com/Maicss/uengine-installer |
|
||||
| UEngine APK 打包器 | https://gitee.com/gfdgd-xi/uengine-apk-builder |
|
||||
| Root UEngine | https://gitee.com/Limexb/root-uengine |
|
||||
|
||||
### UEngine 运行器的部分技术介绍
|
||||
|
||||
可见:https://www.52pojie.cn/thread-1672077-1-1.html
|
||||
|
||||
### 附测试生成图标无问题列表:
|
||||
|
||||
### 附测试生成图标无问题列表:
|
||||
|
||||
**至于能不能用就不测试了,这暂时不是重点**
|
||||
**现在新加了评分功能,就看大家的评分了!**
|
||||
| 程序 | 下载链接 |
|
||||
|:-:|:-:|
|
||||
| QQ 全家桶(完整版、极速版、Android Pad 版) | https://im.qq.com |
|
||||
| TIM | https://office.qq.com/download.html |
|
||||
| 微信 | https://weixin.qq.com |
|
||||
| 百度翻译 | https://fanyi.baidu.com/appdownload/download.html |
|
||||
| 百度网盘 | https://pan.baidu.com |
|
||||
| 腾讯课堂 | https://ke.qq.com/download/app.html |
|
||||
| 抖音极速版 | https://www.douyin.com/downloadpage/app |
|
||||
| 豌豆荚 | https://www.wandoujia.com/ |
|
||||
| 小猿口算 | http://kousuan.yuanfudao.com/ |
|
||||
| Hyperbowl | 忘了 |
|
||||
| bilibili | https://d.bilibili.com/download_app.html?bsource=app_bili |
|
||||
| 蓝奏云 | https://up.woozooo.com/lanzouh5.apk |
|
||||
| QQ 音乐(完整版、Android Pad 版、TV 版、车载版) | https://y.qq.com/download/index.html |
|
||||
| 360 手机卫士(完整版、极速版) | https://shouji.360.cn/v6/index.html |
|
||||
| 360 清理大师(稳定版、尝鲜版) | http://shouji.360.cn/360cleandroid/ |
|
||||
| 360 手机助手 | http://sj.360.cn/index.html |
|
||||
| WPS Office For Android | https://www.wps.cn/ |
|
||||
| 钉钉 for android | https://page.dingtalk.com/wow/dingtalk/act/download?spm=a3140.8196062.0.0.6f4c5c3dWBhYUM |
|
||||
|
||||
### ©2021-2022
|
||||
**现在新加了评分功能,就看大家的评分了!**
|
||||
|
||||
| 程序 | 下载链接 |
|
||||
| :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: |
|
||||
| QQ 全家桶(完整版、极速版、Android Pad 版) | https://im.qq.com |
|
||||
| TIM | https://office.qq.com/download.html |
|
||||
| 微信 | https://weixin.qq.com |
|
||||
| 百度翻译 | https://fanyi.baidu.com/appdownload/download.html |
|
||||
| 百度网盘 | https://pan.baidu.com |
|
||||
| 腾讯课堂 | https://ke.qq.com/download/app.html |
|
||||
| 抖音极速版 | https://www.douyin.com/downloadpage/app |
|
||||
| 豌豆荚 | https://www.wandoujia.com/ |
|
||||
| 小猿口算 | http://kousuan.yuanfudao.com/ |
|
||||
| Hyperbowl | 忘了/无 |
|
||||
| bilibili | https://d.bilibili.com/download_app.html?bsource=app_bili |
|
||||
| 蓝奏云 | https://up.woozooo.com/lanzouh5.apk |
|
||||
| QQ 音乐(完整版、Android Pad 版、TV 版、车载版) | https://y.qq.com/download/index.html |
|
||||
| 360 手机卫士(完整版、极速版) | https://shouji.360.cn/v6/index.html |
|
||||
| 360 清理大师(稳定版、尝鲜版) | http://shouji.360.cn/360cleandroid/ |
|
||||
| 360 手机助手 | http://sj.360.cn/index.html |
|
||||
| WPS Office For Android | https://www.wps.cn/ |
|
||||
| 钉钉 for android | https://page.dingtalk.com/wow/dingtalk/act/download?spm=a3140.8196062.0.0.6f4c5c3dWBhYUM |
|
||||
|
||||
### ©2021-Now
|
||||
|
||||
13
RemovePycacheFile.py
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
def Remove(path):
|
||||
for i in os.listdir(path):
|
||||
nowPath = f"{path}/{i}"
|
||||
if os.path.isdir(nowPath):
|
||||
if i == "__pycache__":
|
||||
os.system(f"rm -rfv '{nowPath}'")
|
||||
else:
|
||||
Remove(nowPath)
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
debPath = f"{programPath}/new-deb-build"
|
||||
Remove(debPath)
|
||||
125
UI/AutoConfig.py
Executable file
@@ -0,0 +1,125 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'AutoConfig.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, 600)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget)
|
||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.searchTips = QtWidgets.QLabel(self.centralwidget)
|
||||
self.searchTips.setObjectName("searchTips")
|
||||
self.horizontalLayout.addWidget(self.searchTips)
|
||||
self.searchThings = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.searchThings.setObjectName("searchThings")
|
||||
self.horizontalLayout.addWidget(self.searchThings)
|
||||
self.saerchBotton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.saerchBotton.setObjectName("saerchBotton")
|
||||
self.horizontalLayout.addWidget(self.saerchBotton)
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout)
|
||||
self.searchList = QtWidgets.QListView(self.centralwidget)
|
||||
self.searchList.setObjectName("searchList")
|
||||
self.verticalLayout_3.addWidget(self.searchList)
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_2.addItem(spacerItem)
|
||||
self.getInfoButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.getInfoButton.setObjectName("getInfoButton")
|
||||
self.horizontalLayout_2.addWidget(self.getInfoButton)
|
||||
self.getFen = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.getFen.setObjectName("getFen")
|
||||
self.horizontalLayout_2.addWidget(self.getFen)
|
||||
self.runBotton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.runBotton.setObjectName("runBotton")
|
||||
self.horizontalLayout_2.addWidget(self.runBotton)
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menu = QtWidgets.QMenu(self.menubar)
|
||||
self.menu.setObjectName("menu")
|
||||
self.menu_2 = QtWidgets.QMenu(self.menubar)
|
||||
self.menu_2.setObjectName("menu_2")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.about = QtWidgets.QAction(MainWindow)
|
||||
self.about.setObjectName("about")
|
||||
self.exitProgram = QtWidgets.QAction(MainWindow)
|
||||
self.exitProgram.setObjectName("exitProgram")
|
||||
self.help = QtWidgets.QAction(MainWindow)
|
||||
self.help.setObjectName("help")
|
||||
self.openFile = QtWidgets.QAction(MainWindow)
|
||||
self.openFile.setObjectName("openFile")
|
||||
self.actionGitlink = QtWidgets.QAction(MainWindow)
|
||||
self.actionGitlink.setCheckable(True)
|
||||
self.actionGitlink.setChecked(True)
|
||||
self.actionGitlink.setObjectName("actionGitlink")
|
||||
self.actionGitee = QtWidgets.QAction(MainWindow)
|
||||
self.actionGitee.setCheckable(True)
|
||||
self.actionGitee.setObjectName("actionGitee")
|
||||
self.actionGithub = QtWidgets.QAction(MainWindow)
|
||||
self.actionGithub.setCheckable(True)
|
||||
self.actionGithub.setObjectName("actionGithub")
|
||||
self.action_IPv6 = QtWidgets.QAction(MainWindow)
|
||||
self.action_IPv6.setCheckable(True)
|
||||
self.action_IPv6.setObjectName("action_IPv6")
|
||||
self.action = QtWidgets.QAction(MainWindow)
|
||||
self.action.setCheckable(True)
|
||||
self.action.setObjectName("action")
|
||||
self.action_2 = QtWidgets.QAction(MainWindow)
|
||||
self.action_2.setCheckable(True)
|
||||
self.action_2.setChecked(False)
|
||||
self.action_2.setObjectName("action_2")
|
||||
self.action_3 = QtWidgets.QAction(MainWindow)
|
||||
self.action_3.setCheckable(True)
|
||||
self.action_3.setObjectName("action_3")
|
||||
self.menu.addAction(self.openFile)
|
||||
self.menu.addSeparator()
|
||||
self.menu.addAction(self.exitProgram)
|
||||
self.menu_2.addAction(self.actionGitlink)
|
||||
self.menu_2.addAction(self.actionGitee)
|
||||
self.menu_2.addAction(self.actionGithub)
|
||||
self.menu_2.addAction(self.action_IPv6)
|
||||
self.menu_2.addAction(self.action_2)
|
||||
self.menu_2.addAction(self.action_3)
|
||||
self.menu_2.addAction(self.action)
|
||||
self.menubar.addAction(self.menu.menuAction())
|
||||
self.menubar.addAction(self.menu_2.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本"))
|
||||
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
|
||||
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
|
||||
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
|
||||
self.getFen.setText(_translate("MainWindow", "获取/提交选中项的评分和评论"))
|
||||
self.runBotton.setText(_translate("MainWindow", "安装"))
|
||||
self.menu.setTitle(_translate("MainWindow", "程序"))
|
||||
self.menu_2.setTitle(_translate("MainWindow", "切换源"))
|
||||
self.about.setText(_translate("MainWindow", "关于"))
|
||||
self.exitProgram.setText(_translate("MainWindow", "退出程序"))
|
||||
self.help.setText(_translate("MainWindow", "帮助"))
|
||||
self.openFile.setText(_translate("MainWindow", "打开本地部署脚本"))
|
||||
self.actionGitlink.setText(_translate("MainWindow", "Gitlink 源(推荐)"))
|
||||
self.actionGitee.setText(_translate("MainWindow", "Gitee 源"))
|
||||
self.actionGithub.setText(_translate("MainWindow", "Github 源(国外用户推荐)"))
|
||||
self.action_IPv6.setText(_translate("MainWindow", "备用源1(只限IPv6用户)"))
|
||||
self.action.setText(_translate("MainWindow", "本地测试源(127.0.0.1)"))
|
||||
self.action_2.setText(_translate("MainWindow", "备用源2"))
|
||||
self.action_3.setText(_translate("MainWindow", "备用源3"))
|
||||
|
||||
199
UI/AutoConfig.ui
Executable file
@@ -0,0 +1,199 @@
|
||||
<?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>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>自动部署脚本</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="searchTips">
|
||||
<property name="text">
|
||||
<string>搜索内容(为空代表显示所有内容):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchThings"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="saerchBotton">
|
||||
<property name="text">
|
||||
<string>搜索</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="searchList"/>
|
||||
</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="getInfoButton">
|
||||
<property name="text">
|
||||
<string>获取选中项介绍</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="getFen">
|
||||
<property name="text">
|
||||
<string>获取/提交选中项的评分和评论</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="runBotton">
|
||||
<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>800</width>
|
||||
<height>36</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>程序</string>
|
||||
</property>
|
||||
<addaction name="openFile"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="exitProgram"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_2">
|
||||
<property name="title">
|
||||
<string>切换源</string>
|
||||
</property>
|
||||
<addaction name="actionGitlink"/>
|
||||
<addaction name="actionGitee"/>
|
||||
<addaction name="actionGithub"/>
|
||||
<addaction name="action_IPv6"/>
|
||||
<addaction name="action_2"/>
|
||||
<addaction name="action_3"/>
|
||||
<addaction name="action"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
<addaction name="menu_2"/>
|
||||
</widget>
|
||||
<action name="about">
|
||||
<property name="text">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="exitProgram">
|
||||
<property name="text">
|
||||
<string>退出程序</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="help">
|
||||
<property name="text">
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="openFile">
|
||||
<property name="text">
|
||||
<string>打开本地部署脚本</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGitlink">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gitlink 源(推荐)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGitee">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gitee 源</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGithub">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Github 源(国外用户推荐)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_IPv6">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>备用源1(只限IPv6用户)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>本地测试源(127.0.0.1)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_2">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>备用源2</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_3">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>备用源3</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
BIN
UI/__pycache__/AutoConfig.cpython-37.pyc
Normal file
BIN
__pycache__/ConfigLanguareRunner.cpython-37.pyc
Normal file
BIN
__pycache__/updatekiller.cpython-37.pyc
Normal file
2
allow-android-install-unknown-program.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
adb shell settings put secure install_non_market_apps 1
|
||||
@@ -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")
|
||||
2
get-android-install-unknown-program-setting.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
adb shell settings get secure install_non_market_apps
|
||||
177
getxmlimg.py-bak
Executable file
@@ -0,0 +1,177 @@
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageDraw as ImageDraw
|
||||
import xml.etree.ElementTree as ET
|
||||
import zipfile
|
||||
import subprocess
|
||||
import re
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
'''import xml.etree.ElementTree as ET
|
||||
|
||||
def xml2svg(xml_file):
|
||||
tree = ET.parse(xml_file)
|
||||
root = tree.getroot()
|
||||
svg_str = '<svg>'
|
||||
for child in root:
|
||||
svg_str += '<' + child.tag
|
||||
for attr in child.attrib:
|
||||
svg_str += ' ' + attr + '="' + child.attrib[attr] + '"'
|
||||
svg_str += '>'
|
||||
for sub_child in child:
|
||||
svg_str += '<' + sub_child.tag
|
||||
for attr in sub_child.attrib:
|
||||
svg_str += ' ' + attr + '="' + sub_child.attrib[attr] + '"'
|
||||
svg_str += '/>'
|
||||
svg_str += '</' + child.tag + '>'
|
||||
svg_str += '</svg>'
|
||||
return svg_str'''
|
||||
|
||||
class getsavexml():
|
||||
'''def xml2svg(xml_file):
|
||||
tree = ET.parse(xml_file)
|
||||
root = tree.getroot()
|
||||
svg_str = '<svg>'
|
||||
for child in root:
|
||||
svg_str += '<' + child.tag
|
||||
for attr in child.attrib:
|
||||
svg_str += ' ' + attr + '="' + child.attrib[attr] + '"'
|
||||
svg_str += '>'
|
||||
for sub_child in child:
|
||||
svg_str += '<' + sub_child.tag
|
||||
for attr in sub_child.attrib:
|
||||
svg_str += ' ' + attr + '="' + sub_child.attrib[attr] + '"'
|
||||
svg_str += '/>'
|
||||
svg_str += '</' + child.tag + '>'
|
||||
svg_str += '</svg>'
|
||||
return svg_str'''
|
||||
|
||||
def savexml(self,apkFilePath,xmlpath,iconSavePath):
|
||||
cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath
|
||||
print(cmddumpid)
|
||||
xmltree = subprocess.getoutput(cmddumpid)
|
||||
xmls = xmltree.splitlines()
|
||||
# find strs ,print next line
|
||||
def FindStrs(lines,strs):
|
||||
i=0
|
||||
while i < len(lines):
|
||||
if re.search(strs,lines[i]):
|
||||
tmpstr = lines[i+1]
|
||||
i += 1
|
||||
Resultstr = tmpstr.split(":")[-1].split("=")[-1].split("0x")[-1]
|
||||
return Resultstr
|
||||
else:
|
||||
i += 1
|
||||
#从apk的信息中获取前后景图片的ID号
|
||||
backimgid = FindStrs(xmls,"background")
|
||||
foreimgid = FindStrs(xmls,"foreground")
|
||||
print(backimgid)
|
||||
print(foreimgid)
|
||||
|
||||
# 直接从apk resource文件获取前后两层图片路径及ID字符串
|
||||
resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
|
||||
resourcelines = resource.splitlines()
|
||||
print(resourcelines)
|
||||
|
||||
# 从过滤出的字符串中获取所有相同ID的图片路径
|
||||
def Findpicpath(lines,imgid):
|
||||
i=0
|
||||
Resultstr = []
|
||||
while i < len(lines):
|
||||
if re.search(imgid,lines[i]) and re.search("string8",lines[i+1]) :
|
||||
print(lines[i+1])
|
||||
tmpstr = lines[i+1].replace("\"","")
|
||||
i += 1
|
||||
Resultstr.append(tmpstr.split()[-1])
|
||||
else:
|
||||
i += 1
|
||||
return Resultstr
|
||||
|
||||
#获取所有带前后图片ID的图片路径(相同背景或者前景的图片ID但分辨率不一样)
|
||||
backimgs = Findpicpath(resourcelines,backimgid)
|
||||
foreimgs = Findpicpath(resourcelines,foreimgid)
|
||||
print(backimgs)
|
||||
print(foreimgs)
|
||||
#获取分辨率最高的图片路径
|
||||
def getmaxsize(imgs):
|
||||
j = 0
|
||||
size=(0,0)
|
||||
zipapk = zipfile.ZipFile(apkFilePath)
|
||||
imgpath = ""
|
||||
while j < len(imgs):
|
||||
print(imgs[j])
|
||||
img = Image.open(zipapk.open(imgs[j]))
|
||||
print(imgs[j])
|
||||
print(img.size)
|
||||
if size < img.size:
|
||||
size = img.size
|
||||
imgpath = imgs[j]
|
||||
j += 1
|
||||
return imgpath
|
||||
|
||||
# 获取到文件列表后,进行比较分辨率,选取分辨率最高的张图片
|
||||
# /home/gfdgd_xi/Downloads/MT2.12.2.apk
|
||||
try:
|
||||
iconbackpath = getmaxsize(backimgs)
|
||||
iconforepath = getmaxsize(foreimgs)
|
||||
except:
|
||||
if len(backimgs):
|
||||
iconbackpath = backimgs[0]
|
||||
else:
|
||||
iconbackpath = ""
|
||||
if len(foreimgs):
|
||||
iconforepath = foreimgs[0]
|
||||
else:
|
||||
iconforepath = ""
|
||||
print(iconbackpath, iconforepath)
|
||||
|
||||
#从APK文件获取最终图片
|
||||
zipapk = zipfile.ZipFile(apkFilePath)
|
||||
try:
|
||||
iconback = zipapk.open(iconbackpath)
|
||||
except:
|
||||
iconback = None
|
||||
try:
|
||||
iconfore = zipapk.open(iconforepath)
|
||||
except:
|
||||
iconfore = None
|
||||
|
||||
# 叠加图片,mask 设置前景为蒙版
|
||||
try:
|
||||
iconbackimg = Image.open(iconback).convert("RGBA")
|
||||
except:
|
||||
pass
|
||||
iconforeimg = Image.open(iconfore).convert("RGBA")
|
||||
iconbackimg.paste(iconforeimg,mask=iconforeimg)
|
||||
|
||||
|
||||
# 圆角图片函数,网上拷贝的
|
||||
def circle_corner(img, radii): #把原图片变成圆角,这个函数是从网上找的,原址 https://www.pyget.cn/p/185266
|
||||
"""
|
||||
圆角处理
|
||||
:param img: 源图象。
|
||||
:param radii: 半径,如:30。
|
||||
:return: 返回一个圆角处理后的图象。
|
||||
"""
|
||||
# 画圆(用于分离4个角)
|
||||
circle = Image.new('L', (radii * 2, radii * 2), 0) # 创建一个黑色背景的画布
|
||||
draw = ImageDraw.Draw(circle)
|
||||
draw.ellipse((0, 0, radii * 2, radii * 2), fill=255) # 画白色圆形
|
||||
# 原图
|
||||
img = img.convert("RGBA")
|
||||
w, h = img.size
|
||||
# 画4个角(将整圆分离为4个部分)
|
||||
alpha = Image.new('L', img.size, 255)
|
||||
alpha.paste(circle.crop((0, 0, radii, radii)), (0, 0)) # 左上角
|
||||
alpha.paste(circle.crop((radii, 0, radii * 2, radii)), (w - radii, 0)) # 右上角
|
||||
alpha.paste(circle.crop((radii, radii, radii * 2, radii * 2)), (w - radii, h - radii)) # 右下角
|
||||
alpha.paste(circle.crop((0, radii, radii, radii * 2)), (0, h - radii)) # 左下角
|
||||
# alpha.show()
|
||||
img.putalpha(alpha) # 白色区域透明可见,黑色区域不可见
|
||||
return img
|
||||
|
||||
# 圆角半径1/8边长,保存icon图片
|
||||
w,h = iconbackimg.size
|
||||
iconimg = circle_corner(iconbackimg,int(w/8))
|
||||
iconimg.save(iconSavePath)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"https://github.com/gfdgd-xi/uengine-runner",
|
||||
"https://gitlink.org.cn/gfdgd_xi/uengine-runner"
|
||||
],
|
||||
"Version": "1.8.2",
|
||||
"Version": "2.0.0",
|
||||
"System": "Linux(deepin/UOS)",
|
||||
"Tips": [
|
||||
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
|
||||
@@ -23,6 +23,37 @@
|
||||
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
||||
],
|
||||
"Update": [
|
||||
"<b>V2.0.0:</b>",
|
||||
"※1、内置微型应用商店,支持评论、评分功能;",
|
||||
"※2、修复 UEngine 安装器在 Wayland 下无法正常运行的问题;",
|
||||
"※3、更新 UEngine 安装器安装的 UEngine 版本;",
|
||||
"※4、修复 UEngine 安装器安装后的 UEngine 无法正常安装 APK 的问题(包括从运行器和 deb 包安装);",
|
||||
"※5、UEngine 安装器支持安装使用 SuperSU Root 的镜像;",
|
||||
"※6、UEngine 安装器安装后的 UEngine 支持开机后自动加载运行环境,无需人手动打开终端运行;",
|
||||
"※7、放开原先程序内的程序安装量查询功能,并新增打开量查询功能(在程序的关于窗口里打开);",
|
||||
"※8、程序更新时不需要关闭所有 Python3 程序,只会关闭自己;",
|
||||
"※9、新增彩蛋(只在2023年1月22日生效);",
|
||||
"※10、修复 UEngine 打包器在部分系统无法打开的问题;",
|
||||
"※11、新增程序公告功能;",
|
||||
"※12、修复了程序更新功能从高版本降级到低版本的问题;",
|
||||
"※13、不强制依赖 Deepin 终端;",
|
||||
"※14、新增 UEngine 打包器(高级版);",
|
||||
"15、更改程序论坛网址;",
|
||||
"16、新增程序评分功能;",
|
||||
"17、修复 UEngine 打包器在打包时无法正确禁用所有选项;",
|
||||
"18、UEngine 打包器打包的 deb 不再指定 deepin-elf-verify 依赖版本;",
|
||||
"19、“更多帮助”功能支持访问云端的帮助内容;",
|
||||
"20、更换程序接口;",
|
||||
"21、优化菜单栏分类,菜单栏新增图标;",
|
||||
"22、程序关于可以查看程序使用的开源协议;",
|
||||
"23、修复在 Ubuntu 下安装后启动器没有图标的问题。",
|
||||
"",
|
||||
"<b>V1.8.3:</b>",
|
||||
"※1、修复安装/打包程序时出现找不到图标的问题;",
|
||||
"※2、修复部分无法正确获取程序中文名和 Activity 的问题;",
|
||||
"※3、修复在运行器内打开打包器不会自动填充打包器 APK 路径;",
|
||||
"※4、问题反馈新增论坛反馈入口。",
|
||||
"",
|
||||
"<b>V1.8.2:</b>",
|
||||
"※1、重新恢复 uengine-installer For Ubuntu",
|
||||
"※2、修复 postrm 的问题",
|
||||
@@ -199,27 +230,30 @@
|
||||
"11、deepin 终端",
|
||||
"……"
|
||||
],
|
||||
"Time": "2022年08月30日",
|
||||
"Time": "2023年01月21日",
|
||||
"Contribute": [
|
||||
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
|
||||
"<hr>",
|
||||
"感谢 Bail Pr 修复Python主版本号判断时潜在的问题的补丁",
|
||||
"感谢 麻木法师(1312580754) 在星火应用商店QQ交流群展示的接口及其原理",
|
||||
"感谢 Bail(https://github.com/BailPlus) 修复的函数未输入密码自动回车的 bug",
|
||||
"感谢 actionchen(917981399@qq.com) 提供了新版页面布局(1.3.0 ~ 最新版本)以及布局代码(1.3.0 ~ 1.7.0)",
|
||||
"感谢 柚子(https://gitee.com/Limexb) 提供了 UEngine 构建 Root 镜像脚本",
|
||||
"感谢 星空露光(https://gitee.com/Cynorkyle) 制作了 UEngine 新版图标和安装应用时能选择应用分类的建议",
|
||||
"感谢 shenmo(jifengshenmo@outlook.com) 反馈了许多程序的问题以及提供了 UEngine 在 Ubuntu 上的安装脚本",
|
||||
"感谢 desert(https://gitee.com/desert741) 提供了给软件增加启动成功后自动调整分辨率的功能的建议",
|
||||
"感谢 云思浮(https://gitee.com/foresee_io) 反馈的 1.3.0 依赖缺失问题",
|
||||
"感谢 miaoys(https://bbs.deepin.org/user/271467)、zccrs(https://bbs.deepin.org/user/277780) 等用户反馈希望程序能和与系统 DTK 主题协调的建议",
|
||||
"感谢 jiutian123(https://bbs.deepin.org/user/258825) 反馈的 1.5.2、1.5.3 存在问题",
|
||||
"感谢 kero990(https://bbs.deepin.org/user/277932) 反馈的 README 表示不清的问题",
|
||||
"感谢 wang(https://gitee.com/wang1279476881) 反馈的 1.6.0 左键打不开 “安装与卸载APK”和打包时 APK 版本号开头带 V 无法正常打包的问题",
|
||||
"感谢 通天灵宝(https://bbs.deepin.org/user/137230)、wuhaiou123(https://bbs.chinauos.com/zh/user/309117) 反馈的 图标生成错误导致无法生成 .desktop 文件的问题",
|
||||
"感谢 潜伏(https://bbs.chinauos.com/zh/user/303339) 反馈的右键支持安装/卸载的建议",
|
||||
"感谢 z***g@gmx.de(https://bbs.chinauos.com/zh/user/312017) 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题",
|
||||
"参考 忘记、过去(https://bbs.deepin.org/user/154730) 的帖子《如何更优雅地使用 pkexec》(https://bbs.deepin.org/post/202966)",
|
||||
"感谢 U+解答组们 反馈的 1.8.0 带路径无法正常安装 APK 的问题"
|
||||
"感谢 cleverwwh 反馈的 UEngine 打包器在部分系统无法打开的问题",
|
||||
"感谢 Bail 为此程序做出的许多贡献;",
|
||||
"感谢 Bail、shenmo、Allen 反馈的图标无法正常拷贝的问题;",
|
||||
"感谢 Bail Pr 修复Python主版本号判断时潜在的问题的补丁;",
|
||||
"感谢 麻木法师(1312580754) 在星火应用商店QQ交流群展示的接口及其原理;",
|
||||
"感谢 Bail(https://github.com/BailPlus) 修复的函数未输入密码自动回车的 bug;",
|
||||
"感谢 actionchen(917981399@qq.com) 提供了新版页面布局(1.3.0 ~ 最新版本)以及布局代码(1.3.0 ~ 1.7.0);",
|
||||
"感谢 柚子(https://gitee.com/Limexb) 提供了 UEngine 构建 Root 镜像脚本;",
|
||||
"感谢 星空露光(https://gitee.com/Cynorkyle) 制作了 UEngine 新版图标和安装应用时能选择应用分类的建议;",
|
||||
"感谢 shenmo(jifengshenmo@outlook.com) 反馈了许多程序的问题以及提供了 UEngine 在 Ubuntu 上的安装脚本;",
|
||||
"感谢 desert(https://gitee.com/desert741) 提供了给软件增加启动成功后自动调整分辨率的功能的建议;",
|
||||
"感谢 云思浮(https://gitee.com/foresee_io) 反馈的 1.3.0 依赖缺失问题;",
|
||||
"感谢 miaoys(https://bbs.deepin.org/user/271467)、zccrs(https://bbs.deepin.org/user/277780) 等用户反馈希望程序能和与系统 DTK 主题协调的建议;",
|
||||
"感谢 jiutian123(https://bbs.deepin.org/user/258825) 反馈的 1.5.2、1.5.3 存在问题;",
|
||||
"感谢 kero990(https://bbs.deepin.org/user/277932) 反馈的 README 表示不清的问题;",
|
||||
"感谢 wang(https://gitee.com/wang1279476881) 反馈的 1.6.0 左键打不开 “安装与卸载APK”和打包时 APK 版本号开头带 V 无法正常打包的问题;",
|
||||
"感谢 通天灵宝(https://bbs.deepin.org/user/137230)、wuhaiou123(https://bbs.chinauos.com/zh/user/309117) 反馈的 图标生成错误导致无法生成 .desktop 文件的问题;",
|
||||
"感谢 潜伏(https://bbs.chinauos.com/zh/user/303339) 反馈的右键支持安装/卸载的建议;",
|
||||
"感谢 z***g@gmx.de(https://bbs.chinauos.com/zh/user/312017) 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题;",
|
||||
"参考 忘记、过去(https://bbs.deepin.org/user/154730) 的帖子《如何更优雅地使用 pkexec》(https://bbs.deepin.org/post/202966);",
|
||||
"感谢 U+解答组们 反馈的 1.8.0 带空格路径无法正常安装 APK 的问题。"
|
||||
]
|
||||
}
|
||||
|
||||
384
mainwindow.py
@@ -2,7 +2,7 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi<3025613752@qq.com>
|
||||
# 版本:1.8.0
|
||||
# 版本:2.0.0
|
||||
# 更新时间:2022年07月25日
|
||||
# 感谢:anbox、deepin 和 UOS
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
@@ -18,7 +18,9 @@ import time
|
||||
import json
|
||||
import numpy
|
||||
import base64
|
||||
import socket
|
||||
import shutil
|
||||
import datetime
|
||||
import zipfile
|
||||
import platform
|
||||
import requests
|
||||
@@ -26,6 +28,7 @@ import traceback
|
||||
import threading
|
||||
import webbrowser
|
||||
import subprocess
|
||||
import updatekiller
|
||||
map = True
|
||||
import matplotlib
|
||||
import matplotlib.figure
|
||||
@@ -36,6 +39,12 @@ import PyQt5.QtGui as QtGui
|
||||
import PyQt5.QtCore as QtCore
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
from getxmlimg import getsavexml
|
||||
try:
|
||||
import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
|
||||
bad = False
|
||||
except:
|
||||
bad = True
|
||||
from Model import *
|
||||
|
||||
def PythonLower():
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
@@ -49,6 +58,18 @@ if sys.version_info[0] < 3:
|
||||
if sys.version_info[1] < 6:
|
||||
PythonLower()
|
||||
|
||||
print("""观沧海 曹操
|
||||
东临碣石,以观沧海。水何澹澹,山岛竦峙。
|
||||
树木丛生,百草丰茂。秋风萧瑟,洪波涌起。
|
||||
日月之行,若出其中;星汉灿烂,若出其里。
|
||||
幸甚至哉,歌以咏志。""")
|
||||
print("")
|
||||
print("""译文:东行登上碣石山,来观赏那苍茫的海。海水多么宽阔浩荡,山岛高高地挺立在海边。
|
||||
树木和百草丛生,十分繁茂。秋风吹动树木发出悲凉的声音,海中涌着巨大的海浪。
|
||||
太阳和月亮的运行,好像是从这浩瀚的海洋中发出的。银河星光灿烂,好像是从这浩瀚的海洋中产生出来的。
|
||||
我很幸运,就用这首诗歌来表达自己内心的志向。""")
|
||||
print("================================")
|
||||
|
||||
class UninstallProgram(QtCore.QThread):
|
||||
info = QtCore.pyqtSignal(str)
|
||||
error = QtCore.pyqtSignal(str)
|
||||
@@ -265,6 +286,7 @@ def DisabledAndEnbled(choose: "启动或者禁用")->"禁用或启动所有控
|
||||
#ComboUninstallPath.configure(state=a)
|
||||
BtnFindApk.setDisabled(choose)
|
||||
BtnInstall.setDisabled(choose)
|
||||
BtnAppStore.setDisabled(choose)
|
||||
BtnShowUengineApp.setDisabled(choose)
|
||||
#BtnUninstallApkBrowser.configure(state=a)
|
||||
BtnUninstall.setDisabled(choose)
|
||||
@@ -411,6 +433,7 @@ def GetApkActivityName(apkFilePath: "apk 所在路径")->"获取 apk Activity":
|
||||
line = line.replace("label=", "")
|
||||
line = line.replace("icon=", "")
|
||||
return line
|
||||
return f"{GetApkPackageName(apkFilePath)}.Main"
|
||||
|
||||
# 获取 apk 包名
|
||||
def GetApkPackageName(apkFilePath: "apk 所在路径")->"获取 apk 包名":
|
||||
@@ -433,19 +456,25 @@ def InstallRootUengineImage():
|
||||
if not os.path.exists:
|
||||
os.mkdir("/tmp/uengine-runner")
|
||||
write_txt("/tmp/uengine-runner/install.sh", "sudo dpkg -i /tmp/uengine-runner/u*.deb\nsudo apt install -f")
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e \"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.xyz/gfdgd-xi/uengine-runner/releases/download/U1.2.15/uengine-android-image_1.2.15_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'\""]).start()
|
||||
#threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e \"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.xyz/gfdgd-xi/uengine-runner/releases/download/U1.2.15/uengine-android-image_1.2.15_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'\""]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.xyz/gfdgd-xi/uengine-runner/releases/download/U1.2.15/uengine-android-image_1.2.15_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'"]).start()
|
||||
|
||||
|
||||
def UengineUbuntuInstall():
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e bash '{programPath + '/uengine-installer'}'"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"bash '{programPath + '/uengine-installer'}'"]).start()
|
||||
|
||||
def UengineUbuntuInstallRoot():
|
||||
# 加 SuperSU 参数
|
||||
threading.Thread(target=OpenTerminal, args=[f"bash '{programPath + '/uengine-installer'}' SuperSU"]).start()
|
||||
|
||||
def UbuntuInstallUengine():
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e bash '{programPath + '/uengine-installer'}'"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"bash '{programPath + '/uengine-installer'}'"]).start()
|
||||
|
||||
def BuildRootUengineImage():
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e bash '{programPath}/root-uengine.sh'"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"bash '{programPath}/root-uengine.sh'"]).start()
|
||||
|
||||
def ReinstallUengineImage():
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e pkexec apt reinstall uengine-android-image -y"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"pkexec apt reinstall uengine-android-image -y"]).start()
|
||||
|
||||
|
||||
# 生成 uengine 启动文件到桌面
|
||||
@@ -483,11 +512,17 @@ Type=Application
|
||||
# 获取软件的中文名称
|
||||
def GetApkChineseLabel(apkFilePath)->"获取软件的中文名称":
|
||||
info = GetApkInformation(apkFilePath)
|
||||
name = None
|
||||
for line in info.split('\n'):
|
||||
if "application-label-zh:" in line:
|
||||
line = line.replace("application-label-zh:", "")
|
||||
line = line.replace("'", "")
|
||||
return line
|
||||
if "application-label:" in line:
|
||||
line = line.replace("application-label:", "")
|
||||
line = line.replace("'", "")
|
||||
return line
|
||||
name = line
|
||||
return name
|
||||
|
||||
# 保存apk图标
|
||||
def SaveApkIcon(apkFilePath, iconSavePath)->"保存 apk 文件的图标":
|
||||
@@ -557,7 +592,7 @@ def BackUengineClean()->"清空 uengine 数据":
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
|
||||
os.system(f"'{programPath}/launch.sh' deepin-terminal -C \"pkexec rm -rfv /data/uengine\"")
|
||||
OpenTerminal(f"pkexec rm -rfv /data/uengine")
|
||||
return
|
||||
print("Choose False")
|
||||
|
||||
@@ -620,7 +655,7 @@ def ScrcpyConnectUengine():
|
||||
sudo apt install snapd -y
|
||||
sudo snap refresh
|
||||
sudo snap install scrcpy''')
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C \"chmod 777 /tmp/uengine-runner/InstallScrcpy.sh -Rv && pkexec /tmp/uengine-runner/InstallScrcpy.sh\""]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"chmod 777 /tmp/uengine-runner/InstallScrcpy.sh -Rv && pkexec /tmp/uengine-runner/InstallScrcpy.sh"]).start()
|
||||
return
|
||||
|
||||
# 获取用户桌面目录
|
||||
@@ -680,7 +715,7 @@ def CleanAllUengineDesktopLink():
|
||||
|
||||
# 打开 uengine 应用打包器
|
||||
def OpenUengineDebBuilder():
|
||||
threading.Thread(target=os.system, args=[programPath + "/uengine-apk-builder"]).start()
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/uengine-apk-builder' '{ComboInstallPath.currentText()}'"]).start()
|
||||
|
||||
# 打开 uengine 根目录
|
||||
def OpenUengineRootData():
|
||||
@@ -693,12 +728,12 @@ def OpenUengineUserData():
|
||||
# 终端显示 adb 命令行
|
||||
def AdbShellShowInTer():
|
||||
os.system("adb connect 192.168.250.2:5555")
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -w ~ -e 'adb -s 192.168.250.2:5555 shell'"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"adb -s 192.168.250.2:5555 shell"]).start()
|
||||
|
||||
# 终端显示 adb top
|
||||
def AdbCPUAndRAWShowInTer():
|
||||
os.system("adb connect 192.168.250.2:5555")
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -w ~ -e 'adb -s 192.168.250.2:5555 shell top'"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"adb -s 192.168.250.2:5555 shell top"]).start()
|
||||
|
||||
def UengineSettingShow():
|
||||
threading.Thread(target=os.system, args=["/usr/bin/uengine launch --action=android.intent.action.MAIN --package=com.android.settings --component=com.android.settings.Settings"]).start()
|
||||
@@ -719,14 +754,14 @@ def AdbStartServer():
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "完成!")
|
||||
|
||||
def ReinstallUengine():
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C 'pkexec apt reinstall uengine uengine-android-image uengine-modules-dkms -y && notify-send -i uengine \"安装完毕!\"'"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"pkexec apt reinstall uengine uengine-android-image uengine-modules-dkms -y && notify-send -i uengine \"安装完毕!\""]).start()
|
||||
|
||||
def DelUengineCheck():
|
||||
if not os.path.exists("/usr/share/uengine/uengine-check-runnable.sh"):
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "本功能已经被删除,无法重复删除!")
|
||||
return
|
||||
if QtWidgets.QMessageBox.warning(widget, "警告", "删除后将无法使用本软件恢复\n如果需要恢复本功能,请重新安装 UEngine!", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Ok) == QtWidgets.QMessageBox.Ok:
|
||||
threading.Thread(target=os.system, args=["'{programPath}/launch.sh' deepin-terminal -C 'pkexec rm -v /usr/share/uengine/uengine-check-runnable.sh'"]).start()
|
||||
threading.Thread(target=OpenTerminal, args=[f"pkexec rm -v /usr/share/uengine/uengine-check-runnable.sh"]).start()
|
||||
|
||||
# 使用 adb 连接 uengine
|
||||
def UengineConnectAdb():
|
||||
@@ -781,7 +816,27 @@ def VersionCheck(version1, version2):
|
||||
return version1 == version2
|
||||
|
||||
def ShowHelp():
|
||||
webbrowser.open_new_tab(programPath + "/Help/index.html")
|
||||
global webHelp
|
||||
# 先判断是否能连接服务器,如果能则访问线上版本,否则访问本地的帮助文件
|
||||
sk = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
||||
sk.settimeout(1)
|
||||
url = "file://" + programPath + "/Help/index.html"
|
||||
try:
|
||||
sk.connect(("uengine-runner.racoongx.cn", 80))
|
||||
url = f"http://uengine-runner.racoongx.cn"
|
||||
except:
|
||||
traceback.print_exc()
|
||||
if bad:
|
||||
# 如果没有安装 QWebEngine,则直接用浏览器打开
|
||||
webbrowser.open_new_tab(url)
|
||||
return
|
||||
# 否则用 QWebEngine 打开
|
||||
webHelp = QtWebEngineWidgets.QWebEngineView()
|
||||
webHelp.setWindowTitle("获取程序帮助")
|
||||
webHelp.setUrl(QtCore.QUrl(url))
|
||||
webHelp.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
webHelp.resize(int(webHelp.frameGeometry().width() * 1.3), int(webHelp.frameGeometry().height() * 1.1))
|
||||
webHelp.show()
|
||||
|
||||
def AllowOrDisallowUpdateAndroidApp():
|
||||
if not os.path.exists("/data/uengine/data/data/misc/adb/adb_keys"):
|
||||
@@ -1092,18 +1147,40 @@ class UpdateWindow():
|
||||
updateWidgetLayout = QtWidgets.QGridLayout()
|
||||
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知\n更新内容:")
|
||||
updateText = QtWidgets.QTextBrowser()
|
||||
ok = QtWidgets.QPushButton("更新(更新过程中会关闭所有Python应用,包括这个应用)")
|
||||
ok = QtWidgets.QPushButton("更新(更新过程中会关闭这个应用的所有进程)")
|
||||
ok.clicked.connect(UpdateWindow.Update)
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.clicked.connect(UpdateWindow.update.close)
|
||||
ok.setDisabled(True)
|
||||
try:
|
||||
UpdateWindow.data = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/update.json").text)
|
||||
UpdateWindow.data = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd-xi-org/wine-runner-update-information/raw/branch/master/uengine-runner/update.json").text)
|
||||
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:")
|
||||
if UpdateWindow.data["Version"] == version:
|
||||
updateText.setText("此为最新版本,无需更新")
|
||||
ok.setDisabled(True)
|
||||
else:
|
||||
updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n"))
|
||||
# 版本号读取(防止出现高版本号提示要“升级”到低版本号的问题)
|
||||
localVersionList = version.split(".")
|
||||
webVersionList = UpdateWindow.data['Version'].split(".")
|
||||
for i in range(len(localVersionList)):
|
||||
local = int(localVersionList[i])
|
||||
web = int(webVersionList[i])
|
||||
if web < local:
|
||||
updateText.setHtml(f"""<p>此为最新版本,无需更新,但似乎您当前使用的程序版本比云端版本还要高。</p>
|
||||
<p>出现这个问题可能会有如下几种情况:</p>
|
||||
<p>1、使用编译或者内测版本</p>
|
||||
<p>2、自己修改了程序版本</p>
|
||||
<p>3、作者忘记更新云端上的更新信息了</p>
|
||||
<p>如果是第三种情况,请反馈到此:https://gitee.com/gfdgd-xi-org/uengine-runner/issues/I6B091</p>
|
||||
<p>或者是这里:https://bbs.racoongx.cn/t/bugs</p>
|
||||
<p><img src='{programPath}/Icon/doge.png'></p>""")
|
||||
ok.setDisabled(True)
|
||||
break
|
||||
if web > local:
|
||||
updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n"))
|
||||
ok.setEnabled(True)
|
||||
break
|
||||
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(updateWidget, "错误", "无法连接服务器!")
|
||||
@@ -1113,7 +1190,7 @@ class UpdateWindow():
|
||||
updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1)
|
||||
updateWidget.setLayout(updateWidgetLayout)
|
||||
UpdateWindow.update.setCentralWidget(updateWidget)
|
||||
UpdateWindow.update.setWindowTitle("检查更新")
|
||||
UpdateWindow.update.setWindowTitle("检查 UEngine 运行器更新")
|
||||
UpdateWindow.update.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
|
||||
UpdateWindow.update.show()
|
||||
@@ -1127,8 +1204,8 @@ class UpdateWindow():
|
||||
write_txt("/tmp/uengine-runner/update.sh", f"""#!/bin/bash
|
||||
echo 删除多余的安装包
|
||||
rm -rfv /tmp/uengine-runner/update/*
|
||||
echo 关闭“UEngine 运行器”以及其它“Python 应用”
|
||||
killall python3
|
||||
echo 关闭“UEngine 运行器”
|
||||
python3 {programPath}/updatekiller.py
|
||||
echo 下载安装包
|
||||
wget -P /tmp/uengine-runner/update {UpdateWindow.data["Url"][0]}
|
||||
echo 安装安装包
|
||||
@@ -1141,7 +1218,7 @@ zenity --info --text=\"更新完毕!\" --ellipsize
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(widget, "错误,无法继续更新", traceback.format_exc())
|
||||
os.system(f"'{programPath}/launch.sh' deepin-terminal -e pkexec bash /tmp/uengine-runner/update.sh")
|
||||
OpenTerminal(f"pkexec bash /tmp/uengine-runner/update.sh")
|
||||
|
||||
image = None
|
||||
class ApkInformation():
|
||||
@@ -1236,7 +1313,7 @@ class ApkInformation():
|
||||
if choose == None or choose == 7:
|
||||
return
|
||||
try:
|
||||
QtWidgets.QMessageBox.information(widget, "提示", requests.post("https://304626p927.goho.co/uengine-runner/app/check/add.php", {"Package": GetApkPackageName(path), "Type": choose}).text)
|
||||
QtWidgets.QMessageBox.information(widget, "提示", requests.post("http://120.25.153.144/uengine-runner/app/check/add.php", {"Package": GetApkPackageName(path), "Type": choose}).text)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ConnectServerStarError"])
|
||||
@@ -1248,7 +1325,7 @@ class ApkInformation():
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"])
|
||||
return
|
||||
try:
|
||||
data = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/app/check/" + package +"/data.json").text)
|
||||
data = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd-xi-org/wine-runner-downloads-of-runner/raw/branch/master/uengineapp/" + package +"/data.json").text)
|
||||
print(data)
|
||||
except:
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!")
|
||||
@@ -1446,6 +1523,28 @@ class AddNewUengineDesktopLink():
|
||||
activityName.setText(str(GetApkActivityName(path)))
|
||||
write_txt(get_home() + "/.config/uengine-runner/FindApkName.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
|
||||
|
||||
def GetNewInformation():
|
||||
try:
|
||||
text = requests.get("https://code.gitlink.org.cn/gfdgd_xi/uengine-runner-list/raw/branch/master/information/index.html").text
|
||||
except:
|
||||
traceback.print_exc()
|
||||
text = """<p>无法连接到服务器</p>
|
||||
<hr/>
|
||||
<p>你可以尝试:</p>
|
||||
<p>1. 判断是否能正常连接网络</p>
|
||||
<p>2. 网络配置是否有误</p>"""
|
||||
global webInformation
|
||||
if bad:
|
||||
webInformation = QtWidgets.QTextBrowser()
|
||||
else:
|
||||
webInformation = QtWebEngineWidgets.QWebEngineView()
|
||||
webInformation.setHtml(text)
|
||||
webInformation.setWindowTitle("获取程序公告")
|
||||
webInformation.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
webInformation.resize(int(webInformation.frameGeometry().width() * 1.3), int(webInformation.frameGeometry().height() * 1.1))
|
||||
webInformation.show()
|
||||
|
||||
|
||||
def UseProgram():
|
||||
global useProgram
|
||||
useProgram = '''<p>1、UEngine:{}</p>
|
||||
@@ -1487,13 +1586,15 @@ aaptVersion = GetCommandReturn("aapt version")
|
||||
SystemVersion = GetSystemVersion()
|
||||
iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0])
|
||||
about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>
|
||||
<p>介绍 :一个基于 Python3 的 PyQt5 制作的 UEngine 运行器,在新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。</p>
|
||||
<p>版本 :{version}</p>
|
||||
<p>适用平台 :{goodRunSystem}</p>
|
||||
<p>Qt 版本 :{QtCore.qVersion()}</p>
|
||||
<p>程序官网 :{programUrl}</p>
|
||||
<p>系统版本 : {SystemVersion}</p>
|
||||
<h3>©2021-{time.strftime("%Y")}</h3>'''
|
||||
<p>介绍:一个基于 Python3 的 PyQt5 制作的 UEngine 运行器,在新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。</p>
|
||||
<p>程序开源许可证:GPLV3</p>
|
||||
<p>版本:{version}</p>
|
||||
<p>适用平台:{goodRunSystem}</p>
|
||||
<p>Qt 版本:{QtCore.qVersion()}</p>
|
||||
<p>程序官网:{programUrl}</p>
|
||||
<p>系统版本:{SystemVersion}</p>
|
||||
<p>主要开发者:gfdgd xi、为什么您不喜欢熊出没和阿布呢</p>
|
||||
<h1>©2021-{time.strftime("%Y")} RacoonGX 团队</h1>'''
|
||||
updateThingsString = ""
|
||||
tips = ""
|
||||
contribute = ""
|
||||
@@ -1594,12 +1695,32 @@ except:
|
||||
# add sub window
|
||||
#添加窗口开启关闭开关,防止重复开启
|
||||
windowflag = "close"
|
||||
def Egg():
|
||||
def Open():
|
||||
try:
|
||||
lists = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/VersionList.json").text)
|
||||
lists = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd-xi-org/wine-runner-downloads-of-runner/raw/branch/master/Open-UEngine/lists.json").text)
|
||||
data = []
|
||||
for i in lists:
|
||||
data.append(int(requests.get("https://304626p927.goho.co/uengine-runner/{}/data.txt".format(i)).text))
|
||||
data.append(int(requests.get("https://code.gitlink.org.cn/gfdgd-xi-org/wine-runner-downloads-of-runner/raw/branch/master/Open-UEngine/{}.txt".format(i)).text))
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!")
|
||||
return
|
||||
fig = matplotlib.pylab.figure()
|
||||
fig.canvas.set_window_title("“UEngine 运行器”打开数(数据只供参考)")
|
||||
matplotlib.pylab.plot(lists, data)
|
||||
index = numpy.arange(len(lists))
|
||||
fonts = matplotlib.font_manager.FontProperties(fname='/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc') # 用于支持中文显示,需要依赖fonts-noto-cjk
|
||||
matplotlib.pylab.xlabel("版本号", fontproperties=fonts)
|
||||
matplotlib.pylab.ylabel("打开数", fontproperties=fonts)
|
||||
|
||||
matplotlib.pylab.title("“UEngine 运行器”打开数(数据只供参考)", fontproperties=fonts)
|
||||
matplotlib.pylab.show()
|
||||
|
||||
def Download():
|
||||
try:
|
||||
lists = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd-xi-org/wine-runner-downloads-of-runner/raw/branch/master/Install-UEngine/lists.json").text)
|
||||
data = []
|
||||
for i in lists:
|
||||
data.append(int(requests.get("https://code.gitlink.org.cn/gfdgd-xi-org/wine-runner-downloads-of-runner/raw/branch/master/Install-UEngine/{}.txt".format(i)).text))
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!")
|
||||
return
|
||||
@@ -1634,6 +1755,27 @@ def showhelp():
|
||||
def ChgTips():
|
||||
HelpStr.setHtml(tips)
|
||||
|
||||
def ChgGPLV3():
|
||||
try:
|
||||
with open(f"{programPath}/LICENSE", "r") as file:
|
||||
things = file.read()
|
||||
try:
|
||||
HelpStr.setMarkdown(things)
|
||||
except:
|
||||
# 旧版 QT 不支持 Markdown
|
||||
traceback.print_exc()
|
||||
HelpStr.setText(things)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
HelpStr.setText(traceback.print_exc())
|
||||
|
||||
def ChgAdmiration():
|
||||
HelpStr.setHtml(f"""<p><b>赞赏要记得要添加备注“UEngine运行器”,然后后面接自己想要备注的内容或不写</p></b>
|
||||
<p><img src='{programPath}/Icon/doge.png'></p>
|
||||
<h3>转到微信</h3>
|
||||
<p><img src='{programPath}/Icon/QR-WeChat.png'></p>
|
||||
<h3>转到支付宝</h3>
|
||||
<p><img src='{programPath}/Icon/QR-ZhiFuBao.png'></p>""")
|
||||
|
||||
BtnReadme = QtWidgets.QPushButton("使用说明")
|
||||
BtnLog = QtWidgets.QPushButton("更新内容")
|
||||
@@ -1641,14 +1783,31 @@ def showhelp():
|
||||
BtnGongxian = QtWidgets.QPushButton("谢明列表")
|
||||
BtnAbout = QtWidgets.QPushButton("关于")
|
||||
BtnDownN = QtWidgets.QPushButton("程序下载量")
|
||||
BtnOpenN = QtWidgets.QPushButton("程序打开量")
|
||||
BtnGPLV3 = QtWidgets.QPushButton("程序开源许可证")
|
||||
BtnAdmiration = QtWidgets.QPushButton("赞赏(暂未开启)")
|
||||
BtnAdmiration.setDisabled(True)
|
||||
HelpStr = QtWidgets.QTextBrowser()
|
||||
BtnDownN.setEnabled("--彩蛋" in sys.argv)
|
||||
# 此功能从 2.0.0 后不再隐藏
|
||||
#BtnDownN.setEnabled("--彩蛋" in sys.argv)
|
||||
# 暂时隐藏赞赏
|
||||
try:
|
||||
things = requests.get("https://code.gitlink.org.cn/gfdgd_xi/uengine-runner-list/raw/branch/master/admiration.txt").text.strip()
|
||||
except:
|
||||
things = ""
|
||||
traceback.print_exc()
|
||||
if "--admiration" in sys.argv or things == "true":
|
||||
BtnAdmiration.setEnabled(True)
|
||||
BtnAdmiration.setText("赞赏")
|
||||
BtnReadme.clicked.connect(ChgTips)
|
||||
BtnLog.clicked.connect(ChgLog)
|
||||
BtnZujian.clicked.connect(ChgDep)
|
||||
BtnGongxian.clicked.connect(ChgCon)
|
||||
BtnAbout.clicked.connect(ChgAbout)
|
||||
BtnDownN.clicked.connect(Egg)
|
||||
BtnDownN.clicked.connect(Download)
|
||||
BtnGPLV3.clicked.connect(ChgGPLV3)
|
||||
BtnAdmiration.clicked.connect(ChgAdmiration)
|
||||
BtnOpenN.clicked.connect(Open)
|
||||
|
||||
ChgTips()
|
||||
|
||||
@@ -1656,9 +1815,12 @@ def showhelp():
|
||||
helpLayout.addWidget(BtnLog, 1, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnZujian, 2, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnGongxian, 3, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnAbout, 5, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnDownN, 4, 0, 1, 1)
|
||||
helpLayout.addWidget(HelpStr, 0, 1, 7, 1)
|
||||
helpLayout.addWidget(BtnOpenN, 5, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnGPLV3, 6, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnAdmiration, 7, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnAbout, 8, 0, 1, 1)
|
||||
helpLayout.addWidget(HelpStr, 0, 1, 10, 1)
|
||||
|
||||
helpWidget.setLayout(helpLayout)
|
||||
helpWindow.setCentralWidget(helpWidget)
|
||||
@@ -1675,15 +1837,17 @@ if not os.path.exists("/usr/bin/uengine"):
|
||||
# Deepin/UOS 用户
|
||||
if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower():
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n安装完后重新启动该程序即可") == QtWidgets.QMessageBox.Yes:
|
||||
os.system(f"'{programPath}/launch.sh' deepin-terminal -C \"pkexec apt install uengine -y\"")
|
||||
OpenTerminal(f"pkexec apt install uengine -y")
|
||||
sys.exit(0)
|
||||
# 非 Deepin/UOS 用户
|
||||
# 因为安装器出现问题,所以废弃
|
||||
else:
|
||||
#QtWidgets.QMessageBox.critical(None, "错误", "请安装 UEngine 后继续")
|
||||
#sys.exit(0)
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会使用 shenmo 提供的脚本进行安装\n安装完后重新启动该程序即可\n提示:无法保证此安装脚本安装的 UEngine 可以使用") == QtWidgets.QMessageBox.Yes:
|
||||
os.system(f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath}/uengine-installer'\"")
|
||||
#if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会使用 shenmo 提供的脚本进行安装\n安装完后重新启动该程序即可\n提示:无法保证此安装脚本安装的 UEngine 可以使用") == QtWidgets.QMessageBox.Yes:
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会安装移植版本(之前由 Shenmo 编写)\n安装完后重新启动该程序即可\n提示:需要在 Ubuntu 22.04 及以上版本才能正常安装") == QtWidgets.QMessageBox.Yes:
|
||||
#os.system(f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath}/uengine-installer'\"")
|
||||
OpenTerminal(f"bash '{programPath}/uengine-installer'")
|
||||
sys.exit(0)
|
||||
|
||||
###########################
|
||||
@@ -1705,6 +1869,7 @@ FrmInstall = QtWidgets.QGridLayout()
|
||||
BtnFindApk = QtWidgets.QPushButton(langFile[lang]["Main"]["MainWindow"]["BtnFindApk"])
|
||||
BtnInstall = QtWidgets.QPushButton(langFile[lang]["Main"]["MainWindow"]["BtnInstall"])
|
||||
BtnShowUengineApp = QtWidgets.QPushButton(langFile[lang]["Main"]["MainWindow"]["BtnShowUengineApp"])
|
||||
BtnAppStore = QtWidgets.QPushButton("微型应用商店")
|
||||
BtnUninstall = QtWidgets.QPushButton(langFile[lang]["Main"]["MainWindow"]["BtnUninstall"])
|
||||
Btngeticon = QtWidgets.QPushButton(langFile[lang]["Main"]["MainWindow"]["Btngeticon"])
|
||||
BtnSaveApk = QtWidgets.QPushButton(langFile[lang]["Main"]["MainWindow"]["BtnSaveApk"])
|
||||
@@ -1713,6 +1878,7 @@ BtnApkInformation = QtWidgets.QPushButton(langFile[lang]["Main"]["MainWindow"]["
|
||||
FrmInstallWidget.setLayout(FrmInstall)
|
||||
FrmInstallWidget.setSizePolicy(size)
|
||||
BtnShowUengineApp.setSizePolicy(size)
|
||||
BtnAppStore.setSizePolicy(size)
|
||||
ComboInstallPath.setEditable(True)
|
||||
ComboInstallPath.addItems(findApkHistory)
|
||||
ComboInstallPath.setEditText("")
|
||||
@@ -1736,11 +1902,13 @@ BtnUninstall.clicked.connect(ButtonClick8)
|
||||
Btngeticon.clicked.connect(SaveIconToOtherPath)
|
||||
BtnSaveApk.clicked.connect(SaveInstallUengineApp)
|
||||
BtnApkInformation.clicked.connect(ApkInformation.ShowWindows)
|
||||
BtnAppStore.clicked.connect(lambda: threading.Thread(target=os.system, args=[f"python3 '{programPath}/AutoConfig.py'"]).start())
|
||||
# 布局控件
|
||||
widgetLayout.addWidget(LabApkPath, 0, 0, 1, 2)
|
||||
widgetLayout.addWidget(ComboInstallPath, 1, 0, 1, 2)
|
||||
widgetLayout.addWidget(LabApkPath, 0, 0, 1, 3)
|
||||
widgetLayout.addWidget(ComboInstallPath, 1, 0, 1, 3)
|
||||
widgetLayout.addWidget(BtnShowUengineApp, 2, 0, 1, 1)
|
||||
widgetLayout.addWidget(FrmInstallWidget, 0, 2, 3, 1)
|
||||
widgetLayout.addWidget(BtnAppStore, 2, 1, 1, 1)
|
||||
widgetLayout.addWidget(FrmInstallWidget, 0, 3, 3, 1)
|
||||
FrmInstall.addWidget(BtnFindApk, 0, 0, 1, 1)
|
||||
FrmInstall.addWidget(BtnInstall, 0, 1, 1, 1)
|
||||
FrmInstall.addWidget(BtnUninstall, 1, 0, 1, 1)
|
||||
@@ -1754,9 +1922,9 @@ adb = menu.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Name"])
|
||||
uengine = menu.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Name"])
|
||||
help = menu.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Name"])
|
||||
|
||||
cleanProgramHistory = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Menu"][0])
|
||||
settingWindow = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Menu"][2])
|
||||
exitProgram = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Menu"][1])
|
||||
cleanProgramHistory = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Menu"][0])
|
||||
settingWindow = QtWidgets.QAction(QtGui.QIcon.fromTheme("settings"), langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Menu"][2])
|
||||
exitProgram = QtWidgets.QAction(QtGui.QIcon.fromTheme("exit"), langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Menu"][1])
|
||||
programmenu.addAction(cleanProgramHistory)
|
||||
programmenu.addAction(settingWindow)
|
||||
programmenu.addSeparator()
|
||||
@@ -1771,11 +1939,11 @@ adbConnectDevice = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"
|
||||
adbChangeUengineDisplaySize = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][3])
|
||||
adbAndroidInstallAppList = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][4])
|
||||
adbTop = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][5])
|
||||
adbShell = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][6])
|
||||
adbScrcpyConnectUengine = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][7])
|
||||
adbShell = QtWidgets.QAction(QtGui.QIcon.fromTheme("terminal"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][6])
|
||||
adbScrcpyConnectUengine = QtWidgets.QAction(QtGui.QIcon.fromTheme("guiscrcpy"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][7])
|
||||
adb.addAction(adbUengineConnect)
|
||||
adb.addSeparator()
|
||||
adbServer = adb.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Name"])
|
||||
adbServer = adb.addMenu(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Name"])
|
||||
adb.addAction(adbConnectDevice)
|
||||
adb.addSeparator()
|
||||
adb.addAction(adbChangeUengineDisplaySize)
|
||||
@@ -1784,13 +1952,13 @@ adb.addAction(adbTop)
|
||||
adb.addAction(adbShell)
|
||||
adb.addAction(adbScrcpyConnectUengine)
|
||||
adb.addSeparator()
|
||||
uengineUseAdbm = adb.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Name"])
|
||||
adbStartServer = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Menu"][0])
|
||||
adbStopServer = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Menu"][1])
|
||||
adbKillAdbProgress = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Menu"][2])
|
||||
uengineConnectAdb = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Menu"][0])
|
||||
uengineUseAdb = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Menu"][1])
|
||||
uengineDoNotUseAdb = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Menu"][2])
|
||||
uengineUseAdbm = adb.addMenu(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Name"])
|
||||
adbStartServer = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Menu"][0])
|
||||
adbStopServer = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Menu"][1])
|
||||
adbKillAdbProgress = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][1]["Menu"][2])
|
||||
uengineConnectAdb = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Menu"][0])
|
||||
uengineUseAdb = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Menu"][1])
|
||||
uengineDoNotUseAdb = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][1]["Menu"][8]["Menu"][2])
|
||||
# 绑定信号
|
||||
uengineConnectAdb.triggered.connect(UengineConnectAdb)
|
||||
adbConnectDevice.triggered.connect(AdbConnectDeviceShow)
|
||||
@@ -1819,26 +1987,37 @@ uengineDoNotUseAdb.triggered.connect(UengineDoNotUseAdb)
|
||||
|
||||
uengineAllowOrDisallowUpdateAndroidApp = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][13])
|
||||
uengineSetHttpProxy = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][15])
|
||||
uengineOpenDebBuilder = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][1])
|
||||
uengineKeyboardToMouse = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][7])
|
||||
uengineCheckCpu = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][8])
|
||||
uengineUbuntuInstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][12])
|
||||
uengineDeleteUengineCheck = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9])
|
||||
uengineOpenDebBuilder = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), "UEngine 应用打包器(简单版)")
|
||||
uengineOpenDebBuilderMore = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), "UEngine 应用打包器(高级版)")
|
||||
uengineKeyboardToMouse = QtWidgets.QAction(QtGui.QIcon.fromTheme("keyboard"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][7])
|
||||
uengineCheckCpu = QtWidgets.QAction(QtGui.QIcon.fromTheme("cpu"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][8])
|
||||
#uengineUbuntuInstall = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][12])
|
||||
uengineDeleteUengineCheck = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9])
|
||||
uengineReinstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10])
|
||||
uengineUbuntuInstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][14])
|
||||
uengineUbuntuInstall = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][14])
|
||||
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu 上安装 UEngine(SuperSU 镜像)")
|
||||
uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16])
|
||||
uengine.addAction(uengineAllowOrDisallowUpdateAndroidApp)
|
||||
uengine.addAction(uengineSetHttpProxy)
|
||||
uengine.addAction(uengineOpenDebBuilder)
|
||||
uengine.addAction(uengineOpenDebBuilderMore)
|
||||
uengine.addAction(uengineKeyboardToMouse)
|
||||
uengine.addAction(uengineCheckCpu)
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(uengineUbuntuInstall)
|
||||
uengine.addAction(uengineUbuntuInstallRoot)
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(uengineWindowSizeSetting)
|
||||
uengineService = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Name"])
|
||||
uengineInternet = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Name"])
|
||||
uengineIcon = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Name"])
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(uengineAllowOrDisallowUpdateAndroidApp)
|
||||
uengine.addAction(uengineSetHttpProxy)
|
||||
uengine.addSeparator()
|
||||
uengineService = uengine.addMenu(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Name"])
|
||||
uengineInternet = uengine.addMenu(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Name"])
|
||||
uengine.addSeparator()
|
||||
uengineIcon = uengine.addMenu(QtGui.QIcon.fromTheme("desktop"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Name"])
|
||||
uengine.addSeparator()
|
||||
uengine.addMenu(uengineUseAdbm)
|
||||
uengineData = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Name"])
|
||||
uengineData = uengine.addMenu(QtGui.QIcon.fromTheme("fileopen"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Name"])
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(uengineDeleteUengineCheck)
|
||||
uengine.addAction(uengineReinstall)
|
||||
uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"])
|
||||
@@ -1847,16 +2026,18 @@ uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["M
|
||||
uengineAllowOrDisallowUpdateAndroidApp.triggered.connect(AllowOrDisallowUpdateAndroidApp)
|
||||
uengineSetHttpProxy.triggered.connect(SetHttpProxy)
|
||||
uengineOpenDebBuilder.triggered.connect(OpenUengineDebBuilder)
|
||||
uengineOpenDebBuilderMore.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/uengine-apk-builder-more'"]).start())
|
||||
uengineKeyboardToMouse.triggered.connect(KeyboardToMouse)
|
||||
uengineCheckCpu.triggered.connect(UengineCheckCpu)
|
||||
uengineUbuntuInstall.triggered.connect(UengineUbuntuInstall)
|
||||
uengineUbuntuInstallRoot.triggered.connect(UengineUbuntuInstallRoot)
|
||||
uengineDeleteUengineCheck.triggered.connect(DelUengineCheck)
|
||||
uengineReinstall.triggered.connect(ReinstallUengine)
|
||||
uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow)
|
||||
|
||||
uengineStart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][0])
|
||||
uengineStop = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][1])
|
||||
uengineRestart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][2])
|
||||
uengineStart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][0])
|
||||
uengineStop = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][1])
|
||||
uengineRestart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][2])
|
||||
uengineService.addAction(uengineStart)
|
||||
uengineService.addAction(uengineStop)
|
||||
uengineService.addAction(uengineRestart)
|
||||
@@ -1865,14 +2046,14 @@ uengineStart.triggered.connect(StartUengine)
|
||||
uengineStop.triggered.connect(StopUengine)
|
||||
uengineRestart.triggered.connect(UengineRestart)
|
||||
|
||||
uengineBridgeStart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][0])
|
||||
uengineBridgeStop = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][1])
|
||||
uengineBridgeRestart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][2])
|
||||
uengineBridgeReload = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][3])
|
||||
uengineBridgeForceReload = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][4])
|
||||
uengineBridgeStart = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][0])
|
||||
uengineBridgeStop = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][1])
|
||||
uengineBridgeRestart = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][2])
|
||||
uengineBridgeReload = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][3])
|
||||
uengineBridgeForceReload = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][4])
|
||||
uengineInternet.addAction(uengineBridgeStart)
|
||||
uengineInternet.addAction(uengineBridgeStop)
|
||||
uengineInternet.addAction(uengineReinstall)
|
||||
#uengineInternet.addAction(uengineReinstall)
|
||||
uengineInternet.addAction(uengineBridgeReload)
|
||||
uengineInternet.addAction(uengineBridgeForceReload)
|
||||
# 绑定信号
|
||||
@@ -1882,10 +2063,10 @@ uengineBridgeRestart.triggered.connect(UengineBridgeRestart)
|
||||
uengineBridgeReload.triggered.connect(UengineBridgeReload)
|
||||
uengineBridgeForceReload.triggered.connect(UengineBridgeForceReload)
|
||||
|
||||
uengineSendUengineAndroidListForDesktop = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][0])
|
||||
uengineSendUengineAndroidListForLauncher = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][1])
|
||||
uengineAddNewUengineDesktopLink = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][2])
|
||||
uengineCleanAllUengineDesktopLink = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][3])
|
||||
uengineSendUengineAndroidListForDesktop = QtWidgets.QAction(QtGui.QIcon.fromTheme("desktop"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][0])
|
||||
uengineSendUengineAndroidListForLauncher = QtWidgets.QAction(QtGui.QIcon.fromTheme("desktop"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][1])
|
||||
uengineAddNewUengineDesktopLink = QtWidgets.QAction(QtGui.QIcon.fromTheme("desktop"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][2])
|
||||
uengineCleanAllUengineDesktopLink = QtWidgets.QAction(QtGui.QIcon.fromTheme("desktop"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Menu"][3])
|
||||
uengineIcon.addAction(uengineSendUengineAndroidListForDesktop)
|
||||
uengineIcon.addAction(uengineSendUengineAndroidListForLauncher)
|
||||
uengineIcon.addSeparator()
|
||||
@@ -1899,9 +2080,9 @@ uengineAddNewUengineDesktopLink.triggered.connect(AddNewUengineDesktopLink.ShowW
|
||||
uengineCleanAllUengineDesktopLink.triggered.connect(CleanAllUengineDesktopLink)
|
||||
|
||||
#uengineData
|
||||
uengineOpenRootData = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][0])
|
||||
uengineOpenUserData = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][1])
|
||||
uengineBackClean = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][2])
|
||||
uengineOpenRootData = QtWidgets.QAction(QtGui.QIcon.fromTheme("fileopen"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][0])
|
||||
uengineOpenUserData = QtWidgets.QAction(QtGui.QIcon.fromTheme("fileopen"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][1])
|
||||
uengineBackClean = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][2])
|
||||
uengineData.addAction(uengineOpenRootData)
|
||||
uengineData.addAction(uengineOpenUserData)
|
||||
uengineData.addSeparator()
|
||||
@@ -1924,24 +2105,32 @@ uengineInstallRootUengineImage.triggered.connect(InstallRootUengineImage)
|
||||
uengineBuildRootUengineImage.triggered.connect(BuildRootUengineImage)
|
||||
uengineReinstallUengineImage.triggered.connect(ReinstallUengineImage)
|
||||
|
||||
helpOpenProgramUrl = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][0])
|
||||
makerWebsize = QtWidgets.QAction("作者个人站")
|
||||
helpForum = QtWidgets.QAction("程序论坛")
|
||||
uengineRunnerSearch = QtWidgets.QAction("查询指定程序在 UEngine 的运行情况")
|
||||
helpOpenProgramUrl = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][0])
|
||||
makerWebsize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), "作者个人站")
|
||||
helpForum = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), "程序论坛")
|
||||
uengineRunnerSearch = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), "查询指定程序在 UEngine 的运行情况")
|
||||
helpUengineRunnerBugUpload = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][2])
|
||||
helpShowHelp = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][4])
|
||||
helpRunnerUpdate = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][3])
|
||||
helpAbout = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][1])
|
||||
helpAboutQt = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][5])
|
||||
helpFen = QtWidgets.QAction("程序评分")
|
||||
helpWebInformation = QtWidgets.QAction("程序公告")
|
||||
helpAbout = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][1])
|
||||
helpAboutQt = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][5])
|
||||
help.addAction(helpOpenProgramUrl)
|
||||
help.addAction(uengineRunnerSearch)
|
||||
help.addAction(makerWebsize)
|
||||
help.addAction(helpForum)
|
||||
help.addSeparator()
|
||||
help.addAction(helpUengineRunnerBugUpload)
|
||||
help.addSeparator()
|
||||
help.addAction(helpShowHelp)
|
||||
help.addAction(helpRunnerUpdate)
|
||||
help.addAction(helpFen)
|
||||
help.addAction(helpWebInformation)
|
||||
help.addSeparator()
|
||||
help.addAction(helpAbout)
|
||||
help.addAction(helpAboutQt)
|
||||
help.addSeparator()
|
||||
hm1 = help.addMenu("更多生态适配应用")
|
||||
hm1_1 = QtWidgets.QAction("运行 Windows 应用:Wine 运行器")
|
||||
hm1.addAction(hm1_1)
|
||||
@@ -1950,10 +2139,12 @@ hm1_1.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd
|
||||
helpOpenProgramUrl.triggered.connect(OpenProgramURL)
|
||||
uengineRunnerSearch.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io/uengine-runner-info/"))
|
||||
makerWebsize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io"))
|
||||
helpForum.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/"))
|
||||
helpForum.triggered.connect(lambda: webbrowser.open_new_tab("https://bbs.racoongx.cn/"))
|
||||
helpUengineRunnerBugUpload.triggered.connect(UengineRunnerBugUpload)
|
||||
helpShowHelp.triggered.connect(ShowHelp)
|
||||
helpRunnerUpdate.triggered.connect(UpdateWindow.ShowWindow)
|
||||
helpFen.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/ProgramFen.py'"]).start())
|
||||
helpWebInformation.triggered.connect(GetNewInformation)
|
||||
helpAbout.triggered.connect(showhelp)
|
||||
helpAboutQt.triggered.connect(lambda: QtWidgets.QMessageBox.aboutQt(widget))
|
||||
# 设置窗口
|
||||
@@ -1964,4 +2155,13 @@ window.setWindowTitle(title)
|
||||
window.show()
|
||||
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
window.setFixedSize(window.frameSize().width(), window.frameSize().height())
|
||||
# 癸卯年正月初一彩蛋(只显示一次,错过就没了)
|
||||
# (2023年1月22日)
|
||||
if datetime.datetime.now().year == 2023 and datetime.datetime.now().month == 1 and datetime.datetime.now().day == 22 and not os.path.exists(f"{get_home()}/.config/uengine-runner/2023-sf.lock"):
|
||||
os.system(f"touch '{get_home()}/.config/uengine-runner/2023-sf.lock'")
|
||||
QtWidgets.QMessageBox.information(window, "新年祝福", "今天是癸卯年正月初一,RacoonGX 团队祝您在新的一年里万事顺意、幸福美满、官运亨通、吉祥如意、万事顺利、荣华富贵、一帆风顺、金玉满堂、五福临门、龙凤呈祥、龙门精神、百业兴旺、六畜兴旺、五谷丰登、喜上眉梢!")
|
||||
#if datetime.datetime.now().year >= 2023 and datetime.datetime.now().month >= 1 and datetime.datetime.now().day >= 22:
|
||||
if version == "2.0.0":
|
||||
title += " 新春版"
|
||||
window.setWindowTitle(title)
|
||||
sys.exit(app.exec_())
|
||||
|
||||
@@ -1,22 +1,37 @@
|
||||
Package: com.gitee.uengine.runner.spark
|
||||
Source: com.gitee.uengine.runner.spark
|
||||
Replaces: spark-uengine-runner, com.gitee.uengine.runner.spark.ubuntu
|
||||
Version: 1.8.2-uos
|
||||
Version: 2.0.0
|
||||
Architecture: all
|
||||
Section: utils
|
||||
Installed-Size: 1600
|
||||
Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>, 柚子<https://gitee.com/Limexb>, 为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>, 星空露光<https://gitee.com/Cynorkyle>, shenmo<jifengshenmo@outlook.com>
|
||||
Depends: python3, python3-tk, python3-pip, aapt, python3-setuptools, deepin-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, inotify-tools, aria2, python3-pyqt5, python3-matplotlib, python3-urllib3
|
||||
Recommends: uengine, deepin-elf-verify (>= 0.0.16.7-1)
|
||||
Installed-Size: 2920
|
||||
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||
Depends: python3, python3-tk, python3-pip, aapt, python3-setuptools, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, inotify-tools, aria2, python3-pyqt5, python3-matplotlib, python3-urllib3
|
||||
Recommends: uengine, deepin-elf-verify, python3-pyqt5.qtwebengine
|
||||
Priority: optional
|
||||
Conflicts: spark-uengine-apk-builder, com.gitee.uengine.runner.spark.ubuntu
|
||||
Homepage: [https://gitee.com/gfdgd-xi/uengine-runner, https://github.com/gfdgd-xi/uengine-runner, https://www.gitlink.org.cn/gfdgd_xi/uengine-runner]
|
||||
Description: UEngine 运行器,1.8.2 更新内容:
|
||||
※1、重新恢复 uengine-installer For Ubuntu
|
||||
※2、修复 postrm 的问题
|
||||
※3、修复“添加UEngine应用快捷方式出现问题”的问题
|
||||
※4、修复打包器无参数问题
|
||||
※5、打包器默认勾选“使用 uengine-dc 前缀”
|
||||
6、修复Python主版本号判断时潜在的问题(By Bail)
|
||||
7、新增部分资源入口
|
||||
开发/参与者:gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>, 柚子<https://gitee.com/Limexb>, 为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>, 星空露光<https://gitee.com/Cynorkyle>, shenmo<jifengshenmo@outlook.com>
|
||||
Homepage: https://gitee.com/gfdgd-xi/uengine-runner
|
||||
Description: UEngine 运行器,2.0.0 更新内容:
|
||||
※1、内置微型应用商店,支持评论、评分功能;
|
||||
※2、修复 UEngine 安装器在 Wayland 下无法正常运行的问题;
|
||||
※3、更新 UEngine 安装器安装的 UEngine 版本;
|
||||
※4、修复 UEngine 安装器安装后的 UEngine 无法正常安装 APK 的问题(包括从运行器和 deb 包安装);
|
||||
※5、UEngine 安装器支持安装使用 SuperSU Root 的镜像;
|
||||
※6、UEngine 安装器安装后的 UEngine 支持开机后自动加载运行环境,无需人手动打开终端运行;
|
||||
※7、放开原先程序内的程序安装量查询功能,并新增打开量查询功能(在程序的关于窗口里打开);
|
||||
※8、程序更新时不需要关闭所有 Python3 程序,只会关闭自己;
|
||||
※9、新增彩蛋(只在2023年1月22日生效);
|
||||
※10、修复 UEngine 打包器在部分系统无法打开的问题;
|
||||
※11、新增程序公告功能;
|
||||
※12、修复了程序更新功能从高版本降级到低版本的问题;
|
||||
※13、不强制依赖 Deepin 终端;
|
||||
※14、新增 UEngine 打包器(高级版);
|
||||
15、更改程序论坛网址;
|
||||
16、新增程序评分功能;
|
||||
17、修复 UEngine 打包器在打包时无法正确禁用所有选项;
|
||||
18、UEngine 打包器打包的 deb 不再指定 deepin-elf-verify 依赖版本;
|
||||
19、“更多帮助”功能支持访问云端的帮助内容;
|
||||
20、更换程序接口;
|
||||
21、优化菜单栏分类,菜单栏新增图标;
|
||||
22、程序关于可以查看程序使用的开源协议;
|
||||
23、修复在 Ubuntu 下安装后启动器没有图标的问题。
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
# 使用 pip 安装所需库
|
||||
echo 安装组件
|
||||
python3 -m pip install --upgrade pip --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
python3 -m pip install --upgrade ttkthemes --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
python3 -m pip install --upgrade pyautogui --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
python3 -m pip install --upgrade keyboard --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
echo 执行完成
|
||||
# 建立软链接
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner /usr/bin/uengine-runner
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder /usr/bin/uengine-apk-builder
|
||||
@@ -16,9 +18,10 @@ ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-useadb
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-launch.sh /usr/bin/uengine-runner-launch.sh
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug /usr/bin/uengine-runner-update-bug
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/root-uengine /usr/bin/uengine-root
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/AutoShell/main.py /usr/bin/uengine-runner-auto-install-bash
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh /usr/bin/uengine-runner-applist-launch.sh
|
||||
# 刷新图标缓存
|
||||
# 因为 Ubuntu 的问题,省略
|
||||
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
|
||||
# 向服务器返回安装数加1(不显示内容且忽略错误)
|
||||
curl https://304626p927.goho.co/uengine-runner/Install.php?Version=1.8.1-1 -s > /dev/null | true
|
||||
python3 /opt/apps/com.gitee.uengine.runner.spark/files/Download.py 2.0.0 > /dev/null | true
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 bash 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.0.0
|
||||
# 更新时间:2022年01月16日
|
||||
# 基于 bash
|
||||
#################################################################################################################
|
||||
# 删除软链接
|
||||
rm -f /usr/bin/uengine-runner
|
||||
rm -f /usr/bin/uengine-apk-builder
|
||||
@@ -14,6 +21,12 @@ rm -f /usr/bin/uengine-root
|
||||
rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/api/__pycache__
|
||||
rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/__pycache__
|
||||
rm -f /usr/bin/uengine-runner-applist-launch.sh
|
||||
rm -f /usr/bin/uengine-runner-auto-install-bash
|
||||
# 删除软件残留,简单粗暴一点直接全部删掉,防止出现警告
|
||||
# 加判断是为了怕 reinstall 后程序就再也打不开了(除非卸载后重新安装)
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||
rm -rf /opt/apps/com.gitee.uengine.runner.spark
|
||||
fi
|
||||
# 删除软件配置文件(只限“purge”)
|
||||
# 配置目录:~/.config/uengine-runner
|
||||
if [ "$1" = "purge" ]; then
|
||||
@@ -24,12 +37,25 @@ if [ "$1" = "purge" ]; then
|
||||
echo /home/$username
|
||||
if [ -d "/home/$username/.config/uengine-runner/" ]; then
|
||||
rm -rf "/home/$username/.config/uengine-runner/"
|
||||
# 删除 QWebEngine 记录
|
||||
rm -rf "/home/$username/.local/share/uengine-runner"
|
||||
rm -rf "/home/$username/.local/share/AutoConfig.py"
|
||||
rm -rf "/home/$username/.config/share/uengine-runner"
|
||||
rm -rf "/home/$username/.config/share/AutoConfig.py"
|
||||
rm -rf "/home/$username/.cache/share/uengine-runner"
|
||||
rm -rf "/home/$username/.cache/share/AutoConfig.py"
|
||||
fi
|
||||
done
|
||||
# 清理 root 用户的配置文件
|
||||
echo /root
|
||||
if [ -d "/root/.config/uengine-runner/" ]; then
|
||||
rm -rf "/root/.config/uengine-runner/"
|
||||
rm -rf "/root/.local/share/uengine-runner"
|
||||
rm -rf "/root/.local/share/AutoConfig.py"
|
||||
rm -rf "/root/.config/share/uengine-runner"
|
||||
rm -rf "/root/.config/share/AutoConfig.py"
|
||||
rm -rf "/root/.cache/share/uengine-runner"
|
||||
rm -rf "/root/.cache/share/AutoConfig.py"
|
||||
fi
|
||||
else
|
||||
echo "非 purge,跳过清理"
|
||||
|
||||
599
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/AutoConfig.py
Executable file
@@ -0,0 +1,599 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.4.0
|
||||
# 更新时间:2022年10月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
import os
|
||||
import sys
|
||||
import base64
|
||||
import json
|
||||
import traceback
|
||||
import urllib.request
|
||||
import requests
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
from UI.AutoConfig import *
|
||||
from Model import *
|
||||
try:
|
||||
import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
|
||||
webeng = True
|
||||
except:
|
||||
print("未安装此依赖库")
|
||||
webeng = False
|
||||
print("""太常引·建康中秋夜为吕叔潜赋
|
||||
一轮秋影转金波,飞镜又重磨。把酒问姮娥:被白发、欺人奈何?
|
||||
乘风好去,长空万里,直下看山河。斫去桂婆娑,人道是、清光更多。""")
|
||||
print("")
|
||||
print("""译文:一轮缓缓移动的秋月洒下万里金波,就像那刚磨亮的铜镜又飞上了天廓。我举起酒杯问那月中的嫦娥:怎么办呢?白发日增,好像故意欺负我。
|
||||
我要乘风飞上万里长空,俯视祖国的大好山河。还要砍去月中摇曳的桂树枝柯,人们说,这将使月亮洒下人间的光辉更多。""")
|
||||
print("================================")
|
||||
urlSourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/uengine-runner-list/raw/branch/master/auto", # Gitlink 源
|
||||
"https://gitee.com/gfdgd-xi/uengine-wine-runner-auto-configuration-script/raw/master/", # Gitee 源
|
||||
"https://gfdgd-xi.github.io/uengine-wine-runner-auto-configuration-script/", # Github 源
|
||||
"http://gfdgdxi.msns.cn/uengine-runner-list/auto/", # 备用源1,纯 IPv6 源
|
||||
"http://gfdgdxi.free.idcfengye.com/uengine-runner-auto-configuration-script/", # 备用源2
|
||||
"http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3
|
||||
"http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源
|
||||
]
|
||||
urlSources = urlSourcesList[0]
|
||||
lists = []
|
||||
|
||||
class ProgramRunStatusUpload():
|
||||
msgWindow = None
|
||||
starLayout = None
|
||||
fen = None
|
||||
starList = []
|
||||
sha1Value = ""
|
||||
programName = None
|
||||
def ChangeStar():
|
||||
if ProgramRunStatusUpload.fen.currentIndex() > 5:
|
||||
for i in ProgramRunStatusUpload.starList:
|
||||
i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>")
|
||||
return
|
||||
for i in range(ProgramRunStatusUpload.fen.currentIndex()):
|
||||
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>")
|
||||
head = ProgramRunStatusUpload.fen.currentIndex()
|
||||
end = len(ProgramRunStatusUpload.starList)
|
||||
for i in range(head, end):
|
||||
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>")
|
||||
|
||||
def ShowWindow(sha="", title=""):
|
||||
ProgramRunStatusUpload.starList = []
|
||||
ProgramRunStatusUpload.sha1Value = sha
|
||||
ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow()
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
ProgramRunStatusUpload.programName = QtWidgets.QLineEdit()
|
||||
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
|
||||
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
|
||||
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
|
||||
upload.clicked.connect(ProgramRunStatusUpload.Upload)
|
||||
if title != "":
|
||||
ProgramRunStatusUpload.programName.setText(title)
|
||||
ProgramRunStatusUpload.programName.setDisabled(True)
|
||||
# 生成星星列表
|
||||
for i in [1, 1, 1, 1, 0]:
|
||||
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
|
||||
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
|
||||
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
|
||||
ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可"))
|
||||
ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"])
|
||||
ProgramRunStatusUpload.fen.setCurrentIndex(4)
|
||||
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0)
|
||||
msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1)
|
||||
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
|
||||
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
|
||||
msgWidgetLayout.addWidget(upload, 3, 1)
|
||||
msgWidget.setLayout(msgWidgetLayout)
|
||||
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
|
||||
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
|
||||
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ProgramRunStatusUpload.msgWindow.show()
|
||||
|
||||
def Upload():
|
||||
try:
|
||||
#if ProgramRunStatusUpload.sha1Value == "":
|
||||
#ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
|
||||
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2Jhc2g=").decode("utf-8"), {
|
||||
"BashName": ProgramRunStatusUpload.sha1Value,
|
||||
"Fen": ProgramRunStatusUpload.fen.currentIndex()
|
||||
}).json()["Error"])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
|
||||
|
||||
class InformationWindow():
|
||||
def ShowWindow():
|
||||
#webeng = False
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
aboutHtml = ""
|
||||
try:
|
||||
get = requests.get(f"{urlSources}/information/{fileName}.txt")
|
||||
if get.status_code / 100 != 2 and get.status_code / 100 != 3:
|
||||
int("Bad")
|
||||
about = get.text
|
||||
aboutHtml = str(about)
|
||||
if not "<" in about:
|
||||
# 非 Html 标签
|
||||
for i in about.splitlines():
|
||||
about += f"<p>{i}</p>\n"
|
||||
#about = f"<pre>{about}</pre>"
|
||||
about = f"<h1>关于“{choose}”的介绍</h1>\n{about}"
|
||||
except:
|
||||
traceback.print_exc()
|
||||
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
|
||||
try:
|
||||
import requests as r
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
|
||||
maxHead = fenlists.index(max(fenlists))
|
||||
allNumber = 0
|
||||
for i in fenlists:
|
||||
allNumber += i
|
||||
try:
|
||||
maxNumber = max(fenlists) / allNumber * 100
|
||||
if tipsInfo == "":
|
||||
tipsInfo = f"有{maxNumber}%的用户选择了这个评分"
|
||||
except:
|
||||
pass
|
||||
end = 5
|
||||
starHtml = ""
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/BadStar.svg' width=50>\n"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
|
||||
else:
|
||||
for i in range(maxHead):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/Star.svg' width=50>\n"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
|
||||
head = maxHead
|
||||
for i in range(head, end):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/UnStar.svg' width=50>"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
|
||||
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
|
||||
message = QtWidgets.QDialog()
|
||||
messageLayout = QtWidgets.QVBoxLayout()
|
||||
if webeng:
|
||||
informationText = QtWebEngineWidgets.QWebEngineView()
|
||||
print(aboutHtml)
|
||||
if aboutHtml[:7] == "Visit: ":
|
||||
url = aboutHtml[7:].splitlines()[0]
|
||||
print(url)
|
||||
informationText.setUrl(QtCore.QUrl(url.strip()))
|
||||
else:
|
||||
#informationText.linkClicked.connect(lambda: print("a"))
|
||||
try:
|
||||
with open("/tmp/deepin-wine-runner-information.html", "w") as file:
|
||||
file.write(about)
|
||||
informationText.setUrl(QtCore.QUrl("file:///tmp/deepin-wine-runner-information.html"))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
informationText.setHtml(about)
|
||||
#informationText.urlChanged.connect(lambda: informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io")))
|
||||
else:
|
||||
informationText = QtWidgets.QTextBrowser()
|
||||
informationText.setHtml(about)
|
||||
uploadFen = QtWidgets.QPushButton("提交评分")
|
||||
uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
|
||||
|
||||
#informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io"))
|
||||
messageLayout.addWidget(informationText)
|
||||
messageLayout.addWidget(uploadFen)
|
||||
message.setWindowTitle(f"关于“{choose}”的介绍")
|
||||
message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
|
||||
message.setLayout(messageLayout)
|
||||
#message.setWindowModality(ApplicationModal);
|
||||
message.show()
|
||||
message.exec_()
|
||||
|
||||
def Add(lists: list):
|
||||
global pinLunLayout
|
||||
pinLunLayout1 = QtWidgets.QVBoxLayout()
|
||||
pinLunLayout = QtWidgets.QWidget()
|
||||
pinLunLayout.setLayout(pinLunLayout1)
|
||||
for i in range(pinLunLayout1.count()):
|
||||
pinLunLayout1.removeItem(pinLunLayout1.itemAt(i))
|
||||
for i in lists:
|
||||
widget = QtWidgets.QWidget()
|
||||
inLayout = QtWidgets.QGridLayout()
|
||||
inLayout.addWidget(QtWidgets.QLabel("<hr>"), 0, 0, 1, 3)
|
||||
inLayout.addWidget(QtWidgets.QLabel(f"<b>{i[0]}</b>"), 1, 0)
|
||||
inLayout.addWidget(QtWidgets.QLabel(f"<p align='right'><b>第{i[1]}层</b></p>"), 1, 2)
|
||||
inLayout.addWidget(QtWidgets.QLabel(i[2]), 2, 0, 1, 3)
|
||||
widget.setLayout(inLayout)
|
||||
pinLunLayout1.addWidget(widget)
|
||||
#pinLunLayout.addWidget(QtWidgets.QLabel("<hr/>"))
|
||||
# pinLunLayout = widget
|
||||
|
||||
all = 0
|
||||
now = 0
|
||||
class ProgramRunStatusShow():
|
||||
msgWindow = None
|
||||
pingLunLayout = None
|
||||
def ShowWindow():
|
||||
global lists
|
||||
global all
|
||||
global now
|
||||
global leftButton
|
||||
global rightButton
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
try:
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
#traceback.print_exc()
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
tipsInfo = "暂时无人提交此脚本评分,是否立即提交?"
|
||||
|
||||
maxHead = fenlists.index(max(fenlists))
|
||||
allNumber = 0
|
||||
for i in fenlists:
|
||||
allNumber += i
|
||||
try:
|
||||
maxNumber = max(fenlists) / allNumber * 100
|
||||
if tipsInfo == "":
|
||||
tipsInfo = f"有{maxNumber}%的用户选择了这个评分"
|
||||
except:
|
||||
pass
|
||||
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
starLayout = QtWidgets.QHBoxLayout()
|
||||
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此提交评分"))
|
||||
uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0, 2, 1)
|
||||
msgWidgetLayout.addLayout(starLayout, 0, 1, 2, 1)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 0, 2)
|
||||
#msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
|
||||
msgWidgetLayout.addWidget(uploadButton, 1, 2)
|
||||
end = 5
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>"))
|
||||
else:
|
||||
for i in range(maxHead):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>"))
|
||||
head = maxHead
|
||||
for i in range(head, end):
|
||||
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>"))
|
||||
pingLun = QtWidgets.QWidget()
|
||||
msgWidgetLayout.addWidget(pingLun, 4, 0, 1, 3)
|
||||
pingLunLayout = QtWidgets.QGridLayout()
|
||||
pingLunInfo = QtWidgets.QTextEdit()
|
||||
#pingLunInfo.document().setMaximumBlockCount(5)
|
||||
uploadButton = QtWidgets.QPushButton("评论")
|
||||
pingLunLayout.addWidget(pingLunInfo, 0, 0, 1, 3)
|
||||
pingLunLayout.addWidget(uploadButton, 1, 2)
|
||||
pingLunInfo.setPlaceholderText("""在此输入评论,须知:
|
||||
※1、不得含有色情、暴力、侮辱等违法内容以及不得有广告推广等内容
|
||||
※2、字数至少 15 字,但不得超过 250 字,评论内容最多 5 行,且评论内容将会进行审核,意味着评论不会实时生效显示
|
||||
※3、如果审核不通过将会被屏蔽并拉入黑名单,以及公开发布 IP 地址,评论前请三思!""")
|
||||
leftButton = QtWidgets.QPushButton("上一页")
|
||||
rightButton = QtWidgets.QPushButton("下一页")
|
||||
if maxHead == 0:
|
||||
#pingLun.setDisabled(True)
|
||||
pass
|
||||
else:
|
||||
# 显示最新的3条评论
|
||||
try:
|
||||
all = int(requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/data.txt").text)
|
||||
now = all - 3
|
||||
print(all)
|
||||
if all < 3:
|
||||
start = 0
|
||||
rightButton.setDisabled(True)
|
||||
else:
|
||||
start = all - 3
|
||||
uploadList = []
|
||||
for i in range(all - 1, start - 1, -1):
|
||||
print(f"第 {i + 1} 条评论:")
|
||||
info = requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
print(info)
|
||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||
Add(uploadList)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
try:
|
||||
ProgramRunStatusShow.pingLunLayout = pingLunLayout
|
||||
pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
|
||||
except:
|
||||
leftButton.setDisabled(True)
|
||||
rightButton.setDisabled(True)
|
||||
leftButton.clicked.connect(Left)
|
||||
rightButton.clicked.connect(Right)
|
||||
pingLunLayout.addWidget(leftButton, 3, 0)
|
||||
pingLunLayout.addWidget(rightButton, 3, 2)
|
||||
leftButton.setDisabled(True)
|
||||
pingLun.setLayout(pingLunLayout)
|
||||
msgWidget.setLayout(msgWidgetLayout)
|
||||
uploadButton.clicked.connect(lambda: ProgramRunStatusShow.Upload(pingLunInfo.toPlainText(), fileName))
|
||||
ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
|
||||
ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况")
|
||||
ProgramRunStatusShow.msgWindow.show()
|
||||
|
||||
def Upload(info, name):
|
||||
print(f"脚本:{name}")
|
||||
print(f"评论:{info}")
|
||||
try:
|
||||
res = requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL1BpbmdMdW4=").decode("utf-8"), {"PinLun": info, "Version": name}).json()
|
||||
print(res)
|
||||
if res["ExitCode"]:
|
||||
QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", res["Error"])
|
||||
return
|
||||
QtWidgets.QMessageBox.information(ProgramRunStatusShow.msgWindow, "提示", res["Error"])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", "提交失败")
|
||||
|
||||
|
||||
def UpdateFen():
|
||||
global now
|
||||
fileName = ""
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
uploadList = []
|
||||
for i in range(now + 2, now - 1, -1):
|
||||
print(f"第 {i + 1} 条评论:")
|
||||
info = requests.get(f"https://code.gitlink.org.cn/gfdgd-xi-org/bashpinlun/raw/branch/master/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
print(info)
|
||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||
#ProgramRunStatusShow.pingLunLayout.removeItem(ProgramRunStatusShow.pingLunLayout.itemAt(2))
|
||||
ProgramRunStatusShow.pingLunLayout.removeWidget(pinLunLayout)
|
||||
pinLunLayout.hide()
|
||||
#pinLunLayout.
|
||||
Add(uploadList)
|
||||
#l = QtWidgets.QGridLayout()
|
||||
#l.removeWidget(pinLunLayout)
|
||||
ProgramRunStatusShow.pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
|
||||
|
||||
def Left():
|
||||
global now
|
||||
global all
|
||||
|
||||
if now + 6 >= all:
|
||||
now = all - 3
|
||||
leftButton.setDisabled(True)
|
||||
rightButton.setEnabled(True)
|
||||
else:
|
||||
now += 3
|
||||
leftButton.setEnabled(True)
|
||||
rightButton.setEnabled(True)
|
||||
UpdateFen()
|
||||
print(all)
|
||||
print(now)
|
||||
|
||||
def Right():
|
||||
global now
|
||||
if now - 3 < 0:
|
||||
now = 0
|
||||
rightButton.setDisabled(True)
|
||||
leftButton.setEnabled(True)
|
||||
else:
|
||||
now -= 3
|
||||
leftButton.setEnabled(True)
|
||||
rightButton.setEnabled(True)
|
||||
UpdateFen()
|
||||
|
||||
def UploadFen():
|
||||
global lists
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
ProgramRunStatusUpload.ShowWindow(fileName, choose)
|
||||
|
||||
class Connect:
|
||||
def SearchBotton_Clicked():
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
if ui.searchThings.text() == "":
|
||||
# 显示全部内容
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
return
|
||||
for i in lists:
|
||||
# 显示筛选的内容
|
||||
if ui.searchThings.text().upper() in i[0].upper():
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
|
||||
def RunBotton_Clicked():
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
# 下载脚本
|
||||
things = ""
|
||||
try:
|
||||
print(f"{urlSources}/{fileName}")
|
||||
file = open("/tmp/wine-runner-auto-config.wsh", "w")
|
||||
things = requests.get(f"{urlSources}/{fileName}").text
|
||||
file.write(things)
|
||||
file.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "无法获取配置文件")
|
||||
return
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
if "($" in things:
|
||||
print("a")
|
||||
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
|
||||
print(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
|
||||
# 执行脚本
|
||||
print(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '/tmp/wine-runner-auto-config.wsh'")
|
||||
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '/tmp/wine-runner-auto-config.wsh'")
|
||||
#process = QtCore.QProcess()
|
||||
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", "/tmp/wine-runner-auto-config.wsh", "--system"])
|
||||
#process.waitForFinished()
|
||||
|
||||
def OpenFile_Triggered():
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(window, "提示", homePath, "配置文件(*.sh *.wsh);;全部文件(*.*)")
|
||||
if path[0] == "":
|
||||
return
|
||||
try:
|
||||
things = ""
|
||||
with open(path) as file:
|
||||
things = file.read()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
if "($" in things:
|
||||
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system")
|
||||
# 执行脚本
|
||||
OpenTerminal(f"env WINEARCH='{os.getenv('WINEARCH')}' WINEDEBUG='{os.getenv('WINEDEBUG')}' WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")
|
||||
#process = QtCore.QProcess()
|
||||
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", path[0], "--system"])
|
||||
#process.waitForFinished()
|
||||
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
|
||||
def ChangeSources():
|
||||
global urlSources
|
||||
sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
|
||||
for i in range(0, len(sources)):
|
||||
if sources[i].isChecked():
|
||||
urlSources = urlSourcesList[i]
|
||||
# 解析云列表
|
||||
try:
|
||||
# 获取列表
|
||||
lists = json.loads(requests.get(f"{urlSources}/list.json").text)
|
||||
# 解释列表并显示在 GUI 上
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
break
|
||||
|
||||
if __name__ == "__main__":
|
||||
homePath = os.path.expanduser('~')
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
information = json.loads(readtxt(f"{programPath}/information.json"))
|
||||
version = information["Version"]
|
||||
wine = "deepin-wine6-stable"
|
||||
wineprefix = f"{homePath}/.wine"
|
||||
try:
|
||||
wine = sys.argv[1]
|
||||
wineprefix = sys.argv[2]
|
||||
except:
|
||||
pass
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
pinLunLayout = QtWidgets.QHBoxLayout()
|
||||
ui.setupUi(window)
|
||||
window.setWindowTitle(f"UEngine 运行器 {version}——微型应用商店")
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
iconPath = "{}/runner.svg".format(programPath)
|
||||
window.show()
|
||||
#ui.actionGitlink.setExclusive(True)
|
||||
sourcesGroup = QtWidgets.QActionGroup(window)
|
||||
sourcesGroup.addAction(ui.actionGitlink)
|
||||
sourcesGroup.addAction(ui.actionGitee)
|
||||
sourcesGroup.addAction(ui.actionGithub)
|
||||
sourcesGroup.addAction(ui.action_IPv6)
|
||||
sourcesGroup.addAction(ui.action_2)
|
||||
sourcesGroup.addAction(ui.action_3)
|
||||
sourcesGroup.addAction(ui.action)
|
||||
sourcesGroup.triggered.connect(ChangeSources)
|
||||
sourcesGroup.setExclusive(True)
|
||||
#for i in [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action]:
|
||||
#i.triggered.connect(ChangeSources)
|
||||
#pass
|
||||
# 连接信号和槽
|
||||
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
||||
#ui.uploadFen.clicked.connect(UploadFen)
|
||||
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
|
||||
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
|
||||
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
|
||||
ui.exitProgram.triggered.connect(window.close)
|
||||
ui.getFen.clicked.connect(ProgramRunStatusShow.ShowWindow)
|
||||
# 解析云列表
|
||||
try:
|
||||
# 获取列表
|
||||
lists = json.loads(requests.get(f"{urlSources}/list.json").text)
|
||||
# 解释列表并显示在 GUI 上
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
|
||||
app.exec_()
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import platform
|
||||
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
information = json.loads(readtxt(f"{programPath}/../information.json"))
|
||||
version = information["Version"]
|
||||
thankText = ""
|
||||
for i in information["Contribute"]:
|
||||
thankText += f"{i}\n"
|
||||
programEnv = [
|
||||
["WINEPREFIX", f"{os.path.expanduser('~')}/.wine"],
|
||||
["WINE", "deepin-wine6-stable"],
|
||||
["DANGER", "0"],
|
||||
["PROGRAMPATH", programPath],
|
||||
["VERSION", version],
|
||||
["THANK", thankText.replace("\n", "\\n")],
|
||||
["MAKER", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["COPYRIGHT", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["PLATFORM", platform.system()],
|
||||
["DEBUG", str(int("--debug" in sys.argv))]
|
||||
]
|
||||
'''programEnv = [
|
||||
["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
|
||||
["($WINE)", "deepin-wine6-stable"],
|
||||
["($DANGER)", "0"],
|
||||
["($HOME)", os.path.expanduser('~')],
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["?", "0"],
|
||||
["PLATFORM)", platform.system()],
|
||||
["DEBUG)", str(int("--debug" in sys.argv))]
|
||||
]'''
|
||||
optionAll = 0
|
||||
if "--debug" in sys.argv:
|
||||
optionAll += 1
|
||||
if "--system" in sys.argv:
|
||||
programEnv.append(["DANGER", "1"])
|
||||
optionAll += 1
|
||||
if os.getenv("WINE") != None:
|
||||
programEnv.append(["WINE", os.getenv("WINE")])
|
||||
if os.getenv("WINEPREFIX") != None:
|
||||
programEnv.append(["WINEPREFIX", os.getenv("WINEPREFIX")])
|
||||
# 生成可以使用的参数
|
||||
commandEnv = ""
|
||||
for i in programEnv:
|
||||
commandEnv += f"{i[0]}=\"{i[1]}\" "
|
||||
commandEnv += f"PATH=\"{programPath}/command:$PATH\" "
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
os.system(f"{commandEnv} bash ")
|
||||
exit()
|
||||
command = ""
|
||||
for i in sys.argv[1:]:
|
||||
command += f"\"{i}\" "
|
||||
print("UEngine 运行器自动配置文件解析器(基于 Bash)")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
os.system(f"{commandEnv} bash {command}")
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"installdll": "安装指定 dll 在指定容器\n参数数量:1\n参数介绍:dll名称或在从互联网获取DLL工具的编号,如 7012 xolehlp.dll 平台:2003 架构:64 的 7012",
|
||||
"stopdll": "不允许指定 dll/exe 运行\n参数数量:1\n参数介绍:dll/exe 名称,如 example.exe",
|
||||
"installfont": "安装指定字体到指定容器\n参数数量:1\n在字体商店的编号,如 5 msyhbd.ttc 的 5",
|
||||
"installsparkcorefont": "安装星火应用商店的“微软核心字体”\n参数数量:0\n参数介绍:无",
|
||||
"installmono": "安装最新版本的 mono 到指定容器\n参数数量:0\n参数介绍:无",
|
||||
"installgecko": "安装最新版本的 gecko 到指定容器\n参数数量:0\n参数介绍:无",
|
||||
"installvcpp": "安装指定的 VCPP 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Studio C++ 工具的编号,如 10 Visual Studio C++ 2015、2017、2019 和 2022 X64 的 10",
|
||||
"installnet": "安装指定的 .net framework 运行库到指定容器\n参数数量:1\n参数介绍:在安装 .net framework 工具的编号,如 3 .net framework 4.5.1 Offline Installer 的 3",
|
||||
"installmsxml": "安装指定的 MSXML 运行库到指定容器\n参数数量:1\n参数介绍:在安装 MSXML 工具的编号,如 1、MSXML 4.0 SP3 的 1",
|
||||
"echo": "显示内容\n参数数量:≥1\n参数介绍:接要显示的内容",
|
||||
"info": "显示提示对话框\n参数数量:2\n参数介绍:标题+显示内容",
|
||||
"error": "显示错误对话框\n参数数量:2\n参数介绍:标题+显示内容",
|
||||
"warning": "显示警告对话框\n参数数量:2\n参数介绍:标题+显示内容",
|
||||
"exit": "退出程序\n参数数量:0\n参数介绍:无",
|
||||
"bat": "执行 cmd 命令在 Wine 容器内(在 Windows 将在系统执行命令)\n参数数量:≥1\n参数介绍:接要执行的命令",
|
||||
"bash": "执行 bash 命令(在 Windows 系统将执行 cmd 命令)\n参数数量:≥1\n参数介绍:接要执行的命令",
|
||||
"version": "显示解释器版本(Wine 运行器版本)\n参数数量:0\n参数介绍:无",
|
||||
"thank": "显示谢明列表\n参数数量:0\n参数介绍:无",
|
||||
"pause": "按回车键后继续\n参数数量:0\n参数介绍:无",
|
||||
"download": "使用 aria2 下载文件\n参数数量:≥1 && ≤3\n参数介绍:下载URL+保存在的文件夹+保存的文件名",
|
||||
"installdxvk": "安装 dxvk 到指定容器\n参数数量:0\n参数介绍:无",
|
||||
"createbotton": "在指定目录创建容器\n参数数量:0\n参数介绍:无",
|
||||
"reg": "导入 .reg 文件\n参数数量:0\n参数介绍:reg 文件路径",
|
||||
"enabledopengl": "开启 OpenGL\n参数数量:0\n参数介绍:无",
|
||||
"disbledopengl": "关闭 OpenGL\n参数数量:0\n参数介绍:无",
|
||||
"winecfg": "显示“Wine 设置”\n参数数量:0\n参数介绍:无",
|
||||
"winver": "显示“关于 Wine”\n参数数量:0\n参数介绍:无",
|
||||
"changeversion": "更改 Wine 容器系统版本(未实现)\n参数数量:无\n参数介绍:无",
|
||||
"cat": "显示指定文件(只支持显示编码为UTF-8的文件)\n参数数量:1\n参数介绍:无",
|
||||
"enabledhttpproxy": "设置指定容器代理\n参数数量:2\n参数介绍:代理服务器地址+端口",
|
||||
"disbledhttpproxy": "禁用指定容器代理\n参数数量:0\n参数介绍:无",
|
||||
"enabledwinecrashdialog": "启用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无",
|
||||
"disbledwinecrashdialog": "禁用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无",
|
||||
"disbledWinebottlecreatelink": "禁止 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无",
|
||||
"enabledWinebottlecreatelink": "允许 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无",
|
||||
"killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名",
|
||||
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
||||
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
||||
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无",
|
||||
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6",
|
||||
"installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库",
|
||||
"decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径",
|
||||
"programforum": "打开程序论坛\n参数数量:0\n参数介绍:无",
|
||||
"installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径",
|
||||
"installapk": "安装 APK 文件到 UEngine\n参数数量:1\n参数介绍:apk 文件路径"
|
||||
}
|
||||
@@ -0,0 +1,673 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:3.0.1
|
||||
# 更新时间:2022年10月05日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import random
|
||||
import api as uengineapi
|
||||
import platform
|
||||
import traceback
|
||||
import webbrowser
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
information = json.loads(readtxt(f"{programPath}/information.json"))
|
||||
version = information["Version"]
|
||||
thankText = ""
|
||||
helpList = json.loads(readtxt(f"{programPath}/ConfigLanguareRunner-help.json"))
|
||||
for i in information["Contribute"]:
|
||||
thankText += f"{i}\n"
|
||||
programEnv = [
|
||||
["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
|
||||
["($WINE)", "deepin-wine6-stable"],
|
||||
#["($DANGER)", "0"],
|
||||
["($DANGER)", "1"],
|
||||
["($HOME)", os.path.expanduser('~')],
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($?)", "0"],
|
||||
["($PLATFORM)", platform.system()],
|
||||
["($DEBUG)", "1"]
|
||||
#["($DEBUG)", str(int("--debug" in sys.argv))]
|
||||
]
|
||||
readOnlyEnv = [
|
||||
"($DANGER)",
|
||||
"($HOME)",
|
||||
"($PROGRAMPATH)",
|
||||
"($VERSION)",
|
||||
"($THANK)",
|
||||
"($MAKER)",
|
||||
"($COPYRIGHT)",
|
||||
"($?)",
|
||||
"($SYSTEM)",
|
||||
"($DEBUG)"
|
||||
]
|
||||
|
||||
def FindFile(file, name):
|
||||
for i in os.listdir(file):
|
||||
path = f"{file}/{i}"
|
||||
if os.path.isdir(path):
|
||||
returnPath = FindFile(path, name)
|
||||
if returnPath != None:
|
||||
return returnPath.replace("//", "/")
|
||||
if os.path.isfile(path):
|
||||
if i == name:
|
||||
return path
|
||||
return None
|
||||
|
||||
def Debug():
|
||||
if "--debug" in sys.argv:
|
||||
traceback.print_exc()
|
||||
|
||||
class Command():
|
||||
# 有风险的命令
|
||||
dangerCommand = [
|
||||
"bash",
|
||||
"bat",
|
||||
"download",
|
||||
"reg"
|
||||
]
|
||||
# 可以被使用的命令
|
||||
commandList = [
|
||||
"installdll",
|
||||
"installfont",
|
||||
"installsparkcorefont",
|
||||
"installmono",
|
||||
"installgecko",
|
||||
"installvcpp",
|
||||
"installnet",
|
||||
"installmsxml",
|
||||
"echo",
|
||||
"info",
|
||||
"error",
|
||||
"warning",
|
||||
"exit",
|
||||
"bash",
|
||||
"bat",
|
||||
"version",
|
||||
"thank",
|
||||
"pause",
|
||||
"download",
|
||||
"installdxvk",
|
||||
"createbotton",
|
||||
"reg",
|
||||
"enabledopengl",
|
||||
"disbledopengl",
|
||||
"winecfg",
|
||||
"winver",
|
||||
"changeversion",
|
||||
"stopdll",
|
||||
"cat",
|
||||
"taskmgr",
|
||||
"control",
|
||||
"killall",
|
||||
"killallwineserver",
|
||||
"enabledhttpproxy",
|
||||
"disbledhttpproxy",
|
||||
"enabledwinecrashdialog",
|
||||
"disbledwinecrashdialog",
|
||||
"disbledWinebottlecreatelink",
|
||||
"enabledWinebottlecreatelink",
|
||||
"installvb",
|
||||
"installother",
|
||||
"decompressionbottle",
|
||||
"programforum",
|
||||
"installmsi",
|
||||
"installapk"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
self.commandString = commandString
|
||||
|
||||
# 解析器
|
||||
# 命令字符串转可供解析的列表
|
||||
def GetCommandList(self) -> list:
|
||||
shellList = []
|
||||
shellFirstShell = self.commandString.split("\n")
|
||||
# 转换成可以执行的数组
|
||||
for l in range(0, len(shellFirstShell)):
|
||||
i = shellFirstShell[l]
|
||||
# 判断有没有注释
|
||||
if "#" in i:
|
||||
# 忽略注释
|
||||
i = i[:i.index("#")]
|
||||
# 删除前后空格
|
||||
i = i.strip()
|
||||
# 如果是空行
|
||||
if i == "":
|
||||
# 忽略此行,此行不做处理
|
||||
continue
|
||||
# 空格转义
|
||||
i = i.replace("\\ ", "@Space@")
|
||||
# 解析
|
||||
i = i.split()
|
||||
# 判断是否为合法的参数,否则提示并忽略
|
||||
if not i[0] in self.commandList and i[0][0] != "(":
|
||||
print(f"行{l + 1}命令{i[0]}不存在,忽略")
|
||||
programEnv[9][1] = "-2"
|
||||
continue
|
||||
if programEnv[2][1] == "0" and i[0] in self.dangerCommand:
|
||||
print(f"行{l + 1}命令{i[0]}目前解析器不允许运行,忽略")
|
||||
print("如果需要运行,可以在配置面板开启“允许修改系统”选项(针对GUI用户)")
|
||||
print("或添加参数 --system(终端调用运行用户)")
|
||||
programEnv[9][1] = "-1"
|
||||
continue
|
||||
rightList = []
|
||||
for k in i:
|
||||
# 处理符号转义
|
||||
rightList.append(k.replace("@Space@", " ").replace("\\n", "\n").replace("\\r", "\r"))
|
||||
shellList.append(rightList)
|
||||
return shellList
|
||||
|
||||
# 运行器
|
||||
class Run():
|
||||
close = False
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
def Exit(self):
|
||||
self.close = True
|
||||
return 0
|
||||
|
||||
def InstallDll(self) -> int:
|
||||
import InstallDll
|
||||
# 如果是数字
|
||||
number = False
|
||||
try:
|
||||
int(self.command[1])
|
||||
number = True
|
||||
except:
|
||||
pass
|
||||
if number:
|
||||
return InstallDll.Download(self.wineBottonPath, InstallDll.GetNameByNumber(int(self.command[1])), InstallDll.GetUrlByNumber(int(self.command[1])), self.wine)
|
||||
return InstallDll.Download(self.wineBottonPath, self.command[1], InstallDll.GetUrlByName(self.command[1]), self.wine)
|
||||
|
||||
def InstallDxvk(self):
|
||||
if not os.path.exists(f"{programPath}/dxvk"):
|
||||
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
print("错误:无法解压资源")
|
||||
return 1
|
||||
os.remove(f"{programPath}/dxvk.7z")
|
||||
return os.system(f"env 'WINE={self.wine}' 'WINE64={self.wine}' 'WINEPREFIX={self.wineBottonPath}' bash '{programPath}/dxvk/auto.sh' install")
|
||||
|
||||
def Thank(self) -> int:
|
||||
for i in information["Contribute"]:
|
||||
print(i)
|
||||
return 0
|
||||
|
||||
def InstallFont(self) -> int:
|
||||
import InstallFont
|
||||
return InstallFont.Download(self.wineBottonPath, int(self.command[1]))
|
||||
|
||||
def InstallMono(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' mono")
|
||||
|
||||
def InstallGecko(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' gecko")
|
||||
|
||||
def InstallVCPP(self) -> int:
|
||||
import InstallVisualCPlusPlus
|
||||
return InstallVisualCPlusPlus.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallNet(self) -> int:
|
||||
import InstallNetFramework
|
||||
return InstallNetFramework.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallMsxml(self) -> int:
|
||||
import InstallMsxml
|
||||
return InstallMsxml.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def Info(self) -> int:
|
||||
QtWidgets.QMessageBox.information(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def StopDll(self) -> int:
|
||||
return os.system(f"WINEPREFIX='{self.wineBottonPath}' '{self.wine}' reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v {os.path.splitext(self.command[1])[0]} /f")
|
||||
|
||||
def CreateBotton(self):
|
||||
self.command = ["bat", "exit"]
|
||||
self.Bat()
|
||||
return 0
|
||||
|
||||
def InstallSparkCoreFont(self):
|
||||
if not os.system("which aptss"):
|
||||
# 最新版本星火应用商店处理
|
||||
os.system("pkexec bash aptss ssupdate")
|
||||
return os.system("pkexec bash aptss install ms-core-fonts")
|
||||
if not os.system("which ss-apt-fast"):
|
||||
# 稍久的版本
|
||||
os.system("pkexec ss-apt-fast update")
|
||||
return os.system("pkexec bash ss-apt-fast install ms-core-fonts")
|
||||
# 不知道什么版本的处理方法
|
||||
if not os.system("which apt-fast"):
|
||||
# 稍久的版本
|
||||
os.system("pkexec apt-fast update")
|
||||
return os.system("pkexec apt-fast install ms-core-fonts")
|
||||
os.system("pkexec apt update")
|
||||
return os.system("pkexec apt install ms-core-fonts")
|
||||
|
||||
def Echo(self) -> int:
|
||||
del self.command[0]
|
||||
print(" ".join(self.command))
|
||||
return 0
|
||||
|
||||
def Warning(self):
|
||||
QtWidgets.QMessageBox.warning(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def Error(self):
|
||||
QtWidgets.QMessageBox.critical(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def Bash(self):
|
||||
command = ""
|
||||
for i in self.command[1:]:
|
||||
command += f"'{i}' "
|
||||
return os.system(command)
|
||||
|
||||
def Bat(self) -> int:
|
||||
# Windows 直接转换为以 cmd 运行
|
||||
if platform.system() == "Windows":
|
||||
# 直接调用 Bash 函数
|
||||
return self.Bash()
|
||||
command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)"]
|
||||
for i in programEnv:
|
||||
for k in range(len(command)):
|
||||
command[k] = command[k].replace(i[0], i[1])
|
||||
for i in self.command[1:]:
|
||||
command.append(i)
|
||||
commandStr = command[0] + " "
|
||||
for i in command[1:]:
|
||||
commandStr += f"'{i}' "
|
||||
return os.system(commandStr)
|
||||
|
||||
def Version(self):
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
return 0
|
||||
|
||||
def Pause(self) -> int:
|
||||
input("按回车键继续……")
|
||||
return 0
|
||||
|
||||
def Download(self) -> int:
|
||||
command = f"aria2c -x 16 -s 16 -c '{self.command[1]}' "
|
||||
try:
|
||||
command += f"-d '{self.command[2]}' "
|
||||
command += f"-o '{self.command[3]}' "
|
||||
except:
|
||||
pass
|
||||
return os.system(command)
|
||||
|
||||
def Reg(self) -> int:
|
||||
self.command = ["bat", "regedit", "/s", self.command[1]]
|
||||
return self.Bat()
|
||||
|
||||
def EnabledOpenGl(self) -> int:
|
||||
self.command = ["reg", f"z:{programPath}/EnabledOpengl.reg"]
|
||||
return self.Reg()
|
||||
|
||||
def DisbledOpenGl(self) -> int:
|
||||
self.command = ["reg", f"z:{programPath}/DisabledOpengl.reg"]
|
||||
return self.Reg()
|
||||
|
||||
def Winver(self):
|
||||
self.command = ["bat", "winver"]
|
||||
return self.Bat()
|
||||
|
||||
def Winecfg(self):
|
||||
self.command = ["bat", "winecfg"]
|
||||
return self.Bat()
|
||||
|
||||
def ChangeVersion(self):
|
||||
# 判断是否为正确的版本
|
||||
if not os.path.exists(f"{programPath}/ChangeWineBottonVersion/{self.command[1]}.reg"):
|
||||
print("错误:您选择的版本错误,目前只支持以下版本")
|
||||
for i in os.listdir(f"{programPath}/ChangeWineBottonVersion"):
|
||||
print(i.replace(".reg", ""), end=" ")
|
||||
print()
|
||||
return 1
|
||||
self.command = ["reg", f"z:/{programPath}/ChangeWineBottonVersion/{self.command[1]}.reg"]
|
||||
return self.Reg()
|
||||
|
||||
def Cat(self):
|
||||
try:
|
||||
file = open(self.command[1], "r")
|
||||
print(file.read())
|
||||
file.close()
|
||||
return 0
|
||||
except:
|
||||
print("文件读取错误")
|
||||
Debug()
|
||||
return 1
|
||||
|
||||
def Taskmgr(self):
|
||||
self.command = ["bat", "taskmgr"]
|
||||
return self.Bat()
|
||||
|
||||
def Control(self):
|
||||
self.command = ["bat", "control"]
|
||||
return self.Bat()
|
||||
|
||||
def Killall(self):
|
||||
return os.system(f"killall -9 {self.command[1]}")
|
||||
|
||||
def KillallWineServer(self):
|
||||
command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)", "-k"]
|
||||
for i in programEnv:
|
||||
for k in range(len(command)):
|
||||
command[k] = command[k].replace(i[0], i[1])
|
||||
if "box86" in command[1] or "exagear" in command[1] or "box64" in command[1]:
|
||||
print("不支持此 Wine")
|
||||
return 1
|
||||
if os.path.exists(command[1]):
|
||||
# 文件存在
|
||||
command[1] = f"{os.path.dirname(command[1])}/wineserver"
|
||||
else:
|
||||
# 读 which
|
||||
command[1] = f"{os.path.dirname(subprocess.getoutput(f'which {command[1]}').strip())}/wineserver"
|
||||
commandStr = command[0] + " "
|
||||
for i in command[1:]:
|
||||
commandStr += f"'{i}' "
|
||||
return os.system(commandStr)
|
||||
|
||||
def EnabledWineBottleCreateLink(self):
|
||||
self.command = ["bat", "reg", "delete", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def DisbledWineBottleCreateLink(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def DisbledWineCrashDialog(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def EnabledWineCrashDialog(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000001", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def EnabledHttpProxy(self):
|
||||
proxyServerAddress = self.command[1]
|
||||
port = self.command[2]
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000001", "/f"]
|
||||
self.Bat()
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyServer", "/d", f"{proxyServerAddress}:{port}", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def DecompressionBottle(self):
|
||||
tempDebDir = f"/tmp/wine-runner-unpack-deb-{random.randint(0, 1000)}"
|
||||
if os.system(f"dpkg -x '{self.command[1]}' '{tempDebDir}'"):
|
||||
return 1
|
||||
zippath = FindFile(tempDebDir, "files.7z")
|
||||
if zippath == None:
|
||||
return 2
|
||||
# 解压文件
|
||||
os.system(f"mkdir -p '{self.command[2]}'")
|
||||
fi = os.system(f"7z x -y '{zippath}' -o'{self.command[2]}'")
|
||||
os.system(f"rm -rfv '{tempDebDir}'")
|
||||
return fi
|
||||
|
||||
|
||||
def DisbledHttpProxy(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||
return self.Bat()
|
||||
|
||||
def InstallVB(self):
|
||||
import InstallVisualBasicRuntime
|
||||
return InstallVisualBasicRuntime.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallOther(self):
|
||||
import InstallOther
|
||||
return InstallOther.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def ProgramForum(self):
|
||||
webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")
|
||||
return
|
||||
|
||||
def InstallMSI(self):
|
||||
self.command = ["bat", "msiexec", "/i", self.command[1]]
|
||||
return self.Bat()
|
||||
|
||||
def InstallApk(self):
|
||||
if os.system("which uengine > /dev/null"):
|
||||
print("未安装 UEngine,无法使用该命令")
|
||||
return 1
|
||||
apk = uengineapi.APK(self.command[1])
|
||||
result = apk.install()
|
||||
homePath = os.getenv("HOME")
|
||||
if not os.path.exists(f"{homePath}/.local/share/applications/uengine"):
|
||||
os.makedirs(f"{homePath}/.local/share/applications/uengine")
|
||||
if not os.path.exists(f"{homePath}/.local/share/icons/hicolor/apps"):
|
||||
os.makedirs(f"{homePath}/.local/share/icons/hicolor/apps")
|
||||
package = apk.packageName()
|
||||
apk.saveApkIcon(f"{homePath}/.local/share/icons/hicolor/apps/{package}.png")
|
||||
apk.saveDesktopFile(f"{homePath}/.local/share/applications/uengine/{package}.desktop", f"{homePath}/.local/share/icons/hicolor/apps/{package}.png")
|
||||
return result
|
||||
|
||||
# 可以运行的命令的映射关系
|
||||
# 可以被使用的命令的映射
|
||||
commandList = {
|
||||
"installdll": InstallDll,
|
||||
"installfont": InstallFont,
|
||||
"installsparkcorefont": InstallSparkCoreFont,
|
||||
"installmono": InstallMono,
|
||||
"installgecko": InstallGecko,
|
||||
"installvcpp": InstallVCPP,
|
||||
"installnet": InstallNet,
|
||||
"installmsxml": InstallMsxml,
|
||||
"echo": Echo,
|
||||
"info": Info,
|
||||
"warning": Warning,
|
||||
"error": Error,
|
||||
"exit": Exit,
|
||||
"bash": Bash,
|
||||
"bat": Bat,
|
||||
"version": Version,
|
||||
"thank": Thank,
|
||||
"pause": Pause,
|
||||
"download": Download,
|
||||
"installdxvk": InstallDxvk,
|
||||
"createbotton": CreateBotton,
|
||||
"reg": Reg,
|
||||
"enabledopengl": EnabledOpenGl,
|
||||
"disbledopengl": DisbledOpenGl,
|
||||
"winecfg": Winecfg,
|
||||
"winver": Winver,
|
||||
"changeversion": ChangeVersion,
|
||||
"stopdll": StopDll,
|
||||
"cat": Cat,
|
||||
"taskmgr": Taskmgr,
|
||||
"control": Control,
|
||||
"killallwineserver": KillallWineServer,
|
||||
"enabledhttpproxy": EnabledHttpProxy,
|
||||
"disbledhttpproxy": DisbledHttpProxy,
|
||||
"enabledwinecrashdialog": EnabledWineCrashDialog,
|
||||
"disbledwinecrashdialog": DisbledWineCrashDialog,
|
||||
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
|
||||
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink,
|
||||
"installvb": InstallVB,
|
||||
"installother": InstallOther,
|
||||
"decompressionbottle": DecompressionBottle,
|
||||
"programforum": ProgramForum,
|
||||
"installmsi": InstallMSI,
|
||||
"installapk": InstallApk
|
||||
}
|
||||
|
||||
# 参数数列表
|
||||
commandInfo = {
|
||||
"killall": [1],
|
||||
"installdll": [1],
|
||||
"installfont": [1],
|
||||
"installsparkcorefont": [0],
|
||||
"installmono": [0],
|
||||
"installgecko": [0],
|
||||
"installvcpp": [1],
|
||||
"installnet": [1],
|
||||
"installmsxml": [1],
|
||||
"echo": [1],
|
||||
"info": [2],
|
||||
"warning": [2],
|
||||
"error": [2],
|
||||
"exit": [0],
|
||||
"bash": [1],
|
||||
"bat": [1],
|
||||
"version": [0],
|
||||
"thank": [0],
|
||||
"pause": [0],
|
||||
"download": [1],
|
||||
"installdxvk": [0],
|
||||
"createbotton": [0],
|
||||
"reg": [1],
|
||||
"enabledopengl": [0],
|
||||
"disbledopengl": [0],
|
||||
"winecfg": [0],
|
||||
"winver": [0],
|
||||
"changeversion": [1],
|
||||
"stopdll": [1],
|
||||
"cat": [1],
|
||||
"taskmgr": [0],
|
||||
"control": [0],
|
||||
"killallwineserver": [0],
|
||||
"enabledhttpproxy": [2],
|
||||
"disbledhttpproxy": [0],
|
||||
"enabledwinecrashdialog": [0],
|
||||
"disbledwinecrashdialog": [0],
|
||||
"disbledWinebottlecreatelink": [0],
|
||||
"enabledWinebottlecreatelink": [0],
|
||||
"installvb": [1],
|
||||
"installother": [1],
|
||||
"decompressionbottle": [2],
|
||||
"programforum": [0],
|
||||
"installmsi": [1],
|
||||
"installapk": [1]
|
||||
}
|
||||
windowsUnrun = [
|
||||
"createbotton",
|
||||
"installdll",
|
||||
"installmono",
|
||||
"installgecko",
|
||||
"winecfg",
|
||||
"stopdll",
|
||||
"changeversion",
|
||||
"enabledopengl",
|
||||
"disbledopengl",
|
||||
"installdxvk",
|
||||
"installfont",
|
||||
"installsparkcorefont",
|
||||
"decompressionbottle",
|
||||
"installapk"
|
||||
]
|
||||
# 解析
|
||||
def __init__(self, command: list, wineBottonPath: str, wine: str) -> int:
|
||||
self.wineBottonPath = wineBottonPath
|
||||
self.wine = wine
|
||||
for i in command:
|
||||
self.command = i
|
||||
# 变量解析
|
||||
if self.command[0][0] == "(" and "=" in self.command[0]:
|
||||
env = i[0][: i[0].index("=")]
|
||||
value = i[0][i[0].index("=") + 1:]
|
||||
# 判断是不是只读变量
|
||||
if env in readOnlyEnv:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误")
|
||||
print(f"变量 {env} 只读,无法修改,忽略")
|
||||
continue
|
||||
change = False
|
||||
for k in range(len(programEnv)):
|
||||
# 修改变量
|
||||
if env == programEnv[k][0]:
|
||||
programEnv[k][1] = value
|
||||
change = True
|
||||
break
|
||||
if not change:
|
||||
# 添加变量
|
||||
programEnv.append([f"{env}", value])
|
||||
continue
|
||||
# 解析命令是否可以在 Windows 使用(只限在 Windows 系统时)
|
||||
if platform.system() == "Windows" and i[0] in self.windowsUnrun:
|
||||
print("此命令不支持在 Windows 上运行")
|
||||
programEnv[9][1] = "-5"
|
||||
continue
|
||||
# 获取程序帮助信息
|
||||
try:
|
||||
if i[1] == "--help":
|
||||
print(helpList[i[0]].replace("\\n", "\n"))
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
# 正常命令解析
|
||||
if len(i) -1 < self.commandInfo[i[0]][0]:
|
||||
print("参数不足")
|
||||
programEnv[9][1] = "-3"
|
||||
continue
|
||||
# 替换环境变量
|
||||
for a in range(1, len(i)):
|
||||
for b in programEnv:
|
||||
if b[0] in i[a]:
|
||||
i[a] = i[a].replace(b[0], b[1])
|
||||
try:
|
||||
commandReturn = self.commandList[i[0]](self)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
commandReturn = 1
|
||||
if commandReturn:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误,返回值:", commandReturn)
|
||||
programEnv[9][1] = str(commandReturn)
|
||||
if self.close:
|
||||
break
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
if os.getenv("WINE") != None:
|
||||
programEnv[1][1] = os.getenv("WINE")
|
||||
if os.getenv("WINEPREFIX") != None:
|
||||
programEnv[0][1] = os.getenv("WINEPREFIX")
|
||||
if __name__ == "__main__":
|
||||
optionAll = 0
|
||||
if "--debug" in sys.argv:
|
||||
optionAll += 1
|
||||
if "--system" in sys.argv:
|
||||
programEnv[2][1] = "1"
|
||||
optionAll += 1
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
while True:
|
||||
commandLine = input(">")
|
||||
if commandLine == "exit":
|
||||
break
|
||||
com = Command(commandLine)
|
||||
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
|
||||
sys.exit(int(programEnv[9][1]))
|
||||
# 读取文件
|
||||
try:
|
||||
file = open(sys.argv[1], "r")
|
||||
com = Command(file.read())
|
||||
file.close()
|
||||
except:
|
||||
print("错误:无法读取该文件,无法继续")
|
||||
sys.exit(1)
|
||||
print("UEngine 运行器自动配置文件解析器")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
|
||||
sys.exit(int(programEnv[9][1]))
|
||||
11
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Download.py
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import base64
|
||||
import requests
|
||||
print("""浣溪沙
|
||||
一曲新词酒一杯,去年天气旧亭台。夕阳西下几时回?
|
||||
无可奈何花落去,似曾相识燕归来。小园香径独徘徊。""")
|
||||
print("")
|
||||
print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。")
|
||||
print("================================")
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + sys.argv[1]).text)
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 56 KiB |
@@ -1,190 +1,159 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<meta name='viewport' content='width=device-width initial-scale=1'>
|
||||
<link rel="shortcut icon" href="../runner.svg">
|
||||
<title>UEngine 程序帮助</title>
|
||||
</head>
|
||||
|
||||
<body onload="UpdateTime();">
|
||||
<h1 id='uengine-运行器帮助'>UEngine 运行器帮助</h1>
|
||||
<hr />
|
||||
<h2 id='帮助简述'>帮助简述</h2>
|
||||
<blockquote>
|
||||
<p>安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮<br/>卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。<br/>保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可<br/>重置(删除)UEngine数据:点击菜单栏的“UEngine”的“清空UEngine数据”,输入密码重启即可<br/>注意:如果任何安卓一遍打不开,多打开几遍应该就可以重新加载UEngine配置了<br/>打开UEngine应用列表:打开系统已安装的应用列表(安卓界面)<br/><strong>提示:</strong>
|
||||
<br/><strong>※1、近期升级的 UEngine 安装时会自动把要安装的 apk 删除,如果这个 apk 文件非常重要请拷贝一个备份版并安装这个备份版</strong>
|
||||
<br/><strong>2、需要你有使用 root 权限的能力;</strong><br/><strong>3、需要安装 UEngine 才能使用;</strong><br/><strong>4、提取 apk
|
||||
图标的 apk 路径以“安装 apk”那栏为准;</strong><br/><strong>5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0
|
||||
以前的版本。(如需连接UEngine请安装adb补丁)</strong> </p>
|
||||
</blockquote>
|
||||
<hr />
|
||||
<h2 id='详细帮助'>详细帮助</h2>
|
||||
<h3 id='如何安装自己的-apk'>如何安装自己的 Apk</h3>
|
||||
<p><em>请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限</em></p>
|
||||
<h4 id='方法一-1'>方法一</h4>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击浏览按钮,找到想要安装的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击安装按钮,输入密码<br>
|
||||
<img src="1-1-3.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-1-5.png"
|
||||
referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h4 id='方法二-1'>方法二</h4>
|
||||
<ol start=''>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>点击安装按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-2-2.png"
|
||||
referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h3 id='卸载apk'>卸载Apk</h3>
|
||||
<h4 id='方法一-2'>方法一</h4>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击浏览按钮,找到想要卸载的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>提示“操作完成”,卸载完成 <br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h4 id='方法二-2'>方法二</h4>
|
||||
<ol start=''>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>提示“操作完成”,卸载完成<br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li>
|
||||
|
||||
</ol>
|
||||
<h3 id='查询apk信息'>查询Apk信息</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='查看程序评分'>查看程序评分</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息
|
||||
<br>
|
||||
<img src="1-3-1.png" referrerpolicy="no-referrer">
|
||||
</li>
|
||||
<li>点击“查看程序评分情况”即可查看其他用户对程序的评分</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-4-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='上传用户评分'>上传用户评分</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 </li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"> </p>
|
||||
<ol start='2'>
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='3'>
|
||||
<li>点击“上传程序评分情况”,按照要求进行评分</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-5-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='4'>
|
||||
<li>如果提示“提交成功!感谢您的提交”就代表评分成功</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-5-2.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='更新程序'>更新程序</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 </li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='2'>
|
||||
<li>点击“关于”=>“检查更新”,打开更新窗口</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-6-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='3'>
|
||||
<li><strong>保证您的电脑没有运行其它Python应用以及本程序所有工作都已经完成</strong>,再点击“更新(更新过程中会关闭所有Python应用,包括这个应用)”,输入密码以进行更新</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-6-2.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='4'>
|
||||
<li>提示“更新完毕!”后重新启动 UEngine 运行器就更新完毕了</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-6-3.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='保存图标'>保存图标</h3>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 </li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='2'>
|
||||
<li>选择要保存图标的Apk,点击“保存图标”按钮,选择要保存的位置即可</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-7-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='打开已安装的程序列表'>打开已安装的程序列表</h3>
|
||||
<h4 id='方法一-3'>方法一</h4>
|
||||
<p>打开启动器=>UEngine 程序菜单 即可</p>
|
||||
<h4 id='方法二-3'>方法二</h4>
|
||||
<ol start=''>
|
||||
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"></li>
|
||||
<li>点击“打开 UEngine 应用列表”即可</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-8-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h3 id='将-apk-打包成可以无需本应用即可安装的-deb-包'>将 Apk 打包成可以无需本应用即可安装的 deb 包</h3>
|
||||
<h4 id='打开-uengine-打包器的三种方法'>打开 UEngine 打包器的三种方法</h4>
|
||||
<h5 id='方法一-4'>方法一</h5>
|
||||
<p>启动器=>UEngine 应用打包器</p>
|
||||
<h5 id='方法二-4'>方法二</h5>
|
||||
<p>打开要打包的 Apk 所在目录,右击=>“打开方式”=>“打包 deb(UEngine 运行器)”(接下来可以略过步骤一)</p>
|
||||
<p><img src="1-9-1.png" referrerpolicy="no-referrer"></p>
|
||||
<h5 id='方式三'>方式三</h5>
|
||||
<p>打开 UEngine 运行器,点击菜单栏的“UEngine”=>“UEngine 应用打包”</p>
|
||||
<p><img src="1-9-2.png" referrerpolicy="no-referrer"></p>
|
||||
<h4 id='打包-deb'>打包 deb</h4>
|
||||
<ol start=''>
|
||||
<li>打开“UEngine Apk 应用打包器”,点击“浏览按钮”选择apk</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-9-3.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='2'>
|
||||
<li>根据实际情况勾选选项,然后点击“打包”进行打包</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-9-4.png" referrerpolicy="no-referrer"></p>
|
||||
<ol start='3'>
|
||||
<li>当提示“打包完成”时,打包完成,可以在桌面(一般是<code>/home/XXX/Desktop</code>)找到您打包的 deb 包,可以双击安装</li>
|
||||
|
||||
</ol>
|
||||
<p> <img src="1-9-5.png" referrerpolicy="no-referrer"></p>
|
||||
<p> <img src="1-9-6.png" referrerpolicy="no-referrer"></p>
|
||||
<p> <img src="1-9-7.png" referrerpolicy="no-referrer"></p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<script>
|
||||
function UpdateTime() {
|
||||
var d = new Date();
|
||||
document.getElementById("time").innerHTML = "©2021~" + d.getFullYear() + " gfdgd xi、为什么您不喜欢熊出没和阿布呢";
|
||||
}
|
||||
</script>
|
||||
<hr>
|
||||
<h1 id="time"> ©2021-2022</h1>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<h1 id="uengine-运行器帮助">UEngine 运行器帮助</h1>
|
||||
<hr>
|
||||
<h2 id="帮助简述">帮助简述</h2>
|
||||
<blockquote>
|
||||
<p>安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮<br>卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。<br>保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可<br>重置(删除)UEngine数据:点击菜单栏的“UEngine”的“清空UEngine数据”,输入密码重启即可<br>注意:如果任何安卓一遍打不开,多打开几遍应该就可以重新加载UEngine配置了<br>打开UEngine应用列表:打开系统已安装的应用列表(安卓界面)<br><strong>提示:</strong><br><strong>※1、近期升级的 UEngine 安装时会自动把要安装的 apk 删除,如果这个 apk 文件非常重要请拷贝一个备份版并安装这个备份版</strong><br><strong>2、需要你有使用 root 权限的能力;</strong><br><strong>3、需要安装 UEngine 才能使用;</strong><br><strong>4、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;</strong><br><strong>5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)</strong> </p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h2 id="常见问题">常见问题</h2>
|
||||
<h3 id="出现如下图的情况如何修复?">出现如下图的情况如何修复?</h3>
|
||||
<p><img src="2-1-1.png" alt=""><br>出于安全考虑,您的平板电脑已设置为禁止安装来源不明的应用。 </p>
|
||||
<h4 id="修复方法">修复方法</h4>
|
||||
<ol>
|
||||
<li>打开“UEngine 程序列表”,打开设置<br><img src="2-1-2.png" alt=""> </li>
|
||||
<li>找到“安全”<br><img src="2-1-3.png" alt=""> </li>
|
||||
<li>开启“允许安装来自未知来源的应用”<br><img src="2-1-4.png" alt=""> </li>
|
||||
<li>点击确认即可<br><img src="2-1-5.png" alt=""></li>
|
||||
</ol>
|
||||
<h2 id="详细帮助">详细帮助</h2>
|
||||
<h3 id="如何安装自己的-apk">如何安装自己的 Apk</h3>
|
||||
<p><em>请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限</em></p>
|
||||
<h4 id="方法一">方法一</h4>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器<br><img src="1-1-1.png" alt=""> </li>
|
||||
<li>点击浏览按钮,找到想要安装的Apk<br><img src="1-1-2.png" alt=""> </li>
|
||||
<li>点击安装按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br><img src="1-1-4.png" alt=""><br><img src="1-1-5.png" alt=""></li>
|
||||
</ol>
|
||||
<h4 id="方法二">方法二</h4>
|
||||
<ol>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br><img src="1-2-1.png" alt=""> </li>
|
||||
<li>点击安装按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br><img src="1-1-4.png" alt=""><br><img src="1-2-2.png" alt=""></li>
|
||||
</ol>
|
||||
<h3 id="卸载apk">卸载Apk</h3>
|
||||
<h4 id="方法一-1">方法一</h4>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器<br><img src="1-1-1.png" alt=""> </li>
|
||||
<li>点击浏览按钮,找到想要卸载的Apk<br><img src="1-1-2.png" alt=""> </li>
|
||||
<li>点击卸载按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,卸载完成<br><img src="1-1-4.png" alt=""></li>
|
||||
</ol>
|
||||
<h4 id="方法二-1">方法二</h4>
|
||||
<ol>
|
||||
<li>打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)<br><img src="1-2-1.png" alt=""> </li>
|
||||
<li>点击卸载按钮,输入密码<br><img src="1-1-3.png" alt=""> </li>
|
||||
<li>提示“操作完成”,卸载完成<br><img src="1-1-4.png" alt=""></li>
|
||||
</ol>
|
||||
<h3 id="查询apk信息">查询Apk信息</h3>
|
||||
<ol>
|
||||
<li><p>打开 UEngine 运行器<br> <img src="1-1-1.png" alt=""> </p>
|
||||
</li>
|
||||
<li><p>点击“Apk 信息” 按钮即可查询Apk信息</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" alt=""></p>
|
||||
<h3 id="查看程序评分">查看程序评分</h3>
|
||||
<ol>
|
||||
<li><p>打开 UEngine 运行器<br> <img src="1-1-1.png" alt=""> </p>
|
||||
</li>
|
||||
<li><p>点击“Apk 信息” 按钮即可查询Apk信息
|
||||
<img src="1-3-1.png" alt=""></p>
|
||||
</li>
|
||||
<li><p>点击“查看程序评分情况”即可查看其他用户对程序的评分</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p> <img src="1-4-1.png" alt=""></p>
|
||||
<h3 id="上传用户评分">上传用户评分</h3>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器</li>
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" alt=""> </p>
|
||||
<ol start="2">
|
||||
<li>点击“Apk 信息” 按钮即可查询Apk信息</li>
|
||||
</ol>
|
||||
<p> <img src="1-3-1.png" alt=""></p>
|
||||
<ol start="3">
|
||||
<li>点击“上传程序评分情况”,按照要求进行评分</li>
|
||||
</ol>
|
||||
<p> <img src="1-5-1.png" alt=""></p>
|
||||
<ol start="4">
|
||||
<li>如果提示“提交成功!感谢您的提交”就代表评分成功</li>
|
||||
</ol>
|
||||
<p> <img src="1-5-2.png" alt=""></p>
|
||||
<h3 id="更新程序">更新程序</h3>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器</li>
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" alt=""></p>
|
||||
<ol start="2">
|
||||
<li>点击“关于”=>“检查更新”,打开更新窗口</li>
|
||||
</ol>
|
||||
<p> <img src="1-6-1.png" alt=""></p>
|
||||
<ol start="3">
|
||||
<li><strong>保证您的电脑没有运行其它Python应用以及本程序所有工作都已经完成</strong>,再点击“更新(更新过程中会关闭所有Python应用,包括这个应用)”,输入密码以进行更新</li>
|
||||
</ol>
|
||||
<p> <img src="1-6-2.png" alt=""></p>
|
||||
<ol start="4">
|
||||
<li>提示“更新完毕!”后重新启动 UEngine 运行器就更新完毕了</li>
|
||||
</ol>
|
||||
<p> <img src="1-6-3.png" alt=""></p>
|
||||
<h3 id="保存图标">保存图标</h3>
|
||||
<ol>
|
||||
<li>打开 UEngine 运行器</li>
|
||||
</ol>
|
||||
<p> <img src="1-1-1.png" alt=""></p>
|
||||
<ol start="2">
|
||||
<li>选择要保存图标的Apk,点击“保存图标”按钮,选择要保存的位置即可</li>
|
||||
</ol>
|
||||
<p> <img src="1-7-1.png" alt=""></p>
|
||||
<h3 id="打开已安装的程序列表">打开已安装的程序列表</h3>
|
||||
<h4 id="方法一-2">方法一</h4>
|
||||
<p>打开启动器=>UEngine 程序菜单 即可</p>
|
||||
<h4 id="方法二-2">方法二</h4>
|
||||
<ol>
|
||||
<li><p>打开 UEngine 运行器<br> <img src="1-1-1.png" alt=""></p>
|
||||
</li>
|
||||
<li><p>点击“打开 UEngine 应用列表”即可</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p> <img src="1-8-1.png" alt=""></p>
|
||||
<h3 id="将-apk-打包成可以无需本应用即可安装的-deb-包">将 Apk 打包成可以无需本应用即可安装的 deb 包</h3>
|
||||
<h4 id="打开-uengine-打包器的三种方法">打开 UEngine 打包器的三种方法</h4>
|
||||
<h5 id="方法一-3">方法一</h5>
|
||||
<p>启动器=>UEngine 应用打包器</p>
|
||||
<h5 id="方法二-3">方法二</h5>
|
||||
<p>打开要打包的 Apk 所在目录,右击=>“打开方式”=>“打包 deb(UEngine 运行器)”(接下来可以略过步骤一)</p>
|
||||
<p><img src="1-9-1.png" alt=""></p>
|
||||
<h5 id="方式三">方式三</h5>
|
||||
<p>打开 UEngine 运行器,点击菜单栏的“UEngine”=>“UEngine 应用打包”</p>
|
||||
<p><img src="1-9-2.png" alt=""></p>
|
||||
<h4 id="打包-deb">打包 deb</h4>
|
||||
<ol>
|
||||
<li>打开“UEngine Apk 应用打包器”,点击“浏览按钮”选择apk</li>
|
||||
</ol>
|
||||
<p> <img src="1-9-3.png" alt=""></p>
|
||||
<ol start="2">
|
||||
<li>根据实际情况勾选选项,然后点击“打包”进行打包</li>
|
||||
</ol>
|
||||
<p> <img src="1-9-4.png" alt=""></p>
|
||||
<ol start="3">
|
||||
<li>当提示“打包完成”时,打包完成,可以在桌面(一般是<code>/home/XXX/Desktop</code>)找到您打包的 deb 包,可以双击安装</li>
|
||||
</ol>
|
||||
<p> <img src="1-9-5.png" alt=""></p>
|
||||
<p> <img src="1-9-6.png" alt=""></p>
|
||||
<p> <img src="1-9-7.png" alt=""></p>
|
||||
<hr/>
|
||||
<h1 id="time">©2021-2023 gfdgd xi、为什么您不喜欢熊出没和阿布呢</h1>
|
||||
<script>
|
||||
function UpdateTime() {
|
||||
var d = new Date();
|
||||
document.getElementById("time").innerHTML = "©2021~" + d.getFullYear() + " gfdgd xi、为什么您不喜欢熊出没和阿布呢";
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,18 +15,32 @@
|
||||
> **5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)**
|
||||
|
||||
---
|
||||
## 常见问题
|
||||
### 出现如下图的情况如何修复?
|
||||

|
||||
出于安全考虑,您的平板电脑已设置为禁止安装来源不明的应用。
|
||||
#### 修复方法
|
||||
1. 打开“UEngine 程序列表”,打开设置
|
||||

|
||||
2. 找到“安全”
|
||||

|
||||
3. 开启“允许安装来自未知来源的应用”
|
||||

|
||||
4. 点击确认即可
|
||||

|
||||
|
||||
## 详细帮助
|
||||
### 如何安装自己的 Apk
|
||||
*请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限*
|
||||
#### 方法一
|
||||
1. 打开 UEngine 运行器
|
||||

|
||||
2. 点击浏览按钮,找到想要安装的Apk
|
||||
2. 点击浏览按钮,找到想要安装的Apk
|
||||

|
||||
3. 点击安装按钮,输入密码
|
||||
3. 点击安装按钮,输入密码
|
||||

|
||||
4. 提示“操作完成”,在启动器找到新安装的图标启动即可
|
||||

|
||||
4. 提示“操作完成”,在启动器找到新安装的图标启动即可
|
||||

|
||||

|
||||
#### 方法二
|
||||
1. 打开要安装的Apk所在目录,右击=>打开方式=>安装或卸载 APK(UEngine 运行器)
|
||||
@@ -57,7 +71,7 @@
|
||||
|
||||
### 查询Apk信息
|
||||
1. 打开 UEngine 运行器
|
||||

|
||||

|
||||
|
||||
2. 点击“Apk 信息” 按钮即可查询Apk信息
|
||||
|
||||
@@ -189,5 +203,6 @@
|
||||
|
||||
|
||||
|
||||
--------
|
||||
|
||||
©2021-2022
|
||||
# ©2021-2023 gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
81
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/BadStar.svg
Executable file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 67.733331 67.733331"
|
||||
version="1.1"
|
||||
id="svg3719"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="BadStar.svg">
|
||||
<defs
|
||||
id="defs3713" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4"
|
||||
inkscape:cx="2.1794989"
|
||||
inkscape:cy="208.04937"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="836"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3716">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-229.26667)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
id="path3737"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="151.91904"
|
||||
sodipodi:cy="166.98949"
|
||||
sodipodi:r1="158.97482"
|
||||
sodipodi:r2="79.487411"
|
||||
sodipodi:arg1="-0.32926921"
|
||||
sodipodi:arg2="0.29904932"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 302.35356,115.58473 -74.475,74.82269 19.41613,103.76885 L 153.12004,246.46782 60.429914,297 76.701777,192.69187 -6.9307488e-6,120.15362 104.23121,103.39609 149.51703,8.0328112 197.6636,101.98423 Z"
|
||||
inkscape:transform-center-x="0.16628225"
|
||||
inkscape:transform-center-y="-3.3924633"
|
||||
style="fill:none;stroke-width:11.54627375;stroke:#000000;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
transform="matrix(0.22402028,0,0,0.234398,-5.3781204e-6,227.3838)" />
|
||||
<path
|
||||
style="fill:none;stroke:#db0000;stroke-width:4.17411947;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 4.6835638,237.71432 60.365607,288.71648"
|
||||
id="path4588"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 717 KiB |
76
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Star.svg
Executable file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 67.733331 67.733331"
|
||||
version="1.1"
|
||||
id="svg3719"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="Star.svg">
|
||||
<defs
|
||||
id="defs3713" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4"
|
||||
inkscape:cx="2.1794989"
|
||||
inkscape:cy="208.04937"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="836"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3716">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-229.26667)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
id="path3737"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="151.91904"
|
||||
sodipodi:cy="166.98949"
|
||||
sodipodi:r1="158.97482"
|
||||
sodipodi:r2="79.487411"
|
||||
sodipodi:arg1="-0.32926921"
|
||||
sodipodi:arg2="0.29904932"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 302.35356,115.58473 -74.475,74.82269 19.41613,103.76885 L 153.12004,246.46782 60.429914,297 76.701777,192.69187 -6.9307488e-6,120.15362 104.23121,103.39609 149.51703,8.0328112 197.6636,101.98423 Z"
|
||||
inkscape:transform-center-x="0.15367302"
|
||||
inkscape:transform-center-y="-3.1244574"
|
||||
style="fill:#ffff00;stroke:#000000;stroke-width:11.54627419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(0.20703169,0,0,0.21588,2.5808914,230.58088)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
76
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/UnStar.svg
Executable file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="256"
|
||||
height="256"
|
||||
viewBox="0 0 67.733331 67.733331"
|
||||
version="1.1"
|
||||
id="svg3719"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="UnStar.svg">
|
||||
<defs
|
||||
id="defs3713" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="-87.142857"
|
||||
inkscape:cy="560"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="836"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3716">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-229.26667)">
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
id="path3737"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="151.91904"
|
||||
sodipodi:cy="166.98949"
|
||||
sodipodi:r1="158.97482"
|
||||
sodipodi:r2="79.487411"
|
||||
sodipodi:arg1="-0.32926921"
|
||||
sodipodi:arg2="0.29904932"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 302.35356,115.58473 -74.475,74.82269 19.41613,103.76885 L 153.12004,246.46782 60.429914,297 76.701777,192.69187 -6.9307488e-6,120.15362 104.23121,103.39609 149.51703,8.0328112 197.6636,101.98423 Z"
|
||||
inkscape:transform-center-x="0.16628225"
|
||||
inkscape:transform-center-y="-3.3924633"
|
||||
style="fill:none;stroke-width:11.54627375;stroke:#000000;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
transform="matrix(0.22402028,0,0,0.234398,-5.3781204e-6,227.3838)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |