parent
c63369017f
commit
0047522859
|
@ -33,6 +33,7 @@ using OpenSim;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Environment;
|
using OpenSim.Region.Environment;
|
||||||
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using Mono.Addins.Description;
|
using Mono.Addins.Description;
|
||||||
|
|
||||||
|
@ -41,7 +42,7 @@ namespace OpenSim.Tools.Export
|
||||||
public class OpenSimExport
|
public class OpenSimExport
|
||||||
{
|
{
|
||||||
public IniConfigSource config;
|
public IniConfigSource config;
|
||||||
private StorageManager sman;
|
public StorageManager sman;
|
||||||
|
|
||||||
public OpenSimExport(IniConfigSource config)
|
public OpenSimExport(IniConfigSource config)
|
||||||
{
|
{
|
||||||
|
@ -67,6 +68,10 @@ namespace OpenSim.Tools.Export
|
||||||
RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml");
|
RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml");
|
||||||
|
|
||||||
System.Console.WriteLine("This application does nothing useful yet: " + reg.RegionID);
|
System.Console.WriteLine("This application does nothing useful yet: " + reg.RegionID);
|
||||||
|
foreach (SceneObjectGroup group in export.sman.DataStore.LoadObjects(reg.RegionID))
|
||||||
|
{
|
||||||
|
System.Console.WriteLine("{0} -> {1}", reg.RegionID, group.UUID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected LogBase CreateLog()
|
protected LogBase CreateLog()
|
||||||
|
@ -88,17 +93,14 @@ namespace OpenSim.Tools.Export
|
||||||
|
|
||||||
IConfig startupConfig = configSource.Configs["Startup"];
|
IConfig startupConfig = configSource.Configs["Startup"];
|
||||||
string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
|
string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
|
||||||
|
System.Console.WriteLine(iniFilePath);
|
||||||
IniConfigSource config = new IniConfigSource();
|
IniConfigSource config = new IniConfigSource();
|
||||||
//check for .INI file (either default or name passed in command line)
|
//check for .INI file (either default or name passed in command line)
|
||||||
if (File.Exists(iniFilePath))
|
if(! File.Exists(iniFilePath))
|
||||||
{
|
|
||||||
config.Merge(new IniConfigSource(iniFilePath));
|
|
||||||
config.Merge(configSource);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
iniFilePath = Path.Combine(Util.configDir(), iniFilePath);
|
iniFilePath = Path.Combine(Util.configDir(), iniFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
if(File.Exists(iniFilePath))
|
if(File.Exists(iniFilePath))
|
||||||
{
|
{
|
||||||
config.Merge(new IniConfigSource(iniFilePath));
|
config.Merge(new IniConfigSource(iniFilePath));
|
||||||
|
@ -107,13 +109,10 @@ namespace OpenSim.Tools.Export
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no default config files, so set default values, and save it
|
// no default config files, so set default values, and save it
|
||||||
// SetDefaultConfig();
|
System.Console.WriteLine("We didn't find a config!");
|
||||||
config.Merge(OpenSim.OpenSimMain.DefaultConfig());
|
config.Merge(OpenSim.OpenSimMain.DefaultConfig());
|
||||||
config.Merge(configSource);
|
config.Merge(configSource);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// ReadConfigSettings();
|
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue