Merge remote-tracking branch 'origin/master' into v9-rollup

This commit is contained in:
github-actions[bot] 2023-09-10 21:53:08 +00:00
commit 38a4a7f580
36 changed files with 1336 additions and 279 deletions

View file

@ -862,7 +862,7 @@ internal partial class PluginManager : IDisposable, IServiceType
}
// Document the url the plugin was installed from
manifest.InstalledFromUrl = repoManifest.SourceRepo.IsThirdParty ? repoManifest.SourceRepo.PluginMasterUrl : LocalPluginManifest.FlagMainRepo;
manifest.InstalledFromUrl = repoManifest.SourceRepo.IsThirdParty ? repoManifest.SourceRepo.PluginMasterUrl : SpecialPluginSource.MainRepo;
manifest.Save(manifestFile, "installation");

View file

@ -232,4 +232,7 @@ internal class Profile
if (apply)
await this.manager.ApplyAllWantStatesAsync();
}
/// <inheritdoc/>
public override string ToString() => $"{this.Guid} ({this.Name})";
}

View file

@ -13,18 +13,6 @@ namespace Dalamud.Plugin.Internal.Types.Manifest;
/// </summary>
internal record LocalPluginManifest : PluginManifest, ILocalPluginManifest
{
/// <summary>
/// Flag indicating that a plugin was installed from the official repo.
/// </summary>
[JsonIgnore]
public const string FlagMainRepo = "OFFICIAL";
/// <summary>
/// Flag indicating that a plugin is a dev plugin..
/// </summary>
[JsonIgnore]
public const string FlagDevPlugin = "DEVPLUGIN";
/// <summary>
/// Gets or sets a value indicating whether the plugin is disabled and should not be loaded.
/// This value supersedes the ".disabled" file functionality and should not be included in the plugin master.
@ -51,7 +39,7 @@ internal record LocalPluginManifest : PluginManifest, ILocalPluginManifest
/// Gets a value indicating whether this manifest is associated with a plugin that was installed from a third party
/// repo. Unless the manifest has been manually modified, this is determined by the InstalledFromUrl being null.
/// </summary>
public bool IsThirdParty => !this.InstalledFromUrl.IsNullOrEmpty() && this.InstalledFromUrl != FlagMainRepo;
public bool IsThirdParty => !this.InstalledFromUrl.IsNullOrEmpty() && this.InstalledFromUrl != SpecialPluginSource.MainRepo;
/// <summary>
/// Gets the effective version of this plugin.

View file

@ -0,0 +1,17 @@
namespace Dalamud.Plugin.Internal.Types.Manifest;
/// <summary>
/// A fake enum representing "special" sources for plugins.
/// </summary>
public static class SpecialPluginSource
{
/// <summary>
/// Indication that this plugin came from the official Dalamud repository.
/// </summary>
public const string MainRepo = "OFFICIAL";
/// <summary>
/// Indication that this plugin is loaded as a dev plugin. See also <see cref="DalamudPluginInterface.IsDev"/>.
/// </summary>
public const string DevPlugin = "DEVPLUGIN";
}