mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-19 15:51:45 +00:00
Expose a DisplayBepInExVersion (#556)
This commit is contained in:
1 parent
a06688e85b
commit
bd467c9af6
2 files changed
+9
-6
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user