using System.Runtime.InteropServices;
using Dalamud.Common.Game;
using Newtonsoft.Json;
namespace Dalamud.Common;
///
/// Struct containing information needed to initialize Dalamud.
/// Modify DalamudStartInfo.h and DalamudStartInfo.cpp along with this record.
///
[Serializable]
public record DalamudStartInfo
{
///
/// Initializes a new instance of the class.
///
public DalamudStartInfo()
{
this.Platform = OSPlatform.Create("UNKNOWN");
}
///
/// Gets or sets the Dalamud load method.
///
public LoadMethod LoadMethod { get; set; }
///
/// Gets or sets the working directory of the XIVLauncher installations.
///
public string? WorkingDirectory { get; set; }
///
/// Gets or sets the path to the configuration file.
///
public string? ConfigurationPath { get; set; }
///
/// Gets or sets the path of the log files.
///
public string? LogPath { get; set; }
///
/// Gets or sets the name of the log file.
///
public string? LogName { get; set; }
///
/// Gets or sets the path to the directory for installed plugins.
///
public string? PluginDirectory { get; set; }
///
/// Gets or sets the path to core Dalamud assets.
///
public string? AssetDirectory { get; set; }
///
/// Gets or sets the language of the game client.
///
public ClientLanguage Language { get; set; } = ClientLanguage.English;
///
/// Gets or sets the underlying platform�Dalamud runs on.
///
[JsonConverter(typeof(OSPlatformConverter))]
public OSPlatform Platform { get; set; }
///
/// Gets or sets the current game version code.
///
[JsonConverter(typeof(GameVersionConverter))]
public GameVersion? GameVersion { get; set; }
///
/// Gets or sets troubleshooting information to attach when generating a tspack file.
///
public string? TroubleshootingPackData { get; set; }
///
/// Gets or sets a value that specifies how much to wait before a new Dalamud session.
///
public int DelayInitializeMs { get; set; }
///
/// Gets or sets a value indicating whether no plugins should be loaded.
///
public bool NoLoadPlugins { get; set; }
///
/// Gets or sets a value indicating whether no third-party plugins should be loaded.
///
public bool NoLoadThirdPartyPlugins { get; set; }
///
/// Gets or sets the path the boot log file is supposed to be written to.
///
public string? BootLogPath { get; set; }
///
/// Gets or sets a value indicating whether a Boot console should be shown.
///
public bool BootShowConsole { get; set; }
///
/// Gets or sets a value indicating whether the fallback console should be shown, if needed.
///
public bool BootDisableFallbackConsole { get; set; }
///
/// Gets or sets a flag indicating where Dalamud should wait with a message box.
///
public int BootWaitMessageBox { get; set; }
///
/// Gets or sets a value indicating whether Dalamud should wait for a debugger to be attached before initializing.
///
public bool BootWaitDebugger { get; set; }
///
/// Gets or sets a value indicating whether the VEH should be enabled.
///
public bool BootVehEnabled { get; set; }
///
/// Gets or sets a value indicating whether the VEH should be doing full crash dumps.
///
public bool BootVehFull { get; set; }
///
/// Gets or sets a value indicating whether ETW should be enabled.
///
public bool BootEnableEtw { get; set; }
///
/// Gets or sets a value indicating whether to enable legacy corrupted state exceptions.
///
public bool BootDisableLegacyCorruptedStateExceptions { get; set; }
///
/// Gets or sets a value choosing the OpenProcess hookmode.
///
public int BootDotnetOpenProcessHookMode { get; set; }
///
/// Gets or sets a list of enabled game fixes.
///
public List? BootEnabledGameFixes { get; set; }
///
/// Gets or sets a list of DLLs that should be unhooked.
///
public List? BootUnhookDlls { get; set; }
///
/// Gets or sets a value indicating whether to show crash handler console window.
///
public bool CrashHandlerShow { get; set; }
///
/// Gets or sets a value indicating how to deal with unhandled exceptions.
///
public UnhandledExceptionHandlingMode UnhandledException { get; set; }
}