mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
feat: add orphaned plugins regardless, inform users in installer
This commit is contained in:
parent
12722c776d
commit
ce8e088044
2 changed files with 29 additions and 7 deletions
|
|
@ -1180,6 +1180,12 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
||||||
|
|
||||||
ImGui.PopStyleColor();
|
ImGui.PopStyleColor();
|
||||||
}
|
}
|
||||||
|
else if (plugin is { IsOrphaned: true })
|
||||||
|
{
|
||||||
|
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||||
|
ImGui.TextWrapped(Locs.PluginBody_Orphaned);
|
||||||
|
ImGui.PopStyleColor();
|
||||||
|
}
|
||||||
else if (plugin is { State: PluginState.LoadError or PluginState.DependencyResolutionFailed }) // Load failed warning
|
else if (plugin is { State: PluginState.LoadError or PluginState.DependencyResolutionFailed }) // Load failed warning
|
||||||
{
|
{
|
||||||
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||||
|
|
@ -1517,6 +1523,13 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
||||||
trouble = true;
|
trouble = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Orphaned
|
||||||
|
if (plugin.IsOrphaned)
|
||||||
|
{
|
||||||
|
label += Locs.PluginTitleMod_OrphanedError;
|
||||||
|
trouble = true;
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.PushID($"installed{index}{plugin.Manifest.InternalName}");
|
ImGui.PushID($"installed{index}{plugin.Manifest.InternalName}");
|
||||||
var hasChangelog = !plugin.Manifest.Changelog.IsNullOrEmpty();
|
var hasChangelog = !plugin.Manifest.Changelog.IsNullOrEmpty();
|
||||||
|
|
||||||
|
|
@ -1691,6 +1704,9 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
||||||
// Disable everything if the plugin is outdated
|
// Disable everything if the plugin is outdated
|
||||||
disabled = disabled || (plugin.IsOutdated && !configuration.LoadAllApiLevels) || plugin.IsBanned;
|
disabled = disabled || (plugin.IsOutdated && !configuration.LoadAllApiLevels) || plugin.IsBanned;
|
||||||
|
|
||||||
|
// Disable everything if the plugin is orphaned
|
||||||
|
disabled = disabled || plugin.IsOrphaned;
|
||||||
|
|
||||||
// Disable everything if the plugin failed to load
|
// Disable everything if the plugin failed to load
|
||||||
disabled = disabled || plugin.State == PluginState.LoadError || plugin.State == PluginState.DependencyResolutionFailed;
|
disabled = disabled || plugin.State == PluginState.LoadError || plugin.State == PluginState.DependencyResolutionFailed;
|
||||||
|
|
||||||
|
|
@ -1904,7 +1920,7 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
||||||
private void DrawDeletePluginButton(LocalPlugin plugin)
|
private void DrawDeletePluginButton(LocalPlugin plugin)
|
||||||
{
|
{
|
||||||
var unloaded = plugin.State == PluginState.Unloaded;
|
var unloaded = plugin.State == PluginState.Unloaded;
|
||||||
var showButton = unloaded && (plugin.IsDev || plugin.IsOutdated || plugin.IsBanned);
|
var showButton = unloaded && (plugin.IsDev || plugin.IsOutdated || plugin.IsBanned || plugin.IsOrphaned);
|
||||||
|
|
||||||
if (!showButton)
|
if (!showButton)
|
||||||
return;
|
return;
|
||||||
|
|
@ -2264,6 +2280,8 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
||||||
public static string PluginTitleMod_OutdatedError => Loc.Localize("InstallerOutdatedError", " (outdated)");
|
public static string PluginTitleMod_OutdatedError => Loc.Localize("InstallerOutdatedError", " (outdated)");
|
||||||
|
|
||||||
public static string PluginTitleMod_BannedError => Loc.Localize("InstallerBannedError", " (automatically disabled)");
|
public static string PluginTitleMod_BannedError => Loc.Localize("InstallerBannedError", " (automatically disabled)");
|
||||||
|
|
||||||
|
public static string PluginTitleMod_OrphanedError => Loc.Localize("InstallerOrphanedError", " (unknown repository)");
|
||||||
|
|
||||||
public static string PluginTitleMod_New => Loc.Localize("InstallerNewPlugin ", " New!");
|
public static string PluginTitleMod_New => Loc.Localize("InstallerNewPlugin ", " New!");
|
||||||
|
|
||||||
|
|
@ -2299,6 +2317,8 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
||||||
|
|
||||||
public static string PluginBody_Outdated => Loc.Localize("InstallerOutdatedPluginBody ", "This plugin is outdated and incompatible at the moment. Please wait for it to be updated by its author.");
|
public static string PluginBody_Outdated => Loc.Localize("InstallerOutdatedPluginBody ", "This plugin is outdated and incompatible at the moment. Please wait for it to be updated by its author.");
|
||||||
|
|
||||||
|
public static string PluginBody_Orphaned => Loc.Localize("InstallerOrphanedPluginBody ", "This plugin's source repository is no longer available. You may need to reinstall it from its repository, or re-add the repository.");
|
||||||
|
|
||||||
public static string PluginBody_LoadFailed => Loc.Localize("InstallerLoadFailedPluginBody ", "This plugin failed to load. Please contact the author for more information.");
|
public static string PluginBody_LoadFailed => Loc.Localize("InstallerLoadFailedPluginBody ", "This plugin failed to load. Please contact the author for more information.");
|
||||||
|
|
||||||
public static string PluginBody_Banned => Loc.Localize("InstallerBannedPluginBody ", "This plugin was automatically disabled due to incompatibilities and is not available at the moment. Please wait for it to be updated by its author.");
|
public static string PluginBody_Banned => Loc.Localize("InstallerBannedPluginBody ", "This plugin was automatically disabled due to incompatibilities and is not available at the moment. Please wait for it to be updated by its author.");
|
||||||
|
|
|
||||||
|
|
@ -658,11 +658,8 @@ internal partial class PluginManager : IDisposable, IServiceType
|
||||||
manifest.Testing = true;
|
manifest.Testing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (repoManifest.SourceRepo.IsThirdParty)
|
// Document the url the plugin was installed from
|
||||||
{
|
manifest.InstalledFromUrl = repoManifest.SourceRepo.PluginMasterUrl;
|
||||||
// Only document the url if it came from a third party repo.
|
|
||||||
manifest.InstalledFromUrl = repoManifest.SourceRepo.PluginMasterUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
manifest.Save(manifestFile);
|
manifest.Save(manifestFile);
|
||||||
|
|
||||||
|
|
@ -740,9 +737,14 @@ internal partial class PluginManager : IDisposable, IServiceType
|
||||||
}
|
}
|
||||||
else if (plugin.IsOutdated)
|
else if (plugin.IsOutdated)
|
||||||
{
|
{
|
||||||
// Out of date plugins get added so they can be updated.
|
// Out of date plugins get added, so they can be updated.
|
||||||
Log.Information(ex, $"Plugin was outdated, adding anyways: {dllFile.Name}");
|
Log.Information(ex, $"Plugin was outdated, adding anyways: {dllFile.Name}");
|
||||||
}
|
}
|
||||||
|
else if (plugin.IsOrphaned)
|
||||||
|
{
|
||||||
|
// Orphaned plugins get added, so that users aren't confused.
|
||||||
|
Log.Information(ex, $"Plugin was orphaned, adding anyways: {dllFile.Name}");
|
||||||
|
}
|
||||||
else if (isBoot)
|
else if (isBoot)
|
||||||
{
|
{
|
||||||
// During boot load, plugins always get added to the list so they can be fiddled with in the UI
|
// During boot load, plugins always get added to the list so they can be fiddled with in the UI
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue