Skip to content

Commit

Permalink
Don't check for presence of "d3dcompiler_47.dll" when running as ARM6…
Browse files Browse the repository at this point in the history
…4, because that file isn't present in the CEF Redist for this architecture. (cefsharp#3841)

Issue cefsharp#2944
  • Loading branch information
kpreisser authored Oct 10, 2021
1 parent 08e5140 commit 0812ea9
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion CefSharp/DependencyChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
using System;
using System.Collections.Generic;
using System.IO;
#if NETCOREAPP
using System.Linq;
#endif
using System.Reflection;
#if NETCOREAPP
using System.Runtime.InteropServices;
#endif
using System.Text;

namespace CefSharp
Expand All @@ -21,6 +27,11 @@ public static class DependencyChecker
/// </summary>
public const string LocalesPackFile = @"locales\en-US.pak";

/// <summary>
/// File name of the Direct3D Compiler DLL.
/// </summary>
private const string D3DCompilerDll = "d3dcompiler_47.dll";

/// <summary>
/// List of Cef Dependencies
/// </summary>
Expand Down Expand Up @@ -60,7 +71,8 @@ public static class DependencyChecker
// Note: Without these components HTML5 accelerated content like 2D canvas, 3D CSS and WebGL will not function.
"libEGL.dll",
"libGLESv2.dll",
"d3dcompiler_47.dll",
// The D3D Compiler isn't included in the win-arm64 redist; we remove it in the static constructor.
D3DCompilerDll,
//Crashpad support
"chrome_elf.dll"
};
Expand Down Expand Up @@ -99,6 +111,17 @@ public static class DependencyChecker
#endif
};

#if NETCOREAPP
static DependencyChecker()
{
// win-arm64 doesn't ship with a copy of the D3D Compiler, it's included with the OS.
if (RuntimeInformation.ProcessArchitecture is Architecture.Arm64)
{
CefOptionalDependencies = CefOptionalDependencies.Where(x => x != D3DCompilerDll).ToArray();
}
}
#endif

/// <summary>
/// CheckDependencies iterates through the list of Cef and CefSharp dependencines
/// relative to the path provided and returns a list of missing ones
Expand Down

0 comments on commit 0812ea9

Please sign in to comment.