The plugin loader can now handle plugin dependencies without hardcoding

0.6.0-stable
Johan Berntsson 2008-03-11 03:10:21 +00:00
parent 9ef044727e
commit bec947cde3
3 changed files with 7 additions and 19 deletions

View File

@ -374,27 +374,14 @@ namespace OpenSim
m_moduleLoader = new ModuleLoader(m_config);
ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup");
m_log.InfoFormat("[PLUGINS]: Loading {0} OpenSim application plugins", nodes.Count);
foreach (TypeExtensionNode node in nodes)
{
// First load the proxy server (if present)
if(node.Path.Contains("Proxy"))
{
m_log.InfoFormat("[PLUGINS]: Loading OpenSim application plugin {0}", node.Path);
IApplicationPlugin plugin = (IApplicationPlugin)node.CreateInstance();
plugin.Initialise(this);
m_plugins.Add(plugin);
}
}
// then load the other modules
foreach (TypeExtensionNode node in nodes)
{
if(!node.Path.Contains("Proxy"))
{
IApplicationPlugin plugin = (IApplicationPlugin)node.CreateInstance();
plugin.Initialise(this);
m_plugins.Add(plugin);
}
}
// Start UDP servers
//for (int i = 0; i < m_udpServers.Count; i++)
//{

View File

@ -54,6 +54,7 @@ using libsecondlife.Packets;
[assembly:Addin]
[assembly:AddinDependency ("OpenSim", "0.5")]
[assembly:AddinDependency ("RegionProxy", "0.1")]
namespace OpenSim.ApplicationPlugins.LoadBalancer
{

View File

@ -43,7 +43,7 @@ using Nwc.XmlRpc;
using Mono.Addins;
[assembly:Addin]
[assembly:Addin ("RegionProxy", "0.1")]
[assembly:AddinDependency ("OpenSim", "0.5")]
namespace OpenSim.ApplicationPlugins.RegionProxy