changes to pass nini config object to the modules that get
loaded so that they may read out any bits they are interested inafrisby
parent
aaaa3c6835
commit
139994757c
|
@ -34,6 +34,7 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Scenes.Scripting;
|
using OpenSim.Region.Environment.Scenes.Scripting;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
||||||
{
|
{
|
||||||
|
@ -103,7 +104,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine
|
||||||
|
|
||||||
#region IRegionModule
|
#region IRegionModule
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
this.InitializeEngine(scene, MainLog.Instance);
|
this.InitializeEngine(scene, MainLog.Instance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@ namespace OpenSim
|
||||||
|
|
||||||
protected ModuleLoader m_moduleLoader;
|
protected ModuleLoader m_moduleLoader;
|
||||||
protected LocalLoginService m_loginService;
|
protected LocalLoginService m_loginService;
|
||||||
|
private IConfigSource m_config;
|
||||||
|
|
||||||
protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll";
|
protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll";
|
||||||
|
|
||||||
|
@ -89,9 +90,8 @@ namespace OpenSim
|
||||||
public OpenSimMain(IConfigSource configSource)
|
public OpenSimMain(IConfigSource configSource)
|
||||||
: base()
|
: base()
|
||||||
{
|
{
|
||||||
IConfigSource startupSource = configSource;
|
string iniFile = configSource.Configs["Startup"].GetString("inifile", "OpenSim.ini");
|
||||||
string iniFile = startupSource.Configs["Startup"].GetString("inifile", "OpenSim.ini");
|
string useExecutePathString = configSource.Configs["Startup"].GetString("useexecutepath", "false").ToLower();
|
||||||
string useExecutePathString = startupSource.Configs["Startup"].GetString("useexecutepath", "false").ToLower();
|
|
||||||
bool useExecutePath = false;
|
bool useExecutePath = false;
|
||||||
if (useExecutePathString == "true" || useExecutePathString == "" || useExecutePathString == "1" || useExecutePathString == "yes")
|
if (useExecutePathString == "true" || useExecutePathString == "" || useExecutePathString == "1" || useExecutePathString == "yes")
|
||||||
{
|
{
|
||||||
|
@ -104,46 +104,46 @@ namespace OpenSim
|
||||||
string iniFilePath = Path.Combine(Util.configDir(), iniFile);
|
string iniFilePath = Path.Combine(Util.configDir(), iniFile);
|
||||||
if (File.Exists(iniFilePath))
|
if (File.Exists(iniFilePath))
|
||||||
{
|
{
|
||||||
startupSource = new IniConfigSource(iniFilePath);
|
m_config = new IniConfigSource(iniFilePath);
|
||||||
|
|
||||||
//enable following line, if we want the original config source(normally commandline args) merged with ini file settings.
|
//enable following line, if we want the original config source(normally commandline args) merged with ini file settings.
|
||||||
//in this case we have it so that if both sources have the same named setting, the command line value will overwrite the ini file value.
|
//in this case we have it so that if both sources have the same named setting, the command line value will overwrite the ini file value.
|
||||||
//(as if someone has bothered to enter a command line arg, we should take notice of it)
|
//(as if someone has bothered to enter a command line arg, we should take notice of it)
|
||||||
startupSource.Merge(configSource);
|
m_config.Merge(configSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadConfigSettings(startupSource);
|
ReadConfigSettings();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ReadConfigSettings(IConfigSource configSource)
|
protected void ReadConfigSettings()
|
||||||
{
|
{
|
||||||
m_networkServersInfo = new NetworkServersInfo();
|
m_networkServersInfo = new NetworkServersInfo();
|
||||||
m_sandbox = !configSource.Configs["Startup"].GetBoolean("gridmode", false);
|
m_sandbox = !m_config.Configs["Startup"].GetBoolean("gridmode", false);
|
||||||
m_physicsEngine = configSource.Configs["Startup"].GetString("physics", "basicphysics");
|
m_physicsEngine = m_config.Configs["Startup"].GetString("physics", "basicphysics");
|
||||||
m_silent = configSource.Configs["Startup"].GetBoolean("noverbose", false);
|
m_silent = m_config.Configs["Startup"].GetBoolean("noverbose", false);
|
||||||
m_permissions = configSource.Configs["Startup"].GetBoolean("serverside_object_permissions", false);
|
m_permissions = m_config.Configs["Startup"].GetBoolean("serverside_object_permissions", false);
|
||||||
|
|
||||||
m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
|
m_storageDLL = m_config.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
|
||||||
|
|
||||||
m_startupCommandsFile = configSource.Configs["Startup"].GetString("startup_console_commands_file", "");
|
m_startupCommandsFile = m_config.Configs["Startup"].GetString("startup_console_commands_file", "");
|
||||||
m_shutdownCommandsFile = configSource.Configs["Startup"].GetString("shutdown_console_commands_file", "");
|
m_shutdownCommandsFile = m_config.Configs["Startup"].GetString("shutdown_console_commands_file", "");
|
||||||
|
|
||||||
m_scriptEngine = configSource.Configs["Startup"].GetString("script_engine", "DotNetEngine");
|
m_scriptEngine = m_config.Configs["Startup"].GetString("script_engine", "DotNetEngine");
|
||||||
|
|
||||||
m_assetStorage = configSource.Configs["Startup"].GetString("asset_database", "db4o");
|
m_assetStorage = m_config.Configs["Startup"].GetString("asset_database", "db4o");
|
||||||
|
|
||||||
configSource.Configs["Startup"].GetBoolean("default_modules", true);
|
m_config.Configs["Startup"].GetBoolean("default_modules", true);
|
||||||
configSource.Configs["Startup"].GetBoolean("default_shared_modules", true);
|
m_config.Configs["Startup"].GetBoolean("default_shared_modules", true);
|
||||||
configSource.Configs["Startup"].GetString("except_modules", "");
|
m_config.Configs["Startup"].GetString("except_modules", "");
|
||||||
configSource.Configs["Startup"].GetString("except_shared_modules", "");
|
m_config.Configs["Startup"].GetString("except_shared_modules", "");
|
||||||
|
|
||||||
standaloneAuthenticate = configSource.Configs["StandAlone"].GetBoolean("accounts_authenticate", false);
|
standaloneAuthenticate = m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate", false);
|
||||||
standaloneWelcomeMessage = configSource.Configs["StandAlone"].GetString("welcome_message", "Welcome to OpenSim");
|
standaloneWelcomeMessage = m_config.Configs["StandAlone"].GetString("welcome_message", "Welcome to OpenSim");
|
||||||
standaloneInventoryPlugin = configSource.Configs["StandAlone"].GetString("inventory_plugin", "OpenSim.Framework.Data.SQLite.dll");
|
standaloneInventoryPlugin = m_config.Configs["StandAlone"].GetString("inventory_plugin", "OpenSim.Framework.Data.SQLite.dll");
|
||||||
standaloneUserPlugin = configSource.Configs["StandAlone"].GetString("userDatabase_plugin", "OpenSim.Framework.Data.DB4o.dll");
|
standaloneUserPlugin = m_config.Configs["StandAlone"].GetString("userDatabase_plugin", "OpenSim.Framework.Data.DB4o.dll");
|
||||||
standaloneAssetPlugin = configSource.Configs["StandAlone"].GetString("asset_plugin", "OpenSim.Framework.Data.SQLite.dll");
|
standaloneAssetPlugin = m_config.Configs["StandAlone"].GetString("asset_plugin", "OpenSim.Framework.Data.SQLite.dll");
|
||||||
m_networkServersInfo.loadFromConfiguration(configSource);
|
m_networkServersInfo.loadFromConfiguration(m_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ namespace OpenSim
|
||||||
configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
|
configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_moduleLoader = new ModuleLoader( m_log );
|
m_moduleLoader = new ModuleLoader( m_log, m_config );
|
||||||
MainLog.Instance.Verbose("Loading Shared Modules");
|
MainLog.Instance.Verbose("Loading Shared Modules");
|
||||||
m_moduleLoader.LoadDefaultSharedModules();
|
m_moduleLoader.LoadDefaultSharedModules();
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Interfaces
|
namespace OpenSim.Region.Environment.Interfaces
|
||||||
{
|
{
|
||||||
public interface IRegionModule
|
public interface IRegionModule
|
||||||
{
|
{
|
||||||
void Initialise(Scene scene);
|
void Initialise(Scene scene, IConfigSource source);
|
||||||
void PostInitialise();
|
void PostInitialise();
|
||||||
void Close();
|
void Close();
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
|
|
|
@ -34,6 +34,7 @@ using OpenSim.Framework.Console;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Modules;
|
using OpenSim.Region.Environment.Modules;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment
|
namespace OpenSim.Region.Environment
|
||||||
{
|
{
|
||||||
|
@ -44,10 +45,12 @@ namespace OpenSim.Region.Environment
|
||||||
public List<IRegionModule> LoadedModules = new List<IRegionModule>();
|
public List<IRegionModule> LoadedModules = new List<IRegionModule>();
|
||||||
public Dictionary<string, IRegionModule> LoadedSharedModules = new Dictionary<string, IRegionModule>();
|
public Dictionary<string, IRegionModule> LoadedSharedModules = new Dictionary<string, IRegionModule>();
|
||||||
private readonly LogBase m_log;
|
private readonly LogBase m_log;
|
||||||
|
private IConfigSource m_config;
|
||||||
|
|
||||||
public ModuleLoader(LogBase log)
|
public ModuleLoader(LogBase log, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_log = log;
|
m_log = log;
|
||||||
|
m_config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PickupModules(Scene scene, string moduleDir)
|
public void PickupModules(Scene scene, string moduleDir)
|
||||||
|
@ -70,14 +73,14 @@ namespace OpenSim.Region.Environment
|
||||||
{
|
{
|
||||||
foreach (IRegionModule module in LoadedSharedModules.Values)
|
foreach (IRegionModule module in LoadedSharedModules.Values)
|
||||||
{
|
{
|
||||||
module.Initialise(scene);
|
module.Initialise(scene, m_config);
|
||||||
scene.AddModule(module.Name, module); //should be doing this?
|
scene.AddModule(module.Name, module); //should be doing this?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitializeModule(IRegionModule module, Scene scene)
|
public void InitializeModule(IRegionModule module, Scene scene)
|
||||||
{
|
{
|
||||||
module.Initialise(scene);
|
module.Initialise(scene, m_config);
|
||||||
scene.AddModule(module.Name, module);
|
scene.AddModule(module.Name, module);
|
||||||
LoadedModules.Add(module);
|
LoadedModules.Add(module);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -40,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
|
|
|
@ -30,6 +30,7 @@ using libsecondlife;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -41,7 +42,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
|
|
|
@ -35,6 +35,7 @@ using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Utilities;
|
using OpenSim.Framework.Utilities;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -67,7 +68,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
m_ircReader = null;
|
m_ircReader = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
|
|
|
@ -33,6 +33,7 @@ using OpenSim.Framework.Types;
|
||||||
using OpenSim.Framework.Utilities;
|
using OpenSim.Framework.Utilities;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -45,7 +46,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>();
|
private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>();
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -35,7 +36,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -35,7 +36,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -38,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
private List<Scene> m_scenes = new List<Scene>();
|
private List<Scene> m_scenes = new List<Scene>();
|
||||||
private LogBase m_log;
|
private LogBase m_log;
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
if (!m_scenes.Contains(scene))
|
if (!m_scenes.Contains(scene))
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -35,7 +36,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
@ -8,6 +8,7 @@ using libsecondlife;
|
||||||
using OpenJPEGNet;
|
using OpenJPEGNet;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -17,7 +18,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
private IDynamicTextureManager m_textureManager;
|
private IDynamicTextureManager m_textureManager;
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
if (m_scene == null)
|
if (m_scene == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,7 @@ using libsecondlife;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -41,7 +42,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
|
|
|
@ -40,6 +40,7 @@ using OpenSim.Framework.Servers;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
*
|
*
|
||||||
|
@ -84,7 +85,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
|
@ -39,6 +39,7 @@ using OpenSim.Framework.Servers;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
*
|
*
|
||||||
|
@ -93,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ using libsecondlife;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules
|
namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
|
@ -46,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
|
|
|
@ -39,12 +39,15 @@ using OpenSim.Region.Communications.Local;
|
||||||
using OpenSim.Region.Environment;
|
using OpenSim.Region.Environment;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.Physics.Manager;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace SimpleApp
|
namespace SimpleApp
|
||||||
{
|
{
|
||||||
class Program : RegionApplicationBase, conscmd_callback
|
class Program : RegionApplicationBase, conscmd_callback
|
||||||
{
|
{
|
||||||
private ModuleLoader m_moduleLoader;
|
private ModuleLoader m_moduleLoader;
|
||||||
|
private IConfigSource m_config;
|
||||||
|
|
||||||
protected override LogBase CreateLog()
|
protected override LogBase CreateLog()
|
||||||
{
|
{
|
||||||
return new LogBase(null, "SimpleApp", this, false);
|
return new LogBase(null, "SimpleApp", this, false);
|
||||||
|
@ -86,7 +89,7 @@ namespace SimpleApp
|
||||||
|
|
||||||
UDPServer udpServer;
|
UDPServer udpServer;
|
||||||
|
|
||||||
m_moduleLoader = new ModuleLoader( m_log );
|
m_moduleLoader = new ModuleLoader( m_log, m_config );
|
||||||
m_moduleLoader.LoadDefaultSharedModules();
|
m_moduleLoader.LoadDefaultSharedModules();
|
||||||
|
|
||||||
Scene scene = SetupScene(regionInfo, out udpServer);
|
Scene scene = SetupScene(regionInfo, out udpServer);
|
||||||
|
@ -155,7 +158,7 @@ namespace SimpleApp
|
||||||
|
|
||||||
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, AgentCircuitManager circuitManager)
|
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, AgentCircuitManager circuitManager)
|
||||||
{
|
{
|
||||||
return new MyWorld(regionInfo, circuitManager, m_commsManager, m_assetCache, storageManager, m_httpServer, new ModuleLoader( m_log ));
|
return new MyWorld(regionInfo, circuitManager, m_commsManager, m_assetCache, storageManager, m_httpServer, new ModuleLoader( m_log, m_config ));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override StorageManager CreateStorageManager(RegionInfo regionInfo)
|
protected override StorageManager CreateStorageManager(RegionInfo regionInfo)
|
||||||
|
|
|
@ -32,6 +32,7 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.ExtensionsScriptModule.CSharp;
|
using OpenSim.Region.ExtensionsScriptModule.CSharp;
|
||||||
using OpenSim.Region.ExtensionsScriptModule.JScript;
|
using OpenSim.Region.ExtensionsScriptModule.JScript;
|
||||||
using OpenSim.Region.ExtensionsScriptModule.JVMEngine;
|
using OpenSim.Region.ExtensionsScriptModule.JVMEngine;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.ExtensionsScriptModule
|
namespace OpenSim.Region.ExtensionsScriptModule
|
||||||
{
|
{
|
||||||
|
@ -67,7 +68,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
|
||||||
compilers.Add(javaCompiler.FileExt(), javaCompiler);
|
compilers.Add(javaCompiler.FileExt(), javaCompiler);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
System.Console.WriteLine("Initialising Extensions Scripting Module");
|
System.Console.WriteLine("Initialising Extensions Scripting Module");
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
|
@ -34,6 +34,7 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Scenes.Scripting;
|
using OpenSim.Region.Environment.Scenes.Scripting;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
using Nini.Config;
|
||||||
|
|
||||||
namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
{
|
{
|
||||||
|
@ -103,7 +104,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
|
|
||||||
#region IRegionModule
|
#region IRegionModule
|
||||||
|
|
||||||
public void Initialise(Scene scene)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
this.InitializeEngine(scene, MainLog.Instance);
|
this.InitializeEngine(scene, MainLog.Instance);
|
||||||
}
|
}
|
||||||
|
|
10
prebuild.xml
10
prebuild.xml
|
@ -475,11 +475,12 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Region.ScriptEngine.DotNetEngine"/>
|
||||||
<!-- For scripting in funny languages by default -->
|
<!-- For scripting in funny languages by default -->
|
||||||
<Reference name="Microsoft.JScript"/>
|
<Reference name="Microsoft.JScript"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -592,7 +593,7 @@
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="Axiom.MathLib.dll"/>
|
<Reference name="Axiom.MathLib.dll"/>
|
||||||
|
<Reference name="Nini.dll"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -670,7 +671,7 @@
|
||||||
<Reference name="OpenSim.Region.ClientStack"/>
|
<Reference name="OpenSim.Region.ClientStack"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -895,6 +896,7 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
||||||
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -983,6 +985,8 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
||||||
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
|
Loading…
Reference in New Issue