diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-12-01 21:15:56 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-12-06 23:47:09 +0100 |
commit | 0d48af4afdf29f39ce954bd16beef6b55b8159bc (patch) | |
tree | 331b5718809188634dabdcdb19e2e795b074d59c /platform/windows/detect.py | |
parent | d089e688b0588e8e7328d3f9bf5853db74c124f2 (diff) | |
download | redot-engine-0d48af4afdf29f39ce954bd16beef6b55b8159bc.tar.gz |
Add build param for targeted Windows version
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r-- | platform/windows/detect.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index fbb02c9d1b..890decf962 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -64,6 +64,10 @@ def get_opts(): return [ ('mingw_prefix_32', 'MinGW prefix (Win32)', mingw32), ('mingw_prefix_64', 'MinGW prefix (Win64)', mingw64), + # 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('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), ] @@ -97,11 +101,6 @@ def configure(env): env.Append(CPPPATH=['#platform/windows']) - # 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 - winver = "0x0601" - if (os.name == "nt" and os.getenv("VCINSTALLDIR")): # MSVC env['ENV']['TMP'] = os.environ['TMP'] @@ -175,7 +174,7 @@ def configure(env): env.Append(CCFLAGS=['/DWASAPI_ENABLED']) env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) env.Append(CCFLAGS=['/DWIN32']) - env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver]) + env.Append(CCFLAGS=['/DWINVER=%s' % env['target_win_version'], '/D_WIN32_WINNT=%s' % env['target_win_version']]) if env["bits"] == "64": env.Append(CCFLAGS=['/D_WIN64']) |