更新分类讨论

This commit is contained in:
gfdgd xi 2022-09-21 20:54:04 +08:00
parent de6be5d611
commit 2454f926d0
3 changed files with 29 additions and 328 deletions

View File

@ -1,5 +1,5 @@
<p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p> <p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p>
<h1 align="center">Wine 运行器 2.1.0-1</h1> <h1 align="center">Wine 运行器 2.1.0-2</h1>
<hr> <hr>
## 介绍 ## 介绍
@ -85,6 +85,9 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
![image.png](https://storage.deepin.org/thread/202207190822204627_image.png) ![image.png](https://storage.deepin.org/thread/202207190822204627_image.png)
## 更新日志 ## 更新日志
### 2.1.0-22022年09月05日
**※1、修复终端调用问题**
### 2.1.0-12022年09月03日 ### 2.1.0-12022年09月03日
**※1、删除多余图标** **※1、删除多余图标**
**※2、修复将打包文件生成目录设置为 / 等重要目录导致删库的问题** **※2、修复将打包文件生成目录设置为 / 等重要目录导致删库的问题**

316
icon.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -807,17 +807,30 @@ 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)
try: if "从源码运行的版本" == programVersionType:
UpdateWindow.data = json.loads(requests.get(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL3VwZGF0ZS5qc29u").decode("utf-8")).text) versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知(从源码运行不提供更新)\n更新内容:")
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:") updateText.setText("从源码运行不提供更新")
if UpdateWindow.data["Version"] == version: ok.setDisabled(True)
updateText.setText(QtCore.QCoreApplication.translate("U", "此为最新版本,无需更新")) else:
if "deepin/UOS 应用商店版本<带签名>" == programVersionType:
url = "aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL3VwZGF0ZS11b3MuanNvbg=="
elif "星火应用商店版本" == programVersionType:
url = "aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL3VwZGF0ZS1zcGFyay5qc29u"
else:
url = "aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL3VwZGF0ZS5qc29u"
try:
UpdateWindow.data = json.loads(requests.get(base64.b64decode(url).decode("utf-8")).text)
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:")
if UpdateWindow.data["Version"] == version:
updateText.setText(QtCore.QCoreApplication.translate("U", "此为最新版本,无需更新"))
ok.setDisabled(True)
else:
updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n"))
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(updateWidget, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "无法连接服务器!"))
updateText.setText("无法连接服务器,无法更新")
ok.setDisabled(True) ok.setDisabled(True)
else:
updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n"))
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(updateWidget, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "无法连接服务器!"))
updateWidgetLayout.addWidget(versionLabel, 0, 0, 1, 1) updateWidgetLayout.addWidget(versionLabel, 0, 0, 1, 1)
updateWidgetLayout.addWidget(updateText, 1, 0, 1, 3) updateWidgetLayout.addWidget(updateText, 1, 0, 1, 3)
updateWidgetLayout.addWidget(ok, 2, 2, 1, 1) updateWidgetLayout.addWidget(ok, 2, 2, 1, 1)
@ -1677,6 +1690,7 @@ def get_now_lang()->"获取当前语言":
def GetVersion(): def GetVersion():
global about global about
global programVersionType
# 目前分为几个版本(在 control 文件区分): # 目前分为几个版本(在 control 文件区分):
# 星火版本:~spark # 星火版本:~spark
# 商店版本:~uos # 商店版本:~uos
@ -1730,7 +1744,7 @@ def GetVersion():
# 获取程序体积 # 获取程序体积
about = about.replace("@programSize@", str(int(getFileFolderSize(programPath) / 1024 / 1024))) about = about.replace("@programSize@", str(int(getFileFolderSize(programPath) / 1024 / 1024)))
programVersionType = ""
print(wine) print(wine)
########################### ###########################
# 程序信息 # 程序信息