From 03304b3495ff03b00e26296d5d2a981eda75b401 Mon Sep 17 00:00:00 2001 From: goaaats Date: Sun, 19 Jun 2022 12:45:12 +0200 Subject: [PATCH] feat: actually set BootLogPath from injector --- Dalamud.Injector/EntryPoint.cs | 5 ++--- Dalamud/DalamudStartInfo.cs | 7 +++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dalamud.Injector/EntryPoint.cs b/Dalamud.Injector/EntryPoint.cs index 24da8b17b..9a10eece0 100644 --- a/Dalamud.Injector/EntryPoint.cs +++ b/Dalamud.Injector/EntryPoint.cs @@ -187,8 +187,6 @@ namespace Dalamud.Injector var logPath = GetLogPath("dalamud.injector"); - Environment.SetEnvironmentVariable("DALAMUD_BOOT_LOGFILE", GetLogPath("dalamud.boot")); - CullLogFile(logPath, 1 * 1024 * 1024); Log.Logger = new LoggerConfiguration() @@ -321,9 +319,10 @@ namespace Dalamud.Injector startInfo.GameVersion = null; // Set boot defaults + startInfo.BootLogPath = GetLogPath("dalamud.boot"); startInfo.BootEnabledGameFixes = new List { "prevent_devicechange_crashes", "disable_game_openprocess_access_check", "redirect_openprocess" }; startInfo.BootDotnetOpenProcessHookMode = 0; - //startInfo.BootUnhookDlls = new List() { "kernel32.dll", "ntdll.dll", "user32.dll" }; + // startInfo.BootUnhookDlls = new List() { "kernel32.dll", "ntdll.dll", "user32.dll" }; return startInfo; } diff --git a/Dalamud/DalamudStartInfo.cs b/Dalamud/DalamudStartInfo.cs index 40c397e49..e9bbc6f46 100644 --- a/Dalamud/DalamudStartInfo.cs +++ b/Dalamud/DalamudStartInfo.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; + using Dalamud.Game; using Newtonsoft.Json; @@ -33,6 +34,7 @@ namespace Dalamud this.Language = other.Language; this.GameVersion = other.GameVersion; this.DelayInitializeMs = other.DelayInitializeMs; + this.BootLogPath = other.BootLogPath; this.BootShowConsole = other.BootShowConsole; this.BootDisableFallbackConsole = other.BootDisableFallbackConsole; this.BootWaitMessageBox = other.BootWaitMessageBox; @@ -85,6 +87,11 @@ namespace Dalamud /// public int DelayInitializeMs { get; set; } = 0; + /// + /// 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. ///