From 091950c5ed827b4628b9962409f76aaa7fbcf953 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Wed, 28 Sep 2022 20:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=85=B3=E4=BA=8E=E5=9F=BA?= =?UTF-8?q?=E4=BA=8E=E7=94=9F=E6=80=81=E9=80=82=E9=85=8D=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- .../deepin-wine-runner-create-botton.py | 52 ------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100755 deb/opt/apps/deepin-wine-runner/deepin-wine-runner-create-botton.py diff --git a/Makefile b/Makefile index f5564f7..a71207e 100755 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ build: cp -rv InstallNewWineHQ.sh deb/opt/apps/deepin-wine-runner cp -rv cleanbottle.sh deb/opt/apps/deepin-wine-runner cp -rv StartVM.sh deb/opt/apps/deepin-wine-runner - cp -rv deepin-wine-runner-create-botton.py deb/opt/apps/deepin-wine-runner + #cp -rv deepin-wine-runner-create-botton.py deb/opt/apps/deepin-wine-runner cp -rv Icon deb/opt/apps/deepin-wine-runner cp -rv gtkGetFileNameDlg deb/opt/apps/deepin-wine-runner cp -rv LANG/*.qm deb/opt/apps/deepin-wine-runner/LANG 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 deleted file mode 100755 index 00d28b5..0000000 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner-create-botton.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/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