mirror of
https://github.com/Sarsoo/csbindgen.git
synced 2024-12-23 15:06:26 +00:00
Update README.md
This commit is contained in:
parent
134e4f35fa
commit
e9071f3bd5
@ -311,18 +311,22 @@ internal static unsafe partial class NativeMethods
|
|||||||
if (libraryName == __DllName)
|
if (libraryName == __DllName)
|
||||||
{
|
{
|
||||||
var path = "runtimes/";
|
var path = "runtimes/";
|
||||||
|
var extension = "";
|
||||||
|
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
path += "win-";
|
path += "win-";
|
||||||
|
extension = ".dll";
|
||||||
}
|
}
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||||
{
|
{
|
||||||
path += "osx-";
|
path += "osx-";
|
||||||
|
extension = ".dylib";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
path += "linux-";
|
path += "linux-";
|
||||||
|
extension = ".so";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RuntimeInformation.OSArchitecture == Architecture.X86)
|
if (RuntimeInformation.OSArchitecture == Architecture.X86)
|
||||||
@ -338,7 +342,7 @@ internal static unsafe partial class NativeMethods
|
|||||||
path += "arm64";
|
path += "arm64";
|
||||||
}
|
}
|
||||||
|
|
||||||
path += "/native/" + __DllName;
|
path += "/native/" + __DllName + extension;
|
||||||
|
|
||||||
return NativeLibrary.Load(Path.Combine(AppContext.BaseDirectory, path), assembly, searchPath);
|
return NativeLibrary.Load(Path.Combine(AppContext.BaseDirectory, path), assembly, searchPath);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user