aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Tools/Export/OpenSimExport.cs55
-rw-r--r--prebuild.xml1
2 files changed, 55 insertions, 1 deletions
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs
index e5146a3..cdafbdb 100644
--- a/OpenSim/Tools/Export/OpenSimExport.cs
+++ b/OpenSim/Tools/Export/OpenSimExport.cs
@@ -26,18 +26,71 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.IO;
29using Nini.Config; 30using Nini.Config;
31using OpenSim;
30using OpenSim.Framework; 32using OpenSim.Framework;
31using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using Mono.Addins;
35using Mono.Addins.Description;
32 36
33namespace OpenSim.Tools.Export 37namespace OpenSim.Tools.Export
34{ 38{
35 public class OpenSimExport 39 public class OpenSimExport
36 { 40 {
41 private IniConfigSource config;
42
43 public OpenSimExport(IniConfigSource config)
44 {
45 this.config = config;
46 }
47
37 public static void Main(string[] args) 48 public static void Main(string[] args)
38 { 49 {
39 ArgvConfigSource configSource = new ArgvConfigSource(args); 50 OpenSimExport export = new OpenSimExport(InitConfig(args));
51
40 System.Console.WriteLine("This application does nothing useful yet"); 52 System.Console.WriteLine("This application does nothing useful yet");
41 } 53 }
54
55 private static IniConfigSource InitConfig(string[] args)
56 {
57 System.Console.WriteLine("Good");
58 ArgvConfigSource configSource = new ArgvConfigSource(args);
59 configSource.AddSwitch("Startup", "inifile");
60
61// AddinManager.Initialize(".");
62// AddinManager.Registry.Update(null);
63
64 IConfig startupConfig = configSource.Configs["Startup"];
65 string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
66
67 IniConfigSource config = new IniConfigSource();
68 //check for .INI file (either default or name passed in command line)
69 if (File.Exists(iniFilePath))
70 {
71 config.Merge(new IniConfigSource(iniFilePath));
72 config.Merge(configSource);
73 }
74 else
75 {
76 iniFilePath = Path.Combine(Util.configDir(), iniFilePath);
77 if (File.Exists(iniFilePath))
78 {
79 config.Merge(new IniConfigSource(iniFilePath));
80 config.Merge(configSource);
81 }
82 else
83 {
84 // no default config files, so set default values, and save it
85 // SetDefaultConfig();
86 config.Merge(OpenSim.OpenSimMain.DefaultConfig());
87 config.Merge(configSource);
88 }
89 }
90
91 // ReadConfigSettings();
92
93 return config;
94 }
42 } 95 }
43} \ No newline at end of file 96} \ No newline at end of file
diff --git a/prebuild.xml b/prebuild.xml
index 9c376f3..7a6317c 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1177,6 +1177,7 @@
1177 <Reference name="Axiom.MathLib.dll"/> 1177 <Reference name="Axiom.MathLib.dll"/>
1178 <Reference name="Db4objects.Db4o.dll"/> 1178 <Reference name="Db4objects.Db4o.dll"/>
1179 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> 1179 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
1180 <Reference name="OpenSim"/>
1180 <Reference name="OpenSim.Framework"/> 1181 <Reference name="OpenSim.Framework"/>
1181 <Reference name="OpenSim.Framework.Data"/> 1182 <Reference name="OpenSim.Framework.Data"/>
1182 <Reference name="OpenSim.Framework.Console"/> 1183 <Reference name="OpenSim.Framework.Console"/>