From 683a1a876ed2874697716e0de61aba654dee4b03 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Sat, 10 Dec 2022 12:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProgramFen.py | 10 +++++----- .../deepin-wine-runner/MountWithoutHome.sh | 2 +- deb/opt/apps/deepin-wine-runner/ProgramFen.py | 10 +++++----- deb/opt/apps/deepin-wine-runner/UnMount.sh | 3 ++- .../deepin-wine-runner/package-script.zip | Bin 306745 -> 306745 bytes mainwindow.py | 16 ++++++++-------- package-script.zip | Bin 306745 -> 306745 bytes 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ProgramFen.py b/ProgramFen.py index c2b48fa..7e6f4a2 100755 --- a/ProgramFen.py +++ b/ProgramFen.py @@ -82,7 +82,7 @@ class ProgramRunStatusUpload(): def ShowWindow(): ProgramRunStatusUpload.starList = [] - ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow() + ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow(ProgramRunStatusShow.msgWindow) msgWidget = QtWidgets.QWidget() msgWidgetLayout = QtWidgets.QGridLayout() ProgramRunStatusUpload.fen = QtWidgets.QComboBox() @@ -90,12 +90,12 @@ class ProgramRunStatusUpload(): upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传")) upload.clicked.connect(ProgramRunStatusUpload.Upload) # 生成星星列表 - for i in [1, 1, 1, 1, 0]: + for i in [1, 1, 1, 1, 1]: ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"")) ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"]) - ProgramRunStatusUpload.fen.setCurrentIndex(4) + ProgramRunStatusUpload.fen.setCurrentIndex(5) ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0) msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1) @@ -109,10 +109,10 @@ class ProgramRunStatusUpload(): def Upload(): try: - QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}").json()["Error"]) + QtWidgets.QMessageBox.information(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}").json()["Error"]) except: traceback.print_exc() - QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) + QtWidgets.QMessageBox.critical(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) if __name__ == "__main__": programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string diff --git a/deb/opt/apps/deepin-wine-runner/MountWithoutHome.sh b/deb/opt/apps/deepin-wine-runner/MountWithoutHome.sh index 33635ef..724f16e 100755 --- a/deb/opt/apps/deepin-wine-runner/MountWithoutHome.sh +++ b/deb/opt/apps/deepin-wine-runner/MountWithoutHome.sh @@ -26,4 +26,4 @@ chmod 777 -R root xhost + # 如果参数 3 存在 -chroot ${@:3} +chroot . ${@:3} diff --git a/deb/opt/apps/deepin-wine-runner/ProgramFen.py b/deb/opt/apps/deepin-wine-runner/ProgramFen.py index c2b48fa..7e6f4a2 100644 --- a/deb/opt/apps/deepin-wine-runner/ProgramFen.py +++ b/deb/opt/apps/deepin-wine-runner/ProgramFen.py @@ -82,7 +82,7 @@ class ProgramRunStatusUpload(): def ShowWindow(): ProgramRunStatusUpload.starList = [] - ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow() + ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow(ProgramRunStatusShow.msgWindow) msgWidget = QtWidgets.QWidget() msgWidgetLayout = QtWidgets.QGridLayout() ProgramRunStatusUpload.fen = QtWidgets.QComboBox() @@ -90,12 +90,12 @@ class ProgramRunStatusUpload(): upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传")) upload.clicked.connect(ProgramRunStatusUpload.Upload) # 生成星星列表 - for i in [1, 1, 1, 1, 0]: + for i in [1, 1, 1, 1, 1]: ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"")) ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"]) - ProgramRunStatusUpload.fen.setCurrentIndex(4) + ProgramRunStatusUpload.fen.setCurrentIndex(5) ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0) msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1) @@ -109,10 +109,10 @@ class ProgramRunStatusUpload(): def Upload(): try: - QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}").json()["Error"]) + QtWidgets.QMessageBox.information(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}").json()["Error"]) except: traceback.print_exc() - QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) + QtWidgets.QMessageBox.critical(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) if __name__ == "__main__": programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string diff --git a/deb/opt/apps/deepin-wine-runner/UnMount.sh b/deb/opt/apps/deepin-wine-runner/UnMount.sh index a8b0316..834a626 100755 --- a/deb/opt/apps/deepin-wine-runner/UnMount.sh +++ b/deb/opt/apps/deepin-wine-runner/UnMount.sh @@ -20,7 +20,8 @@ umount ./etc/resolv.conf umount ./sys umount ./dev/shm # 挂载 Wine 运行器目录 -umount ./opt/apps/deepin-wine-runner/ +umount ./opt +umount ./opt/apps/deepin-wine-runner # 挂载字体 umount ./usr/share/fonts # 挂载用户目录到 /root(默认 $HOME 路径) diff --git a/deb/opt/apps/deepin-wine-runner/package-script.zip b/deb/opt/apps/deepin-wine-runner/package-script.zip index f55b1bdc1a40050aaedbee6842f57b9af6b04bd0..107cd4ca7b3308fd75340885cff6ae00c8186ed2 100755 GIT binary patch delta 164 zcmdmaM`-6Ap$TRz{XA2Wr%(LFC_KHsmxXQe1}>J3;Wk`o!p$4Fwr}8K{Bi?L9He~v w(Z`J1d{`u=TP@&%sY^Un>TQ6-@wKAJ3;Wk`o!p$4Fwr}8K{Bi?L9He~v w(Z`J1d{`u=TP@&%sY^Un>TQ6-@wKA