新增构建时间

This commit is contained in:
gfdgd_xi 2023-04-29 15:21:43 +08:00
parent d7d01e2216
commit 7d912978ce
13 changed files with 132 additions and 64 deletions

View File

@ -57,6 +57,7 @@ build:
cp -rv CompareVersion.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv uengine-remove.sh 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 UpdateTime.py
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

12
UpdateTime.py Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
# 更新构建时间
import os
import json
import platform
import datetime
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
with open(f"{programPath}/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json", "r") as file:
info = json.loads(file.read())
info["Time"] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " " + platform.platform()
with open(f"{programPath}/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json", "w") as file:
file.write(json.dumps(info, ensure_ascii=False, indent=4))

View File

@ -230,7 +230,7 @@
"11、deepin 终端",
"……"
],
"Time": "2023年01月21日",
"Time": "未知",
"Contribute": [
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
"<hr>",

View File

@ -305,7 +305,7 @@ def GetSystemVersion():
systemInformation = readtxt("/etc/os-release")
for systemInformation in systemInformation.split('\n'):
if "PRETTY_NAME=" in systemInformation:
return systemInformation.replace("NAME=", "").replace('"', '')
return systemInformation.replace("PRETTY_NAME=", "").replace('"', '')
# 打开所有窗口事件
def Button5Click():
@ -1592,6 +1592,7 @@ about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>
<p>Qt 版本{QtCore.qVersion()}</p>
<p>程序官网{programUrl}</p>
<p>系统版本{SystemVersion}</p>
<p>安装包构建时间{information['Time']}</p>
<h1>©2021-{time.strftime("%Y")} gfdgd xi</h1>'''
updateThingsString = ""
tips = ""

View File

@ -17,6 +17,7 @@ import json
import traceback
import urllib.request
import requests
import updatekiller
import PyQt5.QtWidgets as QtWidgets
from UI.AutoConfig import *
from Model import *
@ -24,7 +25,7 @@ try:
import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
webeng = True
except:
print("未安装此依赖库")
print("未安装 QtWebEngine") #这样更容易排查问题
webeng = False
print("""太常引·建康中秋夜为吕叔潜赋
一轮秋影转金波飞镜又重磨把酒问姮娥被白发欺人奈何
@ -42,6 +43,7 @@ urlSourcesList = [
"http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3
"http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源
]
urlSourcesIndex = 0
urlSources = urlSourcesList[0]
lists = []
@ -522,10 +524,12 @@ def readtxt(path):
def ChangeSources():
global urlSources
global urlSourcesIndex
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]
old_urlSources = urlSources #先备份
urlSources = urlSourcesList[i] #然后切换尝试
# 解析云列表
try:
# 获取列表
@ -535,9 +539,12 @@ def ChangeSources():
for i in lists:
nmodel.appendRow(QtGui.QStandardItem(i[0]))
ui.searchList.setModel(nmodel)
urlSourcesIndex = i
except:
[ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
urlSources = old_urlSources #如果源不可用则换回来
break
if __name__ == "__main__":

View File

@ -0,0 +1,26 @@
#!/usr/bin/env python3
import sys
if len(sys.argv) <= 2:
print("参数不足")
exit()
# 忽略 - (别问为什么)
if "-" in sys.argv[1]:
sys.argv[1] = sys.argv[1][:sys.argv[1].index("-")]
if "-" in sys.argv[2]:
sys.argv[2] = sys.argv[2][:sys.argv[2].index("-")]
firstVersion = sys.argv[1].split(".")
secondVersion = sys.argv[2].split(".")
for i in range(len(firstVersion)):
first = int(firstVersion[i])
try:
second = int(secondVersion[i])
except:
second = 0
if first > second:
print(f"{sys.argv[1]} > {sys.argv[2]}")
sys.exit(0)
if first < second:
print(f"{sys.argv[1]} < {sys.argv[2]}")
sys.exit(2)
print(f"{sys.argv[1]} = {sys.argv[2]}")
sys.exit(1)

View File

@ -150,10 +150,10 @@
<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>
<h1 id="time">©2021-2023 gfdgd xi</h1>
<script>
function UpdateTime() {
var d = new Date();
document.getElementById("time").innerHTML = "©2021~" + d.getFullYear() + " gfdgd xi、为什么您不喜欢熊出没和阿布呢";
document.getElementById("time").innerHTML = "©2021~" + d.getFullYear() + " gfdgd xi";
}
</script>

View File

@ -205,4 +205,4 @@
--------
# ©2021-2023 gfdgd xi、为什么您不喜欢熊出没和阿布呢
# ©2021-2023 gfdgd xi

View File

@ -5,8 +5,8 @@
"https://github.com/gfdgd-xi/uengine-runner",
"https://gitlink.org.cn/gfdgd_xi/uengine-runner"
],
"Version": "2.0.0",
"System": "Linuxdeepin/UOS",
"Version": "2.0.1",
"System": "Linuxdeepin/UOS/Ubuntu22.04",
"Tips": [
"更多可见https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
"安装APK点浏览按钮选中需要安装的APK然后点安装按钮",
@ -234,6 +234,7 @@
"Contribute": [
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
"<hr>",
"感谢 RacoonGX 团队的付出和贡献",
"感谢 cleverwwh 反馈的 UEngine 打包器在部分系统无法打开的问题",
"感谢 Bail 为此程序做出的许多贡献;",
"感谢 Bail、shenmo、Allen 反馈的图标无法正常拷贝的问题;",

View File

@ -1,4 +1,30 @@
#/bin/bash
# 判断安装条件
CheckEnv(){
# 检测是不是 Ubuntu
lsb_release -i | grep -i ubuntu
if [[ $? != 0 ]]; then
zenity --error --no-wrap '--text=您的系统无法安装 UEngine原因此脚本只支持 Ubuntu'
exit
fi
# 检测架构
if [[ `arch` != "x86_64" ]]; then
zenity --error --no-wrap '--text=您的系统无法安装 UEngine原因暂不支持非 X86 架构'
exit
fi
# 检测内核
kernel=`uname -r`
python3 "${programPath}/CompareVersion.py" "${kernel}" "5.17.3"
if [[ $? == 0 ]]; then
zenity --warning --no-wrap "--text=提示:您当前使用的内核版本是${kernel},而一会将会安装内核 5.17.3\n如果要使用 UEngine请在重启后选择该版本内核启动否则无法启动"
fi
#exit
}
programPath=$(cd $(dirname $0); pwd)
# 先判断是否符合安装条件
CheckEnv
echo 1
#exit
# 在 Shenmo 制作的脚本的基础上进行了修改,修复在 Wayland 下运行错误和无法安装程序的问题
# 建议在 Ubuntu 22.04 及以上版本安装,最好在此之前先安装星火应用商店并将系统和星火应用商店更新到最新版本
#is_tar_checked="0"
@ -76,6 +102,21 @@ cd `dirname $0`
sudo cp uengine-loading-ubuntu.desktop /usr/share/applications
sudo cp uengine-loading-ubuntu.desktop /etc/xdg/autostart
sudo chmod 755 /etc/xdg/autostart/uengine-loading-ubuntu.desktop
# 检测最后安装是否成功
which uengine
if [[ $? != 0 ]]; then
# 安装失败
sudo rm /usr/share/applications/uengine-loading-ubuntu.desktop
sudo rm /etc/xdg/autostart/uengine-loading-ubuntu.desktop
sudo rm /usr/bin/uengine-loading-ubuntu
for username in $(ls /home)
do
echo /home/$username
sudo rm /home/$username/uengine-launch/run_daemon.sh
done
zenity --error --no-wrap '--text=抱歉UEngine 安装失败,已移除安装时进行的修改'
exit
fi
# echo "重启后在$HOME/uengine-launch执行launch_uengine.sh即可打开uengine守护进程。随后即可安装和使用安卓应用"
# 这里直接运行 run_daemon.sh运行 launch_uengine.sh 好像不行
echo "重启后在$HOME/uengine-launch执行run_daemon.sh或在启动器手动运行或执行命令uengine-loading-ubuntu即可打开uengine守护进程。随后即可安装和使用安卓应用"

View File

@ -0,0 +1,10 @@
#!/bin/bash
sudo apt purge uengine uengine-modules-dkms uengine-android-image -y
sudo rm /usr/share/applications/uengine-loading-ubuntu.desktop
sudo rm /etc/xdg/autostart/uengine-loading-ubuntu.desktop
sudo rm /usr/bin/uengine-loading-ubuntu
for username in $(ls /home)
do
echo /home/$username
sudo rm /home/$username/uengine-launch/run_daemon.sh
done

View File

@ -6,7 +6,7 @@
# 更新时间2022年07月25日
# 感谢anbox、deepin 和 UOS
# 基于 Python3 的 PyQt5 构建
# 更新gfdgd xi<3025613752@qq.com>、actionchen<917981399@qq.com>、为什么您不喜欢熊出没和阿布呢
# 更新gfdgd xi<3025613752@qq.com>、actionchen<917981399@qq.com>
###########################################################################################
#################
# 引入所需的库
@ -305,7 +305,7 @@ def GetSystemVersion():
systemInformation = readtxt("/etc/os-release")
for systemInformation in systemInformation.split('\n'):
if "PRETTY_NAME=" in systemInformation:
return systemInformation.replace("PRETTY_NAME=", "").replace('"', '')
return systemInformation.replace("NAME=", "").replace('"', '')
# 打开所有窗口事件
def Button5Click():
@ -819,11 +819,11 @@ def ShowHelp():
global webHelp
# 先判断是否能连接服务器,如果能则访问线上版本,否则访问本地的帮助文件
sk = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sk.settimeout(1)
sk.settimeout(1000)
url = "file://" + programPath + "/Help/index.html"
try:
sk.connect(("uengine-runner.racoongx.cn", 80))
url = f"http://uengine-runner.racoongx.cn"
sk.connect(("uengine-runner.gfdgdxi.top", 80))
url = f"http://uengine-runner.gfdgdxi.top"
except:
traceback.print_exc()
if bad:
@ -1153,7 +1153,7 @@ class UpdateWindow():
cancel.clicked.connect(UpdateWindow.update.close)
ok.setDisabled(True)
try:
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)
UpdateWindow.data = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/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("此为最新版本,无需更新")
@ -1171,8 +1171,7 @@ class UpdateWindow():
<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>如果是第三种情况请反馈到此https://gitee.com/gfdgd-xi/uengine-runner/issues/I6B091</p>
<p><img src='{programPath}/Icon/doge.png'></p>""")
ok.setDisabled(True)
break
@ -1205,7 +1204,7 @@ class UpdateWindow():
echo 删除多余的安装包
rm -rfv /tmp/uengine-runner/update/*
echo 关闭“UEngine 运行器”
python3 {programPath}/updatekiller.py
python3 "{programPath}/updatekiller.py"
echo 下载安装包
wget -P /tmp/uengine-runner/update {UpdateWindow.data["Url"][0]}
echo 安装安装包
@ -1325,7 +1324,7 @@ class ApkInformation():
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"])
return
try:
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)
data = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-downloads-of-runner/raw/branch/master/uengineapp/" + package +"/data.json").text)
print(data)
except:
QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!")
@ -1593,8 +1592,7 @@ about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>
<p>Qt 版本:{QtCore.qVersion()}</p>
<p>程序官网:{programUrl}</p>
<p>系统版本:{SystemVersion}</p>
<p>主要开发者gfdgd xi、为什么您不喜欢熊出没和阿布呢</p>
<h1>©2021-{time.strftime("%Y")} RacoonGX 团队</h1>'''
<h1>©2021-{time.strftime("%Y")} gfdgd xi</h1>'''
updateThingsString = ""
tips = ""
contribute = ""
@ -1697,10 +1695,10 @@ except:
windowflag = "close"
def Open():
try:
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)
lists = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-downloads-of-runner/raw/branch/master/Open-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/Open-UEngine/{}.txt".format(i)).text))
data.append(int(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-downloads-of-runner/raw/branch/master/Open-UEngine/{}.txt".format(i)).text))
except:
QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!")
return
@ -1717,10 +1715,10 @@ def Open():
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)
lists = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/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))
data.append(int(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-downloads-of-runner/raw/branch/master/Install-UEngine/{}.txt".format(i)).text))
except:
QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!")
return
@ -1769,14 +1767,6 @@ def showhelp():
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("更新内容")
BtnZujian = QtWidgets.QPushButton("程序依赖的组件")
@ -1785,20 +1775,9 @@ def showhelp():
BtnDownN = QtWidgets.QPushButton("程序下载量")
BtnOpenN = QtWidgets.QPushButton("程序打开量")
BtnGPLV3 = QtWidgets.QPushButton("程序开源许可证")
BtnAdmiration = QtWidgets.QPushButton("赞赏(暂未开启)")
BtnAdmiration.setDisabled(True)
HelpStr = QtWidgets.QTextBrowser()
# 此功能从 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)
@ -1806,7 +1785,6 @@ def showhelp():
BtnAbout.clicked.connect(ChgAbout)
BtnDownN.clicked.connect(Download)
BtnGPLV3.clicked.connect(ChgGPLV3)
BtnAdmiration.clicked.connect(ChgAdmiration)
BtnOpenN.clicked.connect(Open)
ChgTips()
@ -1818,8 +1796,7 @@ def showhelp():
helpLayout.addWidget(BtnDownN, 4, 0, 1, 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(BtnAbout, 7, 0, 1, 1)
helpLayout.addWidget(HelpStr, 0, 1, 10, 1)
helpWidget.setLayout(helpLayout)
@ -1835,7 +1812,7 @@ def showhelp():
###########################
if not os.path.exists("/usr/bin/uengine"):
# Deepin/UOS 用户
if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower():
if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower() or subprocess.getoutput("arch").replace("\n", "").replace(" ", "") != "x86_64":
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine是否安装 UEngine 以便更好的使用\n安装完后重新启动该程序即可") == QtWidgets.QMessageBox.Yes:
OpenTerminal(f"pkexec apt install uengine -y")
sys.exit(0)
@ -1920,7 +1897,7 @@ menu = window.menuBar()
programmenu = menu.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][0]["Name"])
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"])
help = menu.addMenu("关于")
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])
@ -1995,6 +1972,7 @@ uengineCheckCpu = QtWidgets.QAction(QtGui.QIcon.fromTheme("cpu"), langFile[lang]
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(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][14])
uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "移除在 Ubuntu 上安装的 UEngine 及其附属脚本")
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu 上安装 UEngineSuperSU 镜像)")
uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16])
uengine.addAction(uengineOpenDebBuilder)
@ -2004,6 +1982,7 @@ uengine.addAction(uengineCheckCpu)
uengine.addSeparator()
uengine.addAction(uengineUbuntuInstall)
uengine.addAction(uengineUbuntuInstallRoot)
uengine.addAction(uengineUbuntuRemove)
uengine.addSeparator()
uengine.addAction(uengineWindowSizeSetting)
uengine.addSeparator()
@ -2025,6 +2004,7 @@ uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["M
# 绑定信号
uengineAllowOrDisallowUpdateAndroidApp.triggered.connect(AllowOrDisallowUpdateAndroidApp)
uengineSetHttpProxy.triggered.connect(SetHttpProxy)
uengineUbuntuRemove.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"bash '{programPath}/uengine-remove.sh'"]).start())
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)
@ -2107,19 +2087,17 @@ uengineReinstallUengineImage.triggered.connect(ReinstallUengineImage)
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])
helpFen = QtWidgets.QAction("程序评分")
helpWebInformation = QtWidgets.QAction("程序公告")
helpAbout = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), langFile[lang]["Main"]["MainWindow"]["Menu"][3]["Menu"][1])
helpAbout = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), "关于")
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()
@ -2139,7 +2117,6 @@ 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://bbs.racoongx.cn/"))
helpUengineRunnerBugUpload.triggered.connect(UengineRunnerBugUpload)
helpShowHelp.triggered.connect(ShowHelp)
helpRunnerUpdate.triggered.connect(UpdateWindow.ShowWindow)
@ -2147,6 +2124,7 @@ helpFen.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{p
helpWebInformation.triggered.connect(GetNewInformation)
helpAbout.triggered.connect(showhelp)
helpAboutQt.triggered.connect(lambda: QtWidgets.QMessageBox.aboutQt(widget))
# 设置窗口
app.setStyle(QtWidgets.QStyleFactory.create(settingConf["Theme"]))
widget.setLayout(widgetLayout)
@ -2155,13 +2133,4 @@ 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_())

View File

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