Skip to content

Commit 68fad69

Browse files
committed
Bug fix: RUNTIME_PLATFORM
修复由于修改主文件中获取运行时平台方式,但忘记修改 `SubProcessDlg` 对应代码导致的问题;
1 parent aadc437 commit 68fad69

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/py2exe_gui/Widgets/subprocess_widget.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
QWidget,
1515
)
1616

17-
from ..Constants import PLATFORM
17+
from ..Constants import PLATFORM, RUNTIME_PLATFORM
1818
from ..Core.subprocess_tool import SubProcessTool
1919

2020

@@ -96,12 +96,12 @@ def handle_multifunction(self) -> None:
9696
self.close()
9797
elif btn_text == "打开输出位置":
9898
dist_path = self.parent().packaging_task.script_path.parent / "dist"
99-
if self.parent().running_platform == PLATFORM.windows:
99+
if PLATFORM.windows == RUNTIME_PLATFORM:
100100
import os # fmt: skip
101101
os.startfile(dist_path) # noqa
102-
elif self.parent().running_platform == PLATFORM.linux:
102+
elif PLATFORM.linux == RUNTIME_PLATFORM:
103103
subprocess.call(["xdg-open", dist_path])
104-
elif self.parent().running_platform == PLATFORM.macos:
104+
elif PLATFORM.macos == RUNTIME_PLATFORM:
105105
subprocess.call(["open", dist_path])
106106
elif btn_text == "关闭":
107107
self.close()

0 commit comments

Comments
 (0)