From 13a3c8fbddb9dd47d30e1b9684d3ceb048086e91 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 22 Apr 2021 18:13:45 -0400 Subject: add SMAPI version and bitness to console title earlier --- src/SMAPI/Constants.cs | 5 ++++- src/SMAPI/Program.cs | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 079c9251..b55104c0 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -59,6 +59,9 @@ namespace StardewModdingAPI /// The value which should appear in the SMAPI log, if any. internal static int? LogScreenId { get; set; } + + /// SMAPI's current raw semantic version. + internal static string RawApiVersion = "3.9.5"; } /// Contains SMAPI's constants and assumptions. @@ -71,7 +74,7 @@ namespace StardewModdingAPI ** Public ****/ /// SMAPI's current semantic version. - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.9.5"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion(EarlyConstants.RawApiVersion); /// The minimum supported version of Stardew Valley. public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.5.4"); diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs index 986d2780..e830f799 100644 --- a/src/SMAPI/Program.cs +++ b/src/SMAPI/Program.cs @@ -24,6 +24,8 @@ namespace StardewModdingAPI /// The command-line arguments. public static void Main(string[] args) { + Console.Title = $"SMAPI {EarlyConstants.RawApiVersion}{(EarlyConstants.IsWindows64BitHack ? " 64-bit" : "")} - {Console.Title}"; + try { AppDomain.CurrentDomain.AssemblyResolve += Program.CurrentDomain_AssemblyResolve; @@ -159,7 +161,7 @@ namespace StardewModdingAPI Console.ResetColor(); Console.WriteLine(); } - + Program.PressAnyKeyToExit(showMessage: true); } -- cgit