mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
feat: add staging/beta key
This commit is contained in:
parent
0200468149
commit
25e01599ec
3 changed files with 21 additions and 9 deletions
|
|
@ -16,6 +16,11 @@ namespace Dalamud.Configuration.Internal
|
|||
[Serializable]
|
||||
internal sealed class DalamudConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Currently used beta key for Dalamud staging builds.
|
||||
/// </summary>
|
||||
public const string DalamudCurrentBetaKey = "Testing6015";
|
||||
|
||||
private static readonly JsonSerializerSettings SerializerSettings = new()
|
||||
{
|
||||
TypeNameHandling = TypeNameHandling.All,
|
||||
|
|
@ -78,9 +83,9 @@ namespace Dalamud.Configuration.Internal
|
|||
public bool DoPluginTest { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not Dalamud testing builds should be used.
|
||||
/// Gets or sets a key to opt into Dalamud staging builds.
|
||||
/// </summary>
|
||||
public bool DoDalamudTest { get; set; } = false;
|
||||
public string? DalamudBetaKey { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not XL should download the Dalamud .NET runtime.
|
||||
|
|
@ -198,7 +203,7 @@ namespace Dalamud.Configuration.Internal
|
|||
public bool IsAntiAntiDebugEnabled { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the kind of beta to download when <see cref="DoDalamudTest"/> is set to true.
|
||||
/// Gets or sets the kind of beta to download when <see cref="DalamudBetaKey"/> matches the server value.
|
||||
/// </summary>
|
||||
public string DalamudBetaKind { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -384,8 +384,10 @@ namespace Dalamud.Interface.Internal
|
|||
if (config.DoDalamudTest)
|
||||
{
|
||||
#endif
|
||||
#pragma warning disable SA1137
|
||||
ImGui.SetCursorPos(cursor);
|
||||
ImGui.Image(this.logoTexture.ImGuiHandle, imageSize);
|
||||
#pragma warning restore SA1137
|
||||
#if !DEBUG
|
||||
}
|
||||
#endif
|
||||
|
|
@ -519,9 +521,10 @@ namespace Dalamud.Interface.Internal
|
|||
|
||||
ImGui.Separator();
|
||||
|
||||
if (ImGui.MenuItem("Enable Dalamud testing", string.Empty, configuration.DoDalamudTest))
|
||||
var isBeta = configuration.DalamudBetaKey == DalamudConfiguration.DalamudCurrentBetaKey;
|
||||
if (ImGui.MenuItem("Enable Dalamud testing", string.Empty, isBeta))
|
||||
{
|
||||
configuration.DoDalamudTest ^= true;
|
||||
configuration.DalamudBetaKey = isBeta ? null : DalamudConfiguration.DalamudCurrentBetaKey;
|
||||
configuration.Save();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,10 +70,10 @@ namespace Dalamud.Support
|
|||
DalamudGitHash = Util.GetGitHash(),
|
||||
GameVersion = startInfo.GameVersion.ToString(),
|
||||
Language = startInfo.Language.ToString(),
|
||||
DoDalamudTest = configuration.DoDalamudTest,
|
||||
BetaKey = configuration.DalamudBetaKey,
|
||||
DoPluginTest = configuration.DoPluginTest,
|
||||
InterfaceLoaded = interfaceManager?.IsReady ?? false,
|
||||
ThirdRepo = configuration.ThirdRepoList,
|
||||
HasThirdRepo = configuration.ThirdRepoList is { Count: > 0 },
|
||||
ForcedMinHook = EnvironmentConfiguration.DalamudForceMinHook,
|
||||
};
|
||||
|
||||
|
|
@ -107,7 +107,9 @@ namespace Dalamud.Support
|
|||
|
||||
public string Language { get; set; }
|
||||
|
||||
public bool DoDalamudTest { get; set; }
|
||||
public bool DoDalamudTest => false;
|
||||
|
||||
public string? BetaKey { get; set; }
|
||||
|
||||
public bool DoPluginTest { get; set; }
|
||||
|
||||
|
|
@ -115,7 +117,9 @@ namespace Dalamud.Support
|
|||
|
||||
public bool ForcedMinHook { get; set; }
|
||||
|
||||
public List<ThirdPartyRepoSettings> ThirdRepo { get; set; }
|
||||
public List<ThirdPartyRepoSettings> ThirdRepo => new();
|
||||
|
||||
public bool HasThirdRepo { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue