mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 16:36:04 +01:00
Merge bitcoin/bitcoin#31172: build: increase minimum supported Windows to 10.0
ee1128ead8doc: update stack-clash-protection comment re mingw-w64 (fanquake)bf47448f15test: drop check for Windows < 10 (fanquake)35b898c47frelease: target Windows 10 or later (fanquake)398754e70bdepends: target Windows 10 when building for mingw-w64 (fanquake) Pull request description: Follows up to https://github.com/bitcoin/bitcoin/pull/31048#discussion_r1803165670. We definitely cannot claim that Bitcoin Core is "supported and extensively tested on" on Windows 7. Note that #30997 is also increasing the minimum required Windows version (for the GUI) to 10. ACKs for top commit: hodlinator: cr-ACKee1128ead8davidgumberg: ACKee1128ead8achow101: ACKee1128ead8hebasto: re-ACKee1128ead8, only rebased, a commit message and a comment have been amended since my recent [review](https://github.com/bitcoin/bitcoin/pull/31172#pullrequestreview-2415452160). TheCharlatan: ACKee1128ead8Tree-SHA512: 245e0bac3d63414d919a1948661fef4ff79359faaacaf19d64abd91cc62e822797fb1cf3379e340bfdf9a85c0b88fd99a90eda450dd4218b6213ab78aefb1374
This commit is contained in:
@@ -51,23 +51,23 @@ except UnicodeDecodeError:
|
||||
CROSS = "x "
|
||||
CIRCLE = "o "
|
||||
|
||||
if platform.system() != 'Windows' or sys.getwindowsversion() >= (10, 0, 14393): #type:ignore
|
||||
if platform.system() == 'Windows':
|
||||
import ctypes
|
||||
kernel32 = ctypes.windll.kernel32 # type: ignore
|
||||
ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4
|
||||
STD_OUTPUT_HANDLE = -11
|
||||
STD_ERROR_HANDLE = -12
|
||||
# Enable ascii color control to stdout
|
||||
stdout = kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
|
||||
stdout_mode = ctypes.c_int32()
|
||||
kernel32.GetConsoleMode(stdout, ctypes.byref(stdout_mode))
|
||||
kernel32.SetConsoleMode(stdout, stdout_mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||
# Enable ascii color control to stderr
|
||||
stderr = kernel32.GetStdHandle(STD_ERROR_HANDLE)
|
||||
stderr_mode = ctypes.c_int32()
|
||||
kernel32.GetConsoleMode(stderr, ctypes.byref(stderr_mode))
|
||||
kernel32.SetConsoleMode(stderr, stderr_mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||
if platform.system() == 'Windows':
|
||||
import ctypes
|
||||
kernel32 = ctypes.windll.kernel32 # type: ignore
|
||||
ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4
|
||||
STD_OUTPUT_HANDLE = -11
|
||||
STD_ERROR_HANDLE = -12
|
||||
# Enable ascii color control to stdout
|
||||
stdout = kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
|
||||
stdout_mode = ctypes.c_int32()
|
||||
kernel32.GetConsoleMode(stdout, ctypes.byref(stdout_mode))
|
||||
kernel32.SetConsoleMode(stdout, stdout_mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||
# Enable ascii color control to stderr
|
||||
stderr = kernel32.GetStdHandle(STD_ERROR_HANDLE)
|
||||
stderr_mode = ctypes.c_int32()
|
||||
kernel32.GetConsoleMode(stderr, ctypes.byref(stderr_mode))
|
||||
kernel32.SetConsoleMode(stderr, stderr_mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||
else:
|
||||
# primitive formatting on supported
|
||||
# terminal via ANSI escape sequences:
|
||||
DEFAULT = ('\033[0m', '\033[0m')
|
||||
|
||||
Reference in New Issue
Block a user