From 2454f926d0b7b24944fa445e0333c2782b06b7b1 Mon Sep 17 00:00:00 2001
From: gfdgd_xi <3025613752@qq.com>
Date: Wed, 21 Sep 2022 20:54:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=86=E7=B1=BB=E8=AE=A8?=
=?UTF-8?q?=E8=AE=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 5 +-
icon.svg | 316 --------------------------------------------------
mainwindow.py | 36 ++++--
3 files changed, 29 insertions(+), 328 deletions(-)
delete mode 100644 icon.svg
diff --git a/README.md b/README.md
index 1e5f4f0..60924b6 100755
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-Wine 运行器 2.1.0-1
+Wine 运行器 2.1.0-2
## 介绍
@@ -85,6 +85,9 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
![image.png](https://storage.deepin.org/thread/202207190822204627_image.png)
## 更新日志
+### 2.1.0-2(2022年09月05日)
+**※1、修复终端调用问题**
+
### 2.1.0-1(2022年09月03日)
**※1、删除多余图标**
**※2、修复将打包文件生成目录设置为 / 等重要目录导致删库的问题**
diff --git a/icon.svg b/icon.svg
deleted file mode 100644
index 77db7a1..0000000
--- a/icon.svg
+++ /dev/null
@@ -1,316 +0,0 @@
-
-
-
-
diff --git a/mainwindow.py b/mainwindow.py
index f7d6400..5d24941 100755
--- a/mainwindow.py
+++ b/mainwindow.py
@@ -807,17 +807,30 @@ class UpdateWindow():
ok.clicked.connect(UpdateWindow.Update)
cancel = QtWidgets.QPushButton("取消")
cancel.clicked.connect(UpdateWindow.update.close)
- try:
- UpdateWindow.data = json.loads(requests.get(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL3VwZGF0ZS5qc29u").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", "此为最新版本,无需更新"))
+ if "从源码运行的版本" == programVersionType:
+ versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知(从源码运行不提供更新)\n更新内容:")
+ updateText.setText("从源码运行不提供更新")
+ ok.setDisabled(True)
+ 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)
- 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(updateText, 1, 0, 1, 3)
updateWidgetLayout.addWidget(ok, 2, 2, 1, 1)
@@ -1677,6 +1690,7 @@ def get_now_lang()->"获取当前语言":
def GetVersion():
global about
+ global programVersionType
# 目前分为几个版本(在 control 文件区分):
# 星火版本:~spark
# 商店版本:~uos
@@ -1730,7 +1744,7 @@ def GetVersion():
# 获取程序体积
about = about.replace("@programSize@", str(int(getFileFolderSize(programPath) / 1024 / 1024)))
-
+programVersionType = ""
print(wine)
###########################
# 程序信息