mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
never ever update dev plugins
This commit is contained in:
parent
869ce9568d
commit
4328826c86
2 changed files with 14 additions and 30 deletions
|
|
@ -2176,7 +2176,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
this.DrawSendFeedbackButton(plugin.Manifest, plugin.IsTesting);
|
this.DrawSendFeedbackButton(plugin.Manifest, plugin.IsTesting);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (availablePluginUpdate != default)
|
if (availablePluginUpdate != default && ! plugin.IsDev)
|
||||||
this.DrawUpdateSinglePluginButton(availablePluginUpdate);
|
this.DrawUpdateSinglePluginButton(availablePluginUpdate);
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
|
||||||
|
|
@ -1144,44 +1144,28 @@ Thanks and have fun!";
|
||||||
|
|
||||||
if (plugin.IsDev)
|
if (plugin.IsDev)
|
||||||
{
|
{
|
||||||
// TODO: Does this ever work? Why? We should never update devplugins
|
throw new Exception("We should never update a dev plugin");
|
||||||
try
|
|
||||||
{
|
|
||||||
plugin.DllFile.Delete();
|
|
||||||
lock (this.pluginListLock)
|
|
||||||
{
|
|
||||||
this.InstalledPlugins = this.InstalledPlugins.Remove(plugin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Log.Error(ex, "Error during delete (update)");
|
|
||||||
updateStatus.WasUpdated = false;
|
|
||||||
return updateStatus;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
try
|
// TODO: Why were we ever doing this? We should never be loading the old version in the first place
|
||||||
{
|
/*
|
||||||
// TODO: Why were we ever doing this? We should never be loading the old version in the first place
|
|
||||||
/*
|
|
||||||
if (!plugin.IsDisabled)
|
if (!plugin.IsDisabled)
|
||||||
plugin.Disable();
|
plugin.Disable();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lock (this.pluginListLock)
|
lock (this.pluginListLock)
|
||||||
{
|
|
||||||
this.InstalledPlugins = this.InstalledPlugins.Remove(plugin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
{
|
||||||
Log.Error(ex, "Error during disable (update)");
|
this.InstalledPlugins = this.InstalledPlugins.Remove(plugin);
|
||||||
updateStatus.WasUpdated = false;
|
|
||||||
return updateStatus;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex, "Error during disable (update)");
|
||||||
|
updateStatus.WasUpdated = false;
|
||||||
|
return updateStatus;
|
||||||
|
}
|
||||||
|
|
||||||
// We need to handle removed DTR nodes here, as otherwise, plugins will not be able to re-add their bar entries after updates.
|
// We need to handle removed DTR nodes here, as otherwise, plugins will not be able to re-add their bar entries after updates.
|
||||||
var dtr = Service<DtrBar>.Get();
|
var dtr = Service<DtrBar>.Get();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue