diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control index 1f9be9a..06401b5 100755 --- a/deb/DEBIAN/control +++ b/deb/DEBIAN/control @@ -1,5 +1,5 @@ Package: spark-deepin-wine-runner -Version: 2.2.0-1 +Version: 2.2.1 Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢 Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner Architecture: all diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner-create-botton.py b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner-create-botton.py new file mode 100755 index 0000000..00d28b5 --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner-create-botton.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +import os +import sys +import threading +import PyQt5.QtGui as QtGui +import PyQt5.QtWidgets as QtWidgets + +def Create(): + # 解压容器 + # 这里参考了 deepin wine 的 run_v4.sh + os.system(f"mkdir -p \"{sys.argv[1]}\"") + os.system(f"7z x \"{programPath}/files-exagear.7z\" -o\"{sys.argv[1]}\"") + os.system(f"mv \"{sys.argv[1]}/drive_c/users/@current_user@\" \"{sys.argv[1]}/drive_c/users/$USER\"") + os.system(f"sed -i \"s#@current_user@#$USER#\" {sys.argv[1]}/*.reg") + window.close() + +def Download(): + os.system(f"aria2c -x 16 -s 16 -d \"{programPath}\" -o files-exagear.7z https://www.gitlink.org.cn/api/attachments/392364") + window.close() + +if __name__ == "__main__": + if len(sys.argv) <= 1 or "--help" in sys.argv: + print("帮助:") + print("参数为要解压到的路径") + print("--help 查看帮助") + sys.exit(1) + programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string + if os.path.exists(sys.argv[1]): + exit() + app = QtWidgets.QApplication(sys.argv) + window = QtWidgets.QMainWindow() + widget = QtWidgets.QWidget() + layout = QtWidgets.QHBoxLayout() + label = QtWidgets.QLabel("正在下载容器,请稍后……") + layout.addWidget(QtWidgets.QLabel(f"")) + layout.addWidget(label) + widget.setLayout(layout) + window.setCentralWidget(widget) + window.setWindowTitle("下载容器") + window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg")) + # 下载容器 + if not os.path.exists(f"{programPath}/files-exagear.7z"): + window.setWindowTitle("下载容器") + label.setText("正在下载容器,请稍后……") + window.show() + threading.Thread(target=Download).start() + app.exec_() + window.setWindowTitle(f"解压容器 {sys.argv[1]}") + label.setText(f"正在解压容器,请稍后……\n容器路径:{sys.argv[1]}") + window.show() + threading.Thread(target=Create).start() + app.exec_() \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/information.json b/deb/opt/apps/deepin-wine-runner/information.json index 1b11da5..ac60368 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.2.0-1", + "Version": "2.2.1", "Thank": [ "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @zhangs https://bbs.deepin.org/post/227948", diff --git a/deb/opt/apps/deepin-wine-runner/package-script.zip b/deb/opt/apps/deepin-wine-runner/package-script.zip index d4cb4c0..dcf35da 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 1b11da5..ac60368 100755 --- a/information.json +++ b/information.json @@ -1,5 +1,5 @@ { - "Version": "2.2.0-1", + "Version": "2.2.1", "Thank": [ "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @zhangs https://bbs.deepin.org/post/227948", diff --git a/package-script.zip b/package-script.zip index d4cb4c0..dcf35da 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 17543c5..4fbd456 100755 --- a/package-script/information.json +++ b/package-script/information.json @@ -1,3 +1,3 @@ { - "Version": "2.2.0-1" + "Version": "2.2.1" }