diff options
author | Melanie | 2012-02-18 22:21:10 +0000 |
---|---|---|
committer | Melanie | 2012-02-18 22:21:10 +0000 |
commit | 985526b662f47404404281a3ef4a35afa607bfbf (patch) | |
tree | cbda3c3003b6f456498f0ee3ec6edfc10b5fd64a /OpenSim/Framework | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-985526b662f47404404281a3ef4a35afa607bfbf.zip opensim-SC-985526b662f47404404281a3ef4a35afa607bfbf.tar.gz opensim-SC-985526b662f47404404281a3ef4a35afa607bfbf.tar.bz2 opensim-SC-985526b662f47404404281a3ef4a35afa607bfbf.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 38 |
2 files changed, 40 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 3868a31..586cde6 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -308,7 +308,9 @@ namespace OpenSim.Framework.Servers | |||
308 | // clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and | 308 | // clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and |
309 | // the clr version number doesn't match the project version number under Mono. | 309 | // the clr version number doesn't match the project version number under Mono. |
310 | //m_log.Info("[STARTUP]: Virtual machine runtime version: " + Environment.Version + Environment.NewLine); | 310 | //m_log.Info("[STARTUP]: Virtual machine runtime version: " + Environment.Version + Environment.NewLine); |
311 | m_log.Info("[STARTUP]: Operating system version: " + Environment.OSVersion + Environment.NewLine); | 311 | m_log.InfoFormat( |
312 | "[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n", | ||
313 | Environment.OSVersion, Environment.OSVersion.Platform, Util.Is64BitProcess() ? "64" : "32"); | ||
312 | 314 | ||
313 | StartupSpecific(); | 315 | StartupSpecific(); |
314 | 316 | ||
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index dd30c2f..d2797e6 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -35,7 +35,8 @@ using System.IO; | |||
35 | using System.IO.Compression; | 35 | using System.IO.Compression; |
36 | using System.Net; | 36 | using System.Net; |
37 | using System.Net.Sockets; | 37 | using System.Net.Sockets; |
38 | using System.Reflection; | 38 | using System.Reflection; |
39 | using System.Runtime.InteropServices; | ||
39 | using System.Runtime.Serialization; | 40 | using System.Runtime.Serialization; |
40 | using System.Runtime.Serialization.Formatters.Binary; | 41 | using System.Runtime.Serialization.Formatters.Binary; |
41 | using System.Security.Cryptography; | 42 | using System.Security.Cryptography; |
@@ -375,6 +376,20 @@ namespace OpenSim.Framework | |||
375 | } | 376 | } |
376 | 377 | ||
377 | return sb.ToString(); | 378 | return sb.ToString(); |
379 | } | ||
380 | |||
381 | /// <summary> | ||
382 | /// Is the platform Windows? | ||
383 | /// </summary> | ||
384 | /// <returns>true if so, false otherwise</returns> | ||
385 | public static bool IsWindows() | ||
386 | { | ||
387 | PlatformID platformId = Environment.OSVersion.Platform; | ||
388 | |||
389 | return (platformId == PlatformID.Win32NT | ||
390 | || platformId == PlatformID.Win32S | ||
391 | || platformId == PlatformID.Win32Windows | ||
392 | || platformId == PlatformID.WinCE); | ||
378 | } | 393 | } |
379 | 394 | ||
380 | public static bool IsEnvironmentSupported(ref string reason) | 395 | public static bool IsEnvironmentSupported(ref string reason) |
@@ -1469,6 +1484,27 @@ namespace OpenSim.Framework | |||
1469 | } | 1484 | } |
1470 | 1485 | ||
1471 | return data; | 1486 | return data; |
1487 | } | ||
1488 | |||
1489 | /// <summary> | ||
1490 | /// Used to trigger an early library load on Windows systems. | ||
1491 | /// </summary> | ||
1492 | /// <remarks> | ||
1493 | /// Required to get 32-bit and 64-bit processes to automatically use the | ||
1494 | /// appropriate native library. | ||
1495 | /// </remarks> | ||
1496 | /// <param name="dllToLoad"></param> | ||
1497 | /// <returns></returns> | ||
1498 | [DllImport("kernel32.dll")] | ||
1499 | public static extern IntPtr LoadLibrary(string dllToLoad); | ||
1500 | |||
1501 | /// <summary> | ||
1502 | /// Determine whether the current process is 64 bit | ||
1503 | /// </summary> | ||
1504 | /// <returns>true if so, false if not</returns> | ||
1505 | public static bool Is64BitProcess() | ||
1506 | { | ||
1507 | return IntPtr.Size == 8; | ||
1472 | } | 1508 | } |
1473 | 1509 | ||
1474 | #region FireAndForget Threading Pattern | 1510 | #region FireAndForget Threading Pattern |