This patch fixes the issue where on Windows 8 and above, by default the system 
version returned is always Windows 8.

More info on this can be found on 
http://blogs.msdn.com/b/cjacks/archive/2009/03/27/manifesting-for-compatibility-on-windows-7.aspx

In order for GetVersionEx to work properly, a manifest must be embedded in the 
exe telling it to ignore the new behavior and give the proper version.

This patch adds support to specify manifests and teaches CMake how to embed 
them using Visual Studio.
This patch adds a simple version manifest Source\cmake.version.manifest to the 
CMake executables.
This removes the use of RtlGetVersion and properly uses GetVersionEx which will 
now return the proper operating system version for all operating systems until 
Windows 10.
This patch also fixes a potential buffer overrun and improper call of 
GetVersionEx in SystemTools.cxx where GetVersionExW is called with a 
OSVERSIONINFOEXA struct causing a failure since the size is improper for the 
API. Fixing this, GetVersionEx should never fail anymore.
Update the OSVersionAndName for new versions of Windows released after Windows 
7.

This change will require a double compile of CMake (I'm not sure if this is 
what the dashboards are doing) to have the functionality enabled, since the 
first step will build a new CMake that will know how to embed a manifest. The 
second compile with the version of CMake that knows how to embed a manifest, 
will then embed the manifest in CMake enabling this feature.

Thanks

~Gilles

Attachment: Issue15674.patch
Description: Issue15674.patch

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to