diff options
author | mingchen | 2007-07-18 23:15:08 +0000 |
---|---|---|
committer | mingchen | 2007-07-18 23:15:08 +0000 |
commit | 222becc8795d8abd8263c8abf8212de91faa4748 (patch) | |
tree | ac0eb1b420c2f60975b759296c94813f41925798 /OpenSim/Region | |
parent | * Reverting 1371 (diff) | |
download | opensim-SC_OLD-222becc8795d8abd8263c8abf8212de91faa4748.zip opensim-SC_OLD-222becc8795d8abd8263c8abf8212de91faa4748.tar.gz opensim-SC_OLD-222becc8795d8abd8263c8abf8212de91faa4748.tar.bz2 opensim-SC_OLD-222becc8795d8abd8263c8abf8212de91faa4748.tar.xz |
*New Configuration System, much easier and less buggy compared to the original system in place
*View RegionInfo.cs for an example on how it works!
*This hopefully copies all the files over, but who knows :)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 38 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/PacketServer.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Environment/RegionManager.cs | 1 |
5 files changed, 13 insertions, 32 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index c333e0e..81523e0 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -37,7 +37,7 @@ using OpenSim.Framework.Data; | |||
37 | using OpenSim.Framework.Interfaces; | 37 | using OpenSim.Framework.Interfaces; |
38 | using OpenSim.Framework.Servers; | 38 | using OpenSim.Framework.Servers; |
39 | using OpenSim.Framework.Types; | 39 | using OpenSim.Framework.Types; |
40 | using OpenSim.GenericConfig; | 40 | using OpenSim.Framework.Configuration; |
41 | using OpenSim.Physics.Manager; | 41 | using OpenSim.Physics.Manager; |
42 | using OpenSim.Region.Caches; | 42 | using OpenSim.Region.Caches; |
43 | using OpenSim.Region.ClientStack; | 43 | using OpenSim.Region.ClientStack; |
@@ -85,6 +85,9 @@ namespace OpenSim | |||
85 | /// </summary> | 85 | /// </summary> |
86 | public override void StartUp() | 86 | public override void StartUp() |
87 | { | 87 | { |
88 | m_log = new LogBase(m_logFilename, "Region", this, m_silent); | ||
89 | MainLog.Instance = m_log; | ||
90 | |||
88 | base.StartUp(); | 91 | base.StartUp(); |
89 | 92 | ||
90 | if (!m_sandbox) | 93 | if (!m_sandbox) |
@@ -108,27 +111,16 @@ namespace OpenSim | |||
108 | { | 111 | { |
109 | string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); | 112 | string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); |
110 | string path3 = Path.Combine(path2, "default.xml"); | 113 | string path3 = Path.Combine(path2, "default.xml"); |
111 | Console.WriteLine("Creating default region config file"); | 114 | |
112 | //TODO create default region | 115 | RegionInfo regionInfo = new RegionInfo("DEFAULT REGION CONFIG", path3); |
113 | IGenericConfig defaultConfig = new XmlConfig(path3); | ||
114 | defaultConfig.LoadData(); | ||
115 | defaultConfig.Commit(); | ||
116 | defaultConfig.Close(); | ||
117 | defaultConfig = null; | ||
118 | configFiles = Directory.GetFiles(path, "*.xml"); | 116 | configFiles = Directory.GetFiles(path, "*.xml"); |
119 | } | 117 | } |
120 | 118 | ||
121 | for (int i = 0; i < configFiles.Length; i++) | 119 | for (int i = 0; i < configFiles.Length; i++) |
122 | { | 120 | { |
123 | Console.WriteLine("Loading region config file"); | 121 | Console.WriteLine("Loading region config file"); |
124 | 122 | RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i]); | |
125 | IGenericConfig regionConfig = new XmlConfig(configFiles[i]); | 123 | |
126 | RegionInfo regionInfo = new RegionInfo(); | ||
127 | regionConfig.LoadData(); | ||
128 | regionInfo.InitConfig(this.m_sandbox, regionConfig); | ||
129 | regionConfig.Close(); | ||
130 | |||
131 | |||
132 | UDPServer udpServer; | 124 | UDPServer udpServer; |
133 | Scene scene = SetupScene(regionInfo, out udpServer); | 125 | Scene scene = SetupScene(regionInfo, out udpServer); |
134 | 126 | ||
@@ -159,21 +151,7 @@ namespace OpenSim | |||
159 | 151 | ||
160 | protected override void Initialize() | 152 | protected override void Initialize() |
161 | { | 153 | { |
162 | IGenericConfig localConfig = new XmlConfig(m_configFileName); | ||
163 | localConfig.LoadData(); | ||
164 | |||
165 | if (m_useConfigFile) | ||
166 | { | ||
167 | SetupFromConfigFile(localConfig); | ||
168 | } | ||
169 | |||
170 | StartLog(); | ||
171 | |||
172 | m_networkServersInfo.InitConfig(m_sandbox, localConfig); | ||
173 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | 154 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; |
174 | |||
175 | localConfig.Close(); | ||
176 | |||
177 | m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); | 155 | m_assetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); |
178 | } | 156 | } |
179 | 157 | ||
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs index 41aaf3a..7b15ab4 100644 --- a/OpenSim/Region/ClientStack/PacketServer.cs +++ b/OpenSim/Region/ClientStack/PacketServer.cs | |||
@@ -31,6 +31,7 @@ using System.Net.Sockets; | |||
31 | using libsecondlife.Packets; | 31 | using libsecondlife.Packets; |
32 | using OpenSim.Assets; | 32 | using OpenSim.Assets; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Types; | ||
34 | using OpenSim.Framework.Interfaces; | 35 | using OpenSim.Framework.Interfaces; |
35 | using OpenSim.Region.Caches; | 36 | using OpenSim.Region.Caches; |
36 | 37 | ||
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 1bb383f..375306d 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -65,9 +65,9 @@ namespace OpenSim.Region.ClientStack | |||
65 | 65 | ||
66 | virtual public void StartUp() | 66 | virtual public void StartUp() |
67 | { | 67 | { |
68 | |||
68 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); | 69 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); |
69 | m_networkServersInfo = new NetworkServersInfo(); | 70 | m_networkServersInfo = new NetworkServersInfo("NETWORK SERVERS INFO", "network_servers_information.xml"); |
70 | RegionInfo m_regionInfo = new RegionInfo(); | ||
71 | 71 | ||
72 | Initialize(); | 72 | Initialize(); |
73 | 73 | ||
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index ac17720..f90a213 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -32,6 +32,7 @@ using System.Net.Sockets; | |||
32 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
33 | using OpenSim.Assets; | 33 | using OpenSim.Assets; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Types; | ||
35 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Interfaces; | 37 | using OpenSim.Framework.Interfaces; |
37 | using OpenSim.Region.Caches; | 38 | using OpenSim.Region.Caches; |
diff --git a/OpenSim/Region/Environment/RegionManager.cs b/OpenSim/Region/Environment/RegionManager.cs index e75ee60..255aa45 100644 --- a/OpenSim/Region/Environment/RegionManager.cs +++ b/OpenSim/Region/Environment/RegionManager.cs | |||
@@ -1,5 +1,6 @@ | |||
1 | using System.Collections.Generic; | 1 | using System.Collections.Generic; |
2 | using OpenSim.Framework; | 2 | using OpenSim.Framework; |
3 | using OpenSim.Framework.Types; | ||
3 | using OpenSim.Framework.Communications; | 4 | using OpenSim.Framework.Communications; |
4 | using OpenSim.Framework.Servers; | 5 | using OpenSim.Framework.Servers; |
5 | using OpenSim.Region.Capabilities; | 6 | using OpenSim.Region.Capabilities; |