AuroraRuntime/Include/Aurora/SWInfo/WinVersion.hpp

83 lines
4.1 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: WinVersion.hpp
Date: 2022-1-25
Author: Reece
***/
#pragma once
namespace Aurora::SWInfo
{
// VersionHelpers.h - except it doesn't lie to you and wont break NIX land
AUKN_SYM bool IsWindowsXPOrGreater();
AUKN_SYM bool IsWindowsXP();
AUKN_SYM bool IsWindowsXPSP1OrGreater();
AUKN_SYM bool IsWindowsXPSP1();
AUKN_SYM bool IsWindowsXPSP2OrGreater();
AUKN_SYM bool IsWindowsXPSP2();
AUKN_SYM bool IsWindowsXPSP3OrGreater();
AUKN_SYM bool IsWindowsXPSP3();
AUKN_SYM bool IsWindowsXPAny(); // < Is Windows XP?
AUKN_SYM bool IsWindowsVistaOrGreater();
AUKN_SYM bool IsWindowsVista();
AUKN_SYM bool IsWindowsVistaSP1OrGreater();
AUKN_SYM bool IsWindowsVistaSP1();
AUKN_SYM bool IsWindowsVistaSP2OrGreater();
AUKN_SYM bool IsWindowsVistaSP2();
AUKN_SYM bool IsWindowsVistaAny(); // < Is Windows Vista?
AUKN_SYM bool IsWindows7OrGreater();
AUKN_SYM bool IsWindows7();
AUKN_SYM bool IsWindows7SP1OrGreater();
AUKN_SYM bool IsWindows7SP1();
AUKN_SYM bool IsWindows7Any(); // Is Windows 7?
AUKN_SYM bool IsWindows8OrGreater();
AUKN_SYM bool IsWindows8(); // Is garbage metro tablet OS?
AUKN_SYM bool IsWindows8Point1OrGreater();
AUKN_SYM bool IsWindows8Point1(); // Is garbage metro tablet OS that defaults to the old desktop first?
AUKN_SYM bool IsWindows8Any();
AUKN_SYM bool IsWindows10OrGreater();
AUKN_SYM bool IsWindows10(); // warning: this deviates from the other APIs in that this checks for any Windows 10 build
inline bool IsWindows10Any()
{
return IsWindows10();
}
// Here's where the fun begins.
// Not only is Microsoft lying when they said "Windows 10 will be the last version", you cannot even trust these milestone builds to mean anything.
// Microsoft defines milestone in the literal defintion of "a significant stage or event in the development of something."
// Emphasis on "in the development of something" - Windows 10, including the LTSC releases, is perpetual betaware.
// Major breaking changes have occurred between these milestone builds, including those that would break older drivers and changes in the OS's set of 3D apis.
// On the topic of the former point, we've had at least 14 major releases of Windows 10, and that's not accounting for every feature break that occoured.
// ...that's 14 releases or more releases of Windows in the span of Windows XP to Windows Vista (and a half)
// You'll probably want to use GetPlatformInfo().uKernelPatch instead.
AUKN_SYM bool IsWindows10MilestoneTH1OrGreater();
AUKN_SYM bool IsWindows10MilestoneTH1();
AUKN_SYM bool IsWindows10MilestoneTH2OrGreater();
AUKN_SYM bool IsWindows10MilestoneTH2();
AUKN_SYM bool IsWindows10MilestoneRS1OrGreater();
AUKN_SYM bool IsWindows10MilestoneRS1();
AUKN_SYM bool IsWindows10MilestoneRS2OrGreater();
AUKN_SYM bool IsWindows10MilestoneRS2();
AUKN_SYM bool IsWindows10MilestoneRS3OrGreater();
AUKN_SYM bool IsWindows10MilestoneRS3();
AUKN_SYM bool IsWindows10MilestoneRS4OrGreater();
AUKN_SYM bool IsWindows10MilestoneRS4();
AUKN_SYM bool IsWindows10MilestoneRS5OrGreater();
AUKN_SYM bool IsWindows10MilestoneRS5();
AUKN_SYM bool IsWindows10Milestone19H1OrGreater();
AUKN_SYM bool IsWindows10Milestone19H1();
AUKN_SYM bool IsWindows10Milestone19H2OrGreater();
AUKN_SYM bool IsWindows10Milestone19H2();
AUKN_SYM bool IsWindows10Milestone20H1OrGreater();
AUKN_SYM bool IsWindows10Milestone20H1();
AUKN_SYM bool IsWindows10Milestone20H2OrGreater();
AUKN_SYM bool IsWindows10Milestone20H2();
AUKN_SYM bool IsWindows10Milestone21H1OrGreater();
AUKN_SYM bool IsWindows10Milestone21H1();
AUKN_SYM bool IsWindows10Milestone21H2OrGreater();
AUKN_SYM bool IsWindows10Milestone21H2();
AUKN_SYM bool IsWindows10Milestone22H2OrGreater();
AUKN_SYM bool IsWindows10Milestone22H2();
AUKN_SYM bool IsWindows11OrGreater();
AUKN_SYM bool IsWindows11(); // Is Windows 11 or greater? (we have no frame of reference for when Windows 11 ends)
}