Skip to content

Commit cc59a80

Browse files
committed
Fix bug
修复当无法启动 PyInstaller 子进程时没有任何反馈的问题;
1 parent b2f7fff commit cc59a80

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/py2exe_gui/Widgets/dialog_widgets.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ def handle_output(self, subprocess_output: tuple[int, str]) -> None:
205205
self.info_label.setText(output_text)
206206
if output_text == "正在运行中……":
207207
self.multifunction_btn.setText("取消")
208+
elif output_type == SubProcessTool.ERROR:
209+
self.info_label.setText("PyInstaller错误!")
210+
self.browser.append(output_text)
211+
self.browser.append("请检查是否已经安装正确版本的 PyInstaller")
212+
self.multifunction_btn.setText("关闭")
208213

209214
@Slot()
210215
def handle_multifunction(self) -> None:
@@ -225,3 +230,5 @@ def handle_multifunction(self) -> None:
225230
subprocess.call(["xdg-open", dist_path])
226231
elif self.parent().running_platform == PLATFORM.macos:
227232
subprocess.call(["open", dist_path])
233+
elif btn_text == "关闭":
234+
self.close()

0 commit comments

Comments
 (0)