diff options
author | Justin Clarke Casey | 2008-04-28 14:41:46 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-28 14:41:46 +0000 |
commit | 776b1f341aea5005a94bc3e03159619b3e9ce502 (patch) | |
tree | 629c2fa3812039867d44d522bf2bd50980d600b5 /OpenSim/Region/Application/Application.cs | |
parent | * Fixed 'Welcome to Krynn' default that I missed and got stuck in by a patch. (diff) | |
download | opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.zip opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.tar.gz opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.tar.bz2 opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.tar.xz |
From: Dr Scofield <hud@zurich.ibm.com>
Note: This is the first part of some changes from Dr Scofield to support console-less operation of an OpenSim region server.
The changes are not yet complete.
* refactors OpenSimMain into two classes: OpenSimMain and
OpenSimMainConsole. OpenSimMainConsole derives from OpenSimMain
and basically is the "old" OpenSimMain
* drops StartConsole from RegionApplicationBase (was only called
from the "old" OpenSimMain anyhow)
* reverts the changes to TryGetScene(string, out scene) as that
seems to work perfectly fine
* adds a check to region-remove to see whether
m_sceneManger.CurrentScene is non-null before comparing it against
the region-to-be-removed
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index eaa4788..828490a 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -65,6 +65,12 @@ namespace OpenSim | |||
65 | 65 | ||
66 | ArgvConfigSource configSource = new ArgvConfigSource(args); | 66 | ArgvConfigSource configSource = new ArgvConfigSource(args); |
67 | 67 | ||
68 | configSource.Alias.AddAlias("On", true); | ||
69 | configSource.Alias.AddAlias("Off", false); | ||
70 | configSource.Alias.AddAlias("True", true); | ||
71 | configSource.Alias.AddAlias("False", false); | ||
72 | |||
73 | configSource.AddSwitch("Startup", "background"); | ||
68 | configSource.AddSwitch("Startup", "inifile"); | 74 | configSource.AddSwitch("Startup", "inifile"); |
69 | configSource.AddSwitch("Startup", "gridmode"); | 75 | configSource.AddSwitch("Startup", "gridmode"); |
70 | configSource.AddSwitch("Startup", "physics"); | 76 | configSource.AddSwitch("Startup", "physics"); |
@@ -73,13 +79,23 @@ namespace OpenSim | |||
73 | configSource.AddConfig("StandAlone"); | 79 | configSource.AddConfig("StandAlone"); |
74 | configSource.AddConfig("Network"); | 80 | configSource.AddConfig("Network"); |
75 | 81 | ||
76 | OpenSimMain sim = new OpenSimMain(configSource); | 82 | bool background = configSource.Configs["Startup"].GetBoolean("background", false); |
77 | |||
78 | sim.StartUp(); | ||
79 | 83 | ||
80 | while (true) | 84 | if (background) |
85 | { | ||
86 | Console.WriteLine("background mode"); | ||
87 | OpenSimMain sim = new OpenSimMain(configSource); | ||
88 | sim.StartUp(); | ||
89 | } | ||
90 | else | ||
81 | { | 91 | { |
82 | MainConsole.Instance.Prompt(); | 92 | OpenSimMain sim = new OpenSimMainConsole(configSource); |
93 | sim.StartUp(); | ||
94 | |||
95 | while (true) | ||
96 | { | ||
97 | MainConsole.Instance.Prompt(); | ||
98 | } | ||
83 | } | 99 | } |
84 | } | 100 | } |
85 | 101 | ||