summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SCore.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-10-01 18:43:14 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-10-01 18:43:14 -0400
commitf5386fcf6028cb6d6f9e93bf282c4c99a62debf7 (patch)
tree33194f23c1f8bb185907ecf0e63de7b5ef22cde4 /src/SMAPI/Framework/SCore.cs
parentc531acb6599b4e115e8b6f6d12e9194b3f83ff9d (diff)
downloadSMAPI-f5386fcf6028cb6d6f9e93bf282c4c99a62debf7.tar.gz
SMAPI-f5386fcf6028cb6d6f9e93bf282c4c99a62debf7.tar.bz2
SMAPI-f5386fcf6028cb6d6f9e93bf282c4c99a62debf7.zip
add error if player has wrong version of SMAPI installed for their OS
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r--src/SMAPI/Framework/SCore.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index 0594c793..4c33f348 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -141,6 +141,23 @@ namespace StardewModdingAPI.Framework
this.Monitor.Log("(Using custom --mods-path argument.)", LogLevel.Trace);
this.Monitor.Log($"Log started at {DateTime.UtcNow:s} UTC", LogLevel.Trace);
+ // validate platform
+#if SMAPI_FOR_WINDOWS
+ if (Constants.Platform != Platform.Windows)
+ {
+ this.Monitor.Log("Oops! You're running Windows, but this version of SMAPI is for Linux or Mac. Please reinstall SMAPI to fix this.", LogLevel.Error);
+ this.PressAnyKeyToExit();
+ return;
+ }
+#else
+ if (Constants.Platform == Platform.Windows)
+ {
+ this.Monitor.Log("Oops! You're running {Constants.Platform}, but this version of SMAPI is for Windows. Please reinstall SMAPI to fix this.", LogLevel.Error);
+ this.PressAnyKeyToExit();
+ return;
+ }
+#endif
+
// validate game version
if (Constants.GameVersion.IsOlderThan(Constants.MinimumGameVersion))
{