diff --git a/Dalamud/Plugin/PluginManager.cs b/Dalamud/Plugin/PluginManager.cs index 9c0998be2..3279e1fcc 100644 --- a/Dalamud/Plugin/PluginManager.cs +++ b/Dalamud/Plugin/PluginManager.cs @@ -93,12 +93,18 @@ namespace Dalamud.Plugin // If this entire folder has been marked as a disabled plugin, don't even try to load anything var disabledFile = new FileInfo(Path.Combine(dllFile.Directory.FullName, ".disabled")); - if (disabledFile.Exists && !raw) // should raw/dev plugins really not respect this? + if (disabledFile.Exists && !raw) // should raw/dev plugins really not respect this? { Log.Information("Plugin {0} is disabled.", dllFile.FullName); return false; } + var testingFile = new FileInfo(Path.Combine(dllFile.Directory.FullName, ".testing")); + if (testingFile.Exists && this.dalamud.Configuration.DoPluginTest) { + Log.Information("Plugin {0} was testing, but testing is disabled.", dllFile.FullName); + return false; + } + // read the plugin def if present - again, fail before actually trying to load the dll if there is a problem var defJsonFile = new FileInfo(Path.Combine(dllFile.Directory.FullName, $"{Path.GetFileNameWithoutExtension(dllFile.Name)}.json")); diff --git a/Dalamud/Plugin/PluginRepository.cs b/Dalamud/Plugin/PluginRepository.cs index d82917bd1..602f5c358 100644 --- a/Dalamud/Plugin/PluginRepository.cs +++ b/Dalamud/Plugin/PluginRepository.cs @@ -71,6 +71,7 @@ namespace Dalamud.Plugin var outputDir = new DirectoryInfo(Path.Combine(this.pluginDirectory, definition.InternalName, definition.AssemblyVersion)); var dllFile = new FileInfo(Path.Combine(outputDir.FullName, $"{definition.InternalName}.dll")); var disabledFile = new FileInfo(Path.Combine(outputDir.FullName, ".disabled")); + var testingFile = new FileInfo(Path.Combine(outputDir.FullName, ".testing")); var wasDisabled = disabledFile.Exists; if (dllFile.Exists && enableAfterInstall) @@ -118,6 +119,13 @@ namespace Dalamud.Plugin return true; } + if (doTestingDownload) { + testingFile.Create(); + } else { + if (testingFile.Exists) + testingFile.Delete(); + } + return this.dalamud.PluginManager.LoadPluginFromAssembly(dllFile, false, PluginLoadReason.Installer); } catch (Exception e)