diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-13 23:47:24 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-13 23:47:24 -0400 |
commit | 45f4f85b7e74e0cffd345310d6aabc95c12dac26 (patch) | |
tree | 902b7a796d84060aeb9981d8b12bcd864237437e /src/SMAPI/Constants.cs | |
parent | 504733dec7d629335b83841af38cd5da91d5231f (diff) | |
download | SMAPI-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.cs | 11 |
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", |