More work on install/loading/unloading
Moved troublesome openjpeg libs - testing to see if opensim region can run with the changeintegration
parent
3e6043bb47
commit
d95e6ca0c6
|
@ -90,9 +90,9 @@ namespace OpenSim.Services.IntegrationService
|
||||||
|
|
||||||
AddinRegistry registry = new AddinRegistry(RegistryLocation, ".");
|
AddinRegistry registry = new AddinRegistry(RegistryLocation, ".");
|
||||||
|
|
||||||
suppress_console_output_(true);
|
Ux.suppress_console_output_(true);
|
||||||
m_PluginManager = new PluginManager(registry);
|
m_PluginManager = new PluginManager(registry);
|
||||||
suppress_console_output_(false);
|
Ux.suppress_console_output_(false);
|
||||||
|
|
||||||
// Deal with files only for now - will add url/environment later
|
// Deal with files only for now - will add url/environment later
|
||||||
m_IntegrationConfigLoc = serverConfig.GetString("IntegrationConfig", String.Empty);
|
m_IntegrationConfigLoc = serverConfig.GetString("IntegrationConfig", String.Empty);
|
||||||
|
@ -176,20 +176,20 @@ namespace OpenSim.Services.IntegrationService
|
||||||
m_log.Info ("[INTEGRATION SERVICE]: Plugin Loaded: " + args.AddinId);
|
m_log.Info ("[INTEGRATION SERVICE]: Plugin Loaded: " + args.AddinId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TextWriter prev_console_;
|
// private static TextWriter prev_console_;
|
||||||
public void suppress_console_output_(bool save)
|
// public void suppress_console_output_(bool save)
|
||||||
{
|
// {
|
||||||
if (save)
|
// if (save)
|
||||||
{
|
// {
|
||||||
prev_console_ = System.Console.Out;
|
// prev_console_ = System.Console.Out;
|
||||||
System.Console.SetOut(new StreamWriter(Stream.Null));
|
// System.Console.SetOut(new StreamWriter(Stream.Null));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
if (prev_console_ != null)
|
// if (prev_console_ != null)
|
||||||
System.Console.SetOut(prev_console_);
|
// System.Console.SetOut(prev_console_);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
private void LoadingPlugin(IntegrationPlugin plugin)
|
private void LoadingPlugin(IntegrationPlugin plugin)
|
||||||
{
|
{
|
||||||
|
|
|
@ -149,5 +149,20 @@ namespace OpenSim.Services.IntegrationService
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static TextWriter prev_console_;
|
||||||
|
public static void suppress_console_output_(bool save)
|
||||||
|
{
|
||||||
|
if (save)
|
||||||
|
{
|
||||||
|
prev_console_ = System.Console.Out;
|
||||||
|
System.Console.SetOut(new StreamWriter(Stream.Null));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (prev_console_ != null)
|
||||||
|
System.Console.SetOut(prev_console_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -36,6 +36,8 @@ using Mono.Addins.Setup;
|
||||||
using Mono.Addins.Description;
|
using Mono.Addins.Description;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
|
||||||
|
using Ux = OpenSim.Services.IntegrationService.IUtils;
|
||||||
|
|
||||||
namespace OpenSim.Services.IntegrationService
|
namespace OpenSim.Services.IntegrationService
|
||||||
{
|
{
|
||||||
// This will maintain the plugin repositories and plugins
|
// This will maintain the plugin repositories and plugins
|
||||||
|
@ -55,13 +57,14 @@ namespace OpenSim.Services.IntegrationService
|
||||||
PackageCollection toUninstall;
|
PackageCollection toUninstall;
|
||||||
DependencyCollection unresolved;
|
DependencyCollection unresolved;
|
||||||
|
|
||||||
IProgressStatus ps = new ConsoleProgressStatus(true);
|
IProgressStatus ps = new ConsoleProgressStatus(false);
|
||||||
|
|
||||||
m_Registry.Update(ps);
|
// m_Registry.Update(ps);
|
||||||
|
|
||||||
string name = Addin.GetIdName(args[1]);
|
string name = Addin.GetIdName(args[1]);
|
||||||
string version = Addin.GetIdVersion(args[1]);
|
string version = Addin.GetIdVersion(args[1]);
|
||||||
|
|
||||||
|
|
||||||
AddinRepositoryEntry[] aentry = Repositories.GetAvailableAddin(name, version);
|
AddinRepositoryEntry[] aentry = Repositories.GetAvailableAddin(name, version);
|
||||||
|
|
||||||
foreach (AddinRepositoryEntry ae in aentry)
|
foreach (AddinRepositoryEntry ae in aentry)
|
||||||
|
@ -78,7 +81,9 @@ namespace OpenSim.Services.IntegrationService
|
||||||
return "Install";
|
return "Install";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return "Bomb";
|
return "Bomb";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove plugin
|
// Remove plugin
|
||||||
|
@ -97,9 +102,8 @@ namespace OpenSim.Services.IntegrationService
|
||||||
MainConsole.Instance.OutputFormat("Uninstalling plugin {0}", addin.Id);
|
MainConsole.Instance.OutputFormat("Uninstalling plugin {0}", addin.Id);
|
||||||
AddinManager.Registry.DisableAddin(addin.Id);
|
AddinManager.Registry.DisableAddin(addin.Id);
|
||||||
addin.Enabled = false;
|
addin.Enabled = false;
|
||||||
IProgressStatus ps = new ConsoleProgressStatus(true);
|
IProgressStatus ps = new ConsoleProgressStatus(false);
|
||||||
Uninstall(ps, addin.Id);
|
Uninstall(ps, addin.Id);
|
||||||
// m_Registry.Rebuild(null);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +178,7 @@ namespace OpenSim.Services.IntegrationService
|
||||||
|
|
||||||
public void GetRepository()
|
public void GetRepository()
|
||||||
{
|
{
|
||||||
Repositories.UpdateAllRepositories (new ConsoleProgressStatus (true));
|
Repositories.UpdateAllRepositories (new ConsoleProgressStatus (false));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove a repository from the list
|
// Remove a repository from the list
|
||||||
|
@ -330,13 +334,12 @@ namespace OpenSim.Services.IntegrationService
|
||||||
// AddinManager.Registry.Update();
|
// AddinManager.Registry.Update();
|
||||||
if(m_Registry.IsAddinEnabled(addin.Id))
|
if(m_Registry.IsAddinEnabled(addin.Id))
|
||||||
{
|
{
|
||||||
ConsoleProgressStatus ps = new ConsoleProgressStatus(true);
|
ConsoleProgressStatus ps = new ConsoleProgressStatus(false);
|
||||||
if (!AddinManager.AddinEngine.IsAddinLoaded(addin.Id))
|
if (!AddinManager.AddinEngine.IsAddinLoaded(addin.Id))
|
||||||
{
|
{
|
||||||
AddinManager.Registry.Rebuild(ps);
|
AddinManager.Registry.Rebuild(ps);
|
||||||
AddinManager.AddinEngine.LoadAddin(ps, addin.Id);
|
AddinManager.AddinEngine.LoadAddin(ps, addin.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue