更新postrm

This commit is contained in:
gfdgd xi 2023-01-18 15:50:04 +08:00
parent e7e391600b
commit 8d4da8c4cf
20 changed files with 1098 additions and 72 deletions

@ -35,6 +35,7 @@ build:
cp -rv updatekiller.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 cp -rv pkexec/* new-deb-build/usr/share/polkit-1/actions
cp -rv AutoShell new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ 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 UI 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-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 ConfigLanguareRunner.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/

@ -36,12 +36,12 @@
"※10、修复 UEngine 打包器在部分系统无法打开的问题", "※10、修复 UEngine 打包器在部分系统无法打开的问题",
"※11、新增程序公告功能", "※11、新增程序公告功能",
"※12、修复了程序更新功能从高版本降级到低版本的问题", "※12、修复了程序更新功能从高版本降级到低版本的问题",
"13、更改程序论坛网址", "※13、不强制依赖 Deepin 终端",
"14、新增程序评分功能", "14、更改程序论坛网址",
"15、修复 UEngine 打包器在打包时无法正确禁用所有选项", "15、新增程序评分功能;",
"16、UEngine 打包器打包的 deb 不再指定 deepin-elf-verify 依赖版本", "16、修复 UEngine 打包器在打包时无法正确禁用所有选项",
"17、“更多帮助”功能支持访问云端的帮助内容", "17、UEngine 打包器打包的 deb 不再指定 deepin-elf-verify 依赖版本",
"18、……", "18、“更多帮助”功能支持访问云端的帮助内容",
"", "",
"<b>V1.8.3</b>", "<b>V1.8.3</b>",
"※1、修复安装/打包程序时出现找不到图标的问题;", "※1、修复安装/打包程序时出现找不到图标的问题;",

@ -24,4 +24,4 @@ ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-laun
# 因为 Ubuntu 的问题,省略 # 因为 Ubuntu 的问题,省略
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
# 向服务器返回安装数加1不显示内容且忽略错误 # 向服务器返回安装数加1不显示内容且忽略错误
python3 /opt/apps/com.gitee.uengine.runner.spark/files/Download.py 1.8.3 > /dev/null | true python3 /opt/apps/com.gitee.uengine.runner.spark/files/Download.py 2.0.0 > /dev/null | true

@ -37,6 +37,7 @@ if [ "$1" = "purge" ]; then
echo /home/$username echo /home/$username
if [ -d "/home/$username/.config/uengine-runner/" ]; then if [ -d "/home/$username/.config/uengine-runner/" ]; then
rm -rf "/home/$username/.config/uengine-runner/" rm -rf "/home/$username/.config/uengine-runner/"
rm -rf "/home/$username/.local/share/uengine-runner"
fi fi
done done
# 清理 root 用户的配置文件 # 清理 root 用户的配置文件

@ -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_()

@ -2,4 +2,10 @@
import sys import sys
import base64 import base64
import requests import requests
print("""浣溪沙
一曲新词酒一杯去年天气旧亭台夕阳西下几时回
无可奈何花落去似曾相识燕归来小园香径独徘徊""")
print("")
print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。")
print("================================")
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + sys.argv[1]).text) print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + sys.argv[1]).text)

@ -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

(image error) Size: 2.8 KiB

@ -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

(image error) Size: 2.5 KiB

@ -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

(image error) Size: 2.5 KiB

Binary file not shown.

After

(image error) Size: 11 KiB

@ -8,6 +8,15 @@ import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
print("""十五从军征
十五从军征八十始得归道逢乡里人家中有阿谁
遥看是君家松柏冢累累兔从狗窦入雉从梁上飞
中庭生旅谷井上生旅葵舂谷持作饭采葵持作羹
羹饭一时熟不知饴阿谁出门东向看泪落沾我衣""")
print("")
print("""译文:刚满十五岁的少年就出去打仗,到了八十岁才回来。路遇一个乡下的邻居,问:“我家里还有什么人?”你家那个地方,现在已是松树柏树林中的一片坟墓。走到家门前看见野兔从狗洞里出进,野鸡在屋脊上飞来飞去。院子里长着野生的谷子,野生的葵菜环绕着井台。用捣掉壳的野谷来做饭,摘下葵叶来煮汤。汤和饭一会儿都做好了,却不知赠送给谁吃。走出大门向着东方张望,老泪纵横,洒落在征衣上。""")
print("================================")
class ProgramRunStatusShow(): class ProgramRunStatusShow():
msgWindow = None msgWindow = None
def ShowWindow(): def ShowWindow():

@ -28,10 +28,20 @@
"※2、修复 UEngine 安装器在 Wayland 下无法正常运行的问题;", "※2、修复 UEngine 安装器在 Wayland 下无法正常运行的问题;",
"※3、更新 UEngine 安装器安装的 UEngine 版本;", "※3、更新 UEngine 安装器安装的 UEngine 版本;",
"※4、修复 UEngine 安装器安装后的 UEngine 无法正常安装 APK 的问题(包括从运行器和 deb 包安装);", "※4、修复 UEngine 安装器安装后的 UEngine 无法正常安装 APK 的问题(包括从运行器和 deb 包安装);",
"※5、UEngine 安装器安装后的 UEngine 支持开机后自动加载运行环境,无需人手动打开终端运行;", "※5、UEngine 安装器支持安装使用 SuperSU Root 的镜像",
"6、更改程序论坛网址", "※6、UEngine 安装器安装后的 UEngine 支持开机后自动加载运行环境,无需人手动打开终端运行;",
"7、新增程序评分功能", "※7、放开原先程序内的程序安装量查询功能并新增打开量查询功能在程序的关于窗口里打开",
"8、……", "※8、程序更新时不需要关闭所有 Python3 程序,只会关闭自己",
"※9、新增彩蛋只在2023年1月22日生效",
"※10、修复 UEngine 打包器在部分系统无法打开的问题",
"※11、新增程序公告功能",
"※12、修复了程序更新功能从高版本降级到低版本的问题",
"※13、不强制依赖 Deepin 终端",
"14、更改程序论坛网址",
"15、新增程序评分功能",
"16、修复 UEngine 打包器在打包时无法正确禁用所有选项",
"17、UEngine 打包器打包的 deb 不再指定 deepin-elf-verify 依赖版本",
"18、“更多帮助”功能支持访问云端的帮助内容",
"", "",
"<b>V1.8.3</b>", "<b>V1.8.3</b>",
"※1、修复安装/打包程序时出现找不到图标的问题;", "※1、修复安装/打包程序时出现找不到图标的问题;",

@ -24,6 +24,14 @@ import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
from getxmlimg import getsavexml from getxmlimg import getsavexml
print("""渔家傲·秋思
塞下秋来风景异,衡阳雁去无留意。四面边声连角起。千嶂里,长烟落日孤城闭。
浊酒一杯家万里,燕然未勒归无计。羌管悠悠霜满地。人不寐,将军白发征夫泪。""")
print("")
print("""译文:眼看秋天到了,西北边塞的风光和江南风光自然大不相同。头顶的大雁又飞回南方衡阳去了,一点也没有停留意思。此情此景,不禁又勾起戍边人思乡的情绪。黄昏时分,军中号角催吹,周围的边声也随之而起。层峦叠嶂里,暮霭沉沉,山衔落日,孤零零的城门紧闭。
饮一杯浊酒,我不由得想起万里之外的亲人。可是,眼下外患未平,功不成名不就,又怎能半途而废。远方传来羌笛的悠悠之声,天气寒冷,军营里早已结满寒霜。夜深了,我还不能安睡,为操持军计,我的须发都变白了。戍边人思念亲人,也久久难以成眠,多少次梦里流下眼泪。""")
print("================================")
def FindApk(): def FindApk():
path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 APK", json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"], "APK 可执行文件(*.apk);;所有文件(*.*)") path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 APK", json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"], "APK 可执行文件(*.apk);;所有文件(*.*)")
if path != "" and path != "()": if path != "" and path != "()":
@ -107,7 +115,7 @@ class BuildApkDeb(QtCore.QThread):
Version: {} Version: {}
Architecture: all Architecture: all
Maintainer: {} Maintainer: {}
Depends: deepin-elf-verify (>= 0.0.16.7-1), uengine (>= 1.0.1) Depends: deepin-elf-verify, uengine (>= 1.0.1)
Section: utils Section: utils
Priority: optional Priority: optional
Description: {}\n'''.format(apkPackageNameNew, apkPackageVersion, apkChineseLabel, apkChineseLabel) Description: {}\n'''.format(apkPackageNameNew, apkPackageVersion, apkChineseLabel, apkChineseLabel)
@ -227,6 +235,7 @@ def DisabledAndEnbled(choose):
check.setDisabled(choose) check.setDisabled(choose)
button2.setDisabled(choose) button2.setDisabled(choose)
button3.setDisabled(choose) button3.setDisabled(choose)
sizes.setDisabled(choose)
# 重启本应用程序 # 重启本应用程序
def ReStartProgram(): def ReStartProgram():

@ -9,7 +9,7 @@ rm -rf /tmp/uengine
#read tar_path #read tar_path
mkdir -p /tmp/uengine mkdir -p /tmp/uengine
# 区分是下载 Root 镜像还是普通镜像 # 区分是下载 Root 镜像还是普通镜像
if[[ $1 == "SuperSU" ]]; then if [[ $1 == "SuperSU" ]]; then
aria2c -x 16 -s 16 -d /tmp/uengine -o uenginetar.xz https://code.gitlink.org.cn/gfdgd_xi/uengine-installer/raw/branch/master/uengine2.1.2.2007-supersu.tar.xz aria2c -x 16 -s 16 -d /tmp/uengine -o uenginetar.xz https://code.gitlink.org.cn/gfdgd_xi/uengine-installer/raw/branch/master/uengine2.1.2.2007-supersu.tar.xz
else else
aria2c -x 16 -s 16 -d /tmp/uengine -o uenginetar.xz https://code.gitlink.org.cn/gfdgd_xi/uengine-installer/raw/branch/master/uengine2.1.2.2007.tar.xz aria2c -x 16 -s 16 -d /tmp/uengine -o uenginetar.xz https://code.gitlink.org.cn/gfdgd_xi/uengine-installer/raw/branch/master/uengine2.1.2.2007.tar.xz

@ -19,6 +19,12 @@ import tkinter as tk
import tkinter.ttk as ttk import tkinter.ttk as ttk
import tkinter.messagebox as messagebox import tkinter.messagebox as messagebox
import tkinter.filedialog as filedialog import tkinter.filedialog as filedialog
print("山坡羊·潼关怀古")
print("""峰峦如聚,波涛如怒,山河表里潼关路。望西都,意踌躇。
伤心秦汉经行处,宫阙万间都做了土。兴,百姓苦;亡,百姓苦。
译文:(华山的)山峰从四面八方汇聚,(黄河的)波涛像发怒似的汹涌。潼关外有黄河,内有华山,山河雄伟,地势险要。遥望古都长安,陷于思索之中。从秦汉宫遗址经过,引发无限伤感,万间宫殿早已化作了尘土,一朝兴盛,百姓受苦;一朝灭亡,百姓依旧受苦。""")
######################## ########################
# #
######################## ########################

@ -2,7 +2,7 @@
# 使用系统默认的 python3 运行 # 使用系统默认的 python3 运行
########################################################################################### ###########################################################################################
# 作者gfdgd xi<3025613752@qq.com> # 作者gfdgd xi<3025613752@qq.com>
# 版本:1.8.0 # 版本:2.0.0
# 更新时间2022年07月25日 # 更新时间2022年07月25日
# 感谢anbox、deepin 和 UOS # 感谢anbox、deepin 和 UOS
# 基于 Python3 的 PyQt5 构建 # 基于 Python3 的 PyQt5 构建
@ -18,7 +18,9 @@ import time
import json import json
import numpy import numpy
import base64 import base64
import socket
import shutil import shutil
import datetime
import zipfile import zipfile
import platform import platform
import requests import requests
@ -37,6 +39,12 @@ import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
from getxmlimg import getsavexml from getxmlimg import getsavexml
try:
import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
bad = False
except:
bad = True
from Model import *
def PythonLower(): def PythonLower():
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
@ -50,6 +58,18 @@ if sys.version_info[0] < 3:
if sys.version_info[1] < 6: if sys.version_info[1] < 6:
PythonLower() PythonLower()
print("""观沧海 曹操
东临碣石,以观沧海。水何澹澹,山岛竦峙。
树木丛生,百草丰茂。秋风萧瑟,洪波涌起。
日月之行,若出其中;星汉灿烂,若出其里。
幸甚至哉,歌以咏志。""")
print("")
print("""译文:东行登上碣石山,来观赏那苍茫的海。海水多么宽阔浩荡,山岛高高地挺立在海边。
树木和百草丛生,十分繁茂。秋风吹动树木发出悲凉的声音,海中涌着巨大的海浪。
太阳和月亮的运行,好像是从这浩瀚的海洋中发出的。银河星光灿烂,好像是从这浩瀚的海洋中产生出来的。
我很幸运,就用这首诗歌来表达自己内心的志向。""")
print("================================")
class UninstallProgram(QtCore.QThread): class UninstallProgram(QtCore.QThread):
info = QtCore.pyqtSignal(str) info = QtCore.pyqtSignal(str)
error = QtCore.pyqtSignal(str) error = QtCore.pyqtSignal(str)
@ -435,19 +455,25 @@ def InstallRootUengineImage():
if not os.path.exists: if not os.path.exists:
os.mkdir("/tmp/uengine-runner") os.mkdir("/tmp/uengine-runner")
write_txt("/tmp/uengine-runner/install.sh", "sudo dpkg -i /tmp/uengine-runner/u*.deb\nsudo apt install -f") 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(): 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(): 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(): 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(): 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 启动文件到桌面 # 生成 uengine 启动文件到桌面
@ -565,7 +591,7 @@ def BackUengineClean()->"清空 uengine 数据":
except: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_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 return
print("Choose False") print("Choose False")
@ -628,7 +654,7 @@ def ScrcpyConnectUengine():
sudo apt install snapd -y sudo apt install snapd -y
sudo snap refresh sudo snap refresh
sudo snap install scrcpy''') 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 return
# 获取用户桌面目录 # 获取用户桌面目录
@ -701,12 +727,12 @@ def OpenUengineUserData():
# 终端显示 adb 命令行 # 终端显示 adb 命令行
def AdbShellShowInTer(): def AdbShellShowInTer():
os.system("adb connect 192.168.250.2:5555") 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 # 终端显示 adb top
def AdbCPUAndRAWShowInTer(): def AdbCPUAndRAWShowInTer():
os.system("adb connect 192.168.250.2:5555") 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(): 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() 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()
@ -727,14 +753,14 @@ def AdbStartServer():
QtWidgets.QMessageBox.information(widget, "提示", "完成!") QtWidgets.QMessageBox.information(widget, "提示", "完成!")
def ReinstallUengine(): 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(): def DelUengineCheck():
if not os.path.exists("/usr/share/uengine/uengine-check-runnable.sh"): if not os.path.exists("/usr/share/uengine/uengine-check-runnable.sh"):
QtWidgets.QMessageBox.information(widget, "提示", "本功能已经被删除,无法重复删除!") QtWidgets.QMessageBox.information(widget, "提示", "本功能已经被删除,无法重复删除!")
return return
if QtWidgets.QMessageBox.warning(widget, "警告", "删除后将无法使用本软件恢复\n如果需要恢复本功能请重新安装 UEngine", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Ok) == QtWidgets.QMessageBox.Ok: 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 # 使用 adb 连接 uengine
def UengineConnectAdb(): def UengineConnectAdb():
@ -789,7 +815,27 @@ def VersionCheck(version1, version2):
return version1 == version2 return version1 == version2
def ShowHelp(): 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(): def AllowOrDisallowUpdateAndroidApp():
if not os.path.exists("/data/uengine/data/data/misc/adb/adb_keys"): if not os.path.exists("/data/uengine/data/data/misc/adb/adb_keys"):
@ -1104,14 +1150,36 @@ class UpdateWindow():
ok.clicked.connect(UpdateWindow.Update) ok.clicked.connect(UpdateWindow.Update)
cancel = QtWidgets.QPushButton("取消") cancel = QtWidgets.QPushButton("取消")
cancel.clicked.connect(UpdateWindow.update.close) cancel.clicked.connect(UpdateWindow.update.close)
ok.setDisabled(True)
try: 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更新内容") versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本{UpdateWindow.data['Version']}\n更新内容")
if UpdateWindow.data["Version"] == version: if UpdateWindow.data["Version"] == version:
updateText.setText("此为最新版本,无需更新") updateText.setText("此为最新版本,无需更新")
ok.setDisabled(True) ok.setDisabled(True)
else: 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: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(updateWidget, "错误", "无法连接服务器!") QtWidgets.QMessageBox.critical(updateWidget, "错误", "无法连接服务器!")
@ -1121,7 +1189,7 @@ class UpdateWindow():
updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1) updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1)
updateWidget.setLayout(updateWidgetLayout) updateWidget.setLayout(updateWidgetLayout)
UpdateWindow.update.setCentralWidget(updateWidget) UpdateWindow.update.setCentralWidget(updateWidget)
UpdateWindow.update.setWindowTitle("检查更新") UpdateWindow.update.setWindowTitle("检查 UEngine 运行器更新")
UpdateWindow.update.setWindowIcon(QtGui.QIcon(iconPath)) UpdateWindow.update.setWindowIcon(QtGui.QIcon(iconPath))
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5)) UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
UpdateWindow.update.show() UpdateWindow.update.show()
@ -1149,7 +1217,7 @@ zenity --info --text=\"更新完毕!\" --ellipsize
except: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(widget, "错误,无法继续更新", traceback.format_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 image = None
class ApkInformation(): class ApkInformation():
@ -1244,7 +1312,7 @@ class ApkInformation():
if choose == None or choose == 7: if choose == None or choose == 7:
return return
try: 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: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ConnectServerStarError"]) QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ConnectServerStarError"])
@ -1256,7 +1324,7 @@ class ApkInformation():
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"]) QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"])
return return
try: 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) print(data)
except: except:
QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!") QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!")
@ -1454,6 +1522,28 @@ class AddNewUengineDesktopLink():
activityName.setText(str(GetApkActivityName(path))) activityName.setText(str(GetApkActivityName(path)))
write_txt(get_home() + "/.config/uengine-runner/FindApkName.json", json.dumps({"path": os.path.dirname(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(): def UseProgram():
global useProgram global useProgram
useProgram = '''<p>1、UEngine{}</p> useProgram = '''<p>1、UEngine{}</p>
@ -1496,6 +1586,7 @@ SystemVersion = GetSystemVersion()
iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0]) iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0])
about = f'''<p align="center"><img width=256 src="{iconPath}"/></p> 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>介绍:一个基于 Python3 的 PyQt5 制作的 UEngine 运行器在新版本Deepin/UOS发布后可以在应用商店安装部分官方已适配的安卓应用对爱好者来说不能自己安装APK软件包始终差点意思本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包并能发送安装的APK包启动菜单到桌面或系统菜单。</p>
<p>程序开源许可证GPLV3</p>
<p>版本:{version}</p> <p>版本:{version}</p>
<p>适用平台:{goodRunSystem}</p> <p>适用平台:{goodRunSystem}</p>
<p>Qt 版本:{QtCore.qVersion()}</p> <p>Qt 版本:{QtCore.qVersion()}</p>
@ -1603,12 +1694,32 @@ except:
# add sub window # add sub window
#添加窗口开启关闭开关,防止重复开启 #添加窗口开启关闭开关,防止重复开启
windowflag = "close" windowflag = "close"
def Egg(): def Open():
try: 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 = [] data = []
for i in lists: 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: except:
QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!") QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!")
return return
@ -1650,14 +1761,17 @@ def showhelp():
BtnGongxian = QtWidgets.QPushButton("谢明列表") BtnGongxian = QtWidgets.QPushButton("谢明列表")
BtnAbout = QtWidgets.QPushButton("关于") BtnAbout = QtWidgets.QPushButton("关于")
BtnDownN = QtWidgets.QPushButton("程序下载量") BtnDownN = QtWidgets.QPushButton("程序下载量")
BtnOpenN = QtWidgets.QPushButton("程序打开量")
HelpStr = QtWidgets.QTextBrowser() HelpStr = QtWidgets.QTextBrowser()
BtnDownN.setEnabled("--彩蛋" in sys.argv) # 此功能从 2.0.0 后不再隐藏
#BtnDownN.setEnabled("--彩蛋" in sys.argv)
BtnReadme.clicked.connect(ChgTips) BtnReadme.clicked.connect(ChgTips)
BtnLog.clicked.connect(ChgLog) BtnLog.clicked.connect(ChgLog)
BtnZujian.clicked.connect(ChgDep) BtnZujian.clicked.connect(ChgDep)
BtnGongxian.clicked.connect(ChgCon) BtnGongxian.clicked.connect(ChgCon)
BtnAbout.clicked.connect(ChgAbout) BtnAbout.clicked.connect(ChgAbout)
BtnDownN.clicked.connect(Egg) BtnDownN.clicked.connect(Download)
BtnOpenN.clicked.connect(Open)
ChgTips() ChgTips()
@ -1665,9 +1779,10 @@ def showhelp():
helpLayout.addWidget(BtnLog, 1, 0, 1, 1) helpLayout.addWidget(BtnLog, 1, 0, 1, 1)
helpLayout.addWidget(BtnZujian, 2, 0, 1, 1) helpLayout.addWidget(BtnZujian, 2, 0, 1, 1)
helpLayout.addWidget(BtnGongxian, 3, 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(BtnDownN, 4, 0, 1, 1)
helpLayout.addWidget(HelpStr, 0, 1, 7, 1) helpLayout.addWidget(BtnOpenN, 5, 0, 1, 1)
helpLayout.addWidget(BtnAbout, 6, 0, 1, 1)
helpLayout.addWidget(HelpStr, 0, 1, 8, 1)
helpWidget.setLayout(helpLayout) helpWidget.setLayout(helpLayout)
helpWindow.setCentralWidget(helpWidget) helpWindow.setCentralWidget(helpWidget)
@ -1684,7 +1799,7 @@ if not os.path.exists("/usr/bin/uengine"):
# Deepin/UOS 用户 # Deepin/UOS 用户
if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower(): if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower():
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine是否安装 UEngine 以便更好的使用\n安装完后重新启动该程序即可") == QtWidgets.QMessageBox.Yes: 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) sys.exit(0)
# 非 Deepin/UOS 用户 # 非 Deepin/UOS 用户
# 因为安装器出现问题,所以废弃 # 因为安装器出现问题,所以废弃
@ -1693,7 +1808,8 @@ if not os.path.exists("/usr/bin/uengine"):
#sys.exit(0) #sys.exit(0)
#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提示无法保证此安装脚本安装的 UEngine 可以使用") == QtWidgets.QMessageBox.Yes:
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine是否安装 UEngine 以便更好的使用\n这里将会安装移植版本之前由 Shenmo 编写)\n安装完后重新启动该程序即可\n提示需要在 Ubuntu 22.04 及以上版本才能正常安装") == 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'\"") #os.system(f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath}/uengine-installer'\"")
OpenTerminal(f"bash '{programPath}/uengine-installer'")
sys.exit(0) sys.exit(0)
########################### ###########################
@ -1833,26 +1949,35 @@ uengineDoNotUseAdb.triggered.connect(UengineDoNotUseAdb)
uengineAllowOrDisallowUpdateAndroidApp = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][13]) uengineAllowOrDisallowUpdateAndroidApp = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][13])
uengineSetHttpProxy = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][15]) uengineSetHttpProxy = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][15])
uengineOpenDebBuilder = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][1]) uengineOpenDebBuilder = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][1])
uengineKeyboardToMouse = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][7]) uengineKeyboardToMouse = QtWidgets.QAction(QtGui.QIcon.fromTheme("keyboard"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][7])
uengineCheckCpu = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][8]) uengineCheckCpu = QtWidgets.QAction(QtGui.QIcon.fromTheme("cpu"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][8])
uengineUbuntuInstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][12]) #uengineUbuntuInstall = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][12])
uengineDeleteUengineCheck = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9]) uengineDeleteUengineCheck = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9])
uengineReinstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10]) 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 上安装 UEngineSuperSU 镜像)")
uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16]) uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16])
uengine.addAction(uengineAllowOrDisallowUpdateAndroidApp)
uengine.addAction(uengineSetHttpProxy)
uengine.addAction(uengineOpenDebBuilder) uengine.addAction(uengineOpenDebBuilder)
uengine.addAction(uengineKeyboardToMouse) uengine.addAction(uengineKeyboardToMouse)
uengine.addAction(uengineCheckCpu) uengine.addAction(uengineCheckCpu)
uengine.addSeparator()
uengine.addAction(uengineUbuntuInstall) uengine.addAction(uengineUbuntuInstall)
uengine.addAction(uengineUbuntuInstallRoot)
uengine.addSeparator()
uengine.addAction(uengineWindowSizeSetting) uengine.addAction(uengineWindowSizeSetting)
uengineService = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Name"]) uengine.addSeparator()
uengineInternet = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Name"]) 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(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Name"]) uengineIcon = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][4]["Name"])
uengine.addSeparator()
uengine.addMenu(uengineUseAdbm) 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(uengineDeleteUengineCheck)
uengine.addAction(uengineReinstall) uengine.addAction(uengineReinstall)
uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"]) uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"])
@ -1864,13 +1989,14 @@ uengineOpenDebBuilder.triggered.connect(OpenUengineDebBuilder)
uengineKeyboardToMouse.triggered.connect(KeyboardToMouse) uengineKeyboardToMouse.triggered.connect(KeyboardToMouse)
uengineCheckCpu.triggered.connect(UengineCheckCpu) uengineCheckCpu.triggered.connect(UengineCheckCpu)
uengineUbuntuInstall.triggered.connect(UengineUbuntuInstall) uengineUbuntuInstall.triggered.connect(UengineUbuntuInstall)
uengineUbuntuInstallRoot.triggered.connect(UengineUbuntuInstallRoot)
uengineDeleteUengineCheck.triggered.connect(DelUengineCheck) uengineDeleteUengineCheck.triggered.connect(DelUengineCheck)
uengineReinstall.triggered.connect(ReinstallUengine) uengineReinstall.triggered.connect(ReinstallUengine)
uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow) uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow)
uengineStart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][0]) uengineStart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][0])
uengineStop = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][1]) uengineStop = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][1])
uengineRestart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][2]) uengineRestart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][2])
uengineService.addAction(uengineStart) uengineService.addAction(uengineStart)
uengineService.addAction(uengineStop) uengineService.addAction(uengineStop)
uengineService.addAction(uengineRestart) uengineService.addAction(uengineRestart)
@ -1879,14 +2005,14 @@ uengineStart.triggered.connect(StartUengine)
uengineStop.triggered.connect(StopUengine) uengineStop.triggered.connect(StopUengine)
uengineRestart.triggered.connect(UengineRestart) uengineRestart.triggered.connect(UengineRestart)
uengineBridgeStart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][0]) uengineBridgeStart = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][0])
uengineBridgeStop = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][1]) uengineBridgeStop = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][1])
uengineBridgeRestart = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][2]) uengineBridgeRestart = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][2])
uengineBridgeReload = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][3]) uengineBridgeReload = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][3])
uengineBridgeForceReload = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][4]) uengineBridgeForceReload = QtWidgets.QAction(QtGui.QIcon.fromTheme("internet"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][3]["Menu"][4])
uengineInternet.addAction(uengineBridgeStart) uengineInternet.addAction(uengineBridgeStart)
uengineInternet.addAction(uengineBridgeStop) uengineInternet.addAction(uengineBridgeStop)
uengineInternet.addAction(uengineReinstall) #uengineInternet.addAction(uengineReinstall)
uengineInternet.addAction(uengineBridgeReload) uengineInternet.addAction(uengineBridgeReload)
uengineInternet.addAction(uengineBridgeForceReload) uengineInternet.addAction(uengineBridgeForceReload)
# 绑定信号 # 绑定信号
@ -1913,9 +2039,9 @@ uengineAddNewUengineDesktopLink.triggered.connect(AddNewUengineDesktopLink.ShowW
uengineCleanAllUengineDesktopLink.triggered.connect(CleanAllUengineDesktopLink) uengineCleanAllUengineDesktopLink.triggered.connect(CleanAllUengineDesktopLink)
#uengineData #uengineData
uengineOpenRootData = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][0]) uengineOpenRootData = QtWidgets.QAction(QtGui.QIcon.fromTheme("fileopen"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][0])
uengineOpenUserData = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][1]) uengineOpenUserData = QtWidgets.QAction(QtGui.QIcon.fromTheme("fileopen"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][1])
uengineBackClean = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][2]) uengineBackClean = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][6]["Menu"][2])
uengineData.addAction(uengineOpenRootData) uengineData.addAction(uengineOpenRootData)
uengineData.addAction(uengineOpenUserData) uengineData.addAction(uengineOpenUserData)
uengineData.addSeparator() uengineData.addSeparator()
@ -1946,8 +2072,9 @@ helpUengineRunnerBugUpload = QtWidgets.QAction(langFile[lang]["Main"]["MainWindo
helpShowHelp = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][4]) helpShowHelp = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][4])
helpRunnerUpdate = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][3]) helpRunnerUpdate = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][3])
helpFen = QtWidgets.QAction("程序评分") helpFen = QtWidgets.QAction("程序评分")
helpAbout = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][1]) helpWebInformation = QtWidgets.QAction("程序公告")
helpAboutQt = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][5]) 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(helpOpenProgramUrl)
help.addAction(uengineRunnerSearch) help.addAction(uengineRunnerSearch)
help.addAction(makerWebsize) help.addAction(makerWebsize)
@ -1958,6 +2085,7 @@ help.addSeparator()
help.addAction(helpShowHelp) help.addAction(helpShowHelp)
help.addAction(helpRunnerUpdate) help.addAction(helpRunnerUpdate)
help.addAction(helpFen) help.addAction(helpFen)
help.addAction(helpWebInformation)
help.addSeparator() help.addSeparator()
help.addAction(helpAbout) help.addAction(helpAbout)
help.addAction(helpAboutQt) help.addAction(helpAboutQt)
@ -1975,6 +2103,7 @@ helpUengineRunnerBugUpload.triggered.connect(UengineRunnerBugUpload)
helpShowHelp.triggered.connect(ShowHelp) helpShowHelp.triggered.connect(ShowHelp)
helpRunnerUpdate.triggered.connect(UpdateWindow.ShowWindow) helpRunnerUpdate.triggered.connect(UpdateWindow.ShowWindow)
helpFen.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/ProgramFen.py'"]).start()) helpFen.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/ProgramFen.py'"]).start())
helpWebInformation.triggered.connect(GetNewInformation)
helpAbout.triggered.connect(showhelp) helpAbout.triggered.connect(showhelp)
helpAboutQt.triggered.connect(lambda: QtWidgets.QMessageBox.aboutQt(widget)) helpAboutQt.triggered.connect(lambda: QtWidgets.QMessageBox.aboutQt(widget))
# 设置窗口 # 设置窗口
@ -1985,4 +2114,12 @@ window.setWindowTitle(title)
window.show() window.show()
window.setWindowIcon(QtGui.QIcon(iconPath)) window.setWindowIcon(QtGui.QIcon(iconPath))
window.setFixedSize(window.frameSize().width(), window.frameSize().height()) 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 version == "2.0.0":
title += " 新春版"
window.setWindowTitle(title)
sys.exit(app.exec_()) sys.exit(app.exec_())

@ -20,10 +20,10 @@ else
else else
# 因为安装器出现问题,所以废弃 # 因为安装器出现问题,所以废弃
zenity --error --text="请安装 UEngine 后继续" --no-wrap zenity --error --text="请安装 UEngine 后继续" --no-wrap
#echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功" echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功"
#zenity --question --text="您还未安装 UEngine是否现在安装\n将会使用 shenmo 提供的脚本进行安装\n暂未保证此安装脚本一定安装成功" --no-wrap zenity --question --text="您还未安装 UEngine是否现在安装" --no-wrap
#if [[ $? = 0 ]]; then if [[ $? = 0 ]]; then
# deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer" deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
#fi fi
fi fi
fi fi

@ -10,7 +10,12 @@ import updatekiller
import urllib.parse as parse import urllib.parse as parse
import PyQt5.QtGui as QtGui import PyQt5.QtGui as QtGui
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
print("""过零丁洋
辛苦遭逢起一经,干戈寥落四周星。山河破碎风飘絮,身世浮沉雨打萍。
惶恐滩头说惶恐,零丁洋里叹零丁。人生自古谁无死?留取丹心照汗青。""")
print("")
print("译文:回想我早年由科举入仕历尽辛苦,如今战火消歇已熬过了四个年头。国家危在旦夕恰如狂风中的柳絮,个人又哪堪言说似骤雨里的浮萍。惶恐滩的惨败让我至今依然惶恐,零丁洋身陷元虏可叹我孤苦零丁。人生自古以来有谁能够长生不死?我要留一片爱国的丹心映照史册。")
print("================================")
# 读取文本文档 # 读取文本文档
def readtxt(path: "路径")->"读取文本文档": def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象 f = open(path, "r") # 设置文件对象

@ -8,6 +8,16 @@ import sys
import traceback import traceback
import updatekiller import updatekiller
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
print("""白雪歌送武判官归京
北风卷地白草折,胡天八月即飞雪。忽如一夜春风来,千树万树梨花开。
散入珠帘湿罗幕,狐裘不暖锦衾薄。将军角弓不得控,都护铁衣冷难着。
瀚海阑干百丈冰,愁云惨淡万里凝。中军置酒饮归客,胡琴琵琶与羌笛。
纷纷暮雪下辕门,风掣红旗冻不翻。轮台东门送君去,去时雪满天山路。
山回路转不见君,雪上空留马行处。""")
print("")
print("北风席卷大地把白草吹折,胡地天气八月就纷扬落雪。忽然间宛如一夜春风吹来,好像是千树万树梨花盛开。雪花散入珠帘打湿了罗幕,狐裘穿不暖锦被也嫌单薄。将军都护手冻得拉不开弓,铁甲冰冷得让人难以穿着。沙漠结冰百丈纵横有裂纹,万里长空凝聚着惨淡愁云。主帅帐中摆酒为归客饯行,胡琴琵琶羌笛合奏来助兴。傍晚辕门前大雪落个不停,红旗冻僵了风也无法牵引。轮台东门外欢送你回京去,你去时大雪盖满了天山路。山路迂回曲折已看不见你,雪上只留下一行马蹄印迹。")
print("================================")
######################## ########################
# #
######################## ########################

@ -28,7 +28,7 @@ print("""渔家傲·秋思
塞下秋来风景异,衡阳雁去无留意。四面边声连角起。千嶂里,长烟落日孤城闭。 塞下秋来风景异,衡阳雁去无留意。四面边声连角起。千嶂里,长烟落日孤城闭。
浊酒一杯家万里,燕然未勒归无计。羌管悠悠霜满地。人不寐,将军白发征夫泪。""") 浊酒一杯家万里,燕然未勒归无计。羌管悠悠霜满地。人不寐,将军白发征夫泪。""")
print("") print("")
print("""眼看秋天到了,西北边塞的风光和江南风光自然大不相同。头顶的大雁又飞回南方衡阳去了,一点也没有停留意思。此情此景,不禁又勾起戍边人思乡的情绪。黄昏时分,军中号角催吹,周围的边声也随之而起。层峦叠嶂里,暮霭沉沉,山衔落日,孤零零的城门紧闭。 print("""译文:眼看秋天到了,西北边塞的风光和江南风光自然大不相同。头顶的大雁又飞回南方衡阳去了,一点也没有停留意思。此情此景,不禁又勾起戍边人思乡的情绪。黄昏时分,军中号角催吹,周围的边声也随之而起。层峦叠嶂里,暮霭沉沉,山衔落日,孤零零的城门紧闭。
饮一杯浊酒,我不由得想起万里之外的亲人。可是,眼下外患未平,功不成名不就,又怎能半途而废。远方传来羌笛的悠悠之声,天气寒冷,军营里早已结满寒霜。夜深了,我还不能安睡,为操持军计,我的须发都变白了。戍边人思念亲人,也久久难以成眠,多少次梦里流下眼泪。""") 饮一杯浊酒,我不由得想起万里之外的亲人。可是,眼下外患未平,功不成名不就,又怎能半途而废。远方传来羌笛的悠悠之声,天气寒冷,军营里早已结满寒霜。夜深了,我还不能安睡,为操持军计,我的须发都变白了。戍边人思念亲人,也久久难以成眠,多少次梦里流下眼泪。""")
print("================================") print("================================")