diff options
| author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-11-30 17:12:49 -0500 |
|---|---|---|
| committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-11-30 17:12:49 -0500 |
| commit | 919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9 (patch) | |
| tree | 5c03ee1bd3cd658586755694940ac329491d6493 /src/SMAPI.Toolkit/Framework | |
| parent | 3ca6fb562417748c87567d6bb6915d56b2c1b57c (diff) | |
| parent | d1d09ae1df63826dd453aa0347d668f420754ed7 (diff) | |
| download | SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.tar.gz SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.tar.bz2 SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.zip | |
Merge branch 'beta' into develop
Diffstat (limited to 'src/SMAPI.Toolkit/Framework')
| -rw-r--r-- | src/SMAPI.Toolkit/Framework/Constants.cs | 9 | ||||
| -rw-r--r-- | src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs | 5 | ||||
| -rw-r--r-- | src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs | 9 |
3 files changed, 10 insertions, 13 deletions
diff --git a/src/SMAPI.Toolkit/Framework/Constants.cs b/src/SMAPI.Toolkit/Framework/Constants.cs new file mode 100644 index 00000000..55f26582 --- /dev/null +++ b/src/SMAPI.Toolkit/Framework/Constants.cs @@ -0,0 +1,9 @@ +namespace StardewModdingAPI.Toolkit.Framework +{ + /// <summary>Contains the SMAPI installer's constants and assumptions.</summary> + internal static class Constants + { + /// <summary>The name of the game's main DLL, used to detect game folders.</summary> + public const string GameDllName = "Stardew Valley.dll"; + } +} diff --git a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs index c90fc1d3..7553c07f 100644 --- a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs +++ b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs @@ -56,10 +56,7 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning { return dir.Exists - && ( - dir.EnumerateFiles("StardewValley.exe").Any() - || dir.EnumerateFiles("Stardew Valley.exe").Any() - ); + && dir.EnumerateFiles("Stardew Valley.dll").Any(); } diff --git a/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs b/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs index 2636aae0..8b6eb5fb 100644 --- a/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs +++ b/src/SMAPI.Toolkit/Framework/LowLevelEnvironmentUtility.cs @@ -80,15 +80,6 @@ namespace StardewModdingAPI.Toolkit.Framework return name; } - /// <summary>Get the name of the Stardew Valley executable.</summary> - /// <param name="platform">The current platform.</param> - public static string GetExecutableName(string platform) - { - return platform == nameof(Platform.Windows) - ? "Stardew Valley.exe" - : "StardewValley.exe"; - } - /// <summary>Get whether an executable is 64-bit.</summary> /// <param name="path">The absolute path to the assembly file.</param> public static bool Is64BitAssembly(string path) |
