The plugin loader can now handle plugin dependencies without hardcoding
parent
9ef044727e
commit
bec947cde3
|
@ -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++)
|
||||
//{
|
||||
|
|
|
@ -54,6 +54,7 @@ using libsecondlife.Packets;
|
|||
|
||||
[assembly:Addin]
|
||||
[assembly:AddinDependency ("OpenSim", "0.5")]
|
||||
[assembly:AddinDependency ("RegionProxy", "0.1")]
|
||||
|
||||
namespace OpenSim.ApplicationPlugins.LoadBalancer
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue