Skip to content

Commit

Permalink
Bump min required Windows version to 7
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vultraz committed May 10, 2018
1 parent 497d58d commit 2a58511
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -601,7 +601,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
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions projectfiles/CodeBlocks/wesnoth.cbp
Expand Up @@ -41,8 +41,8 @@
<Add option="-Wunused-parameter" />
<Add option="-DHAVE_LIBPNG" />
<Add option="-D_WIN32_WINDOWS" />
<Add option="-D_WIN32_WINNT=0x0501" />
<Add option="-D_WIN32_IE=0x0501" />
<Add option="-D_WIN32_WINNT=0x0601" />
<Add option="-D_WIN32_IE=0x0601" />
<Add option="-DGLEW_STATIC" />
<Add directory="../../src" />
</Compiler>
Expand Down
2 changes: 1 addition & 1 deletion projectfiles/VC14/campaignd.vcxproj
Expand Up @@ -64,7 +64,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\..\src;..\..\..\external\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WINXP;_SCL_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=_WIN32_WINNT_WIN7;_SCL_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244;4127</DisableSpecificWarnings>
</ClCompile>
<Link>
Expand Down
2 changes: 1 addition & 1 deletion projectfiles/VC14/wesnoth.vcxproj
Expand Up @@ -156,7 +156,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\..\src;..\..\..\external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>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)</PreprocessorDefinitions>
<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)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down
2 changes: 1 addition & 1 deletion projectfiles/VC14/wesnothd.vcxproj
Expand Up @@ -112,7 +112,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\src;..\..\..\external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>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)</PreprocessorDefinitions>
<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)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<OpenMPSupport>
Expand Down
2 changes: 0 additions & 2 deletions src/desktop/windows_tray_notification.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/desktop/windows_tray_notification.hpp
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/network_asio.hpp
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/wesnothd_connection.hpp
Expand Up @@ -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
Expand Down

0 comments on commit 2a58511

Please sign in to comment.