Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
fbccff4994
|
@ -308,7 +308,9 @@ namespace OpenSim.Framework.Servers
|
||||||
// clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and
|
// clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and
|
||||||
// the clr version number doesn't match the project version number under Mono.
|
// the clr version number doesn't match the project version number under Mono.
|
||||||
//m_log.Info("[STARTUP]: Virtual machine runtime version: " + Environment.Version + Environment.NewLine);
|
//m_log.Info("[STARTUP]: Virtual machine runtime version: " + Environment.Version + Environment.NewLine);
|
||||||
m_log.Info("[STARTUP]: Operating system version: " + Environment.OSVersion + Environment.NewLine);
|
m_log.InfoFormat(
|
||||||
|
"[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n",
|
||||||
|
Environment.OSVersion, Environment.OSVersion.Platform, Util.Is64BitProcess() ? "64" : "32");
|
||||||
|
|
||||||
StartupSpecific();
|
StartupSpecific();
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ using System.IO.Compression;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
@ -377,6 +378,20 @@ namespace OpenSim.Framework
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Is the platform Windows?
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>true if so, false otherwise</returns>
|
||||||
|
public static bool IsWindows()
|
||||||
|
{
|
||||||
|
PlatformID platformId = Environment.OSVersion.Platform;
|
||||||
|
|
||||||
|
return (platformId == PlatformID.Win32NT
|
||||||
|
|| platformId == PlatformID.Win32S
|
||||||
|
|| platformId == PlatformID.Win32Windows
|
||||||
|
|| platformId == PlatformID.WinCE);
|
||||||
|
}
|
||||||
|
|
||||||
public static bool IsEnvironmentSupported(ref string reason)
|
public static bool IsEnvironmentSupported(ref string reason)
|
||||||
{
|
{
|
||||||
// Must have .NET 2.0 (Generics / libsl)
|
// Must have .NET 2.0 (Generics / libsl)
|
||||||
|
@ -1459,6 +1474,27 @@ namespace OpenSim.Framework
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to trigger an early library load on Windows systems.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Required to get 32-bit and 64-bit processes to automatically use the
|
||||||
|
/// appropriate native library.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="dllToLoad"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[DllImport("kernel32.dll")]
|
||||||
|
public static extern IntPtr LoadLibrary(string dllToLoad);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Determine whether the current process is 64 bit
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>true if so, false if not</returns>
|
||||||
|
public static bool Is64BitProcess()
|
||||||
|
{
|
||||||
|
return IntPtr.Size == 8;
|
||||||
|
}
|
||||||
|
|
||||||
#region FireAndForget Threading Pattern
|
#region FireAndForget Threading Pattern
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1592,7 +1592,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
if (m_parentScene.Permissions.CanEditObject(group.UUID,agentID))
|
if (m_parentScene.Permissions.CanEditObject(group.UUID, agentID))
|
||||||
{
|
{
|
||||||
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
group.UpdateExtraParam(primLocalID, type, inUse, data);
|
||||||
}
|
}
|
||||||
|
@ -1609,7 +1609,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
if (m_parentScene.Permissions.CanEditObject(group.GetPartsFullID(primLocalID), agentID))
|
if (m_parentScene.Permissions.CanEditObject(group.UUID, agentID))
|
||||||
{
|
{
|
||||||
ObjectShapePacket.ObjectDataBlock shapeData = new ObjectShapePacket.ObjectDataBlock();
|
ObjectShapePacket.ObjectDataBlock shapeData = new ObjectShapePacket.ObjectDataBlock();
|
||||||
shapeData.ObjectLocalID = shapeBlock.ObjectLocalID;
|
shapeData.ObjectLocalID = shapeBlock.ObjectLocalID;
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Region.Physics.Manager
|
namespace OpenSim.Region.Physics.Manager
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OdePlugin : IPhysicsPlugin
|
public class OdePlugin : IPhysicsPlugin
|
||||||
{
|
{
|
||||||
//private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private OdeScene m_scene;
|
private OdeScene m_scene;
|
||||||
|
|
||||||
|
@ -59,13 +59,33 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
if (m_scene == null)
|
if (m_scene == null)
|
||||||
{
|
{
|
||||||
|
// We do this so that OpenSimulator on Windows loads the correct native ODE library depending on whether
|
||||||
|
// it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports
|
||||||
|
// will find it already loaded later on.
|
||||||
|
//
|
||||||
|
// This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be
|
||||||
|
// controlled in Ode.NET.dll.config
|
||||||
|
if (Util.IsWindows())
|
||||||
|
{
|
||||||
|
string nativeLibraryPath;
|
||||||
|
|
||||||
|
if (Util.Is64BitProcess())
|
||||||
|
nativeLibraryPath = "lib64/ode.dll";
|
||||||
|
else
|
||||||
|
nativeLibraryPath = "lib32/ode.dll";
|
||||||
|
|
||||||
|
m_log.DebugFormat("[ODE PLUGIN]: Loading native Windows ODE library at {0}", nativeLibraryPath);
|
||||||
|
Util.LoadLibrary(nativeLibraryPath);
|
||||||
|
}
|
||||||
|
|
||||||
// Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to
|
// Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to
|
||||||
// http://opensimulator.org/mantis/view.php?id=2750).
|
// http://opensimulator.org/mantis/view.php?id=2750).
|
||||||
d.InitODE();
|
d.InitODE();
|
||||||
|
|
||||||
m_scene = new OdeScene(sceneIdentifier);
|
m_scene = new OdeScene(sceneIdentifier);
|
||||||
}
|
}
|
||||||
return (m_scene);
|
|
||||||
|
return m_scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetName()
|
public string GetName()
|
||||||
|
|
Loading…
Reference in New Issue