feat(color-console): support ansi colors in console

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2025-04-17 14:54:44 -07:00
parent 564f120c22
commit 4a2b5c72dc
No known key found for this signature in database
GPG Key ID: E10E321EB160949B
4 changed files with 11 additions and 5 deletions

View File

@ -155,7 +155,7 @@
#if defined Q_OS_WIN32
#include <windows.h>
#include <QStyleHints>
#include "WindowsConsole.h"
#include "console/WindowsConsole.h"
#endif
#define STRINGIFY(x) #x

View File

@ -589,8 +589,8 @@ set(ATLAUNCHER_SOURCES
)
set(LINKEXE_SOURCES
WindowsConsole.cpp
WindowsConsole.h
console/WindowsConsole.cpp
console/WindowsConsole.h
filelink/FileLink.h
filelink/FileLink.cpp
@ -1164,8 +1164,8 @@ endif()
if(WIN32)
set(LAUNCHER_SOURCES
WindowsConsole.cpp
WindowsConsole.h
console/WindowsConsole.cpp
console/WindowsConsole.h
${LAUNCHER_SOURCES}
)
endif()

View File

@ -19,6 +19,7 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include "WindowsConsole.h"
#include <fcntl.h>
#include <io.h>
#include <stdio.h>
@ -126,3 +127,5 @@ bool AttachWindowsConsole()
return false;
}
std::error_code

View File

@ -21,5 +21,8 @@
#pragma once
#include <system_error>
void BindCrtHandlesToStdHandles(bool bindStdIn, bool bindStdOut, bool bindStdErr);
bool AttachWindowsConsole();
std::error_code EnableAnsiSupport();