mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +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)
|
if (!enableTask.Result)
|
||||||
return;
|
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));
|
.ContinueWith(this.DisplayErrorContinuation, Locs.ErrorModal_LoadFail(plugin.Name));
|
||||||
|
|
||||||
loadTask.Wait();
|
loadTask.Wait();
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ namespace Dalamud.Plugin.Internal
|
||||||
private readonly FileInfo disabledFile;
|
private readonly FileInfo disabledFile;
|
||||||
private readonly FileInfo testingFile;
|
private readonly FileInfo testingFile;
|
||||||
|
|
||||||
private PluginLoader loader;
|
private PluginLoader? loader;
|
||||||
private Assembly pluginAssembly;
|
private Assembly? pluginAssembly;
|
||||||
private Type? pluginType;
|
private Type? pluginType;
|
||||||
private IDalamudPlugin? instance;
|
private IDalamudPlugin? instance;
|
||||||
|
|
||||||
|
|
@ -112,9 +112,6 @@ namespace Dalamud.Plugin.Internal
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.Manifest = manifest;
|
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.
|
// This converts from the ".disabled" file feature to the manifest instead.
|
||||||
|
|
@ -143,7 +140,7 @@ namespace Dalamud.Plugin.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="DalamudPluginInterface"/> associated with this plugin.
|
/// Gets the <see cref="DalamudPluginInterface"/> associated with this plugin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DalamudPluginInterface DalamudInterface { get; private set; }
|
public DalamudPluginInterface? DalamudInterface { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to the plugin DLL.
|
/// Gets the path to the plugin DLL.
|
||||||
|
|
@ -158,18 +155,18 @@ namespace Dalamud.Plugin.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the current state of the plugin.
|
/// Gets or sets the current state of the plugin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PluginState State { get; protected set; } = PluginState.Unloaded;
|
public PluginState State { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the AssemblyName plugin, populated during <see cref="Load(PluginLoadReason, bool)"/>.
|
/// Gets the AssemblyName plugin, populated during <see cref="Load(PluginLoadReason, bool)"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Plugin type.</returns>
|
/// <returns>Plugin type.</returns>
|
||||||
public AssemblyName? AssemblyName { get; private set; } = null;
|
public AssemblyName? AssemblyName { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the plugin name, directly from the plugin or if it is not loaded from the manifest.
|
/// Gets the plugin name, directly from the plugin or if it is not loaded from the manifest.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name => this.instance?.Name ?? this.Manifest.Name ?? this.DllFile.Name;
|
public string Name => this.instance?.Name ?? this.Manifest.Name;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an optional reason, if the plugin is banned.
|
/// 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")))
|
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 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("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.");
|
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