|
@@ -22,12 +22,15 @@ internal static class NativeDependencyProvider
|
|
|
public static void EnsureNativeFileAvailability()
|
|
public static void EnsureNativeFileAvailability()
|
|
|
{
|
|
{
|
|
|
var nativeFilesPath = GetNativeFileSourcePath();
|
|
var nativeFilesPath = GetNativeFileSourcePath();
|
|
|
|
|
+ Console.WriteLine($"Native files source: {nativeFilesPath}");
|
|
|
|
|
|
|
|
if (nativeFilesPath == null)
|
|
if (nativeFilesPath == null)
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
foreach (var nativeFilePath in Directory.GetFiles(nativeFilesPath))
|
|
foreach (var nativeFilePath in Directory.GetFiles(nativeFilesPath))
|
|
|
{
|
|
{
|
|
|
|
|
+ Console.WriteLine($"Copying native file: {nativeFilePath}");
|
|
|
|
|
+
|
|
|
var targetDirectory = new FileInfo(nativeFilePath)
|
|
var targetDirectory = new FileInfo(nativeFilePath)
|
|
|
.Directory
|
|
.Directory
|
|
|
.Parent // native
|
|
.Parent // native
|
|
@@ -49,6 +52,7 @@ internal static class NativeDependencyProvider
|
|
|
static string? GetNativeFileSourcePath()
|
|
static string? GetNativeFileSourcePath()
|
|
|
{
|
|
{
|
|
|
var platform = GetRuntimePlatform();
|
|
var platform = GetRuntimePlatform();
|
|
|
|
|
+ Console.WriteLine($"Detected platform: {platform}");
|
|
|
|
|
|
|
|
var availableLocations = new[]
|
|
var availableLocations = new[]
|
|
|
{
|
|
{
|
|
@@ -67,6 +71,8 @@ internal static class NativeDependencyProvider
|
|
|
|
|
|
|
|
var nativeFileSourcePath = Path.Combine(location, "runtimes", platform, "native");
|
|
var nativeFileSourcePath = Path.Combine(location, "runtimes", platform, "native");
|
|
|
|
|
|
|
|
|
|
+ Console.WriteLine($"Trying access potential native file location: {nativeFileSourcePath}");
|
|
|
|
|
+
|
|
|
if (Directory.Exists(nativeFileSourcePath))
|
|
if (Directory.Exists(nativeFileSourcePath))
|
|
|
return nativeFileSourcePath;
|
|
return nativeFileSourcePath;
|
|
|
}
|
|
}
|