diff options
92 files changed, 4869 insertions, 3369 deletions
diff --git a/build/GlobalAssemblyInfo.cs b/build/GlobalAssemblyInfo.cs index 79d473e6..93e45e30 100644 --- a/build/GlobalAssemblyInfo.cs +++ b/build/GlobalAssemblyInfo.cs @@ -1,6 +1,5 @@ using System.Reflection; -using System.Runtime.InteropServices; -[assembly: ComVisible(false)] -[assembly: AssemblyVersion("2.4.0.0")] -[assembly: AssemblyFileVersion("2.4.0.0")] +[assembly: AssemblyProduct("SMAPI")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] diff --git a/build/prepare-install-package.targets b/build/prepare-install-package.targets index f2a2b23c..fca311f2 100644 --- a/build/prepare-install-package.targets +++ b/build/prepare-install-package.targets @@ -20,6 +20,8 @@ <!-- copy installer files --> <Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(PackagePath)\install.exe" /> <Copy SourceFiles="$(TargetDir)\readme.txt" DestinationFiles="$(PackagePath)\README.txt" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(TargetDir)\unix-launcher.sh" DestinationFiles="$(PackageInternalPath)\Mono\StardewModdingAPI" /> + <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(TargetDir)\unix-install.sh" DestinationFiles="$(PackagePath)\install.sh" /> <!-- copy SMAPI files for Mono --> <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(PackageInternalPath)\Mono" /> @@ -31,7 +33,6 @@ <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)\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)" /> diff --git a/docs/release-notes.md b/docs/release-notes.md index 9c1fbf93..3dee3705 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,4 +1,34 @@ # Release notes +## 2.5 +* For players: + * **Added support for [content packs](https://stardewvalleywiki.com/Modding:Content_packs)**. + <small>_Content packs are collections of files for a SMAPI mod to load. These can be installed directly under `Mods` like a normal SMAPI mod, get automatic update and compatibility checks, and provide convenient APIs to the mods that read them._</small> + * Added mod detection for unhandled errors (so most errors now mention which mod caused them). + * Added install scripts for Linux/Mac (no more manual terminal commands!). + * Added the missing mod's name and URL to dependency errors. + * Fixed uninstall script not reporting when done on Linux/Mac. + * Updated compatibility list and enabled update checks for more mods. + +* For modders: + * Added support for content packs and new APIs to read them. + * Added support for `ISemanticVersion` in JSON models. + * Added `SpecialisedEvents.UnvalidatedUpdateTick` event for specialised use cases. + * Added path normalising to `ReadJsonFile` and `WriteJsonFile` helpers (so no longer need `Path.Combine` with those). + * Fixed deadlock in rare cases with asset loaders. + * Fixed unhelpful error when a mod exposes a non-public API. + * Fixed unhelpful error when a translation file has duplicate keys due to case-insensitivity. + * Fixed some JSON field names being case-sensitive. + +* For the [log parser][]: + * Added support for SMAPI 2.5 content packs. + * Reduced download size when viewing a parsed log with repeated errors. + * Improved parse error handling. + * Fixed 'log started' field showing incorrect date. + +* For SMAPI developers: + * Overhauled mod DB format to be more concise, reduce the memory footprint, and support versioning/defaulting more fields. + * Reimplemented log parser with serverside parsing and vue.js on the frontend. + ## 2.4 * For players: * Fixed visual map glitch in rare cases. diff --git a/src/SMAPI.AssemblyRewriters/Properties/AssemblyInfo.cs b/src/SMAPI.AssemblyRewriters/Properties/AssemblyInfo.cs index 7cc6804a..f456a30d 100644 --- a/src/SMAPI.AssemblyRewriters/Properties/AssemblyInfo.cs +++ b/src/SMAPI.AssemblyRewriters/Properties/AssemblyInfo.cs @@ -1,7 +1,4 @@ using System.Reflection; -using System.Runtime.InteropServices; -[assembly: AssemblyTitle("StardewModdingAPI.AssemblyRewriters")] +[assembly: AssemblyTitle("SMAPI.AssemblyRewriters")] [assembly: AssemblyDescription("Contains internal SMAPI classes used during assembly rewriting that need to be public for technical reasons, but shouldn't be visible to modders.")] -[assembly: AssemblyProduct("StardewModdingAPI.AssemblyRewriters")] -[assembly: Guid("10db0676-9fc1-4771-a2c8-e2519f091e49")] diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs index 43d31eea..b7e698ad 100644 --- a/src/SMAPI.Installer/InteractiveInstaller.cs +++ b/src/SMAPI.Installer/InteractiveInstaller.cs @@ -364,8 +364,13 @@ namespace StardewModdingApi.Installer else this.PrintColor("SMAPI is removed! If you configured Steam to launch SMAPI, don't forget to clear your launch options.", ConsoleColor.DarkGreen); } - else if (action == ScriptAction.Install) - this.PrintColor("SMAPI is installed! Launch the game the same way as before to play with mods.", ConsoleColor.DarkGreen); + else + { + if (action == ScriptAction.Install) + this.PrintColor("SMAPI is installed! Launch the game the same way as before to play with mods.", ConsoleColor.DarkGreen); + else + this.PrintColor("SMAPI is removed! Launch the game the same way as before to play without mods.", ConsoleColor.DarkGreen); + } Console.ReadKey(); } diff --git a/src/SMAPI.Installer/Properties/AssemblyInfo.cs b/src/SMAPI.Installer/Properties/AssemblyInfo.cs index 3a6a4648..9838e5a0 100644 --- a/src/SMAPI.Installer/Properties/AssemblyInfo.cs +++ b/src/SMAPI.Installer/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ -using System.Reflection; -using System.Runtime.InteropServices; +using System.Reflection; -[assembly: AssemblyTitle("StardewModdingAPI.Installer")] -[assembly: AssemblyProduct("StardewModdingAPI.Installer")] -[assembly: Guid("443ddf81-6aaf-420a-a610-3459f37e5575")] +[assembly: AssemblyTitle("SMAPI.Installer")] +[assembly: AssemblyDescription("The SMAPI installer for players.")] diff --git a/src/SMAPI.Installer/StardewModdingAPI.Installer.csproj b/src/SMAPI.Installer/StardewModdingAPI.Installer.csproj index d3a6aa0b..a575e06f 100644 --- a/src/SMAPI.Installer/StardewModdingAPI.Installer.csproj +++ b/src/SMAPI.Installer/StardewModdingAPI.Installer.csproj @@ -50,6 +50,14 @@ <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> + <ItemGroup> + <None Include="unix-install.sh"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="unix-launcher.sh"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + </ItemGroup> <Import Project="..\SMAPI.Common\StardewModdingAPI.Common.projitems" Label="Shared" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="..\..\build\common.targets" /> diff --git a/src/SMAPI.Installer/unix-install.sh b/src/SMAPI.Installer/unix-install.sh new file mode 100644 index 00000000..a0bd9346 --- /dev/null +++ b/src/SMAPI.Installer/unix-install.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Run the SMAPI installer through Mono on Linux or Mac. + +# Move to script's directory +cd "`dirname "$0"`" + +# get cross-distro version of POSIX command +COMMAND="" +if command -v command >/dev/null 2>&1; then + COMMAND="command -v" +elif type type >/dev/null 2>&1; then + COMMAND="type" +fi + +# validate Mono & run installer +if $COMMAND mono >/dev/null 2>&1; then + mono install.exe +else + echo "Oops! Looks like Mono isn't installed. Please install Mono from http://mono-project.com, reboot, and run this installer again." + read +fi diff --git a/src/SMAPI/unix-launcher.sh b/src/SMAPI.Installer/unix-launcher.sh index 2542a286..2542a286 100644 --- a/src/SMAPI/unix-launcher.sh +++ b/src/SMAPI.Installer/unix-launcher.sh diff --git a/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs b/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs index 102d4c3d..96bd29f4 100644 --- a/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs +++ b/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs @@ -1,9 +1,6 @@ using System.Reflection; -using System.Runtime.InteropServices; -[assembly: AssemblyTitle("StardewModdingAPI.ModBuildConfig")] +[assembly: AssemblyTitle("SMAPI.ModBuildConfig")] [assembly: AssemblyDescription("")] -[assembly: Guid("ea4f1e80-743f-4a1d-9757-ae66904a196a")] -[assembly: ComVisible(false)] [assembly: AssemblyVersion("2.0.2.0")] [assembly: AssemblyFileVersion("2.0.2.0")] diff --git a/src/SMAPI.Mods.ConsoleCommands/Properties/AssemblyInfo.cs b/src/SMAPI.Mods.ConsoleCommands/Properties/AssemblyInfo.cs index ac15ec72..86653141 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Properties/AssemblyInfo.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.InteropServices; [assembly: AssemblyTitle("SMAPI.Mods.ConsoleCommands")] [assembly: AssemblyDescription("")] -[assembly: Guid("76791e28-b1b5-407c-82d6-50c3e5b7e037")] diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index fc5ce35d..b852f686 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,7 +1,7 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "2.4.0", + "Version": "2.5.0", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll" diff --git a/src/SMAPI.Tests/Core/ModResolverTests.cs b/src/SMAPI.Tests/Core/ModResolverTests.cs index 051ffe99..d63eb1a2 100644 --- a/src/SMAPI.Tests/Core/ModResolverTests.cs +++ b/src/SMAPI.Tests/Core/ModResolverTests.cs @@ -6,6 +6,7 @@ using Moq; using Newtonsoft.Json; using NUnit.Framework; using StardewModdingAPI.Framework; +using StardewModdingAPI.Framework.ModData; using StardewModdingAPI.Framework.Models; using StardewModdingAPI.Framework.ModLoading; using StardewModdingAPI.Framework.Serialisation; @@ -30,7 +31,7 @@ namespace StardewModdingAPI.Tests.Core Directory.CreateDirectory(rootFolder); // act - IModMetadata[] mods = new ModResolver().ReadManifests(rootFolder, new JsonHelper(), new ModDataRecord[0]).ToArray(); + IModMetadata[] mods = new ModResolver().ReadManifests(rootFolder, new JsonHelper(), new ModDatabase()).ToArray(); // assert Assert.AreEqual(0, mods.Length, 0, $"Expected to find zero manifests, found {mods.Length} |
