From cb9d6ae5ad9252c2a36174856b28f12344d026f3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 4 Dec 2021 23:47:27 -0500 Subject: improve error when installer is pointed at a SDV 1.5.4 folder --- src/SMAPI.Installer/Framework/InstallerContext.cs | 7 +++++++ src/SMAPI.Installer/InteractiveInstaller.cs | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Installer') diff --git a/src/SMAPI.Installer/Framework/InstallerContext.cs b/src/SMAPI.Installer/Framework/InstallerContext.cs index 95df32ca..68df2001 100644 --- a/src/SMAPI.Installer/Framework/InstallerContext.cs +++ b/src/SMAPI.Installer/Framework/InstallerContext.cs @@ -54,5 +54,12 @@ namespace StardewModdingAPI.Installer.Framework { return this.GameScanner.LooksLikeGameFolder(dir); } + + /// Get whether a folder seems to contain Stardew Valley 1.5.4 or earlier. + /// The folder to check. + public bool LooksLikeStardewValley154(DirectoryInfo dir) + { + return this.GameScanner.LooksLikeStardewValley154(dir); + } } } diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs index d8c27a2d..424fe42b 100644 --- a/src/SMAPI.Installer/InteractiveInstaller.cs +++ b/src/SMAPI.Installer/InteractiveInstaller.cs @@ -704,7 +704,15 @@ namespace StardewModdingApi.Installer } if (!context.LooksLikeGameFolder(directory)) { - this.PrintWarning("That directory doesn't contain a Stardew Valley executable."); + if (context.LooksLikeStardewValley154(directory)) + { + this.PrintWarning("That directory seems to have Stardew Valley 1.5.4 or earlier."); + this.PrintWarning("Please update your game to the latest version to use SMAPI."); + } + else + { + this.PrintWarning("That directory doesn't contain a Stardew Valley executable."); + } continue; } -- cgit