Implement dalamud-platform launch argument (#1452)

* implement dalamud platform launch arg
* implement cross-platform gamePath fallback
* refactor platform detection heuristic
* add cross platform dalamud runtime detection
This commit is contained in:
marzent 2025-03-24 16:42:24 +01:00 committed by GitHub
parent 9815cf1d88
commit 7cac19ce81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 299 additions and 101 deletions

View file

@ -1,3 +1,4 @@
using System.Runtime.InteropServices;
using Dalamud.Common.Game;
using Newtonsoft.Json;
@ -15,7 +16,7 @@ public record DalamudStartInfo
/// </summary>
public DalamudStartInfo()
{
// ignored
this.Platform = OSPlatform.Create("UNKNOWN");
}
/// <summary>
@ -58,6 +59,12 @@ public record DalamudStartInfo
/// </summary>
public ClientLanguage Language { get; set; } = ClientLanguage.English;
/// <summary>
/// Gets or sets the underlying platform<72>Dalamud runs on.
/// </summary>
[JsonConverter(typeof(OSPlatformConverter))]
public OSPlatform Platform { get; set; }
/// <summary>
/// Gets or sets the current game version code.
/// </summary>