Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net Core - Don't check for presence of "d3dcompiler_47.dll" on ARM64 #3841

Merged
merged 1 commit into from
Oct 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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