diff --git a/Model/__init__.py b/Model/__init__.py index 61f0d50..7f043be 100644 --- a/Model/__init__.py +++ b/Model/__init__.py @@ -15,17 +15,17 @@ terminalList = [ "gnome-terminal" ] terminalEnd = { - f"{programPath}/launch.sh\" \"deepin-terminal": ["-e", 0], + f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0], "mate-terminal": ["-e", 1], "gnome-terminal": ["--", 0] } for i in terminalList: if not os.system(f"which {i}"): if i == "deepin-terminal": - i = f"{programPath}/launch.sh\" \"deepin-terminal" + i = f"{programPath}/../launch.sh\" \"deepin-terminal" terminal = i break if terminal == "": print("无法识别到以下的任意一个终端") print(" ".join(terminalList)) - exit() \ No newline at end of file + exit() diff --git a/Model/__pycache__/__init__.cpython-37.pyc b/Model/__pycache__/__init__.cpython-37.pyc index 647b21f..3a4bb90 100644 Binary files a/Model/__pycache__/__init__.cpython-37.pyc and b/Model/__pycache__/__init__.cpython-37.pyc differ diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control index 5fe8ee9..60df885 100755 --- a/deb/DEBIAN/control +++ b/deb/DEBIAN/control @@ -1,5 +1,5 @@ Package: spark-deepin-wine-runner -Version: 2.1.0-1 +Version: 2.1.0-2 Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢 Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner Architecture: all diff --git a/deb/DEBIAN/postinst b/deb/DEBIAN/postinst index 096cfe3..b0946d6 100755 --- a/deb/DEBIAN/postinst +++ b/deb/DEBIAN/postinst @@ -23,4 +23,4 @@ fi # 设置目录权限,让用户可读可写,方便后续删除组件 chmod 777 -R /opt/apps/deepin-wine-runner # 向服务器返回安装数加1(不显示内容且忽略错误) -curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.1.0-1 -s > /dev/null | true +curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.1.0-2 -s > /dev/null | true diff --git a/deb/opt/apps/deepin-wine-runner/Model/__init__.py b/deb/opt/apps/deepin-wine-runner/Model/__init__.py index 5373bf0..7f043be 100644 --- a/deb/opt/apps/deepin-wine-runner/Model/__init__.py +++ b/deb/opt/apps/deepin-wine-runner/Model/__init__.py @@ -10,22 +10,22 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string # 优先为深度终端 terminal = "" terminalList = [ - "deepin-terminal1", - "mate-terminal1", + "deepin-terminal", + "mate-terminal", "gnome-terminal" ] terminalEnd = { - f"{programPath}/launch.sh\" \"deepin-terminal": ["-e", 0], + f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0], "mate-terminal": ["-e", 1], "gnome-terminal": ["--", 0] } for i in terminalList: if not os.system(f"which {i}"): if i == "deepin-terminal": - i = f"{programPath}/launch.sh\" \"deepin-terminal" + i = f"{programPath}/../launch.sh\" \"deepin-terminal" terminal = i break if terminal == "": print("无法识别到以下的任意一个终端") print(" ".join(terminalList)) - exit() \ No newline at end of file + exit() diff --git a/deb/opt/apps/deepin-wine-runner/Model/__pycache__/__init__.cpython-37.pyc b/deb/opt/apps/deepin-wine-runner/Model/__pycache__/__init__.cpython-37.pyc index 647b21f..3a4bb90 100644 Binary files a/deb/opt/apps/deepin-wine-runner/Model/__pycache__/__init__.cpython-37.pyc and b/deb/opt/apps/deepin-wine-runner/Model/__pycache__/__init__.cpython-37.pyc differ diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner index c88d8b5..dbf272b 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner @@ -17,6 +17,7 @@ import json import base64 import shutil import hashlib +import platform import requests import threading import traceback @@ -27,6 +28,19 @@ import PyQt5.QtGui as QtGui import PyQt5.QtCore as QtCore import PyQt5.QtWidgets as QtWidgets from Model import * + +def PythonLower(): + app = QtWidgets.QApplication(sys.argv) + QtWidgets.QMessageBox.critical(None, "错误", "Python 至少需要 3.6 及以上版本,目前版本:" + platform.python_version() + "") + sys.exit(1) + +# Python 版本检测,因为 f-string 格式化要至少 Python 3.6 及以上的版本,所以需要检测 +# 判断主版本号 +if sys.version_info[0] > 3: + PythonLower() +if sys.version_info[1] < 6: + PythonLower() + ################### # 程序所需事件 ################### @@ -1374,7 +1388,9 @@ exe路径\' 参数 \' 千万不要中断后不删除源的情况下 apt upgrade !!!中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可 以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示 N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。''' -updateThingsString = '''

2.1.0-1 更新内容:

+updateThingsString = '''

2.1.0-2 更新内容:

+※1、修复终端调用问题 +

2.1.0-1 更新内容:

※1、删除多余图标 ※2、修复将打包文件生成目录设置为 / 等重要目录导致删库的问题 3、修复了打包器浏览按钮闪退、生成的 postrm 有误的问题 diff --git a/deb/opt/apps/deepin-wine-runner/information.json b/deb/opt/apps/deepin-wine-runner/information.json index e065b87..01232be 100755 --- a/deb/opt/apps/deepin-wine-runner/information.json +++ b/deb/opt/apps/deepin-wine-runner/information.json @@ -1,5 +1,5 @@ { - "Version": "2.1.0-1", + "Version": "2.1.0-2", "Thank": [ "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @zhangs https://bbs.deepin.org/post/227948", @@ -7,6 +7,7 @@ "感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw", "感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址", "感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议", + "感谢 @shenmo 反馈的 2.1.0 打包器问题和 2.1.0-1 终端调用问题", "感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议", "感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码", "感谢 @sgb76 为 Wine 打包器(非生态适配脚本)打包的 i386 deb 提供建议", diff --git a/deb/opt/apps/deepin-wine-runner/package-script.zip b/deb/opt/apps/deepin-wine-runner/package-script.zip index abc38de..24e6c5f 100755 Binary files a/deb/opt/apps/deepin-wine-runner/package-script.zip and b/deb/opt/apps/deepin-wine-runner/package-script.zip differ diff --git a/information.json b/information.json index e065b87..01232be 100755 --- a/information.json +++ b/information.json @@ -1,5 +1,5 @@ { - "Version": "2.1.0-1", + "Version": "2.1.0-2", "Thank": [ "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @zhangs https://bbs.deepin.org/post/227948", @@ -7,6 +7,7 @@ "感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw", "感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址", "感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议", + "感谢 @shenmo 反馈的 2.1.0 打包器问题和 2.1.0-1 终端调用问题", "感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议", "感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码", "感谢 @sgb76 为 Wine 打包器(非生态适配脚本)打包的 i386 deb 提供建议", diff --git a/mainwindow.py b/mainwindow.py index d62c6df..dbf272b 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -1388,7 +1388,9 @@ exe路径\' 参数 \' 千万不要中断后不删除源的情况下 apt upgrade !!!中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可 以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示 N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。''' -updateThingsString = '''

2.1.0-1 更新内容:

+updateThingsString = '''

2.1.0-2 更新内容:

+※1、修复终端调用问题 +

2.1.0-1 更新内容:

※1、删除多余图标 ※2、修复将打包文件生成目录设置为 / 等重要目录导致删库的问题 3、修复了打包器浏览按钮闪退、生成的 postrm 有误的问题 diff --git a/package-script.zip b/package-script.zip index abc38de..24e6c5f 100755 Binary files a/package-script.zip and b/package-script.zip differ diff --git a/package-script/information.json b/package-script/information.json index 5ef6a3c..dd36d23 100755 --- a/package-script/information.json +++ b/package-script/information.json @@ -1,3 +1,3 @@ { - "Version": "2.1.0-1" + "Version": "2.1.0-2" }