mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
[Windows] Drop support for Windows 7/8/8.1.
This commit is contained in:
parent
b89c47bb85
commit
617e12a6b4
11 changed files with 45 additions and 376 deletions
|
@ -5,7 +5,7 @@ import sys
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
import methods
|
||||
from methods import print_error, print_info, print_warning
|
||||
from methods import print_error, print_warning
|
||||
from platform_methods import detect_arch, validate_arch
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -182,14 +182,6 @@ def get_opts():
|
|||
|
||||
return [
|
||||
("mingw_prefix", "MinGW prefix", mingw),
|
||||
# Targeted Windows version: 7 (and later), minimum supported version
|
||||
# XP support dropped after EOL due to missing API for IPv6 and other issues
|
||||
# Vista support dropped after EOL due to GH-10243
|
||||
(
|
||||
"target_win_version",
|
||||
"Targeted Windows version, >= 0x0601 (Windows 7)",
|
||||
"0x0601",
|
||||
),
|
||||
EnumVariable("windows_subsystem", "Windows subsystem", "gui", ["gui", "console"], ignorecase=2),
|
||||
("msvc_version", "MSVC version to use. Handled automatically by SCons if omitted.", ""),
|
||||
BoolVariable("use_mingw", "Use the Mingw compiler, even if MSVC is installed.", False),
|
||||
|
@ -403,13 +395,6 @@ def configure_msvc(env: "SConsEnvironment"):
|
|||
# for notes on why this shouldn't be enabled for gcc
|
||||
env.AppendUnique(CCFLAGS=["/bigobj"])
|
||||
|
||||
validate_win_version(env)
|
||||
|
||||
if env["accesskit"]:
|
||||
if int(env["target_win_version"], 16) < 0x0602:
|
||||
print_info("AccessKit enabled, targeted Windows version changed to Windows 8 (0x602).")
|
||||
env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+
|
||||
|
||||
env.AppendUnique(
|
||||
CPPDEFINES=[
|
||||
"WINDOWS_ENABLED",
|
||||
|
@ -417,8 +402,8 @@ def configure_msvc(env: "SConsEnvironment"):
|
|||
"WINMIDI_ENABLED",
|
||||
"TYPED_METHOD_BIND",
|
||||
"WIN32",
|
||||
"WINVER=%s" % env["target_win_version"],
|
||||
"_WIN32_WINNT=%s" % env["target_win_version"],
|
||||
"WINVER=0x0A00",
|
||||
"_WIN32_WINNT=0x0A00",
|
||||
]
|
||||
)
|
||||
env.AppendUnique(CPPDEFINES=["NOMINMAX"]) # disable bogus min/max WinDef.h macros
|
||||
|
@ -447,6 +432,7 @@ def configure_msvc(env: "SConsEnvironment"):
|
|||
"gdi32",
|
||||
"IPHLPAPI",
|
||||
"Shlwapi",
|
||||
"Shcore",
|
||||
"wsock32",
|
||||
"Ws2_32",
|
||||
"shell32",
|
||||
|
@ -772,13 +758,6 @@ def configure_mingw(env: "SConsEnvironment"):
|
|||
|
||||
## Compile flags
|
||||
|
||||
validate_win_version(env)
|
||||
|
||||
if env["accesskit"]:
|
||||
if int(env["target_win_version"], 16) < 0x0602:
|
||||
print_info("AccessKit enabled, targeted Windows version changed to Windows 8 (0x602).")
|
||||
env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+
|
||||
|
||||
if not env["use_llvm"]:
|
||||
env.Append(CCFLAGS=["-mwindows"])
|
||||
|
||||
|
@ -809,8 +788,8 @@ def configure_mingw(env: "SConsEnvironment"):
|
|||
env.Append(CPPDEFINES=["WINDOWS_ENABLED", "WASAPI_ENABLED", "WINMIDI_ENABLED"])
|
||||
env.Append(
|
||||
CPPDEFINES=[
|
||||
("WINVER", env["target_win_version"]),
|
||||
("_WIN32_WINNT", env["target_win_version"]),
|
||||
"WINVER=0x0A00",
|
||||
"_WIN32_WINNT=0x0A00",
|
||||
]
|
||||
)
|
||||
env.Append(
|
||||
|
@ -824,6 +803,7 @@ def configure_mingw(env: "SConsEnvironment"):
|
|||
"iphlpapi",
|
||||
"shell32",
|
||||
"shlwapi",
|
||||
"shcore",
|
||||
"wsock32",
|
||||
"ws2_32",
|
||||
"kernel32",
|
||||
|
@ -958,9 +938,3 @@ def check_d3d12_installed(env, suffix):
|
|||
"https://docs.godotengine.org/en/latest/contributing/development/compiling/compiling_for_windows.html"
|
||||
)
|
||||
sys.exit(255)
|
||||
|
||||
|
||||
def validate_win_version(env):
|
||||
if int(env["target_win_version"], 16) < 0x0601:
|
||||
print_error("`target_win_version` should be 0x0601 or higher (Windows 7).")
|
||||
sys.exit(255)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue