diff --git a/CefSharp.Example/CefExample.cs b/CefSharp.Example/CefExample.cs
index 52d94bcbd..0a96a4a1e 100644
--- a/CefSharp.Example/CefExample.cs
+++ b/CefSharp.Example/CefExample.cs
@@ -51,7 +51,7 @@ namespace CefSharp.Example
SchemeHandlerFactory = new CefSharpSchemeHandlerFactory()
});
- DependencyChecker.AssetAllDependenciesPresent(settings.Locale, settings.LocalesDirPath, settings.ResourcesDirPath);
+ DependencyChecker.AssetAllDependenciesPresent(settings.Locale, settings.LocalesDirPath, settings.ResourcesDirPath, settings.PackLoadingDisabled);
if (!Cef.Initialize(settings))
{
diff --git a/CefSharp/DependencyChecker.cs b/CefSharp/DependencyChecker.cs
index 860aa5764..9d9b8ac3e 100644
--- a/CefSharp/DependencyChecker.cs
+++ b/CefSharp/DependencyChecker.cs
@@ -74,8 +74,9 @@ namespace CefSharp
/// path to check for dependencies
/// The locale pack file e.g. locales\en-US.pak
///
+ /// Is loading of pack files disabled?
/// List of missing dependencies, if all present an empty List will be returned
- public static List CheckDependencies(bool checkOptional, string path, string localePackFile, string resourcesDirPath)
+ public static List CheckDependencies(bool checkOptional, string path, string localePackFile, string resourcesDirPath, bool packLoadingDisabled)
{
var missingDependencies = new List();
@@ -90,14 +91,17 @@ namespace CefSharp
}
}
- //Loop through Cef Resources and add to list if not found
- foreach (var cefResource in CefResources)
+ if (!packLoadingDisabled)
{
- var resourcePath = Path.Combine(resourcesDirPath, cefResource);
-
- if (!File.Exists(resourcePath))
+ //Loop through Cef Resources and add to list if not found
+ foreach (var cefResource in CefResources)
{
- missingDependencies.Add(cefResource);
+ var resourcePath = Path.Combine(resourcesDirPath, cefResource);
+
+ if (!File.Exists(resourcePath))
+ {
+ missingDependencies.Add(cefResource);
+ }
}
}
@@ -145,8 +149,9 @@ namespace CefSharp
/// The locale, if empty then en-US will be used.
/// The path to the locales directory, if empty locales\ will be used.
/// The path to the resources directory, if empty the Executing Assembly path is used.
+ /// Is loading of pack files disabled?
/// Throw when not all dependencies are present
- public static void AssetAllDependenciesPresent(string locale, string localesDirPath, string resourcesDirPath)
+ public static void AssetAllDependenciesPresent(string locale, string localesDirPath, string resourcesDirPath, bool packLoadingDisabled)
{
var executingAssembly = Assembly.GetExecutingAssembly();
@@ -167,7 +172,7 @@ namespace CefSharp
resourcesDirPath = path;
}
- var missingDependencies = CheckDependencies(true, path, localesDirPath + locale + ".pak", resourcesDirPath);
+ var missingDependencies = CheckDependencies(true, path, localesDirPath + locale + ".pak", resourcesDirPath, packLoadingDisabled);
if (missingDependencies.Count > 0)
{