* 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.0.1-prestable
parent
7e29f458ad
commit
feca5d22c6
|
@ -87,10 +87,11 @@ namespace OpenSim
|
||||||
public bool user_accounts = false;
|
public bool user_accounts = false;
|
||||||
public bool gridLocalAsset = false;
|
public bool gridLocalAsset = false;
|
||||||
private bool configFileSetup = false;
|
private bool configFileSetup = false;
|
||||||
|
public string m_config;
|
||||||
|
|
||||||
protected ConsoleBase m_console;
|
protected ConsoleBase m_console;
|
||||||
|
|
||||||
public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool verbose)
|
public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool verbose, string configFile)
|
||||||
{
|
{
|
||||||
this.configFileSetup = useConfigFile;
|
this.configFileSetup = useConfigFile;
|
||||||
m_sandbox = sandBoxMode;
|
m_sandbox = sandBoxMode;
|
||||||
|
@ -109,7 +110,7 @@ namespace OpenSim
|
||||||
this.regionData = new RegionInfo();
|
this.regionData = new RegionInfo();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.localConfig = new XmlConfig("simconfig.xml");
|
this.localConfig = new XmlConfig(m_config);
|
||||||
this.localConfig.LoadData();
|
this.localConfig.LoadData();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace OpenSim
|
||||||
bool gridLocalAsset = false;
|
bool gridLocalAsset = false;
|
||||||
bool useConfigFile = false;
|
bool useConfigFile = false;
|
||||||
bool noverbose = false;
|
bool noverbose = false;
|
||||||
|
string configFile = "simconfig.xml";
|
||||||
|
|
||||||
for (int i = 0; i < args.Length; i++)
|
for (int i = 0; i < args.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -60,9 +61,21 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
noverbose = true;
|
noverbose = true;
|
||||||
}
|
}
|
||||||
|
if (args[i] == "-config")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
configFile = args[i];
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine("-config: Please specify a config file.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine, useConfigFile, noverbose);
|
OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, noverbose, configFile);
|
||||||
// OpenSimRoot.Instance.Application = sim;
|
// OpenSimRoot.Instance.Application = sim;
|
||||||
sim.m_sandbox = sandBoxMode;
|
sim.m_sandbox = sandBoxMode;
|
||||||
sim.user_accounts = userAccounts;
|
sim.user_accounts = userAccounts;
|
||||||
|
|
Loading…
Reference in New Issue