aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2012-02-21 10:20:56 +0000
committerMelanie2012-02-21 10:20:56 +0000
commit03e7bc1526d24efe23f61f6a8dee88010ccfdb8c (patch)
treec2c2afef43a697dec1373ef5987f7d163031e5e2 /OpenSim/Framework
parentMerge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff)
parentBoth 32-bit and 64-bit BulletSim.dll must have the same name. Rename the 64 ... (diff)
downloadopensim-SC_OLD-03e7bc1526d24efe23f61f6a8dee88010ccfdb8c.zip
opensim-SC_OLD-03e7bc1526d24efe23f61f6a8dee88010ccfdb8c.tar.gz
opensim-SC_OLD-03e7bc1526d24efe23f61f6a8dee88010ccfdb8c.tar.bz2
opensim-SC_OLD-03e7bc1526d24efe23f61f6a8dee88010ccfdb8c.tar.xz
Merge branch 'master' into careminster
Conflicts:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index d2797e6..02da7f4 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)