aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712008-12-08 14:45:40 +0000
committerlbsa712008-12-08 14:45:40 +0000
commitb4a725ed87e088c0ec06e96c34569159cf3b3931 (patch)
tree35ceeb43ef48c4998306ae761c6a57bd46d31e2e /OpenSim
parent* Adds some rudimentary error handling to the physics debug drawstuff tool. (diff)
downloadopensim-SC_OLD-b4a725ed87e088c0ec06e96c34569159cf3b3931.zip
opensim-SC_OLD-b4a725ed87e088c0ec06e96c34569159cf3b3931.tar.gz
opensim-SC_OLD-b4a725ed87e088c0ec06e96c34569159cf3b3931.tar.bz2
opensim-SC_OLD-b4a725ed87e088c0ec06e96c34569159cf3b3931.tar.xz
* Killed off OpenSimExport. One project less to maintain.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Tools/Export/OpenSimExport.cs112
1 files changed, 0 insertions, 112 deletions
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs
deleted file mode 100644
index 570a855..0000000
--- a/OpenSim/Tools/Export/OpenSimExport.cs
+++ /dev/null
@@ -1,112 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using log4net.Config;
31using Nini.Config;
32using OpenSim;
33using OpenSim.Framework;
34using OpenSim.Framework.Console;
35using OpenSim.Region.Environment;
36using OpenSim.Region.Environment.Scenes;
37
38namespace OpenSimExport
39{
40 public class OpenSimExport
41 {
42 public IniConfigSource config;
43 public StorageManager sman;
44
45 public OpenSimExport(IniConfigSource config)
46 {
47 this.config = config;
48 IConfig startup = config.Configs["Startup"];
49 // AddinManager.Initialize(".");
50 // AddinManager.Registry.Update(null);
51
52 MainConsole.Instance = CreateConsole();
53
54 sman = new StorageManager(
55 startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"),
56 startup.GetString("storage_connection_string", String.Empty),
57 startup.GetString("estate_connection_string", String.Empty)
58 );
59 }
60
61 public static void Main(string[] args)
62 {
63 XmlConfigurator.Configure();
64
65 OpenSimExport export = new OpenSimExport(InitConfig(args));
66 RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml",false);
67
68 Console.WriteLine("This application does nothing useful yet: " + reg.RegionID);
69 foreach (SceneObjectGroup group in export.sman.DataStore.LoadObjects(reg.RegionID))
70 {
71 Console.WriteLine("{0} -> {1}", reg.RegionID, group.UUID);
72 }
73 }
74
75 protected static ConsoleBase CreateConsole()
76 {
77 return new ConsoleBase("Export", null);
78 }
79
80 private static IniConfigSource InitConfig(string[] args)
81 {
82 Console.WriteLine("Good");
83 ArgvConfigSource configSource = new ArgvConfigSource(args);
84 configSource.AddSwitch("Startup", "inifile");
85
86 IConfig startupConfig = configSource.Configs["Startup"];
87 string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
88 Console.WriteLine(iniFilePath);
89 IniConfigSource config = new IniConfigSource();
90 //check for .INI file (either default or name passed in command line)
91 if (! File.Exists(iniFilePath))
92 {
93 iniFilePath = Path.Combine(Util.configDir(), iniFilePath);
94 }
95
96 if (File.Exists(iniFilePath))
97 {
98 config.Merge(new IniConfigSource(iniFilePath));
99 config.Merge(configSource);
100 }
101 else
102 {
103 // no default config files, so set default values, and save it
104 Console.WriteLine("We didn't find a config!");
105 config.Merge(ConfigurationLoader.DefaultConfig());
106 config.Merge(configSource);
107 }
108
109 return config;
110 }
111 }
112}