diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 71 |
1 files changed, 9 insertions, 62 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index a8c40ec..b07a4d6 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using OpenSim.Framework.Console; | 29 | using OpenSim.Framework.Console; |
30 | using OpenSim.Region.Environment.Scenes; | 30 | using OpenSim.Region.Environment.Scenes; |
31 | using Nini.Config; | ||
31 | 32 | ||
32 | namespace OpenSim | 33 | namespace OpenSim |
33 | { | 34 | { |
@@ -52,70 +53,16 @@ namespace OpenSim | |||
52 | 53 | ||
53 | Console.WriteLine("Starting...\n"); | 54 | Console.WriteLine("Starting...\n"); |
54 | 55 | ||
55 | bool sandBoxMode = true; | 56 | ArgvConfigSource source = new ArgvConfigSource(args); |
56 | bool startLoginServer = true; | ||
57 | string physicsEngine = "basicphysics"; | ||
58 | 57 | ||
59 | bool userAccounts = false; | 58 | source.AddSwitch("Startup", "inifile"); |
60 | bool gridLocalAsset = false; | 59 | source.AddSwitch("Startup", "configfile"); |
61 | bool useConfigFile = false; | 60 | source.AddSwitch("Startup", "gridmode"); |
62 | bool silent = false; | 61 | source.AddSwitch("Startup", "physics"); |
63 | string configFile = "simconfig.xml"; | 62 | source.AddSwitch("Startup", "config"); |
64 | 63 | source.AddSwitch("Startup", "noverbose"); | |
65 | for (int i = 0; i < args.Length; i++) | ||
66 | { | ||
67 | if (args[i] == "-gridmode") | ||
68 | { | ||
69 | sandBoxMode = false; | ||
70 | startLoginServer = false; | ||
71 | } | ||
72 | |||
73 | if (args[i] == "-accounts") | ||
74 | { | ||
75 | userAccounts = true; | ||
76 | } | ||
77 | if (args[i] == "-realphysx") | ||
78 | { | ||
79 | physicsEngine = "RealPhysX"; | ||
80 | } | ||
81 | if (args[i] == "-bulletX") | ||
82 | { | ||
83 | physicsEngine = "BulletXEngine"; | ||
84 | } | ||
85 | if (args[i] == "-ode") | ||
86 | { | ||
87 | physicsEngine = "OpenDynamicsEngine"; | ||
88 | } | ||
89 | if (args[i] == "-localasset") | ||
90 | { | ||
91 | gridLocalAsset = true; | ||
92 | } | ||
93 | if (args[i] == "-configfile") | ||
94 | { | ||
95 | useConfigFile = true; | ||
96 | } | ||
97 | if (args[i] == "-noverbose") | ||
98 | { | ||
99 | silent = true; | ||
100 | } | ||
101 | if (args[i] == "-config") | ||
102 | { | ||
103 | try | ||
104 | { | ||
105 | i++; | ||
106 | configFile = args[i]; | ||
107 | } | ||
108 | catch (Exception e) | ||
109 | { | ||
110 | Console.WriteLine("-config: Please specify a config file. (" + e.ToString() + ")"); | ||
111 | } | ||
112 | } | ||
113 | } | ||
114 | |||
115 | OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile); | ||
116 | 64 | ||
117 | sim.user_accounts = userAccounts; | 65 | OpenSimMain sim = new OpenSimMain(source); |
118 | sim.m_gridLocalAsset = gridLocalAsset; | ||
119 | 66 | ||
120 | sim.StartUp(); | 67 | sim.StartUp(); |
121 | 68 | ||