aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Tools/Export/OpenSimExport.cs37
1 files changed, 18 insertions, 19 deletions
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs
index 85a9984..b0764ff 100644
--- a/OpenSim/Tools/Export/OpenSimExport.cs
+++ b/OpenSim/Tools/Export/OpenSimExport.cs
@@ -33,6 +33,7 @@ using OpenSim;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using OpenSim.Region.Environment; 35using OpenSim.Region.Environment;
36using OpenSim.Region.Environment.Scenes;
36using Mono.Addins; 37using Mono.Addins;
37using Mono.Addins.Description; 38using Mono.Addins.Description;
38 39
@@ -41,7 +42,7 @@ namespace OpenSim.Tools.Export
41 public class OpenSimExport 42 public class OpenSimExport
42 { 43 {
43 public IniConfigSource config; 44 public IniConfigSource config;
44 private StorageManager sman; 45 public StorageManager sman;
45 46
46 public OpenSimExport(IniConfigSource config) 47 public OpenSimExport(IniConfigSource config)
47 { 48 {
@@ -67,6 +68,10 @@ namespace OpenSim.Tools.Export
67 RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml"); 68 RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml");
68 69
69 System.Console.WriteLine("This application does nothing useful yet: " + reg.RegionID); 70 System.Console.WriteLine("This application does nothing useful yet: " + reg.RegionID);
71 foreach (SceneObjectGroup group in export.sman.DataStore.LoadObjects(reg.RegionID))
72 {
73 System.Console.WriteLine("{0} -> {1}", reg.RegionID, group.UUID);
74 }
70 } 75 }
71 76
72 protected LogBase CreateLog() 77 protected LogBase CreateLog()
@@ -88,33 +93,27 @@ namespace OpenSim.Tools.Export
88 93
89 IConfig startupConfig = configSource.Configs["Startup"]; 94 IConfig startupConfig = configSource.Configs["Startup"];
90 string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); 95 string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
91 96 System.Console.WriteLine(iniFilePath);
92 IniConfigSource config = new IniConfigSource(); 97 IniConfigSource config = new IniConfigSource();
93 //check for .INI file (either default or name passed in command line) 98 //check for .INI file (either default or name passed in command line)
94 if (File.Exists(iniFilePath)) 99 if(! File.Exists(iniFilePath))
100 {
101 iniFilePath = Path.Combine(Util.configDir(), iniFilePath);
102 }
103
104 if(File.Exists(iniFilePath))
95 { 105 {
96 config.Merge(new IniConfigSource(iniFilePath)); 106 config.Merge(new IniConfigSource(iniFilePath));
97 config.Merge(configSource); 107 config.Merge(configSource);
98 } 108 }
99 else 109 else
100 { 110 {
101 iniFilePath = Path.Combine(Util.configDir(), iniFilePath); 111 // no default config files, so set default values, and save it
102 if (File.Exists(iniFilePath)) 112 System.Console.WriteLine("We didn't find a config!");
103 { 113 config.Merge(OpenSim.OpenSimMain.DefaultConfig());
104 config.Merge(new IniConfigSource(iniFilePath)); 114 config.Merge(configSource);
105 config.Merge(configSource);
106 }
107 else
108 {
109 // no default config files, so set default values, and save it
110 // SetDefaultConfig();
111 config.Merge(OpenSim.OpenSimMain.DefaultConfig());
112 config.Merge(configSource);
113 }
114 } 115 }
115 116
116 // ReadConfigSettings();
117
118 return config; 117 return config;
119 } 118 }
120 } 119 }