mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Fix dev plugin dependency loading when not auto-load
This commit is contained in:
parent
264c85b0dc
commit
c0545c0b52
2 changed files with 15 additions and 5 deletions
|
|
@ -1606,7 +1606,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
if (!enableTask.Result)
|
||||
return;
|
||||
|
||||
var loadTask = Task.Run(() => plugin.Load(PluginLoadReason.Installer, plugin is LocalDevPlugin))
|
||||
var loadTask = Task.Run(() => plugin.Load(PluginLoadReason.Installer))
|
||||
.ContinueWith(this.DisplayErrorContinuation, Locs.ErrorModal_LoadFail(plugin.Name));
|
||||
|
||||
loadTask.Wait();
|
||||
|
|
|
|||
|
|
@ -271,13 +271,23 @@ namespace Dalamud.Plugin.Internal
|
|||
{
|
||||
this.loader ??= PluginLoader.CreateFromAssemblyFile(this.DllFile.FullName, this.SetupLoaderConfig);
|
||||
|
||||
if (reloading)
|
||||
if (reloading || this.IsDev)
|
||||
{
|
||||
this.loader.Reload();
|
||||
|
||||
// Reload the manifest in-case there were changes here too.
|
||||
if (this.IsDev)
|
||||
{
|
||||
// If a dev plugin is set to not autoload on boot, but we want to reload it at the arbitrary load
|
||||
// time, we need to essentially "Unload" the plugin, but we can't call plugin.Unload because of the
|
||||
// load state checks. Null any references to the assembly and types, then proceed with regular reload
|
||||
// operations.
|
||||
this.pluginAssembly = null;
|
||||
this.pluginType = null;
|
||||
}
|
||||
|
||||
this.loader.Reload();
|
||||
|
||||
if (this.IsDev)
|
||||
{
|
||||
// Reload the manifest in-case there were changes here too.
|
||||
var manifestFile = LocalPluginManifest.GetManifestFile(this.DllFile);
|
||||
if (manifestFile.Exists)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue