Expose a DisplayBepInExVersion (#556)

This commit is contained in:
js6pak authored and GitHub committed 2026-06-11 12:25:33 +02:00
1 parent a06688e85b
commit bd467c9af6
2 files changed
+9 -6

No files matched your search

+6
View File
@@ -19,6 +19,12 @@ public static class Paths
Version.Parse(MetadataHelper.GetAttributes<AssemblyInformationalVersionAttribute>(typeof(Paths).Assembly)[0]
.InformationalVersion);
/// <summary>
/// BepInEx version without the build suffix.
/// </summary>
public static Version DisplayBepInExVersion { get; } =
new(BepInExVersion.Major, BepInExVersion.Minor, BepInExVersion.Patch, BepInExVersion.PreRelease);
/// <summary>
/// The path to the Managed folder that contains the main managed assemblies.
/// </summary>
@@ -35,17 +35,14 @@ public static class ChainloaderLogHelper
public static void PrintLogInfo(ManualLogSource log)
{
var bepinVersion = Paths.BepInExVersion;
var versionMini = new SemanticVersioning.Version(bepinVersion.Major, bepinVersion.Minor, bepinVersion.Patch,
bepinVersion.PreRelease);
var consoleTitle = $"BepInEx {versionMini} - {Paths.ProcessName}";
var consoleTitle = $"BepInEx {Paths.DisplayBepInExVersion} - {Paths.ProcessName}";
log.Log(LogLevel.Message, $"{consoleTitle} ({File.GetLastWriteTime(Paths.ExecutablePath)})");
if (ConsoleManager.ConsoleActive)
ConsoleManager.SetConsoleTitle(consoleTitle);
if (!string.IsNullOrEmpty(bepinVersion.Build))
log.Log(LogLevel.Message, $"Built from commit {bepinVersion.Build}");
if (!string.IsNullOrEmpty(Paths.BepInExVersion.Build))
log.Log(LogLevel.Message, $"Built from commit {Paths.BepInExVersion.Build}");
Logger.Log(LogLevel.Info, $"System platform: {GetPlatformString()}");
Logger.Log(LogLevel.Info,