add installer version & platform to window title, simplify output (#375)

This commit is contained in:
Jesse Plamondon-Willard 2017-10-29 23:17:21 -04:00
parent 1bea3a9e32
commit e606b074d7
4 changed files with 17 additions and 6 deletions

View File

@ -20,6 +20,9 @@
* Fixed mods which implement `IAssetLoader` directly not being allowed to load files due to incorrect conflict detection.
* Fixed SMAPI blocking reflection access to vanilla members on overridden types.
* For SMAPI developers:
* Added the SMAPI installer version and platform to the window title to simplify troubleshooting.
## 2.0
### Release highlights
* **Mod update checks**

View File

@ -7,6 +7,7 @@ using System.Reflection;
using System.Threading;
using Microsoft.Win32;
using StardewModdingApi.Installer.Enums;
using StardewModdingAPI.Common;
namespace StardewModdingApi.Installer
{
@ -136,6 +137,13 @@ namespace StardewModdingApi.Installer
/// </remarks>
public void Run(string[] args)
{
/****
** Get platform & set window title
****/
Platform platform = this.DetectPlatform();
Console.Title = $"SMAPI {new SemanticVersionImpl(this.GetType().Assembly.GetName().Version)} installer on {platform}";
Console.WriteLine();
/****
** read command-line arguments
****/
@ -160,10 +168,6 @@ namespace StardewModdingApi.Installer
/****
** collect details
****/
// get platform
Platform platform = this.DetectPlatform();
this.PrintDebug($"Platform: {(platform == Platform.Windows ? "Windows" : "Linux or Mac")}.");
// get game path
DirectoryInfo installDir = this.InteractivelyGetInstallPath(platform, gamePathArg);
if (installDir == null)
@ -183,7 +187,9 @@ namespace StardewModdingApi.Installer
unixLauncher = Path.Combine(installDir.FullName, "StardewValley"),
unixLauncherBackup = Path.Combine(installDir.FullName, "StardewValley-original")
};
this.PrintDebug($"Install path: {installDir}.");
// show output
Console.WriteLine($"Your game folder: {installDir}.");
/****
** validate assumptions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@ -50,6 +50,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="..\SMAPI.Common\StardewModdingAPI.Common.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\common.targets" />
<Import Project="..\..\build\prepare-install-package.targets" />

View File

@ -52,6 +52,7 @@ EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
SMAPI.Common\StardewModdingAPI.Common.projitems*{2aa02fb6-ff03-41cf-a215-2ee60ab4f5dc}*SharedItemsImports = 13
SMAPI.Common\StardewModdingAPI.Common.projitems*{443ddf81-6aaf-420a-a610-3459f37e5575}*SharedItemsImports = 4
SMAPI.Common\StardewModdingAPI.Common.projitems*{ea4f1e80-743f-4a1d-9757-ae66904a196a}*SharedItemsImports = 4
SMAPI.Common\StardewModdingAPI.Common.projitems*{f1a573b0-f436-472c-ae29-0b91ea6b9f8f}*SharedItemsImports = 4
EndGlobalSection