fix: 添加freeze_support防止打包后子进程重复启动主窗口

PyInstaller + Windows spawn模式下,子进程会重新执行主脚本,
缺少freeze_support()导致无限循环创建窗口和OCR进程。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
let5sne.win10
2026-02-24 23:52:09 +08:00
parent 8f6a4fbc68
commit 7ebd5badf5

View File

@@ -1147,6 +1147,7 @@ class MainWindow(QMainWindow):
def main():
mp.freeze_support()
log_file = setup_logging()
app = QApplication(sys.argv)
app.setStyle("Fusion")