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
Both cmd.exe and powershell.exe support colorized text formatting on Windows 10; Anyone choosing to use the legacy cmd.exe would see the control character output rather than the colors, though.
I use the registry to check the Windows major version because the API functions (VerifyVersionInfo, etc.):
require an app manifest for Windows 8.1 and 10, and
are deprecated, presumably as part of the push to UWP.
Thanks, good to know that the same escape codes are now possible on Windows! Shouldn't GetVersionEx work to determine the version? It's available since Windows 2000 and still works for UWP apps.
Unless the application is manifested for Windows 8.1 or Windows 10[1], GetVersionEx will report as Windows 8 (and apparently is no longer recommended for >= 8.1[2]). I would bet most D developers don't manifest their applications (especially not the test executable), so this wouldn't work. The registry isn't a great method, but I'm not sure of a reliable way to do it otherwise, short of fixing dub to embed a manifest if present and generating a template manifest on dub init.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both
cmd.exeandpowershell.exesupport colorized text formatting on Windows 10; Anyone choosing to use the legacy cmd.exe would see the control character output rather than the colors, though.I use the registry to check the Windows major version because the API functions (
VerifyVersionInfo, etc.):