diff options
author | Diva Canto | 2015-01-04 19:06:49 -0800 |
---|---|---|
committer | Diva Canto | 2015-01-04 19:06:49 -0800 |
commit | ce1a87b7843ed05e8d827c230c9860e7bf7d75b6 (patch) | |
tree | 91e2e6f386852fcbff6fa415f6a241dccd378a41 /OpenSim/Framework/Util.cs | |
parent | Removing the Wifi config example from Robust.HG.ini.example, because it is no... (diff) | |
download | opensim-SC-ce1a87b7843ed05e8d827c230c9860e7bf7d75b6.zip opensim-SC-ce1a87b7843ed05e8d827c230c9860e7bf7d75b6.tar.gz opensim-SC-ce1a87b7843ed05e8d827c230c9860e7bf7d75b6.tar.bz2 opensim-SC-ce1a87b7843ed05e8d827c230c9860e7bf7d75b6.tar.xz |
Added overloaded LoadArchSpecificWindowsDll, to help addins load native libraries.
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 6f2e7c3..836fa5f 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -538,6 +538,11 @@ namespace OpenSim.Framework | |||
538 | 538 | ||
539 | public static bool LoadArchSpecificWindowsDll(string libraryName) | 539 | public static bool LoadArchSpecificWindowsDll(string libraryName) |
540 | { | 540 | { |
541 | return LoadArchSpecificWindowsDll(libraryName, string.Empty); | ||
542 | } | ||
543 | |||
544 | public static bool LoadArchSpecificWindowsDll(string libraryName, string path) | ||
545 | { | ||
541 | // We do this so that OpenSimulator on Windows loads the correct native library depending on whether | 546 | // We do this so that OpenSimulator on Windows loads the correct native library depending on whether |
542 | // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports | 547 | // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports |
543 | // will find it already loaded later on. | 548 | // will find it already loaded later on. |
@@ -547,9 +552,9 @@ namespace OpenSim.Framework | |||
547 | string nativeLibraryPath; | 552 | string nativeLibraryPath; |
548 | 553 | ||
549 | if (Util.Is64BitProcess()) | 554 | if (Util.Is64BitProcess()) |
550 | nativeLibraryPath = "lib64/" + libraryName; | 555 | nativeLibraryPath = Path.Combine(Path.Combine(path, "lib64"), libraryName); |
551 | else | 556 | else |
552 | nativeLibraryPath = "lib32/" + libraryName; | 557 | nativeLibraryPath = Path.Combine(Path.Combine(path, "lib32"), libraryName); |
553 | 558 | ||
554 | m_log.DebugFormat("[UTIL]: Loading native Windows library at {0}", nativeLibraryPath); | 559 | m_log.DebugFormat("[UTIL]: Loading native Windows library at {0}", nativeLibraryPath); |
555 | 560 | ||