调整更新功能

This commit is contained in:
gfdgd xi 2024-07-21 18:44:42 +08:00
parent 8f37bfd3b8
commit 1bdf8de39c
4 changed files with 14 additions and 6 deletions

@ -45,9 +45,9 @@ Recommends: winbind,
deepin-wine8-stable | spark-wine | spark-wine9 | spark-wine9-wow | spark-wine8 | spark-wine8-wow | spark-wine7-devel | deepin-wine6-stable | deepin-wine5-stable | deepin-wine5 | deepin-wine | wine, deepin-wine8-stable | spark-wine | spark-wine9 | spark-wine9-wow | spark-wine8 | spark-wine8-wow | spark-wine7-devel | deepin-wine6-stable | deepin-wine5-stable | deepin-wine5 | deepin-wine | wine,
spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin
Section: utils Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52 Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux, termux-exec
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52 Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux
Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52 Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux
Installed-Size: @@SIZE@@ Installed-Size: @@SIZE@@
Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。 Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装、创建、分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。 它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装、创建、分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。

@ -1284,7 +1284,7 @@ class UpdateWindow():
isArch = False isArch = False
isFedora = False isFedora = False
isTermux = False isTermux = False
if os.path.exists("/data/data/com.termux"): if os.path.exists("/data/data/com.termux/files"):
isTermux = True isTermux = True
if UpdateWindow.data["Url-termux"][0] == None: if UpdateWindow.data["Url-termux"][0] == None:
unPackageNew = True unPackageNew = True
@ -1296,9 +1296,11 @@ class UpdateWindow():
isFedora = True isFedora = True
if UpdateWindow.data["Url-rpm"][0] == None: if UpdateWindow.data["Url-rpm"][0] == None:
unPackageNew = True unPackageNew = True
if programPath != "/opt/apps/deepin-wine-runner" and programPath != "/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner":
unPackageNew = True
try: try:
print(UpdateWindow.data["Url"]) print(UpdateWindow.data["Url"])
if os.path.exists(f"{programPath}/off-line.lock") or programPath != "/opt/apps/deepin-wine-runner" or unPackageNew: if os.path.exists(f"{programPath}/off-line.lock") or unPackageNew:
# 使用解压法更新 # 使用解压法更新
write_txt(TMPDIR + "/tmp/spark-deepin-wine-runner/update.sh", f"""#!/bin/bash write_txt(TMPDIR + "/tmp/spark-deepin-wine-runner/update.sh", f"""#!/bin/bash
echo 删除多余的安装包 echo 删除多余的安装包

@ -1,5 +1,5 @@
{ {
"Version": "3.9.2", "Version": "4.0.0",
"Time": "未知", "Time": "未知",
"Thank": [ "Thank": [
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000新世界的测试机器", "感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000新世界的测试机器",

@ -210,6 +210,7 @@ class GetInfo():
isLoongarch = (arch == "loong64") or (arch == "loongarch64") isLoongarch = (arch == "loong64") or (arch == "loongarch64")
isProot = os.path.exists("/storage") isProot = os.path.exists("/storage")
isAndroid = os.path.exists("/data") isAndroid = os.path.exists("/data")
isTermux = os.path.exists("/data")
glibcVersion = "2.28" glibcVersion = "2.28"
def __init__(self): def __init__(self):
@ -321,6 +322,8 @@ class GetInfo():
result = True result = True
if (data == "android" and self.isAndroid): if (data == "android" and self.isAndroid):
result = True result = True
if (data == "termux" and self.isTermux):
result = True
if (self.compareVersion(self.glibcVersion, data) == 1): if (self.compareVersion(self.glibcVersion, data) == 1):
result = True result = True
if (os.path.exists(data)): if (os.path.exists(data)):
@ -365,12 +368,15 @@ def ReadInternetInformation():
QtWidgets.QMessageBox.critical(window, "错误", "无法连接服务器!") QtWidgets.QMessageBox.critical(window, "错误", "无法连接服务器!")
return return
nmodel = QtGui.QStandardItemModel(window) nmodel = QtGui.QStandardItemModel(window)
newinternetJsonList = []
for i in internetJsonList: for i in internetJsonList:
if (ui.m_recommendWine.isChecked() and not systemInfo.check(i[2])): if (ui.m_recommendWine.isChecked() and not systemInfo.check(i[2])):
continue continue
item = QtGui.QStandardItem(i[0]) item = QtGui.QStandardItem(i[0])
nmodel.appendRow(item) nmodel.appendRow(item)
newinternetJsonList.append(i)
ui.internetWineList.setModel(nmodel) ui.internetWineList.setModel(nmodel)
internetJsonList = newinternetJsonList
class DownloadThread(QtCore.QThread): class DownloadThread(QtCore.QThread):
MessageBoxInfo = QtCore.pyqtSignal(str) MessageBoxInfo = QtCore.pyqtSignal(str)