Allow Mono Plugin Registry setting for Regions
Signed-off-by: Melanie <melanie@t-data.com>0.8.0.3
parent
a5800f479e
commit
3d0778bcd6
|
@ -215,7 +215,7 @@ namespace OpenSim.Framework
|
||||||
AddinManager.AddinLoadError += on_addinloaderror_;
|
AddinManager.AddinLoadError += on_addinloaderror_;
|
||||||
AddinManager.AddinLoaded += on_addinloaded_;
|
AddinManager.AddinLoaded += on_addinloaded_;
|
||||||
|
|
||||||
clear_registry_();
|
clear_registry_(dir);
|
||||||
|
|
||||||
suppress_console_output_(true);
|
suppress_console_output_(true);
|
||||||
AddinManager.Initialize(dir);
|
AddinManager.Initialize(dir);
|
||||||
|
@ -239,18 +239,19 @@ namespace OpenSim.Framework
|
||||||
+ args.Exception.StackTrace);
|
+ args.Exception.StackTrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clear_registry_()
|
private void clear_registry_(string dir)
|
||||||
{
|
{
|
||||||
// The Mono addin manager (in Mono.Addins.dll version 0.2.0.0)
|
// The Mono addin manager (in Mono.Addins.dll version 0.2.0.0)
|
||||||
// occasionally seems to corrupt its addin cache
|
// occasionally seems to corrupt its addin cache
|
||||||
// Hence, as a temporary solution we'll remove it before each startup
|
// Hence, as a temporary solution we'll remove it before each startup
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Directory.Exists("addin-db-000"))
|
if (Directory.Exists(dir + "/addin-db-000"))
|
||||||
Directory.Delete("addin-db-000", true);
|
Directory.Delete(dir + "/addin-db-000", true);
|
||||||
|
|
||||||
if (Directory.Exists("addin-db-001"))
|
if (Directory.Exists(dir + "/addin-db-001"))
|
||||||
Directory.Delete("addin-db-001", true);
|
Directory.Delete(dir + "/addin-db-001", true);
|
||||||
}
|
}
|
||||||
catch (IOException)
|
catch (IOException)
|
||||||
{
|
{
|
||||||
|
|
|
@ -158,7 +158,10 @@ namespace OpenSim
|
||||||
|
|
||||||
protected virtual void LoadPlugins()
|
protected virtual void LoadPlugins()
|
||||||
{
|
{
|
||||||
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)))
|
IConfig startupConfig = Config.Configs["Startup"];
|
||||||
|
string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation",".") : ".";
|
||||||
|
|
||||||
|
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation))
|
||||||
{
|
{
|
||||||
loader.Load("/OpenSim/Startup");
|
loader.Load("/OpenSim/Startup");
|
||||||
m_plugins = loader.Plugins;
|
m_plugins = loader.Plugins;
|
||||||
|
|
|
@ -57,6 +57,12 @@
|
||||||
; when running with the SmartThreadPool option above
|
; when running with the SmartThreadPool option above
|
||||||
MaxPoolThreads = 15
|
MaxPoolThreads = 15
|
||||||
|
|
||||||
|
; Plugin Registry Location
|
||||||
|
; Set path to directory for plugin registry. Information about the
|
||||||
|
; registered repositories and installed plugins will be stored here.
|
||||||
|
; The OpenSim.exe process must have R/W access to the location.
|
||||||
|
; RegistryLocation = "."
|
||||||
|
|
||||||
; ##
|
; ##
|
||||||
; ## CLIENTS
|
; ## CLIENTS
|
||||||
; ##
|
; ##
|
||||||
|
|
Loading…
Reference in New Issue