add error when running Windows installer on Linux/Mac

This commit is contained in:
Jesse Plamondon-Willard 2018-05-06 23:31:24 -04:00
parent 7f5f222be5
commit 52a0231def
1 changed files with 9 additions and 0 deletions

View File

@ -149,6 +149,15 @@ namespace StardewModdingApi.Installer
Console.Title = $"SMAPI {new SemanticVersionImpl(this.GetType().Assembly.GetName().Version)} installer on {platform} {EnvironmentUtility.GetFriendlyPlatformName(platform)}";
Console.WriteLine();
#if SMAPI_FOR_WINDOWS
if (platform == Platform.Linux || platform == Platform.Mac)
{
this.PrintError($"This is the installer for Windows. Run the 'install on {platform}.{(platform == Platform.Linux ? "sh" : "command")}' file instead.");
Console.ReadLine();
return;
}
#endif
/****
** read command-line arguments
****/