summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/InteractiveInstaller.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Installer/InteractiveInstaller.cs')
-rw-r--r--src/SMAPI.Installer/InteractiveInstaller.cs39
1 files changed, 25 insertions, 14 deletions
diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs
index 1a132e54..b5c2735b 100644
--- a/src/SMAPI.Installer/InteractiveInstaller.cs
+++ b/src/SMAPI.Installer/InteractiveInstaller.cs
@@ -7,6 +7,7 @@ using System.Reflection;
using System.Threading;
using Microsoft.Win32;
using StardewModdingApi.Installer.Enums;
+using StardewModdingAPI.Common;
namespace StardewModdingApi.Installer
{
@@ -97,6 +98,7 @@ namespace StardewModdingApi.Installer
// obsolete
yield return GetInstallPath("Mods/.cache"); // 1.3-1.4
+ yield return GetInstallPath("Mods/TrainerMod"); // *–2.0 (renamed to ConsoleCommands)
yield return GetInstallPath("Mono.Cecil.Rocks.dll"); // 1.3–1.8
yield return GetInstallPath("StardewModdingAPI-settings.json"); // 1.0-1.4
if (modsDir.Exists)
@@ -136,6 +138,13 @@ namespace StardewModdingApi.Installer
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
****/
// get action from CLI
@@ -159,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)
@@ -182,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
@@ -340,22 +347,26 @@ namespace StardewModdingApi.Installer
this.InteractivelyRemoveAppDataMods(platform, modsDir, packagedModsDir);
}
Console.WriteLine();
+ Console.WriteLine();
/****
- ** exit
+ ** final instructions
****/
- this.PrintColor("Done!", ConsoleColor.DarkGreen);
if (platform == Platform.Windows)
{
- this.PrintColor(
- action == ScriptAction.Install
- ? "Don't forget to launch StardewModdingAPI.exe instead of the normal game executable. See the readme.txt for details."
- : "If you manually changed shortcuts or Steam to launch SMAPI, don't forget to change those back.",
- ConsoleColor.DarkGreen
- );
+ if (action == ScriptAction.Install)
+ {
+ this.PrintColor("SMAPI is installed! If you use Steam, set your launch options to enable achievements (see smapi.io/install):", ConsoleColor.DarkGreen);
+ this.PrintColor($" \"{Path.Combine(installDir.FullName, "StardewModdingAPI.exe")}\" %command%", ConsoleColor.DarkGreen);
+ Console.WriteLine();
+ this.PrintColor("If you don't use Steam, launch StardewModdingAPI.exe in your game folder to play with mods.", ConsoleColor.DarkGreen);
+ }
+ else
+ this.PrintColor("SMAPI is removed! If you configured Steam to launch SMAPI, don't forget to clear your launch options.", ConsoleColor.DarkGreen);
}
else if (action == ScriptAction.Install)
- this.PrintColor("You can launch the game the same way as before to play with mods.", ConsoleColor.DarkGreen);
+ this.PrintColor("SMAPI is installed! Launch the game the same way as before to play with mods.", ConsoleColor.DarkGreen);
+
Console.ReadKey();
}