mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
fix: call freeze_support immediately to fix Windows EXE crash
This commit is contained in:
@@ -6,6 +6,10 @@ from pathlib import Path
|
|||||||
import swingmusic.__main__ as app
|
import swingmusic.__main__ as app
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
# Fixed: freeze_support() must be called immediately to prevent
|
||||||
|
# recursive process spawning and ArgumentParser errors on Windows EXE.
|
||||||
|
multiprocessing.freeze_support()
|
||||||
|
|
||||||
# this entry should only be used by pyinstaller.
|
# this entry should only be used by pyinstaller.
|
||||||
# add freeze support here as pyinstaller uses this entry
|
# add freeze support here as pyinstaller uses this entry
|
||||||
|
|
||||||
@@ -20,5 +24,4 @@ if __name__ == "__main__":
|
|||||||
sys.argv.extend(["--client", client_str])
|
sys.argv.extend(["--client", client_str])
|
||||||
sys.orig_argv.extend(["--client", client_str])
|
sys.orig_argv.extend(["--client", client_str])
|
||||||
|
|
||||||
multiprocessing.freeze_support()
|
|
||||||
app.run()
|
app.run()
|
||||||
|
|||||||
Reference in New Issue
Block a user