Use hide_console='hide-early'

Windows only. In console-enabled executable, hide or minimize the console window if the program owns the
console window (i.e., was not launched from existing console window). Depending on the setting, the
console is hidden/mininized either early in the bootloader execution ('hide-early', 'minimize-early') or
late in the bootloader execution ('hide-late', 'minimize-late'). The early option takes place as soon as
the PKG archive is found. In onefile builds, the late option takes place after application has unpacked
itself and before it launches the child process. In onedir builds, the late option takes place before
starting the embedded python interpreter.

790d43f31c/PyInstaller/building/api.py (L386)
This commit is contained in:
Ircama 2024-07-30 08:26:45 +02:00
parent db0611c09e
commit 7dc0bd4932

View file

@ -44,7 +44,7 @@ exe = EXE(
runtime_tmpdir=None,
# console=False, # On Windows or Mac OS governs whether to use the console executable or the windowed executable. Always True on Linux/Unix (always console executable - it does not matter there).
disable_windowed_traceback=False, # Disable traceback dump of unhandled exception in windowed (noconsole) mode (Windows and macOS only)
hide_console='hide-early'. # Windows only. In console-enabled executable, hide or minimize the console window ('hide-early', 'minimize-early', 'hide-late', 'minimize-late')
hide_console='hide-early', # Windows only. In console-enabled executable, hide or minimize the console window ('hide-early', 'minimize-early', 'hide-late', 'minimize-late')
argv_emulation=False,
target_arch=None,
codesign_identity=None,