mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: always reload when loading a devplugin
This commit is contained in:
parent
25fbfd5cc1
commit
c142cc7167
2 changed files with 8 additions and 11 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
|||
/// <summary>
|
||||
/// Gets the <see cref="DalamudPluginInterface"/> associated with this plugin.
|
||||
/// </summary>
|
||||
public DalamudPluginInterface DalamudInterface { get; private set; }
|
||||
public DalamudPluginInterface? DalamudInterface { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the plugin DLL.
|
||||
|
|
@ -158,18 +155,18 @@ namespace Dalamud.Plugin.Internal
|
|||
/// <summary>
|
||||
/// Gets or sets the current state of the plugin.
|
||||
/// </summary>
|
||||
public PluginState State { get; protected set; } = PluginState.Unloaded;
|
||||
public PluginState State { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the AssemblyName plugin, populated during <see cref="Load(PluginLoadReason, bool)"/>.
|
||||
/// </summary>
|
||||
/// <returns>Plugin type.</returns>
|
||||
public AssemblyName? AssemblyName { get; private set; } = null;
|
||||
public AssemblyName? AssemblyName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the plugin name, directly from the plugin or if it is not loaded from the manifest.
|
||||
/// </summary>
|
||||
public string Name => this.instance?.Name ?? this.Manifest.Name ?? this.DllFile.Name;
|
||||
public string Name => this.instance?.Name ?? this.Manifest.Name;
|
||||
|
||||
/// <summary>
|
||||
/// 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. \"<Private>False</Private>\" needs to be set in your csproj.");
|
||||
Log.Error("If you are using ILMerge, do not merge anything other than your direct dependencies.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue