Launcher: Fix multiprocessing in built Launcher (#1792)

This commit is contained in:
Cyb3R 2023-05-05 00:53:57 +02:00 committed by GitHub
parent 11b2b5ed2f
commit d3447a3983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ Scroll down to components= to add components to the launcher as well as setup.py
import argparse import argparse
import itertools import itertools
import multiprocessing
import shlex import shlex
import subprocess import subprocess
import sys import sys
@ -245,6 +246,7 @@ def main(args: Optional[Union[argparse.Namespace, dict]] = None):
if __name__ == '__main__': if __name__ == '__main__':
init_logging('Launcher') init_logging('Launcher')
multiprocessing.freeze_support()
parser = argparse.ArgumentParser(description='Archipelago Launcher') parser = argparse.ArgumentParser(description='Archipelago Launcher')
parser.add_argument('Patch|Game|Component', type=str, nargs='?', parser.add_argument('Patch|Game|Component', type=str, nargs='?',
help="Pass either a patch file, a generated game or the name of a component to run.") help="Pass either a patch file, a generated game or the name of a component to run.")