summaryrefslogtreecommitdiff
path: root/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-05-03 18:11:31 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-05-03 18:11:31 -0400
commit5d3d919d490fd414fe9647e566e92c71d7f64509 (patch)
treee1eab3352287ef04b5de4cdc28b550e255d58c3f /src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
parentc48f6d78cc412c5f2e40a8b460b7b3c1c993c51a (diff)
parent3447e2f575c2c83af729777e4d37e93f4c2a6467 (diff)
downloadSMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.tar.gz
SMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.tar.bz2
SMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs')
-rw-r--r--src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
index 785daba3..c90fc1d3 100644
--- a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
+++ b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs
@@ -20,9 +20,6 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning
/// <summary>The current OS.</summary>
private readonly Platform Platform;
- /// <summary>The name of the Stardew Valley executable.</summary>
- private readonly string ExecutableName;
-
/*********
** Public methods
@@ -31,7 +28,6 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning
public GameScanner()
{
this.Platform = EnvironmentUtility.DetectPlatform();
- this.ExecutableName = EnvironmentUtility.GetExecutableName(this.Platform);
}
/// <summary>Find all valid Stardew Valley install folders.</summary>
@@ -58,7 +54,12 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning
/// <param name="dir">The folder to check.</param>
public bool LooksLikeGameFolder(DirectoryInfo dir)
{
- return dir.Exists && dir.EnumerateFiles(this.ExecutableName).Any();
+ return
+ dir.Exists
+ && (
+ dir.EnumerateFiles("StardewValley.exe").Any()
+ || dir.EnumerateFiles("Stardew Valley.exe").Any()
+ );
}
@@ -82,7 +83,7 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning
? $"{home}/.steam/steam/steamapps/common/Stardew Valley"
: $"{home}/.local/share/Steam/steamapps/common/Stardew Valley";
- // Mac
+ // macOS
yield return "/Applications/Stardew Valley.app/Contents/MacOS";
yield return $"{home}/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS";
}