Fixes linking issue with angelscript

master
Deukhoofd 8 months ago
parent 36b39ba3c4
commit 0486c9cdfb
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
  1. BIN
      PkmnLibSharp/Native/Linux/libangelscript.so
  2. BIN
      PkmnLibSharp/Native/Linux/libangelscript.so.2.35.0
  3. 15
      PkmnLibSharpTests/TestClass.cs

Binary file not shown.

@ -21,6 +21,12 @@ namespace PkmnLibSharpTests
{
NativeLibrary.SetDllImportResolver(assembly, ImportResolver);
}
LoadLibrary("libArbutils");
LoadLibrary("libCreatureLib");
LoadLibrary("libangelscript");
LoadLibrary("libpkmnLib");
LoadLibrary("libpkmnlib_ai");
LogHandler.RegisterListener((level, s) =>
{
@ -31,11 +37,16 @@ namespace PkmnLibSharpTests
}
private IntPtr ImportResolver(string libraryname, Assembly assembly, DllImportSearchPath? searchpath)
{
return LoadLibrary(libraryname);
}
private IntPtr LoadLibrary(string libraryName)
{
var directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var assemblyFile = Environment.OSVersion.Platform == PlatformID.Unix
? Path.Join(directory, libraryname + ".so")
: Path.Join(directory, libraryname + ".dll");
? Path.Join(directory, libraryName + ".so")
: Path.Join(directory, libraryName + ".dll");
return NativeLibrary.Load(assemblyFile);
}
}

Loading…
Cancel
Save