Skip to content

Commit 91d8510

Browse files
authored
Merge 7a63da8 into 15cf58c
2 parents 15cf58c + 7a63da8 commit 91d8510

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

CefSharp/DependencyChecker.cs

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
using System.Collections.Generic;
77
using System.IO;
88
using System.Reflection;
9+
#if NETCOREAPP
10+
using System.Runtime.InteropServices;
11+
#endif
912
using System.Text;
1013

1114
namespace CefSharp
@@ -52,9 +55,9 @@ public static class DependencyChecker
5255
};
5356

5457
/// <summary>
55-
/// List of Optional CEF Dependencies
58+
/// List of Optional CEF Dependencies (x86/x64)
5659
/// </summary>
57-
public static string[] CefOptionalDependencies =
60+
public static string[] CefOptionalDependenciesX86X64 =
5861
{
5962
// Angle and Direct3D support
6063
// Note: Without these components HTML5 accelerated content like 2D canvas, 3D CSS and WebGL will not function.
@@ -65,6 +68,21 @@ public static class DependencyChecker
6568
"chrome_elf.dll"
6669
};
6770

71+
#if NETCOREAPP
72+
/// <summary>
73+
/// List of Optional CEF Dependencies (arm64)
74+
/// </summary>
75+
public static string[] CefOptionalDependenciesArm64 =
76+
{
77+
// Angle support
78+
// Note: Without these components HTML5 accelerated content like 2D canvas, 3D CSS and WebGL will not function.
79+
"libEGL.dll",
80+
"libGLESv2.dll",
81+
//Crashpad support
82+
"chrome_elf.dll"
83+
};
84+
#endif
85+
6886
/// <summary>
6987
/// List of CefSharp Managed Dependencies (Those that are AnyCPU written in c#)
7088
/// </summary>
@@ -140,7 +158,16 @@ public static List<string> CheckDependencies(bool checkOptional, bool packLoadin
140158

141159
if (checkOptional)
142160
{
143-
missingDependencies.AddRange(CheckDependencyList(nativeLibPath, CefOptionalDependencies));
161+
var optionalDependencies = CefOptionalDependenciesX86X64;
162+
163+
#if NETCOREAPP
164+
if (RuntimeInformation.ProcessArchitecture is Architecture.Arm64)
165+
{
166+
optionalDependencies = CefOptionalDependenciesArm64;
167+
}
168+
#endif
169+
170+
missingDependencies.AddRange(CheckDependencyList(nativeLibPath, optionalDependencies));
144171
}
145172

146173
#if NETCOREAPP

0 commit comments

Comments
 (0)