mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #568 from daemitus/devUpdate
update dev plugin workflow + bugfix
This commit is contained in:
commit
56d1ad0bc1
2 changed files with 30 additions and 13 deletions
|
|
@ -1361,7 +1361,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
{
|
||||
this.installStatus = OperationStatus.InProgress;
|
||||
|
||||
Task.Run(() => pluginManager.UpdateSinglePluginAsync(update, true, false))
|
||||
Task.Run(async () => await pluginManager.UpdateSinglePluginAsync(update, true, false))
|
||||
.ContinueWith(task =>
|
||||
{
|
||||
// There is no need to set as Complete for an individual plugin installation
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@ namespace Dalamud.Plugin.Internal
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update all plugins.
|
||||
/// Update all non-dev plugins.
|
||||
/// </summary>
|
||||
/// <param name="dryRun">Perform a dry run, don't install anything.</param>
|
||||
/// <returns>Success or failure and a list of updated plugin metadata.</returns>
|
||||
|
|
@ -698,6 +698,10 @@ namespace Dalamud.Plugin.Internal
|
|||
// Prevent collection was modified errors
|
||||
foreach (var plugin in this.UpdatablePlugins)
|
||||
{
|
||||
// Can't update that!
|
||||
if (plugin.InstalledPlugin.IsDev)
|
||||
return null;
|
||||
|
||||
var result = await this.UpdateSinglePluginAsync(plugin, false, dryRun);
|
||||
if (result != null)
|
||||
updatedList.Add(result);
|
||||
|
|
@ -721,10 +725,6 @@ namespace Dalamud.Plugin.Internal
|
|||
{
|
||||
var plugin = metadata.InstalledPlugin;
|
||||
|
||||
// Can't update that!
|
||||
if (plugin.IsDev)
|
||||
return null;
|
||||
|
||||
var updateStatus = new PluginUpdateStatus
|
||||
{
|
||||
InternalName = plugin.Manifest.InternalName,
|
||||
|
|
@ -753,16 +753,33 @@ namespace Dalamud.Plugin.Internal
|
|||
}
|
||||
}
|
||||
|
||||
try
|
||||
if (plugin.IsDev)
|
||||
{
|
||||
plugin.Disable();
|
||||
this.InstalledPlugins = this.InstalledPlugins.Remove(plugin);
|
||||
try
|
||||
{
|
||||
plugin.DllFile.Delete();
|
||||
this.InstalledPlugins = this.InstalledPlugins.Remove(plugin);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error during delete (update)");
|
||||
updateStatus.WasUpdated = false;
|
||||
return updateStatus;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
else
|
||||
{
|
||||
Log.Error(ex, "Error during disable (update)");
|
||||
updateStatus.WasUpdated = false;
|
||||
return updateStatus;
|
||||
try
|
||||
{
|
||||
plugin.Disable();
|
||||
this.InstalledPlugins = this.InstalledPlugins.Remove(plugin);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error during disable (update)");
|
||||
updateStatus.WasUpdated = false;
|
||||
return updateStatus;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue