From ee2b9d242e4ca9d4229c2a5755094d22522a5545 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Fri, 11 May 2018 10:56:11 +1100 Subject: [PATCH] Bump min required Windows version to 7 Technically, all this code should work on Vista, (including the recent switch to using SHGetKnownFolderPath), but since we're also considering requiring Visual Studio 2017 for building, we need Windows 7. (cherry-picked from commit 2a585118d8b6c4b37d0ff9446a72ca20419ff7f7) --- SConstruct | 2 +- changelog.md | 2 ++ projectfiles/CodeBlocks/wesnoth.cbp | 4 ++-- projectfiles/VC14/campaignd.vcxproj | 2 +- projectfiles/VC14/wesnoth.vcxproj | 2 +- projectfiles/VC14/wesnothd.vcxproj | 2 +- src/desktop/windows_tray_notification.cpp | 2 -- src/desktop/windows_tray_notification.hpp | 2 +- src/network_asio.hpp | 4 ---- src/wesnothd_connection.hpp | 4 ---- 10 files changed, 9 insertions(+), 17 deletions(-) diff --git a/SConstruct b/SConstruct index 424a228680f..a3c77a60521 100755 --- a/SConstruct +++ b/SConstruct @@ -602,7 +602,7 @@ for env in [test_env, client_env, env]: env[d] = os.path.join(env["prefix"], env[d]) if env["PLATFORM"] == 'win32': - env.Append(LIBS = ["wsock32", "iconv", "z", "shlwapi", "winmm"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0501"]) + env.Append(LIBS = ["wsock32", "iconv", "z", "shlwapi", "winmm"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0601"]) if env["PLATFORM"] == 'darwin': # Mac OS X env.Append(FRAMEWORKS = "Cocoa") # Cocoa GUI diff --git a/changelog.md b/changelog.md index ab8dbbcd435..806023e3815 100644 --- a/changelog.md +++ b/changelog.md @@ -25,6 +25,8 @@ * Added custom graphics for the broken tree in S1. * Fixed a bug in the formation ability causing defense bonuses not being received in some cases. + ### Engine + * Windows 7 is now the minimum supported Windows version. ### Help browser * Unit descriptions use the new multiplication sign format for attack lists now (issue #2873). diff --git a/projectfiles/CodeBlocks/wesnoth.cbp b/projectfiles/CodeBlocks/wesnoth.cbp index 757eb40574c..e414bae843b 100644 --- a/projectfiles/CodeBlocks/wesnoth.cbp +++ b/projectfiles/CodeBlocks/wesnoth.cbp @@ -41,8 +41,8 @@ - - + + diff --git a/projectfiles/VC14/campaignd.vcxproj b/projectfiles/VC14/campaignd.vcxproj index 3428edb55a7..5623703d752 100644 --- a/projectfiles/VC14/campaignd.vcxproj +++ b/projectfiles/VC14/campaignd.vcxproj @@ -64,7 +64,7 @@ true true ..\..\src;..\..\..\external\include - _CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WINXP;_SCL_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WIN7;_SCL_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;%(PreprocessorDefinitions) 4244;4127 diff --git a/projectfiles/VC14/wesnoth.vcxproj b/projectfiles/VC14/wesnoth.vcxproj index a4daf076fde..1da2c6cd61c 100644 --- a/projectfiles/VC14/wesnoth.vcxproj +++ b/projectfiles/VC14/wesnoth.vcxproj @@ -156,7 +156,7 @@ true false ..\..\src;..\..\..\external\include;%(AdditionalIncludeDirectories) - WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WINXP;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;HAVE_LIBPNG;NOMINMAX;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WIN7;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;HAVE_LIBPNG;NOMINMAX;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL false true diff --git a/projectfiles/VC14/wesnothd.vcxproj b/projectfiles/VC14/wesnothd.vcxproj index 9d3ad6bbf2f..7d3ecc94f07 100644 --- a/projectfiles/VC14/wesnothd.vcxproj +++ b/projectfiles/VC14/wesnothd.vcxproj @@ -112,7 +112,7 @@ MaxSpeed true ..\..\src;..\..\..\external\include;%(AdditionalIncludeDirectories) - WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WINXP;HAVE_PYTHON;USE_GZIP;NOMINMAX;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WIN7;HAVE_PYTHON;USE_GZIP;NOMINMAX;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/src/desktop/windows_tray_notification.cpp b/src/desktop/windows_tray_notification.cpp index 9609344e0cd..a1db9418133 100644 --- a/src/desktop/windows_tray_notification.cpp +++ b/src/desktop/windows_tray_notification.cpp @@ -135,9 +135,7 @@ bool windows_tray_notification::create_tray_icon() nid->uCallbackMessage = WM_TRAYNOTIFY; nid->uID = ICON_ID; nid->hIcon = icon; -#if _WIN32_WINNT >= 0x600 nid->hBalloonIcon = icon; -#endif lstrcpyW(nid->szTip, wtip.c_str()); // creating icon notification diff --git a/src/desktop/windows_tray_notification.hpp b/src/desktop/windows_tray_notification.hpp index 20b51b5a9e8..8e060cc9d15 100644 --- a/src/desktop/windows_tray_notification.hpp +++ b/src/desktop/windows_tray_notification.hpp @@ -22,7 +22,7 @@ #endif //defines that mingw misses #ifndef _WIN32_IE - #define _WIN32_IE 0x0600 //specifying target platform to be Windows XP and higher + #define _WIN32_IE _WIN32_WINNT_WIN7 //specifying target platform to be Windows 7 and higher #endif #ifndef NIIF_USER #define NIIF_USER 0x00000004 diff --git a/src/network_asio.hpp b/src/network_asio.hpp index dcfac3c94d7..e515c0e48d6 100644 --- a/src/network_asio.hpp +++ b/src/network_asio.hpp @@ -16,10 +16,6 @@ #ifdef _WIN32 -#if _WIN32_WINNT < _WIN32_WINNT_VISTA -#define BOOST_ASIO_DISABLE_IOCP -#endif - #ifdef INADDR_ANY #undef INADDR_ANY #endif diff --git a/src/wesnothd_connection.hpp b/src/wesnothd_connection.hpp index 59570c980a1..34b9f4007cf 100644 --- a/src/wesnothd_connection.hpp +++ b/src/wesnothd_connection.hpp @@ -16,10 +16,6 @@ #ifdef _WIN32 -#if _WIN32_WINNT < _WIN32_WINNT_VISTA -#define BOOST_ASIO_DISABLE_IOCP -#endif - #ifdef INADDR_ANY #undef INADDR_ANY #endif