diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs index 07b86c7fa..786fba131 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs @@ -1606,7 +1606,7 @@ namespace Dalamud.Interface.Internal.Windows if (!enableTask.Result) return; - var loadTask = Task.Run(() => plugin.Load(PluginLoadReason.Installer)) + var loadTask = Task.Run(() => plugin.Load(PluginLoadReason.Installer, plugin is LocalDevPlugin)) .ContinueWith(this.DisplayErrorContinuation, Locs.ErrorModal_LoadFail(plugin.Name)); loadTask.Wait(); diff --git a/Dalamud/Plugin/Internal/LocalPlugin.cs b/Dalamud/Plugin/Internal/LocalPlugin.cs index 1c6edd15a..58f845455 100644 --- a/Dalamud/Plugin/Internal/LocalPlugin.cs +++ b/Dalamud/Plugin/Internal/LocalPlugin.cs @@ -25,8 +25,8 @@ namespace Dalamud.Plugin.Internal private readonly FileInfo disabledFile; private readonly FileInfo testingFile; - private PluginLoader loader; - private Assembly pluginAssembly; + private PluginLoader? loader; + private Assembly? pluginAssembly; private Type? pluginType; private IDalamudPlugin? instance; @@ -112,9 +112,6 @@ namespace Dalamud.Plugin.Internal else { this.Manifest = manifest; - - if (!manifest.CheckSanity()) - throw new InvalidOperationException("Plugin manifest is not sane."); } // This converts from the ".disabled" file feature to the manifest instead. @@ -143,7 +140,7 @@ namespace Dalamud.Plugin.Internal /// /// Gets the associated with this plugin. /// - public DalamudPluginInterface DalamudInterface { get; private set; } + public DalamudPluginInterface? DalamudInterface { get; private set; } /// /// Gets the path to the plugin DLL. @@ -158,18 +155,18 @@ namespace Dalamud.Plugin.Internal /// /// Gets or sets the current state of the plugin. /// - public PluginState State { get; protected set; } = PluginState.Unloaded; + public PluginState State { get; protected set; } /// /// Gets the AssemblyName plugin, populated during . /// /// Plugin type. - public AssemblyName? AssemblyName { get; private set; } = null; + public AssemblyName? AssemblyName { get; private set; } /// /// Gets the plugin name, directly from the plugin or if it is not loaded from the manifest. /// - public string Name => this.instance?.Name ?? this.Manifest.Name ?? this.DllFile.Name; + public string Name => this.instance?.Name ?? this.Manifest.Name; /// /// Gets an optional reason, if the plugin is banned. @@ -262,7 +259,7 @@ namespace Dalamud.Plugin.Internal if (this.DllFile.DirectoryName != null && File.Exists(Path.Combine(this.DllFile.DirectoryName, "Dalamud.dll"))) { - Log.Error("==== IMPORTANT MESSAGE TO {0}, THE DEVELOPER OF {1} ====", this.Manifest.Author, this.Manifest.InternalName); + Log.Error("==== IMPORTANT MESSAGE TO {0}, THE DEVELOPER OF {1} ====", this.Manifest.Author!, this.Manifest.InternalName); Log.Error("YOU ARE INCLUDING DALAMUD DEPENDENCIES IN YOUR BUILDS!!!"); Log.Error("You may not be able to load your plugin. \"False\" needs to be set in your csproj."); Log.Error("If you are using ILMerge, do not merge anything other than your direct dependencies.");