From e04b2d18e984dd70d68506393bb4574e15f76733 Mon Sep 17 00:00:00 2001 From: zeqi Date: Tue, 7 Jul 2026 06:59:10 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=98=BE=E7=A4=BA.EXE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zeqi --- mainwindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mainwindow.py b/mainwindow.py index 9eedfa8..287c833d 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -128,7 +128,10 @@ def liulanbutton(): # 第二个浏览按钮事件 def liulanexebutton(): - path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 exe 可执行文件", json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExe.json"))["path"], "exe 可执行文件(*.exe);;MSI 文件(*.msi);;所有文件(*.*)") + # 文件对话框新增显示.EXE文件 + # path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 exe 可执行文件", json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExe.json"))["path"], "exe 可执行文件(*.exe);;MSI 文件(*.msi);;所有文件(*.*)") + path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 Windows 可执行文件", json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExe.json"))["path"], "exe/EXE 可执行文件(*.exe *.EXE);;MSI 文件(*.msi);;所有文件(*.*)") + if path != "" and path != "()": e2.setEditText(path[0]) # 显示路径 write_txt(get_home() + "/.config/deepin-wine-runner/FindExe.json", json.dumps({"path": os.path.dirname(path[0])})) # 写入配置文件