aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-10-26 09:05:06 -0700
committerGerald Combs <gerald@wireshark.org>2017-10-26 17:57:28 +0000
commitb7f7bee8cf6ecb04a4dec86b80ce2065d4192da7 (patch)
tree1c9817bb874e6b94882adf9ac6b9cd4a34927e8d
parentde6fcf2f21ee0a69b1d4d418f0c6d184b161a203 (diff)
CMake: Set the Windows build target to Vista.
Set NTDDI_VERSION and _WIN32_WINNT to their Vista values so that ws2tcpip.h will define inet_pton and inet_ntop. Remove the associated compiler version checks so that everyone is on the same page. Add breadcrumbs to the various parts of the code where we set a minimum Windows version. Change-Id: I83bba5fa1024bfbc02e07b120412807ad259e291 Reviewed-on: https://code.wireshark.org/review/24080 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r--cmakeconfig.h.in18
-rw-r--r--image/wireshark.exe.manifest.in15
-rw-r--r--packaging/nsis/wireshark.nsi5
-rw-r--r--packaging/wix/Prerequisites.wxi5
4 files changed, 30 insertions, 13 deletions
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index b4a4c8fe93..085dbc3a64 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -406,6 +406,16 @@
#cmakedefine YYTEXT_POINTER
#if defined(_WIN32)
+ /*
+ * Make sure everyone is using the same API and that it's sufficient
+ * for our needs.
+ * This should match the following:
+ * - The <compatibility><application> section in image\wireshark.exe.manifest.in
+ * - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
+ * - The VersionNT parts of packaging\wix\Prerequisites.wxi
+ */
+# define NTDDI_VERSION NTDDI_VISTA
+# define _WIN32_WINNT _WIN32_WINNT_VISTA
/* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */
# ifndef WIN32
@@ -418,20 +428,12 @@
/* FIXME: Detection doesn't work */
# define HAVE_NTDDNDIS_H 1
- /* Visual C 9 (2008), Visual C 10 (2010), Visual C 11 (2012) and Visual C 12 (2013)
- * need these prototypes
- * XXX: Can we use MSC_VER >= 1500 ?? */
-# if _MSC_VER == 1500 || _MSC_VER == 1600 || _MSC_VER == 1700 || _MSC_VER == 1800
-# define NTDDI_VERSION NTDDI_WINXPSP3
-# define _WIN32_WINNT _WIN32_WINNT_WINXP
-# endif
/*
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
*/
# define YY_NO_UNISTD_H
-
# define strncasecmp strnicmp
# define popen _popen
# define pclose _pclose
diff --git a/image/wireshark.exe.manifest.in b/image/wireshark.exe.manifest.in
index 9a3f32c912..1a8e783d0a 100644
--- a/image/wireshark.exe.manifest.in
+++ b/image/wireshark.exe.manifest.in
@@ -29,10 +29,15 @@
</requestedPrivileges>
</security>
</trustInfo>
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
- <application>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- This should match the following:
+ - The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in
+ - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
+ - The VersionNT parts of packaging\wix\Prerequisites.wxi
+ -->
<!-- Windows Vista -->
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
@@ -41,6 +46,6 @@
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
- </application>
+ </application>
</compatibility>
-</assembly>
+</assembly>
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi
index 4f4c3cfcaa..422c1ea646 100644
--- a/packaging/nsis/wireshark.nsi
+++ b/packaging/nsis/wireshark.nsi
@@ -238,6 +238,11 @@ Function .onInit
; Get the Windows version
${GetWindowsVersion} $R0
+ ; This should match the following:
+ ; - The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in
+ ; - The <compatibility><application> section in image\wireshark.exe.manifest.in
+ ; - The VersionNT parts of packaging\wix\Prerequisites.wxi
+
; Uncomment to test.
; MessageBox MB_OK "You're running Windows $R0."
diff --git a/packaging/wix/Prerequisites.wxi b/packaging/wix/Prerequisites.wxi
index c50b59afb8..6298113907 100644
--- a/packaging/wix/Prerequisites.wxi
+++ b/packaging/wix/Prerequisites.wxi
@@ -14,6 +14,11 @@
to ensure the entire fragment is included. -->
<Property Id="IncludePrerequisites">1</Property>
+ <!-- This should match the following:
+ - The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in
+ - The <compatibility><application> section in image\wireshark.exe.manifest.in
+ - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
+ -->
<Condition Message="Windows 2000 is no longer supported. Please install $(var.WiresharkName) 1.2 or 1.0 instead.">
<![CDATA[Installed OR (VersionNT < 500) OR (VersionNT > 500)]]>
</Condition>