summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-05-25 01:14:40 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-05-25 01:14:40 -0400
commit3129f67eb1f162e06d96854f319b10ccf583f0aa (patch)
tree67f7063dd4f362b018a677e6e9d3bd1cc66f63da /src/SMAPI.Installer
parent2a7bcb28f6a390e165c2cb8817f333aad750a032 (diff)
downloadSMAPI-3129f67eb1f162e06d96854f319b10ccf583f0aa.tar.gz
SMAPI-3129f67eb1f162e06d96854f319b10ccf583f0aa.tar.bz2
SMAPI-3129f67eb1f162e06d96854f319b10ccf583f0aa.zip
add semantic version to toolkit (#532)
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>