123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using OpenSim.UserServer;
- using OpenSim.Framework.Console;
- namespace OpenSim
- {
- public class Application
- {
- [STAThread]
- public static void Main(string[] args)
- {
- Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
- Console.WriteLine("Starting...\n");
-
- bool sandBoxMode = false;
- bool startLoginServer = false;
- string physicsEngine = "basicphysics";
- bool allowFlying = false;
- bool userAccounts = false;
- bool gridLocalAsset = false;
- bool useConfigFile = false;
- bool noverbose = false;
- string configFile = "simconfig.xml";
-
- for (int i = 0; i < args.Length; i++)
- {
- if (args[i] == "-sandbox")
- {
- sandBoxMode = true;
- }
- if (args[i] == "-loginserver")
- {
- startLoginServer = true;
- }
- if (args[i] == "-accounts")
- {
- userAccounts = true;
- }
- if (args[i] == "-realphysx")
- {
- physicsEngine = "RealPhysX";
- allowFlying = true;
- }
- if (args[i] == "-ode")
- {
- physicsEngine = "OpenDynamicsEngine";
- allowFlying = true;
- }
- if (args[i] == "-localasset")
- {
- gridLocalAsset = true;
- }
- if (args[i] == "-configfile")
- {
- useConfigFile = true;
- }
- if (args[i] == "-noverbose")
- {
- noverbose = true;
- }
- if (args[i] == "-config")
- {
- try
- {
- i++;
- configFile = args[i];
- }
- catch (Exception e)
- {
- Console.WriteLine("-config: Please specify a config file. (" + e.ToString() + ")");
- }
- }
- }
- OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, noverbose, configFile);
- // OpenSimRoot.Instance.Application = sim;
- sim.m_sandbox = sandBoxMode;
- sim.user_accounts = userAccounts;
- sim.gridLocalAsset = gridLocalAsset;
- OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying;
- sim.StartUp();
- while (true)
- {
- OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt();
- }
- }
- }
- }
|