mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-14 03:47:43 +01:00
Make all versioning functions internal, move to separate class
This commit is contained in:
parent
a1409096fd
commit
20af5b40c7
20 changed files with 142 additions and 130 deletions
|
|
@ -1790,7 +1790,7 @@ internal class PluginManager : IInternalDisposableService
|
|||
var updates = this.AvailablePlugins
|
||||
.Where(remoteManifest => plugin.Manifest.InternalName == remoteManifest.InternalName)
|
||||
.Where(remoteManifest => plugin.Manifest.InstalledFromUrl == remoteManifest.SourceRepo.PluginMasterUrl || !remoteManifest.SourceRepo.IsThirdParty)
|
||||
.Where(remoteManifest => remoteManifest.MinimumDalamudVersion == null || Util.AssemblyVersionParsed >= remoteManifest.MinimumDalamudVersion)
|
||||
.Where(remoteManifest => remoteManifest.MinimumDalamudVersion == null || Versioning.GetAssemblyVersionParsed() >= remoteManifest.MinimumDalamudVersion)
|
||||
.Where(remoteManifest =>
|
||||
{
|
||||
var useTesting = this.UseTesting(remoteManifest);
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ internal class LocalPlugin : IAsyncDisposable
|
|||
if (!this.CheckPolicy())
|
||||
throw new PluginPreconditionFailedException($"Unable to load {this.Name} as a load policy forbids it");
|
||||
|
||||
if (this.Manifest.MinimumDalamudVersion != null && this.Manifest.MinimumDalamudVersion > Util.AssemblyVersionParsed)
|
||||
if (this.Manifest.MinimumDalamudVersion != null && this.Manifest.MinimumDalamudVersion > Versioning.GetAssemblyVersionParsed())
|
||||
throw new PluginPreconditionFailedException($"Unable to load {this.Name}, Dalamud version is lower than minimum required version {this.Manifest.MinimumDalamudVersion}");
|
||||
|
||||
this.State = PluginState.Loading;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ internal class PluginRepository
|
|||
},
|
||||
UserAgent =
|
||||
{
|
||||
new ProductInfoHeaderValue("Dalamud", Util.AssemblyVersion),
|
||||
new ProductInfoHeaderValue("Dalamud", Versioning.GetAssemblyVersion()),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -164,7 +164,7 @@ internal class PluginRepository
|
|||
}
|
||||
|
||||
this.PluginMaster = pluginMaster.Where(this.IsValidManifest).ToList().AsReadOnly();
|
||||
|
||||
|
||||
// API9 HACK: Force IsHide to false, we should remove that
|
||||
if (!this.IsThirdParty)
|
||||
{
|
||||
|
|
@ -197,7 +197,7 @@ internal class PluginRepository
|
|||
Log.Error("Plugin {PluginName} in {RepoLink} has an invalid Name.", manifest.InternalName, this.PluginMasterUrl);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
if (manifest.AssemblyVersion == null)
|
||||
{
|
||||
|
|
@ -224,7 +224,7 @@ internal class PluginRepository
|
|||
request.Headers.CacheControl = new CacheControlHeaderValue { NoCache = true };
|
||||
|
||||
using var requestCts = new CancellationTokenSource(TimeSpan.FromSeconds(timeout));
|
||||
|
||||
|
||||
return await httpClient.SendAsync(request, requestCts.Token);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue