mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Added overloaded LoadArchSpecificWindowsDll, to help addins load native libraries.
This commit is contained in:
@@ -537,6 +537,11 @@ namespace OpenSim.Framework
|
||||
}
|
||||
|
||||
public static bool LoadArchSpecificWindowsDll(string libraryName)
|
||||
{
|
||||
return LoadArchSpecificWindowsDll(libraryName, string.Empty);
|
||||
}
|
||||
|
||||
public static bool LoadArchSpecificWindowsDll(string libraryName, string path)
|
||||
{
|
||||
// We do this so that OpenSimulator on Windows loads the correct native library depending on whether
|
||||
// it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports
|
||||
@@ -547,9 +552,9 @@ namespace OpenSim.Framework
|
||||
string nativeLibraryPath;
|
||||
|
||||
if (Util.Is64BitProcess())
|
||||
nativeLibraryPath = "lib64/" + libraryName;
|
||||
nativeLibraryPath = Path.Combine(Path.Combine(path, "lib64"), libraryName);
|
||||
else
|
||||
nativeLibraryPath = "lib32/" + libraryName;
|
||||
nativeLibraryPath = Path.Combine(Path.Combine(path, "lib32"), libraryName);
|
||||
|
||||
m_log.DebugFormat("[UTIL]: Loading native Windows library at {0}", nativeLibraryPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user