win32: Manually generate manifest to indicate Win7 compatibility

Telling Windows that we support Windows 7 means it will stop catching
unhandled exceptions that occur in a callback from kernel mode, and
allow our own crash handler to catch then.
stable-5.4
Nicolas Hake 2013-11-10 19:09:32 +01:00
parent ddf8b181a1
commit 35f31a7c1d
3 changed files with 37 additions and 0 deletions

View File

@ -586,6 +586,8 @@ if(WIN32)
src/res/resource.h
)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/res/openclonk.manifest" "${CMAKE_CURRENT_BINARY_DIR}/openclonk.manifest" COPYONLY)
if(MINGW)
# cmake does not support compiling resources with MinGW
# natively, see http://www.cmake.org/Bug/view.php?id=4068.
@ -1162,6 +1164,11 @@ if(MSVC)
oc_set_target_names(c4group)
oc_set_target_names(c4script)
oc_set_target_names(netpuncher)
# cmake does not support embedding arbitrary manifests,
# so we add it to the resource file ourselves and tell
# MSVC not to create its own.
set_property(TARGET openclonk APPEND PROPERTY LINK_FLAGS "/MANIFEST:NO")
endif()
############################################################################

View File

@ -8,6 +8,18 @@
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
// Manifest
//
#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#endif
#ifndef RT_MANIFEST
#define RT_MANIFEST 24
#endif
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "openclonk.manifest"
/////////////////////////////////////////////////////////////////////////////
//
// Icons

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--Windows 7-->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!--Windows Vista-->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
</assembly>