diff --git a/Makefile b/Makefile index cd3bbad..3bda443 100755 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ build: 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/ 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 @@ -53,6 +54,7 @@ install: #sudo dpkg -i com.gitee.uengine.runner.spark.deb | true #sudo apt install -f sudo apt reinstall ./com.gitee.uengine.runner.spark.deb + rm com.gitee.uengine.runner.spark.deb depend: sudo apt install python3 python3-tk python3-pip aapt \ diff --git a/com.gitee.uengine.runner.spark.deb b/com.gitee.uengine.runner.spark.deb deleted file mode 100644 index 5e46eaa..0000000 Binary files a/com.gitee.uengine.runner.spark.deb and /dev/null differ diff --git a/information.json b/information.json index a287b4a..47c6642 100755 --- a/information.json +++ b/information.json @@ -29,9 +29,12 @@ "※3、更新 UEngine 安装器安装的 UEngine 版本;", "※4、修复 UEngine 安装器安装后的 UEngine 无法正常安装 APK 的问题(包括从运行器和 deb 包安装);", "※5、UEngine 安装器安装后的 UEngine 支持开机后自动加载运行环境,无需人手动打开终端运行;", - "6、更改程序论坛网址;", - "7、新增程序评分功能;", - "8、……", + "※6、放开原先程序内的程序安装量查询功能,并新增打开量查询功能(在程序的关于窗口里打开)", + "※7、程序更新时不需要关闭所有 Python3 程序,只会关闭自己", + "※8、新增彩蛋(只在2023年1月22日生效)", + "9、更改程序论坛网址;", + "10、新增程序评分功能;", + "11、……", "", "V1.8.3:", "※1、修复安装/打包程序时出现找不到图标的问题;", diff --git a/mainwindow.py b/mainwindow.py index 9e8b173..58e740a 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -19,6 +19,7 @@ import json import numpy import base64 import shutil +import datetime import zipfile import platform import requests @@ -1603,12 +1604,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 @@ -1650,14 +1671,17 @@ def showhelp(): BtnGongxian = QtWidgets.QPushButton("谢明列表") BtnAbout = QtWidgets.QPushButton("关于") BtnDownN = QtWidgets.QPushButton("程序下载量") + BtnOpenN = QtWidgets.QPushButton("程序打开量") HelpStr = QtWidgets.QTextBrowser() - BtnDownN.setEnabled("--彩蛋" in sys.argv) + # 此功能从 2.0.0 后不再隐藏 + #BtnDownN.setEnabled("--彩蛋" in sys.argv) 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) + BtnOpenN.clicked.connect(Open) ChgTips() @@ -1665,9 +1689,10 @@ 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(BtnAbout, 6, 0, 1, 1) + helpLayout.addWidget(HelpStr, 0, 1, 8, 1) helpWidget.setLayout(helpLayout) helpWindow.setCentralWidget(helpWidget) @@ -1985,4 +2010,9 @@ 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 团队祝您在新的一年里万事顺意、幸福美满、官运亨通、美梦连连、吉祥如意、万事顺利、荣华富贵、一帆风顺、金玉满堂、五福临门、龙凤呈祥、龙门精神、百业兴旺、六畜兴旺、五谷丰登、喜上眉梢!") sys.exit(app.exec_())