diff options
author | Sean Dague | 2007-12-15 20:14:29 +0000 |
---|---|---|
committer | Sean Dague | 2007-12-15 20:14:29 +0000 |
commit | 0047522859b9e08b15f58d8258ef23080b5cb644 (patch) | |
tree | 1d4262f5bb9cbf1206ad8a0e1b502b4bb59b3678 /OpenSim/Tools/Export/OpenSimExport.cs | |
parent | * Make inventory operations sync rather than async. This is to alleviate rac... (diff) | |
download | opensim-SC_OLD-0047522859b9e08b15f58d8258ef23080b5cb644.zip opensim-SC_OLD-0047522859b9e08b15f58d8258ef23080b5cb644.tar.gz opensim-SC_OLD-0047522859b9e08b15f58d8258ef23080b5cb644.tar.bz2 opensim-SC_OLD-0047522859b9e08b15f58d8258ef23080b5cb644.tar.xz |
more dorking around with exporter. Still far
from doing anything useful.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tools/Export/OpenSimExport.cs | 37 |
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; | |||
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
35 | using OpenSim.Region.Environment; | 35 | using OpenSim.Region.Environment; |
36 | using OpenSim.Region.Environment.Scenes; | ||
36 | using Mono.Addins; | 37 | using Mono.Addins; |
37 | using Mono.Addins.Description; | 38 | using 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 | } |