diff options
author | Adam Frisby | 2007-04-27 20:32:02 +0000 |
---|---|---|
committer | Adam Frisby | 2007-04-27 20:32:02 +0000 |
commit | feca5d22c68230bd0c87a288d9671c15dcd67956 (patch) | |
tree | b685ac247c46aaf05d354e6848a868fe989eb4aa /OpenSim | |
parent | Clearing up comment to reflect true strength of GenerateChallenge() (diff) | |
download | opensim-SC_OLD-feca5d22c68230bd0c87a288d9671c15dcd67956.zip opensim-SC_OLD-feca5d22c68230bd0c87a288d9671c15dcd67956.tar.gz opensim-SC_OLD-feca5d22c68230bd0c87a288d9671c15dcd67956.tar.bz2 opensim-SC_OLD-feca5d22c68230bd0c87a288d9671c15dcd67956.tar.xz |
* Added new commandline option -config <configfile.xml>
Note: This is untested but is a very simple change and should 'just work'. If someone can test, appreciated.
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 5 | ||||
-rw-r--r-- | OpenSim/Application.cs | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 4375f74..20fffc8 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs | |||
@@ -87,10 +87,11 @@ namespace OpenSim | |||
87 | public bool user_accounts = false; | 87 | public bool user_accounts = false; |
88 | public bool gridLocalAsset = false; | 88 | public bool gridLocalAsset = false; |
89 | private bool configFileSetup = false; | 89 | private bool configFileSetup = false; |
90 | public string m_config; | ||
90 | 91 | ||
91 | protected ConsoleBase m_console; | 92 | protected ConsoleBase m_console; |
92 | 93 | ||
93 | public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool verbose) | 94 | public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool verbose, string configFile) |
94 | { | 95 | { |
95 | this.configFileSetup = useConfigFile; | 96 | this.configFileSetup = useConfigFile; |
96 | m_sandbox = sandBoxMode; | 97 | m_sandbox = sandBoxMode; |
@@ -109,7 +110,7 @@ namespace OpenSim | |||
109 | this.regionData = new RegionInfo(); | 110 | this.regionData = new RegionInfo(); |
110 | try | 111 | try |
111 | { | 112 | { |
112 | this.localConfig = new XmlConfig("simconfig.xml"); | 113 | this.localConfig = new XmlConfig(m_config); |
113 | this.localConfig.LoadData(); | 114 | this.localConfig.LoadData(); |
114 | } | 115 | } |
115 | catch (Exception e) | 116 | catch (Exception e) |
diff --git a/OpenSim/Application.cs b/OpenSim/Application.cs index 6adc540..7d8be59 100644 --- a/OpenSim/Application.cs +++ b/OpenSim/Application.cs | |||
@@ -22,6 +22,7 @@ namespace OpenSim | |||
22 | bool gridLocalAsset = false; | 22 | bool gridLocalAsset = false; |
23 | bool useConfigFile = false; | 23 | bool useConfigFile = false; |
24 | bool noverbose = false; | 24 | bool noverbose = false; |
25 | string configFile = "simconfig.xml"; | ||
25 | 26 | ||
26 | for (int i = 0; i < args.Length; i++) | 27 | for (int i = 0; i < args.Length; i++) |
27 | { | 28 | { |
@@ -60,9 +61,21 @@ namespace OpenSim | |||
60 | { | 61 | { |
61 | noverbose = true; | 62 | noverbose = true; |
62 | } | 63 | } |
64 | if (args[i] == "-config") | ||
65 | { | ||
66 | try | ||
67 | { | ||
68 | i++; | ||
69 | configFile = args[i]; | ||
70 | } | ||
71 | catch (Exception e) | ||
72 | { | ||
73 | Console.WriteLine("-config: Please specify a config file."); | ||
74 | } | ||
75 | } | ||
63 | } | 76 | } |
64 | 77 | ||
65 | OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine, useConfigFile, noverbose); | 78 | OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, noverbose, configFile); |
66 | // OpenSimRoot.Instance.Application = sim; | 79 | // OpenSimRoot.Instance.Application = sim; |
67 | sim.m_sandbox = sandBoxMode; | 80 | sim.m_sandbox = sandBoxMode; |
68 | sim.user_accounts = userAccounts; | 81 | sim.user_accounts = userAccounts; |