You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project:
When compiling Godot for Windows with the debug or release_debug target, it's compiled as a console application (even though it spawns a window on top of that). This means it's able to print to standard output/error. This also allows redirecting its output to a file.
However, when compiling Godot for Windows with the release target, it's compiled as a GUI application. This makes it impossible to see its standard output or error since no console window is visible. Even when running the executable from a command prompt, nothing will be printed. This makes it effectively impossible to redirect its output to a file.
This is a Windows limitation. Running the program in WINE may be able to overcome this limitation, but running WINE on Windows is usually impractical and requires a fair amount of setup.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Add a windows_build_mode=console|gui SCons option that overrides the build mode regardless of the target used. (Feel free to suggest a better name for this option.)
AttachConsole also works, it's non-blocking and won't play nicely with two-panels file managers, but running app with start /wait /b godot should fix it too (and probably by adding freopen("CONIN$", "r", stdin);).
I think going for compile-time option could've been a solution too. See godotengine/godot#41307, so the scons tests=yes could automatically enable proposed windows_build_mode=console for those builds.
Describe the project you are working on:
The Godot editor 🙂
Describe the problem or limitation you are having in your project:
When compiling Godot for Windows with the
debug
orrelease_debug
target, it's compiled as a console application (even though it spawns a window on top of that). This means it's able to print to standard output/error. This also allows redirecting its output to a file.However, when compiling Godot for Windows with the
release
target, it's compiled as a GUI application. This makes it impossible to see its standard output or error since no console window is visible. Even when running the executable from a command prompt, nothing will be printed. This makes it effectively impossible to redirect its output to a file.This is a Windows limitation. Running the program in WINE may be able to overcome this limitation, but running WINE on Windows is usually impractical and requires a fair amount of setup.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Add a
windows_build_mode=console|gui
SCons option that overrides the build mode regardless of the target used. (Feel free to suggest a better name for this option.)This could help resolve godotengine/godot#24701 while making godotengine/godot#28922 significantly easier to troubleshoot.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
This can probably be done with some well-placed
#ifdef
s in the Windows platform code.If this enhancement will not be used often, can it be worked around with a few lines of script?:
This needs to be decided at build-time, so no.
Is there a reason why this should be core and not an add-on in the asset library?:
This needs to be decided at build-time, so this can't be changed by an add-on.
See also #1342.
The text was updated successfully, but these errors were encountered: