Skip to content

Commit 1038d3f

Browse files
committed
[Windows] Drop support for Windows 7/8/8.1.
1 parent b89c47b commit 1038d3f

File tree

9 files changed

+44
-360
lines changed

9 files changed

+44
-360
lines changed

doc/classes/DisplayServer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@
19411941
<description>
19421942
Set active tablet driver name.
19431943
Supported drivers:
1944-
- [code]winink[/code]: Windows Ink API, default (Windows 8.1+ required).
1944+
- [code]winink[/code]: Windows Ink API, default.
19451945
- [code]wintab[/code]: Wacom Wintab API (compatible device driver required).
19461946
- [code]dummy[/code]: Dummy driver, tablet input is disabled.
19471947
[b]Note:[/b] This method is implemented only on Windows.

doc/classes/OS.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@
588588
<return type="String" />
589589
<description>
590590
Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds.
591-
- For Windows, the major and minor version are returned, as well as the build number. For example, the returned string may look like [code]10.0.9926[/code] for a build of Windows 10, and it may look like [code]6.1.7601[/code] for a build of Windows 7 SP1.
591+
- For Windows, the major and minor version are returned, as well as the build number. For example, the returned string may look like [code]10.0.9926[/code] for a build of Windows 10.
592592
- For rolling distributions, such as Arch Linux, an empty string is returned.
593593
- For macOS and iOS, the major and minor version are returned, as well as the patch number.
594594
- For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead.

drivers/d3d12/rendering_context_driver_d3d12.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,7 @@
4242
#endif
4343

4444
#ifdef DCOMP_ENABLED
45-
#if (WINVER < _WIN32_WINNT_WIN8) && defined(_MSC_VER)
46-
#pragma push_macro("NTDDI_VERSION")
47-
#pragma push_macro("WINVER")
48-
#undef NTDDI_VERSION
49-
#undef WINVER
50-
#define NTDDI_VERSION NTDDI_WIN8
51-
#define WINVER _WIN32_WINNT_WIN8
5245
#include <dcomp.h>
53-
#pragma pop_macro("WINVER")
54-
#pragma pop_macro("NTDDI_VERSION")
55-
#else
56-
#include <dcomp.h>
57-
#endif
5846
#endif
5947

6048
#include <d3dx12.h>

drivers/windows/thread_windows.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,14 @@
3838
#define WIN32_LEAN_AND_MEAN
3939
#include <windows.h>
4040

41-
typedef HRESULT(WINAPI *SetThreadDescriptionPtr)(HANDLE p_thread, PCWSTR p_thread_description);
42-
SetThreadDescriptionPtr w10_SetThreadDescription = nullptr;
43-
4441
static Error set_name(const String &p_name) {
4542
HANDLE hThread = GetCurrentThread();
4643
HRESULT res = E_FAIL;
47-
if (w10_SetThreadDescription) {
48-
res = w10_SetThreadDescription(hThread, (LPCWSTR)p_name.utf16().get_data());
49-
}
44+
SetThreadDescription(hThread, (LPCWSTR)p_name.utf16().get_data());
5045
return SUCCEEDED(res) ? OK : ERR_INVALID_PARAMETER;
5146
}
5247

5348
void init_thread_win() {
54-
w10_SetThreadDescription = (SetThreadDescriptionPtr)(void *)GetProcAddress(LoadLibraryW(L"kernel32.dll"), "SetThreadDescription");
55-
5649
Thread::_set_platform_functions({ set_name });
5750
}
5851

modules/mono/editor/hostfxr_resolver.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,11 @@ bool get_latest_fxr(const String &fxr_root, String &r_fxr_path) {
130130
}
131131

132132
#ifdef WINDOWS_ENABLED
133-
typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS)(HANDLE, PBOOL);
134-
135133
BOOL is_wow64() {
136134
BOOL wow64 = FALSE;
137135

138-
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)(void *)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process");
139-
140-
if (fnIsWow64Process) {
141-
if (!fnIsWow64Process(GetCurrentProcess(), &wow64)) {
142-
wow64 = FALSE;
143-
}
136+
if (IsWow64Process(GetCurrentProcess(), &wow64)) {
137+
wow64 = FALSE;
144138
}
145139

146140
return wow64;

platform/windows/detect.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import TYPE_CHECKING
66

77
import methods
8-
from methods import print_error, print_info, print_warning
8+
from methods import print_error, print_warning
99
from platform_methods import detect_arch, validate_arch
1010

1111
if TYPE_CHECKING:
@@ -185,10 +185,11 @@ def get_opts():
185185
# Targeted Windows version: 7 (and later), minimum supported version
186186
# XP support dropped after EOL due to missing API for IPv6 and other issues
187187
# Vista support dropped after EOL due to GH-10243
188+
# 7/8/8.1 support dropped after EOL due to GH-76829
188189
(
189190
"target_win_version",
190-
"Targeted Windows version, >= 0x0601 (Windows 7)",
191-
"0x0601",
191+
"Targeted Windows version, >= 0x0A00 (Windows 10)",
192+
"0x0A00",
192193
),
193194
EnumVariable("windows_subsystem", "Windows subsystem", "gui", ["gui", "console"], ignorecase=2),
194195
("msvc_version", "MSVC version to use. Handled automatically by SCons if omitted.", ""),
@@ -405,11 +406,6 @@ def spawn_capture(sh, escape, cmd, args, env):
405406

406407
validate_win_version(env)
407408

408-
if env["accesskit"]:
409-
if int(env["target_win_version"], 16) < 0x0602:
410-
print_info("AccessKit enabled, targeted Windows version changed to Windows 8 (0x602).")
411-
env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+
412-
413409
env.AppendUnique(
414410
CPPDEFINES=[
415411
"WINDOWS_ENABLED",
@@ -447,6 +443,7 @@ def spawn_capture(sh, escape, cmd, args, env):
447443
"gdi32",
448444
"IPHLPAPI",
449445
"Shlwapi",
446+
"Shcore",
450447
"wsock32",
451448
"Ws2_32",
452449
"shell32",
@@ -774,11 +771,6 @@ def configure_mingw(env: "SConsEnvironment"):
774771

775772
validate_win_version(env)
776773

777-
if env["accesskit"]:
778-
if int(env["target_win_version"], 16) < 0x0602:
779-
print_info("AccessKit enabled, targeted Windows version changed to Windows 8 (0x602).")
780-
env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+
781-
782774
if not env["use_llvm"]:
783775
env.Append(CCFLAGS=["-mwindows"])
784776

@@ -824,6 +816,7 @@ def configure_mingw(env: "SConsEnvironment"):
824816
"iphlpapi",
825817
"shell32",
826818
"shlwapi",
819+
"shcore",
827820
"wsock32",
828821
"ws2_32",
829822
"kernel32",
@@ -961,6 +954,6 @@ def check_d3d12_installed(env, suffix):
961954

962955

963956
def validate_win_version(env):
964-
if int(env["target_win_version"], 16) < 0x0601:
965-
print_error("`target_win_version` should be 0x0601 or higher (Windows 7).")
957+
if int(env["target_win_version"], 16) < 0x0A00:
958+
print_error("`target_win_version` should be 0x0A00 or higher (Windows 10).")
966959
sys.exit(255)

0 commit comments

Comments
 (0)