diff options
author | Sean Dague | 2007-12-14 22:37:51 +0000 |
---|---|---|
committer | Sean Dague | 2007-12-14 22:37:51 +0000 |
commit | a7320acac12d9a52e70eb890b76d8423d717f040 (patch) | |
tree | ee4d0bfb7508998a555d45a3ab597cbf653e26e6 /OpenSim | |
parent | * Tweaked the sim stats so that when a sim is catching up it reports on the s... (diff) | |
download | opensim-SC-a7320acac12d9a52e70eb890b76d8423d717f040.zip opensim-SC-a7320acac12d9a52e70eb890b76d8423d717f040.tar.gz opensim-SC-a7320acac12d9a52e70eb890b76d8423d717f040.tar.bz2 opensim-SC-a7320acac12d9a52e70eb890b76d8423d717f040.tar.xz |
update to OpenSimExport to test loading of a Region
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Tools/Export/OpenSimExport.cs | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs index 03eb123..85a9984 100644 --- a/OpenSim/Tools/Export/OpenSimExport.cs +++ b/OpenSim/Tools/Export/OpenSimExport.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Reflection; | ||
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim; | 32 | using OpenSim; |
32 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -39,27 +40,44 @@ namespace OpenSim.Tools.Export | |||
39 | { | 40 | { |
40 | public class OpenSimExport | 41 | public class OpenSimExport |
41 | { | 42 | { |
42 | private IniConfigSource config; | 43 | public IniConfigSource config; |
43 | private StorageManager sman; | 44 | private StorageManager sman; |
44 | 45 | ||
45 | public OpenSimExport(IniConfigSource config) | 46 | public OpenSimExport(IniConfigSource config) |
46 | { | 47 | { |
47 | this.config = config; | 48 | this.config = config; |
48 | IConfig startup = config.Configs["Startup"]; | 49 | IConfig startup = config.Configs["Startup"]; |
49 | sman = new StorageManager( | 50 | // AddinManager.Initialize("."); |
51 | // AddinManager.Registry.Update(null); | ||
52 | |||
53 | // TODO: this really sucks, but given the way we do | ||
54 | // logging in OpenSim, we need to establish a log up front | ||
55 | |||
56 | MainLog.Instance = CreateLog(); | ||
57 | |||
58 | this.sman = new StorageManager( | ||
50 | startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), | 59 | startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), |
51 | startup.GetString("storage_connection_string","") | 60 | startup.GetString("storage_connection_string","") |
52 | ); | 61 | ); |
53 | |||
54 | } | 62 | } |
55 | 63 | ||
56 | public static void Main(string[] args) | 64 | public static void Main(string[] args) |
57 | { | 65 | { |
58 | OpenSimExport export = new OpenSimExport(InitConfig(args)); | 66 | OpenSimExport export = new OpenSimExport(InitConfig(args)); |
67 | RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml"); | ||
59 | 68 | ||
60 | System.Console.WriteLine("This application does nothing useful yet"); | 69 | System.Console.WriteLine("This application does nothing useful yet: " + reg.RegionID); |
61 | } | 70 | } |
62 | 71 | ||
72 | protected LogBase CreateLog() | ||
73 | { | ||
74 | if (!Directory.Exists(Util.logDir())) | ||
75 | { | ||
76 | Directory.CreateDirectory(Util.logDir()); | ||
77 | } | ||
78 | |||
79 | return new LogBase((Path.Combine(Util.logDir(), "export.log")), "Export", null, true); | ||
80 | } | ||
63 | 81 | ||
64 | 82 | ||
65 | private static IniConfigSource InitConfig(string[] args) | 83 | private static IniConfigSource InitConfig(string[] args) |
@@ -68,9 +86,6 @@ namespace OpenSim.Tools.Export | |||
68 | ArgvConfigSource configSource = new ArgvConfigSource(args); | 86 | ArgvConfigSource configSource = new ArgvConfigSource(args); |
69 | configSource.AddSwitch("Startup", "inifile"); | 87 | configSource.AddSwitch("Startup", "inifile"); |
70 | 88 | ||
71 | // AddinManager.Initialize("."); | ||
72 | // AddinManager.Registry.Update(null); | ||
73 | |||
74 | IConfig startupConfig = configSource.Configs["Startup"]; | 89 | IConfig startupConfig = configSource.Configs["Startup"]; |
75 | string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); | 90 | string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); |
76 | 91 | ||