* worked a little bit more on straigthening the startup procedure out

tourmaline
lbsa71 2007-03-28 05:27:20 +00:00
parent 24b27487c0
commit d66ef8f428
5 changed files with 161 additions and 190 deletions

View File

@ -63,42 +63,64 @@ namespace OpenSim
private System.Timers.Timer timer1 = new System.Timers.Timer(); private System.Timers.Timer timer1 = new System.Timers.Timer();
private string ConfigDll = "OpenSim.Config.SimConfigDb4o.dll"; private string ConfigDll = "OpenSim.Config.SimConfigDb4o.dll";
public string _physicsEngine = "basicphysics"; public string m_physicsEngine;
public bool sandbox = false; public bool m_sandbox = false;
public bool loginserver = false; public bool m_loginserver;
protected ConsoleBase m_console; protected ConsoleBase m_console;
public OpenSimMain() public OpenSimMain( bool sandBoxMode, bool startLoginServer, string physicsEngine )
{ {
m_sandbox = sandBoxMode;
m_loginserver = startLoginServer;
m_physicsEngine = physicsEngine;
m_console = new ConsoleBase("region-console.log", "Region", this); m_console = new ConsoleBase("region-console.log", "Region", this);
OpenSim.Framework.Console.MainConsole.Instance = m_console; OpenSim.Framework.Console.MainConsole.Instance = m_console;
} }
public override void StartUp() public override void StartUp()
{ {
OpenSimRoot.Instance.GridServers = new Grid();
if ( m_sandbox )
{
OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll";
m_console.WriteLine("Starting in Sandbox mode");
}
else
{
OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll";
OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll";
m_console.WriteLine("Starting in Grid mode");
}
OpenSimRoot.Instance.GridServers.Initialise();
OpenSimRoot.Instance.startuptime = DateTime.Now; OpenSimRoot.Instance.startuptime = DateTime.Now;
OpenSimRoot.Instance.AssetCache = new AssetCache(OpenSimRoot.Instance.GridServers.AssetServer); OpenSimRoot.Instance.AssetCache = new AssetCache(OpenSimRoot.Instance.GridServers.AssetServer);
OpenSimRoot.Instance.InventoryCache = new InventoryCache(); OpenSimRoot.Instance.InventoryCache = new InventoryCache();
// We check our local database first, then the grid for config options // We check our local database first, then the grid for config options
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Loading configuration"); m_console.WriteLine("Main.cs:Startup() - Loading configuration");
OpenSimRoot.Instance.Cfg = this.LoadConfigDll(this.ConfigDll); OpenSimRoot.Instance.Cfg = this.LoadConfigDll(this.ConfigDll);
OpenSimRoot.Instance.Cfg.InitConfig(this.sandbox); OpenSimRoot.Instance.Cfg.InitConfig(this.m_sandbox);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Contacting gridserver"); m_console.WriteLine("Main.cs:Startup() - Contacting gridserver");
OpenSimRoot.Instance.Cfg.LoadFromGrid(); OpenSimRoot.Instance.Cfg.LoadFromGrid();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - We are " + OpenSimRoot.Instance.Cfg.RegionName + " at " + OpenSimRoot.Instance.Cfg.RegionLocX.ToString() + "," + OpenSimRoot.Instance.Cfg.RegionLocY.ToString()); m_console.WriteLine("Main.cs:Startup() - We are " + OpenSimRoot.Instance.Cfg.RegionName + " at " + OpenSimRoot.Instance.Cfg.RegionLocX.ToString() + "," + OpenSimRoot.Instance.Cfg.RegionLocY.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Initialising world"); m_console.WriteLine("Initialising world");
OpenSimRoot.Instance.LocalWorld = new World(OpenSimRoot.Instance.ClientThreads, OpenSimRoot.Instance.Cfg.RegionHandle, OpenSimRoot.Instance.Cfg.RegionName, OpenSimRoot.Instance.Cfg); OpenSimRoot.Instance.LocalWorld = new World(OpenSimRoot.Instance.ClientThreads, OpenSimRoot.Instance.Cfg.RegionHandle, OpenSimRoot.Instance.Cfg.RegionName, OpenSimRoot.Instance.Cfg);
OpenSimRoot.Instance.LocalWorld.LandMap = OpenSimRoot.Instance.Cfg.LoadWorld(); OpenSimRoot.Instance.LocalWorld.LandMap = OpenSimRoot.Instance.Cfg.LoadWorld();
this.physManager = new OpenSim.Physics.Manager.PhysicsManager(); this.physManager = new OpenSim.Physics.Manager.PhysicsManager();
this.physManager.LoadPlugins(); this.physManager.LoadPlugins();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting up messaging system"); m_console.WriteLine("Main.cs:Startup() - Starting up messaging system");
OpenSimRoot.Instance.LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this._physicsEngine); //should be reading from the config file what physics engine to use OpenSimRoot.Instance.LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use
OpenSimRoot.Instance.LocalWorld.PhysScene.SetTerrain(OpenSimRoot.Instance.LocalWorld.LandMap); OpenSimRoot.Instance.LocalWorld.PhysScene.SetTerrain(OpenSimRoot.Instance.LocalWorld.LandMap);
OpenSimRoot.Instance.GridServers.AssetServer.SetServerInfo(OpenSimRoot.Instance.Cfg.AssetURL, OpenSimRoot.Instance.Cfg.AssetSendKey); OpenSimRoot.Instance.GridServers.AssetServer.SetServerInfo(OpenSimRoot.Instance.Cfg.AssetURL, OpenSimRoot.Instance.Cfg.AssetSendKey);
@ -107,20 +129,26 @@ namespace OpenSim
OpenSimRoot.Instance.LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. OpenSimRoot.Instance.LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
OpenSimRoot.Instance.LocalWorld.LoadPrimsFromStorage(); OpenSimRoot.Instance.LocalWorld.LoadPrimsFromStorage();
if (this.sandbox) if ( m_sandbox)
{ {
OpenSimRoot.Instance.AssetCache.LoadDefaultTextureSet(); OpenSimRoot.Instance.AssetCache.LoadDefaultTextureSet();
} }
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); m_console.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server");
OpenSimRoot.Instance.HttpServer = new SimCAPSHTTPServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenPort); OpenSimRoot.Instance.HttpServer = new SimCAPSHTTPServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenPort);
OpenSimRoot.Instance.HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", OpenSimRoot.Instance.LocalWorld)); OpenSimRoot.Instance.HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", OpenSimRoot.Instance.LocalWorld));
if ( m_loginserver && m_sandbox)
{
LoginServer loginServer = new LoginServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenAddr, OpenSimRoot.Instance.Cfg.IPListenPort);
loginServer.Startup();
}
MainServerListener();
timer1.Enabled = true; timer1.Enabled = true;
timer1.Interval = 100; timer1.Interval = 100;
timer1.Elapsed += new ElapsedEventHandler(this.Timer1Tick); timer1.Elapsed += new ElapsedEventHandler(this.Timer1Tick);
MainServerListener();
} }
private SimConfig LoadConfigDll(string dllName) private SimConfig LoadConfigDll(string dllName)
@ -185,21 +213,21 @@ namespace OpenSim
private void MainServerListener() private void MainServerListener()
{ {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - New thread started"); m_console.WriteLine("Main.cs:MainServerListener() - New thread started");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + OpenSimRoot.Instance.Cfg.IPListenAddr + ":" + OpenSimRoot.Instance.Cfg.IPListenPort); m_console.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + OpenSimRoot.Instance.Cfg.IPListenAddr + ":" + OpenSimRoot.Instance.Cfg.IPListenPort);
ServerIncoming = new IPEndPoint(IPAddress.Any, OpenSimRoot.Instance.Cfg.IPListenPort); ServerIncoming = new IPEndPoint(IPAddress.Any, OpenSimRoot.Instance.Cfg.IPListenPort);
Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
Server.Bind(ServerIncoming); Server.Bind(ServerIncoming);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - UDP socket bound, getting ready to listen"); m_console.WriteLine("Main.cs:MainServerListener() - UDP socket bound, getting ready to listen");
ipeSender = new IPEndPoint(IPAddress.Any, 0); ipeSender = new IPEndPoint(IPAddress.Any, 0);
epSender = (EndPoint)ipeSender; epSender = (EndPoint)ipeSender;
ReceivedData = new AsyncCallback(this.OnReceivedData); ReceivedData = new AsyncCallback(this.OnReceivedData);
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:MainServerListener() - Listening..."); m_console.WriteLine("Main.cs:MainServerListener() - Listening...");
} }
@ -236,14 +264,14 @@ namespace OpenSim
public override void Shutdown() public override void Shutdown()
{ {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Closing all threads"); m_console.WriteLine("Main.cs:Shutdown() - Closing all threads");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Killing listener thread"); m_console.WriteLine("Main.cs:Shutdown() - Killing listener thread");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Killing clients"); m_console.WriteLine("Main.cs:Shutdown() - Killing clients");
// IMPLEMENT THIS // IMPLEMENT THIS
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Closing console and terminating"); m_console.WriteLine("Main.cs:Shutdown() - Closing console and terminating");
OpenSimRoot.Instance.LocalWorld.Close(); OpenSimRoot.Instance.LocalWorld.Close();
OpenSimRoot.Instance.GridServers.Close(); OpenSimRoot.Instance.GridServers.Close();
OpenSim.Framework.Console.MainConsole.Instance.Close(); m_console.Close();
Environment.Exit(0); Environment.Exit(0);
} }
@ -271,7 +299,7 @@ namespace OpenSim
break; break;
case "shutdown": case "shutdown":
OpenSimRoot.Instance.Shutdown(); Shutdown();
break; break;
} }
} }

View File

@ -44,20 +44,5 @@ namespace OpenSim
public OpenSimApplication Application; public OpenSimApplication Application;
public bool Sandbox = false; public bool Sandbox = false;
public void StartUp()
{
if (this.Application != null)
{
this.Application.StartUp();
}
}
public void Shutdown()
{
if (this.Application != null)
{
this.Application.Shutdown();
}
}
} }
} }

View File

@ -31,100 +31,73 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.PhysXPlugin", "OpenSim.Physics\PhysXPlugin\OpenSim.Physics.PhysXPlugin.csproj", "{0EF13F92-86F1-403D-882A-AA9DD4421B32}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.PhysXPlugin", "OpenSim.Physics\PhysXPlugin\OpenSim.Physics.PhysXPlugin.csproj", "{0EF13F92-86F1-403D-882A-AA9DD4421B32}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
({B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}).2 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
({B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}).3 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
({A6463B2D-0956-4680-9D03-082199779C66}).5 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
({A6463B2D-0956-4680-9D03-082199779C66}).6 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.Build.0 = Release|Any CPU
({98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
({76C00C0A-1AEF-49C9-8E4E-19A529B364E8}).3 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
({76C00C0A-1AEF-49C9-8E4E-19A529B364E8}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
({55969A66-0E92-4F76-BFF6-2256C6A5CAF7}).4 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.Build.0 = Release|Any CPU
({55969A66-0E92-4F76-BFF6-2256C6A5CAF7}).5 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
({0CE4ED02-8BB2-439C-8225-E42F2D661D44}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.Build.0 = Debug|Any CPU
({F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}).2 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) {A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.ActiveCfg = Release|Any CPU
({E168B13F-8D18-43E7-8546-C0EC1899579F}).2 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) {A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.Build.0 = Release|Any CPU
({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).5 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).6 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).7 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
({8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}).8 = ({ADD974E2-994C-4998-864E-4B54D8AD5F00}) {98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.Build.0 = Release|Any CPU
({ADD974E2-994C-4998-864E-4B54D8AD5F00}).5 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
({ADD974E2-994C-4998-864E-4B54D8AD5F00}).6 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
({ADD974E2-994C-4998-864E-4B54D8AD5F00}).7 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
({ADD974E2-994C-4998-864E-4B54D8AD5F00}).8 = ({B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}) {76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.Build.0 = Release|Any CPU
({2EAB18A1-8187-4C79-9947-A671F9C007D9}).3 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
({2EAB18A1-8187-4C79-9947-A671F9C007D9}).4 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
({CBC22F47-9CF2-4748-B6C6-85CDAB267554}).4 = ({BD7866A4-04BA-47F0-905F-B2359118F5B2}) {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
({CBC22F47-9CF2-4748-B6C6-85CDAB267554}).5 = ({4B0A7290-36C2-4C74-B9B4-07775B031CF2}) {55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.Build.0 = Release|Any CPU
({0EF13F92-86F1-403D-882A-AA9DD4421B32}).3 = ({2EAB18A1-8187-4C79-9947-A671F9C007D9}) {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
EndGlobalSection {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
GlobalSection(ProjectConfigurationPlatforms) = postSolution {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.Build.0 = Release|Any CPU
{B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}.Release|Any CPU.Build.0 = Release|Any CPU {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.Build.0 = Release|Any CPU
{4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Debug|Any CPU.Build.0 = Debug|Any CPU {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.ActiveCfg = Release|Any CPU {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B0A7290-36C2-4C74-B9B4-07775B031CF2}.Release|Any CPU.Build.0 = Release|Any CPU {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.Build.0 = Release|Any CPU
{A6463B2D-0956-4680-9D03-082199779C66}.Debug|Any CPU.Build.0 = Debug|Any CPU {E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.ActiveCfg = Release|Any CPU {E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6463B2D-0956-4680-9D03-082199779C66}.Release|Any CPU.Build.0 = Release|Any CPU {E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.Build.0 = Release|Any CPU
{98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98EC7DD5-BAB2-4678-AEA1-7C2B27B27BC9}.Release|Any CPU.Build.0 = Release|Any CPU {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.Build.0 = Release|Any CPU
{76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Debug|Any CPU.Build.0 = Debug|Any CPU {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.ActiveCfg = Release|Any CPU {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76C00C0A-1AEF-49C9-8E4E-19A529B364E8}.Release|Any CPU.Build.0 = Release|Any CPU {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.Build.0 = Release|Any CPU
{55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55969A66-0E92-4F76-BFF6-2256C6A5CAF7}.Release|Any CPU.Build.0 = Release|Any CPU {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.Build.0 = Release|Any CPU
{BD7866A4-04BA-47F0-905F-B2359118F5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD7866A4-04BA-47F0-905F-B2359118F5B2}.Release|Any CPU.Build.0 = Release|Any CPU {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.Build.0 = Release|Any CPU
{0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CE4ED02-8BB2-439C-8225-E42F2D661D44}.Release|Any CPU.Build.0 = Release|Any CPU {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.Build.0 = Release|Any CPU
{F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Debug|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection
{F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.ActiveCfg = Release|Any CPU GlobalSection(SolutionProperties) = preSolution
{F23A90E8-FDED-4D8C-A1B9-2ABE0A8C8EB2}.Release|Any CPU.Build.0 = Release|Any CPU HideSolutionNode = FALSE
{E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU EndGlobalSection
{E168B13F-8D18-43E7-8546-C0EC1899579F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E168B13F-8D18-43E7-8546-C0EC1899579F}.Release|Any CPU.Build.0 = Release|Any CPU
{8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B0B16BC-D9D0-4200-8FEF-6B12AA896EC1}.Release|Any CPU.Build.0 = Release|Any CPU
{ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADD974E2-994C-4998-864E-4B54D8AD5F00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADD974E2-994C-4998-864E-4B54D8AD5F00}.Release|Any CPU.Build.0 = Release|Any CPU
{2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EAB18A1-8187-4C79-9947-A671F9C007D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EAB18A1-8187-4C79-9947-A671F9C007D9}.Release|Any CPU.Build.0 = Release|Any CPU
{CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBC22F47-9CF2-4748-B6C6-85CDAB267554}.Release|Any CPU.Build.0 = Release|Any CPU
{0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0EF13F92-86F1-403D-882A-AA9DD4421B32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EF13F92-86F1-403D-882A-AA9DD4421B32}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal EndGlobal

View File

@ -8,69 +8,50 @@ namespace OpenSim
{ {
public class RegionServer : OpenSimMain public class RegionServer : OpenSimMain
{ {
public RegionServer( ) : base( false, false, String.Empty )
{
}
[STAThread] [STAThread]
public static void Main(string[] args) public static void Main(string[] args)
{ {
Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
Console.WriteLine("Starting...\n"); Console.WriteLine("Starting...\n");
//OpenSimRoot.instance = new OpenSimRoot(); bool sandBoxMode = false;
OpenSimMain sim = new OpenSimMain(); bool startLoginServer = false;
OpenSimRoot.Instance.Application = sim; string physicsEngine = "basicphysics";
bool allowFlying = false;
sim.sandbox = false;
sim.loginserver = false;
sim._physicsEngine = "basicphysics";
for (int i = 0; i < args.Length; i++) for (int i = 0; i < args.Length; i++)
{ {
if (args[i] == "-sandbox") if (args[i] == "-sandbox")
{ {
sim.sandbox = true; sandBoxMode = true;
OpenSimRoot.Instance.Sandbox = true;
} }
if (args[i] == "-loginserver") if (args[i] == "-loginserver")
{ {
sim.loginserver = true; startLoginServer = true;
} }
if (args[i] == "-realphysx") if (args[i] == "-realphysx")
{ {
sim._physicsEngine = "RealPhysX"; physicsEngine = "RealPhysX";
OpenSim.world.Avatar.PhysicsEngineFlying = true;
} }
if (args[i] == "-ode") if (args[i] == "-ode")
{ {
sim._physicsEngine = "OpenDynamicsEngine"; physicsEngine = "OpenDynamicsEngine";
OpenSim.world.Avatar.PhysicsEngineFlying = true; allowFlying = true;
} }
} }
OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine );
OpenSimRoot.Instance.Application = sim;
OpenSimRoot.Instance.Sandbox = sandBoxMode;
OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying;
OpenSimRoot.Instance.GridServers = new Grid(); sim.StartUp();
if (sim.sandbox)
{
OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll";
OpenSimRoot.Instance.GridServers.Initialise();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Starting in Sandbox mode");
}
else
{
OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll";
OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll";
OpenSimRoot.Instance.GridServers.Initialise();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Starting in Grid mode");
}
OpenSimRoot.Instance.StartUp();
if (sim.loginserver && sim.sandbox)
{
LoginServer loginServer = new LoginServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenAddr, OpenSimRoot.Instance.Cfg.IPListenPort);
loginServer.Startup();
}
while (true) while (true)
{ {
OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt(); OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt();

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}</ProjectGuid> <ProjectGuid>{B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon> <ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName> <AssemblyKeyContainerName>
</AssemblyKeyContainerName> </AssemblyKeyContainerName>
<AssemblyName>OpenSim.Servers</AssemblyName> <AssemblyName>OpenSim.Servers</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema> <DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder> <AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenSim.Servers</RootNamespace> <RootNamespace>OpenSim.Servers</RootNamespace>
<StartupObject></StartupObject> <StartupObject>
</StartupObject>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
</PropertyGroup> </PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile> <DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize> <Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn></NoWarn> <NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile> <DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize> <Optimize>True</Optimize>
@ -55,18 +61,19 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn></NoWarn> <NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" > <Reference Include="System">
<HintPath>System.dll</HintPath> <HintPath>System.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.Xml" > <Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath> <HintPath>System.Xml.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="libsecondlife.dll" > <Reference Include="libsecondlife.dll">
<HintPath>..\bin\libsecondlife.dll</HintPath> <HintPath>..\bin\libsecondlife.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
@ -76,22 +83,19 @@
<Name>OpenSim.Framework</Name> <Name>OpenSim.Framework</Name>
<Project>{BD7866A4-04BA-47F0-905F-B2359118F5B2}</Project> <Project>{BD7866A4-04BA-47F0-905F-B2359118F5B2}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private> <Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
<Name>OpenSim.Framework.Console</Name> <Name>OpenSim.Framework.Console</Name>
<Project>{4B0A7290-36C2-4C74-B9B4-07775B031CF2}</Project> <Project>{4B0A7290-36C2-4C74-B9B4-07775B031CF2}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private> <Private>False</Private>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BaseHttpServer.cs"> <Compile Include="BaseHttpServer.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="dummy.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup> <PropertyGroup>
@ -100,4 +104,4 @@
<PostBuildEvent> <PostBuildEvent>
</PostBuildEvent> </PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>