Enable ANSI escape code processing on Windows 10 and later#44118
Enable ANSI escape code processing on Windows 10 and later#44118YuriSizov merged 1 commit intogodotengine:masterfrom
Conversation
efa0f14 to
86ff18d
Compare
|
Any reason this is still in draft? Been waiting for this. |
I've been trying to test this on Windows 7/8/8.1 to see how it behaves there. I don't have real hardware running Windows < 10 anymore, so I need to spin up a VM and figure out how to get a software Vulkan implementation running. I've run into some trouble doing this, as Godot won't even start if Vulkan DLLs are not installed (even with This will surely require adding fallback code to prevent crashing on Windows versions older than 10. We don't expect colored console printing to actually work on Windows versions older than 10, but we should at least make the engine able to run. Bogus ANSI escape codes will likely be present at first, but we can look into stripping ANSI escape codes on old Windows versions if there's enough demand. If you do have access to a Windows 7/8/8.1 machine, please test this PR locally 🙂 Edit: Windows 64-bit editor binary for testing: https://0x0.st/oSUb.zip (link expires in March 2023) |
86ff18d to
6288be0
Compare
|
If this works on Windows 10 it shoudl be fine. We should not bother with unsupported versions of Windows. |
2af7966 to
84e1598
Compare
84e1598 to
94fb63c
Compare
|
I tested this on Windows 10 and 7 again. It works as expected on both platforms (colored output on Windows 10, no colors on Windows 7). |
This lets the engine and projects use the same color codes in the terminal on all platforms. This includes support for `print_rich()` (GDScript) and `print_line_rich()` (C++).
94fb63c to
debfc7c
Compare
|
Paging @bruvzg if you want to look into this. |
|
Thanks! |
masterversion of #66216.This lets the engine and projects use the same color codes in the terminal on all platforms. This includes support for
print_rich()(GDScript) andprint_line_rich()(C++).This PR will be needed by #33505 and #36252.
TODO