summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-06-02 17:54:01 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-06-02 17:54:01 -0400
commitb6cda8f0d32898f34b5c7dc703a85aa823c317ce (patch)
tree91d95583b6af5ce842a3d8208aacb225bdd822d6 /src/SMAPI.Installer
parent2e3c42130358734a6fcf547745324dd272176f9c (diff)
parent9945408aa4ea2f6e07c2820f6aa1c160c68423d5 (diff)
downloadSMAPI-b6cda8f0d32898f34b5c7dc703a85aa823c317ce.tar.gz
SMAPI-b6cda8f0d32898f34b5c7dc703a85aa823c317ce.tar.bz2
SMAPI-b6cda8f0d32898f34b5c7dc703a85aa823c317ce.zip
Merge branch 'create-toolkit' into develop
Diffstat (limited to 'src/SMAPI.Installer')
-rw-r--r--src/SMAPI.Installer/InteractiveInstaller.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs
index ace560e5..6e4cb95d 100644
--- a/src/SMAPI.Installer/InteractiveInstaller.cs
+++ b/src/SMAPI.Installer/InteractiveInstaller.cs
@@ -152,7 +152,7 @@ namespace StardewModdingApi.Installer
** Get platform & set window title
****/
Platform platform = EnvironmentUtility.DetectPlatform();
- Console.Title = $"SMAPI {new SemanticVersionImpl(this.GetType().Assembly.GetName().Version)} installer on {platform} {EnvironmentUtility.GetFriendlyPlatformName(platform)}";
+ Console.Title = $"SMAPI {this.GetDisplayVersion(this.GetType().Assembly.GetName().Version)} installer on {platform} {EnvironmentUtility.GetFriendlyPlatformName(platform)}";
Console.WriteLine();
#if SMAPI_FOR_WINDOWS
@@ -421,6 +421,16 @@ namespace StardewModdingApi.Installer
/*********
** Private methods
*********/
+ /// <summary>Get the display text for an assembly version.</summary>
+ /// <param name="version">The assembly version.</param>
+ private string GetDisplayVersion(Version version)
+ {
+ string str = $"{version.Major}.{version.Minor}";
+ if (version.Build != 0)
+ str += $".{version.Build}";
+ return str;
+ }
+
/// <summary>Get the value of a key in the Windows registry.</summary>
/// <param name="key">The full path of the registry key relative to HKLM.</param>
/// <param name="name">The name of the value.</param>