aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/ConfigurationLoader.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/Application/ConfigurationLoader.cs
parentAdd a build script. (diff)
downloadopensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Region/Application/ConfigurationLoader.cs')
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs24
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index cf7db97..62bd4f4 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -43,10 +43,10 @@ namespace OpenSim
43 public class ConfigurationLoader 43 public class ConfigurationLoader
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 /// <summary> 47 /// <summary>
48 /// Various Config settings the region needs to start 48 /// Various Config settings the region needs to start
49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, 49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor,
50 /// StorageDLL, Storage Connection String, Estate connection String, Client Stack 50 /// StorageDLL, Storage Connection String, Estate connection String, Client Stack
51 /// Standalone settings. 51 /// Standalone settings.
52 /// </summary> 52 /// </summary>
@@ -154,14 +154,15 @@ namespace OpenSim
154 } 154 }
155 155
156 // Override distro settings with contents of inidirectory 156 // Override distro settings with contents of inidirectory
157 string iniDirPath = Path.GetFullPath(Path.Combine(Util.configDir(), startupConfig.GetString("inidirectory", "config"))); 157 string iniDirName = startupConfig.GetString("inidirectory", "config");
158 string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
158 159
159 if (Directory.Exists(iniDirPath)) 160 if (Directory.Exists(iniDirPath))
160 { 161 {
161 m_log.InfoFormat("[CONFIG]: Searching folder {0} for config ini files", iniDirPath); 162 m_log.InfoFormat("[CONFIG]: Searching folder {0} for config ini files", iniDirPath);
162 List<string> overrideSources = new List<string>(); 163 List<string> overrideSources = new List<string>();
163 164
164 string[] fileEntries = Directory.GetFiles(iniDirPath); 165 string[] fileEntries = Directory.GetFiles(iniDirName);
165 foreach (string filePath in fileEntries) 166 foreach (string filePath in fileEntries)
166 { 167 {
167 if (Path.GetExtension(filePath).ToLower() == ".ini") 168 if (Path.GetExtension(filePath).ToLower() == ".ini")
@@ -187,7 +188,7 @@ namespace OpenSim
187 { 188 {
188 iniFileExists = true; 189 iniFileExists = true;
189 AddIncludes(overrideConfig, overrideSources); 190 AddIncludes(overrideConfig, overrideSources);
190 } 191 }
191 } 192 }
192 m_config.Source.Merge(overrideConfig.Source); 193 m_config.Source.Merge(overrideConfig.Source);
193 } 194 }
@@ -197,7 +198,7 @@ namespace OpenSim
197 { 198 {
198 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 199 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
199 Environment.Exit(1); 200 Environment.Exit(1);
200 } 201 }
201 else if (!iniFileExists) 202 else if (!iniFileExists)
202 { 203 {
203 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 204 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
@@ -256,14 +257,14 @@ namespace OpenSim
256 string path = Path.Combine(basepath, chunkWithoutWildcards); 257 string path = Path.Combine(basepath, chunkWithoutWildcards);
257 path = Path.GetFullPath(path) + chunkWithWildcards; 258 path = Path.GetFullPath(path) + chunkWithWildcards;
258 string[] paths = Util.Glob(path); 259 string[] paths = Util.Glob(path);
259 260
260 // If the include path contains no wildcards, then warn the user that it wasn't found. 261 // If the include path contains no wildcards, then warn the user that it wasn't found.
261 if (wildcardIndex == -1 && paths.Length == 0) 262 if (wildcardIndex == -1 && paths.Length == 0)
262 { 263 {
263 m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path); 264 m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path);
264 } 265 }
265 else 266 else
266 { 267 {
267 foreach (string p in paths) 268 foreach (string p in paths)
268 { 269 {
269 if (!sources.Contains(p)) 270 if (!sources.Contains(p))
@@ -347,13 +348,10 @@ namespace OpenSim
347 config.Set("meshing", "Meshmerizer"); 348 config.Set("meshing", "Meshmerizer");
348 config.Set("physical_prim", true); 349 config.Set("physical_prim", true);
349 config.Set("serverside_object_permissions", true); 350 config.Set("serverside_object_permissions", true);
350 config.Set("storage_prim_inventories", true);
351 config.Set("startup_console_commands_file", String.Empty); 351 config.Set("startup_console_commands_file", String.Empty);
352 config.Set("shutdown_console_commands_file", String.Empty); 352 config.Set("shutdown_console_commands_file", String.Empty);
353 config.Set("DefaultScriptEngine", "XEngine"); 353 config.Set("DefaultScriptEngine", "XEngine");
354 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); 354 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
355 // life doesn't really work without this
356 config.Set("EventQueue", true);
357 } 355 }
358 356
359 { 357 {
@@ -379,11 +377,11 @@ namespace OpenSim
379 m_configSettings.PhysicsEngine = startupConfig.GetString("physics"); 377 m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
380 m_configSettings.MeshEngineName = startupConfig.GetString("meshing"); 378 m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
381 379
382 m_configSettings.ClientstackDll 380 m_configSettings.ClientstackDll
383 = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); 381 = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
384 } 382 }
385 383
386 m_networkServersInfo.loadFromConfiguration(m_config.Source); 384 m_networkServersInfo.loadFromConfiguration(m_config.Source);
387 } 385 }
388 } 386 }
389} \ No newline at end of file 387}