mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Plugin prerequisites - Added UI for installing/removing prerequisites
Plugin settings - Added button to reload plugin from disk Confirm dialogs - Made cancel text optional so you can hide the button
This commit is contained in:
1 parent
f1874d9fe3
commit
0cfddcbbaf
25 files changed
+741
-158
No files matched your search
@@ -241,7 +241,16 @@ namespace Artemis.Core.Services
|
||||
}
|
||||
|
||||
foreach (Plugin plugin in _plugins.Where(p => p.Entity.IsEnabled))
|
||||
EnablePlugin(plugin, false, ignorePluginLock);
|
||||
{
|
||||
try
|
||||
{
|
||||
EnablePlugin(plugin, false, ignorePluginLock);
|
||||
}
|
||||
catch (ArtemisPluginPrerequisiteException)
|
||||
{
|
||||
_logger.Warning("Skipped enabling plugin {plugin} because not all prerequisites are met", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
_logger.Debug("Enabled {count} plugin(s)", _plugins.Count(p => p.IsEnabled));
|
||||
// ReSharper restore InconsistentlySynchronizedField
|
||||
@@ -372,6 +381,9 @@ namespace Artemis.Core.Services
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plugin.ArePrerequisitesMet())
|
||||
throw new ArtemisPluginPrerequisiteException(plugin, null, "Cannot enable a plugin whose prerequisites aren't all met");
|
||||
|
||||
// Create the Ninject child kernel and load the module
|
||||
plugin.Kernel = new ChildKernel(_kernel, new PluginModule(plugin));
|
||||
OnPluginEnabling(new PluginEventArgs(plugin));
|
||||
|
||||
Reference in new issue
Block a user