[Bf-blender-cvs] [a58f13fcc4c] tmp_libupdate_34: deps: Refix T88813

Ray Molenkamp noreply at git.blender.org
Mon Aug 22 20:02:29 CEST 2022


Commit: a58f13fcc4ccd1baaf8c553ce49db5231b3110e4
Author: Ray Molenkamp
Date:   Mon Aug 22 12:02:19 2022 -0600
Branches: tmp_libupdate_34
https://developer.blender.org/rBa58f13fcc4ccd1baaf8c553ce49db5231b3110e4

deps: Refix T88813

Change got lost when I salvaged parts of D6399

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

M	build_files/cmake/platform/platform_win32.cmake
D	build_files/cmake/platform/platform_win32_bundle_crt.cmake

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

diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 5ae991da5d9..1a99acf866e 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -141,6 +141,15 @@ if(WITH_WINDOWS_BUNDLE_CRT)
   set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
   include(InstallRequiredSystemLibraries)
 
+  # ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
+  # redirects for this dll, for details see T88813.
+  foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
+    string(FIND ${lib} "ucrtbase" pos)
+    if(NOT pos EQUAL -1)
+      list(REMOVE_ITEM CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
+      install(FILES ${lib} DESTINATION . COMPONENT Libraries)
+    endif()
+  endforeach()
   # Install the CRT to the blender.crt Sub folder.
   install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)
 
diff --git a/build_files/cmake/platform/platform_win32_bundle_crt.cmake b/build_files/cmake/platform/platform_win32_bundle_crt.cmake
deleted file mode 100644
index f5dd0c8c7bc..00000000000
--- a/build_files/cmake/platform/platform_win32_bundle_crt.cmake
+++ /dev/null
@@ -1,54 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-
-# First generate the manifest for tests since it will not need the dependency on the CRT.
-configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest @ONLY)
-
-if(WITH_WINDOWS_BUNDLE_CRT)
-  set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
-  set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
-  set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
-
-  # This sometimes can change when updates are installed and the compiler version
-  # changes, so test if it exists and if not, give InstallRequiredSystemLibraries
-  # another chance to figure out the path.
-  if(MSVC_REDIST_DIR AND NOT EXISTS "${MSVC_REDIST_DIR}")
-    unset(MSVC_REDIST_DIR CACHE)
-  endif()
-
-  include(InstallRequiredSystemLibraries)
-
-  # ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
-  # redirects for this dll, for details see T88813.
-  foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
-    string(FIND ${lib} "ucrtbase" pos)
-    if(NOT pos EQUAL -1)
-      list(REMOVE_ITEM CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
-      install(FILES ${lib} DESTINATION . COMPONENT Libraries)
-    endif()
-  endforeach()
-  # Install the CRT to the blender.crt Sub folder.
-  install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)
-
-  # Generating the manifest is a relatively expensive operation since
-  # it is collecting an sha1 hash for every file required. so only do
-  # this work when the libs have either changed or the manifest does
-  # not exist yet.
-
-  string(SHA1 libshash "${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}")
-  set(manifest_trigger_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/crt_${libshash}")
-
-  if(NOT EXISTS ${manifest_trigger_file})
-    set(CRTLIBS "")
-    foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
-      get_filename_component(filename ${lib} NAME)
-      file(SHA1 "${lib}" sha1_file)
-      string(APPEND CRTLIBS "    <file name=\"${filename}\" hash=\"${sha1_file}\"  hashalg=\"SHA1\" />\n")
-    endforeach()
-    configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.crt.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.crt.manifest @ONLY)
-    file(TOUCH ${manifest_trigger_file})
-  endif()
-
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.crt.manifest DESTINATION ./blender.crt)
-  set(BUNDLECRT "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.crt\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
-endif()
-configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.exe.manifest @ONLY)



More information about the Bf-blender-cvs mailing list