[Bf-blender-cvs] [61a02a7aa1c] master: Cleanup: Windows Manifest usage.

Ray Molenkamp noreply at git.blender.org
Thu Dec 5 20:15:11 CET 2019


Commit: 61a02a7aa1cabc504da3e5ca55f7e65d9b7aaf50
Author: Ray Molenkamp
Date:   Thu Dec 5 12:15:04 2019 -0700
Branches: master
https://developer.blender.org/rB61a02a7aa1cabc504da3e5ca55f7e65d9b7aaf50

Cleanup: Windows Manifest usage.

We had a manifest file, but it was seemingly not used, some
settings were done using linker pragmas, some of them visual
studio would set by default for us, others where not set at all.

This patch changes:

- Single manifest file where we can maintain all settings in
a single location, removal of any linker pragmas related to
the manifest.

- Compatibly settings for win vista - win10, without this any
call to any of the GetVersion and related functions (GetVersionEx,
VerifyVersionInfo, IsWindowsXxxx) will by default say we are
on vista and OS specific optimizations in external libraries may
be missed.

-Rather than having it in the .RC file in an #ifdef which may
or may not trigger depending on the build tool used, we tell
cmake to treat it as a source file and it will do the right
thing for both the ninja and visual studio generators.

Differential Revision: https://developer.blender.org/D6136

Reviewers: brecht

===================================================================

M	intern/ghost/intern/GHOST_SystemWin32.cpp
M	release/windows/icons/blender.exe.manifest
M	release/windows/icons/winblender.rc
M	source/creator/CMakeLists.txt

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index c86accf4ede..323722173d4 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -28,12 +28,6 @@
 #  define _WIN32_IE 0x0501 /* shipped before XP, so doesn't impose additional requirements */
 #endif
 
-/* clang-format off */
-#pragma comment(linker,"\"/manifestdependency:type='win32' \
-name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
-processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
-/* clang-format on */
-
 #include <commctrl.h>
 #include <shlobj.h>
 #include <tlhelp32.h>
diff --git a/release/windows/icons/blender.exe.manifest b/release/windows/icons/blender.exe.manifest
index a43d11b21a0..ceee357ecda 100644
--- a/release/windows/icons/blender.exe.manifest
+++ b/release/windows/icons/blender.exe.manifest
@@ -7,4 +7,30 @@
       </requestedPrivileges>
     </security>
   </trustInfo>
-</assembly>
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
+        <application> 
+            <!-- Windows 10 --> 
+            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+            <!-- Windows 8.1 -->
+            <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+            <!-- Windows 8 -->
+            <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+            <!-- Windows 7 -->
+            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+            <!-- Windows Vista -->
+            <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
+        </application> 
+  </compatibility>  
+  <dependency>
+    <dependentAssembly>
+        <assemblyIdentity
+            type="win32"
+            name="Microsoft.Windows.Common-Controls"
+            version="6.0.0.0"
+            processorArchitecture="*"
+            publicKeyToken="6595b64144ccf1df"
+            language="*"
+        />
+    </dependentAssembly>
+  </dependency>  
+</assembly>
\ No newline at end of file
diff --git a/release/windows/icons/winblender.rc b/release/windows/icons/winblender.rc
index ba3363aacc5..a0dff81b711 100644
--- a/release/windows/icons/winblender.rc
+++ b/release/windows/icons/winblender.rc
@@ -7,7 +7,6 @@
 	#define STRINGIFY_(x) #x
 	#define STRINGIFY(x) STRINGIFY_(x)
 	#define BLEN_VER_RC_STR STRINGIFY(BLEN_VER_RC_STR_M)
-	1 RT_MANIFEST "blender.exe.manifest"
 #endif
 
 APPICON ICON DISCARDABLE "winblender.ico"
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 75cf841f89d..01951fb9790 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -149,6 +149,7 @@ if(WIN32 AND NOT UNIX)
 
   list(APPEND SRC
     ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc
+    ${CMAKE_SOURCE_DIR}/release/windows/icons/blender.exe.manifest
   )
 endif()



More information about the Bf-blender-cvs mailing list