summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-06-18 18:01:15 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-06-18 18:01:15 -0400
commitcdac6dad7d163736ead307041e15857123e07951 (patch)
tree5f4daec2f85596af280722e6f9a3f9e5fd82eac0
parentb0967e6309cd10df4aa08ae0d3719ba92155f604 (diff)
downloadSMAPI-cdac6dad7d163736ead307041e15857123e07951.tar.gz
SMAPI-cdac6dad7d163736ead307041e15857123e07951.tar.bz2
SMAPI-cdac6dad7d163736ead307041e15857123e07951.zip
enable C# 7 tuples
-rw-r--r--release-notes.md3
-rw-r--r--src/StardewModdingAPI.Installer/InteractiveInstaller.cs1
-rw-r--r--src/StardewModdingAPI/StardewModdingAPI.csproj4
-rw-r--r--src/StardewModdingAPI/packages.config1
-rw-r--r--src/prepare-install-package.targets2
5 files changed, 11 insertions, 0 deletions
diff --git a/release-notes.md b/release-notes.md
index f52e66cd..c75f0c19 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -16,6 +16,9 @@ See [log](https://github.com/Pathoschild/SMAPI/compare/1.14...1.15).
For players:
* SMAPI will no longer load mods known to be obsolete or unneeded.
+For modders:
+* Added `System.ValueTuple.dll` to the SMAPI install package so mods can use [C# 7 value tuples](https://docs.microsoft.com/en-us/dotnet/csharp/tuples).
+
## 1.14
See [log](https://github.com/Pathoschild/SMAPI/compare/1.13...1.14).
diff --git a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs
index efad0a3e..78d3d10e 100644
--- a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs
+++ b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs
@@ -82,6 +82,7 @@ namespace StardewModdingApi.Installer
yield return GetInstallPath("StardewModdingAPI.config.json");
yield return GetInstallPath("StardewModdingAPI.data.json");
yield return GetInstallPath("StardewModdingAPI.AssemblyRewriters.dll");
+ yield return GetInstallPath("System.ValueTuple.dll");
yield return GetInstallPath("steam_appid.txt");
// Linux/Mac only
diff --git a/src/StardewModdingAPI/StardewModdingAPI.csproj b/src/StardewModdingAPI/StardewModdingAPI.csproj
index 0e832848..465a5ea7 100644
--- a/src/StardewModdingAPI/StardewModdingAPI.csproj
+++ b/src/StardewModdingAPI/StardewModdingAPI.csproj
@@ -79,6 +79,9 @@
<Reference Include="System.Runtime.Caching">
<Private>True</Private>
</Reference>
+ <Reference Include="System.ValueTuple, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
+ </Reference>
<Reference Include="System.Windows.Forms" Condition="$(OS) == 'Windows_NT'" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@@ -263,6 +266,7 @@
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)" />
+ <Copy SourceFiles="$(TargetDir)\System.ValueTuple.dll" DestinationFolder="$(GamePath)" />
</Target>
<!-- launch SMAPI on debug -->
diff --git a/src/StardewModdingAPI/packages.config b/src/StardewModdingAPI/packages.config
index e5fa3c3a..6a2a8d1b 100644
--- a/src/StardewModdingAPI/packages.config
+++ b/src/StardewModdingAPI/packages.config
@@ -2,4 +2,5 @@
<packages>
<package id="Mono.Cecil" version="0.9.6.4" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net461" />
+ <package id="System.ValueTuple" version="4.3.1" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/prepare-install-package.targets b/src/prepare-install-package.targets
index f2a2b23c..df8bb100 100644
--- a/src/prepare-install-package.targets
+++ b/src/prepare-install-package.targets
@@ -31,6 +31,7 @@
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(PackageInternalPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Numerics.dll" DestinationFolder="$(PackageInternalPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Runtime.Caching.dll" DestinationFolder="$(PackageInternalPath)\Mono" />
+ <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.ValueTuple.dll" DestinationFolder="$(PackageInternalPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\unix-launcher.sh" DestinationFiles="$(PackageInternalPath)\Mono\StardewModdingAPI" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\steam_appid.txt" DestinationFolder="$(PackageInternalPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="@(CompiledMods)" DestinationFolder="$(PackageInternalPath)\Mono\Mods\%(RecursiveDir)" />
@@ -43,6 +44,7 @@
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.xml" DestinationFolder="$(PackageInternalPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.AssemblyRewriters.dll" DestinationFolder="$(PackageInternalPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(PackageInternalPath)\Windows" />
+ <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.ValueTuple.dll" DestinationFolder="$(PackageInternalPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\steam_appid.txt" DestinationFolder="$(PackageInternalPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="@(CompiledMods)" DestinationFolder="$(PackageInternalPath)\Windows\Mods\%(RecursiveDir)" />
</Target>