diff --git a/MantidPlot/CMakeLists.txt b/MantidPlot/CMakeLists.txt index a1d7876115902434aa4bfc02ade405afdc709dc2..7f99f3cba60f13bd026062d0f9daace500b09110 100644 --- a/MantidPlot/CMakeLists.txt +++ b/MantidPlot/CMakeLists.txt @@ -637,7 +637,11 @@ set ( MOCCED_FILES ${MOCCED_FILES} ${CMAKE_CURRENT_BINARY_DIR}/qtcolorpicker.moc set ( SRC_FILES ${QTIPLOT_SRCS} ${MANTID_SRCS} ${SIP_SRC} ) set ( INC_FILES ${QTIPLOT_HDRS} ${MANTID_HDRS} ) -set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} ) +if ( WIN32 ) + set ( MANIFEST_FILES MantidPlot.manifest ) +endif () + +set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} ${MANIFEST_FILES} ) # Use a precompiled header where they are supported enable_precompiled_headers( src/PrecompiledHeader.h ALL_SRC ) diff --git a/MantidPlot/MantidPlot.manifest b/MantidPlot/MantidPlot.manifest new file mode 100644 index 0000000000000000000000000000000000000000..c85468c228051a5ffece9849dfd47e55dd924f8d --- /dev/null +++ b/MantidPlot/MantidPlot.manifest @@ -0,0 +1,35 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?> +<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0' xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> + <security> + <requestedPrivileges> + <requestedExecutionLevel level='asInvoker' uiAccess='false' /> + </requestedPrivileges> + </security> + </trustInfo> + <!-- + MantidPlot embeds a Python interpreter which depends on MSVCRT90.dll. + Extension modules + can also depend on the same runtime but it exists in the SxS system folder. + Even though Python27.dll loads the runtime correctly there is an issue that extension + modules + using ctypes.cdll.LoadLibrary don't consult the SxS registry and fail to load + the correct + runtime library. See for example zmq. + For more information see https://bugs.python.org/issue24429 --> + <dependency> + <dependentAssembly> + <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='amd64' publicKeyToken='1fc8b3b9a1e18e3b' /> + </dependentAssembly> + </dependency> + <!-- + MantidPlot is not DPI aware and we need Windows to apply the user-defined scaling factor. + The documentation claims that dpi unaware is the default but without this setting + appears to be set to SystemAware when viewed with Process Explorer. + https://blogs.msdn.microsoft.com/chuckw/2013/09/10/manifest-madness/ --> + <asmv3:application> + <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> + <dpiAware>false</dpiAware> + </asmv3:windowsSettings> + </asmv3:application> +</assembly> diff --git a/MantidPlot/src/main.cpp b/MantidPlot/src/main.cpp index 8fd15d51f13def228504bd92dbda04bb80a714e3..e368e51b409ba1b16236d547001af2fb8a1276a1 100644 --- a/MantidPlot/src/main.cpp +++ b/MantidPlot/src/main.cpp @@ -153,22 +153,6 @@ only one class per file, with the exception of the indentation depth for him/herself. */ -#if defined(_MSC_VER) -// MantidPlot embeds a Python interpreter which depends on MSVCRT90.dll. -// Extension modules -// can also depend on the same runtime but it exists in the SxS system folder. -// Even though -// Python27.dll loads the runtime correctly there is an issue that extension -// modules -// using ctypes.cdll.LoadLibrary don't consult the SxS registry and fail to load -// the correct -// runtime library. See for example zmq. -// For more information see https://bugs.python.org/issue24429 -#pragma comment( \ - linker, \ - "\"/manifestdependency:type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='amd64' publicKeyToken='1fc8b3b9a1e18e3b'\"") -#endif - int main(int argc, char **argv) { // First, look for command-line arguments that we want to deal with before // launching anything