diff options
author | Justin Clark-Casey (justincc) | 2012-02-21 02:52:20 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-21 02:52:20 +0000 |
commit | 68a4ef5ef62aef3d5e1ec5c20b03b3b4fa51743b (patch) | |
tree | c524c268408a41df92ddf5f5bf68732103f0cfad /OpenSim/Framework | |
parent | Fix bug where NPCs would establish child agents on other neighbour regions th... (diff) | |
download | opensim-SC-68a4ef5ef62aef3d5e1ec5c20b03b3b4fa51743b.zip opensim-SC-68a4ef5ef62aef3d5e1ec5c20b03b3b4fa51743b.tar.gz opensim-SC-68a4ef5ef62aef3d5e1ec5c20b03b3b4fa51743b.tar.bz2 opensim-SC-68a4ef5ef62aef3d5e1ec5c20b03b3b4fa51743b.tar.xz |
Add 64 bit Windows sqlite3.dll and use this if running a 64-bit windows process.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Util.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index b3ec5c2..efa4a7b 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -392,6 +392,36 @@ namespace OpenSim.Framework | |||
392 | || platformId == PlatformID.WinCE); | 392 | || platformId == PlatformID.WinCE); |
393 | } | 393 | } |
394 | 394 | ||
395 | public static bool LoadArchSpecificWindowsDll(string libraryName) | ||
396 | { | ||
397 | // We do this so that OpenSimulator on Windows loads the correct native library depending on whether | ||
398 | // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports | ||
399 | // will find it already loaded later on. | ||
400 | // | ||
401 | // This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be | ||
402 | // controlled in config files. | ||
403 | string nativeLibraryPath; | ||
404 | |||
405 | if (Util.Is64BitProcess()) | ||
406 | nativeLibraryPath = "lib64/" + libraryName; | ||
407 | else | ||
408 | nativeLibraryPath = "lib32/" + libraryName; | ||
409 | |||
410 | m_log.DebugFormat("[UTIL]: Loading native Windows library at {0}", nativeLibraryPath); | ||
411 | |||
412 | if (Util.LoadLibrary(nativeLibraryPath) == IntPtr.Zero) | ||
413 | { | ||
414 | m_log.ErrorFormat( | ||
415 | "[UTIL]: Couldn't find native Windows library at {0}", nativeLibraryPath); | ||
416 | |||
417 | return false; | ||
418 | } | ||
419 | else | ||
420 | { | ||
421 | return true; | ||
422 | } | ||
423 | } | ||
424 | |||
395 | public static bool IsEnvironmentSupported(ref string reason) | 425 | public static bool IsEnvironmentSupported(ref string reason) |
396 | { | 426 | { |
397 | // Must have .NET 2.0 (Generics / libsl) | 427 | // Must have .NET 2.0 (Generics / libsl) |