File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 55using System ;
66using System . Collections . Generic ;
77using System . IO ;
8+ #if NETCOREAPP
9+ using System . Linq ;
10+ #endif
811using System . Reflection ;
12+ #if NETCOREAPP
13+ using System . Runtime . InteropServices ;
14+ #endif
915using System . Text ;
1016
1117namespace CefSharp
@@ -21,6 +27,11 @@ public static class DependencyChecker
2127 /// </summary>
2228 public const string LocalesPackFile = @"locales\en-US.pak" ;
2329
30+ /// <summary>
31+ /// File name of the Direct3D Compiler DLL.
32+ /// </summary>
33+ private const string D3DCompilerDll = "d3dcompiler_47.dll" ;
34+
2435 /// <summary>
2536 /// List of Cef Dependencies
2637 /// </summary>
@@ -60,7 +71,8 @@ public static class DependencyChecker
6071 // Note: Without these components HTML5 accelerated content like 2D canvas, 3D CSS and WebGL will not function.
6172 "libEGL.dll" ,
6273 "libGLESv2.dll" ,
63- "d3dcompiler_47.dll" ,
74+ // The D3D Compiler isn't included in the win-arm64 redist; we remove it in the static constructor.
75+ D3DCompilerDll ,
6476 //Crashpad support
6577 "chrome_elf.dll"
6678 } ;
@@ -99,6 +111,17 @@ public static class DependencyChecker
99111#endif
100112 } ;
101113
114+ #if NETCOREAPP
115+ static DependencyChecker ( )
116+ {
117+ // win-arm64 doesn't ship with a copy of the D3D Compiler, it's included with the OS.
118+ if ( RuntimeInformation . ProcessArchitecture is Architecture . Arm64 )
119+ {
120+ CefOptionalDependencies = CefOptionalDependencies . Where ( x => x != D3DCompilerDll ) . ToArray ( ) ;
121+ }
122+ }
123+ #endif
124+
102125 /// <summary>
103126 /// CheckDependencies iterates through the list of Cef and CefSharp dependencines
104127 /// relative to the path provided and returns a list of missing ones
You can’t perform that action at this time.
0 commit comments