summaryrefslogtreecommitdiff
path: root/src/SMAPI/Constants.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-13 23:47:24 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-13 23:47:24 -0400
commit45f4f85b7e74e0cffd345310d6aabc95c12dac26 (patch)
tree902b7a796d84060aeb9981d8b12bcd864237437e /src/SMAPI/Constants.cs
parent504733dec7d629335b83841af38cd5da91d5231f (diff)
downloadSMAPI-45f4f85b7e74e0cffd345310d6aabc95c12dac26.tar.gz
SMAPI-45f4f85b7e74e0cffd345310d6aabc95c12dac26.tar.bz2
SMAPI-45f4f85b7e74e0cffd345310d6aabc95c12dac26.zip
add MacOS detection
Diffstat (limited to 'src/SMAPI/Constants.cs')
-rw-r--r--src/SMAPI/Constants.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index a098194b..1faaf656 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
+using StardewModdingAPI.Common;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.ModLoading;
using StardewValley;
@@ -91,12 +92,7 @@ namespace StardewModdingAPI
internal static ISemanticVersion GameVersion { get; } = new GameVersion(Constants.GetGameVersion());
/// <summary>The target game platform.</summary>
- internal static Platform TargetPlatform { get; } =
-#if SMAPI_FOR_WINDOWS
- Platform.Windows;
-#else
- Platform.Mono;
-#endif
+ internal static Platform TargetPlatform { get; } = EnvironmentUtility.DetectPlatform();
/*********
@@ -111,7 +107,8 @@ namespace StardewModdingAPI
Assembly[] targetAssemblies;
switch (targetPlatform)
{
- case Platform.Mono:
+ case Platform.Linux:
+ case Platform.Mac:
removeAssemblyReferences = new[]
{
"Stardew Valley",