From 1f3ef0733f6f346cbb2aa36825c6193c6a87e3f3 Mon Sep 17 00:00:00 2001 From: heinezen Date: Wed, 3 Apr 2024 22:03:59 +0200 Subject: [PATCH] convert: Add freeze_support() before using multiprocessing. --- openage/__main__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openage/__main__.py b/openage/__main__.py index c724d5bc6a..4475f46518 100644 --- a/openage/__main__.py +++ b/openage/__main__.py @@ -177,6 +177,11 @@ def main(argv=None): if __name__ == '__main__': + # Required for Windows executables (and apparently macOS too) + # https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support + # https://pyinstaller.org/en/latest/common-issues-and-pitfalls.html#multi-processing + multiprocessing.freeze_support() + # openage is complicated and multithreaded; better not use fork. multiprocessing.set_start_method('spawn')