summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--build/0Harmony.dllbin0 -> 115200 bytes
-rw-r--r--docs/release-notes.md1
-rw-r--r--docs/technical/smapi.md14
-rw-r--r--src/SMAPI/SMAPI.csproj3
5 files changed, 7 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 02522716..b7f0d3e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,8 +30,5 @@ _ReSharper*/
# sensitive files
appsettings.Development.json
-# generated build files
-build/0Harmony.*
-
# Azure generated files
src/SMAPI.Web/Properties/PublishProfiles/*.pubxml
diff --git a/build/0Harmony.dll b/build/0Harmony.dll
new file mode 100644
index 00000000..2e893d0e
--- /dev/null
+++ b/build/0Harmony.dll
Binary files differ
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 9ea3e445..eadd45eb 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -28,6 +28,7 @@
* Added `Multiplayer.PeerConnected` event.
* Added `harmony_summary` console command which lists all current Harmony patches, optionally with a search filter.
* Added ability to override update keys from the compatibility list.
+ * SMAPI now uses [a custom build of Harmony](https://github.com/Pathoschild/Harmony#readme) to provide more useful stack traces in error logs.
* Harmony mods which use the `[HarmonyPatch(type)]` attribute now work crossplatform. Previously SMAPI couldn't rewrite types in custom attributes for compatibility.
* Improved mod rewriting for compatibility:
* Fixed rewriting types in custom attributes.
diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md
index 3b2d6e56..5d550cfc 100644
--- a/docs/technical/smapi.md
+++ b/docs/technical/smapi.md
@@ -58,7 +58,7 @@ SMAPI uses a small number of conditional compilation constants, which you can se
flag | purpose
---- | -------
`SMAPI_FOR_WINDOWS` | Whether SMAPI is being compiled on Windows for players on Windows. Set automatically in `crossplatform.targets`.
-`HARMONY_2` | Whether to enable experimental Harmony 2.0 support. Existing Harmony 1._x_ mods will be rewritten automatically for compatibility.
+`HARMONY_2` | Whether to enable experimental Harmony 2.0 support and rewrite existing Harmony 1._x_ mods for compatibility. Note that you need to replace `build/0Harmony.dll` with a Harmony 2.0 build (or switch to a package reference) to use this flag.
## For SMAPI developers
### Compiling from source
@@ -102,14 +102,10 @@ on the wiki for the first-time setup.
3. Rename the folders to `SMAPI <version> installer` and `SMAPI <version> installer for developers`.
4. Zip the two folders.
-### Using a custom Harmony build
-The official SMAPI releases include [a custom build of Harmony](https://github.com/Pathoschild/Harmony),
-but compiling from source will use the official build. To use a custom build, put `0Harmony.dll` in
-the `build` folder and it'll be referenced automatically.
-
-Note that Harmony merges its dependencies into `0Harmony.dll` when compiled in release mode. To use
-a debug build of Harmony, you'll need to manually copy those dependencies into your game's
-`smapi-internal` folder.
+### Custom Harmony build
+SMAPI uses [a custom build of Harmony](https://github.com/Pathoschild/Harmony#readme), which is
+included in the `build` folder. To use a different build, just replace `0Harmony.dll` in that
+folder.
## Release notes
See [release notes](../release-notes.md).
diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj
index c17de6d0..4af4527b 100644
--- a/src/SMAPI/SMAPI.csproj
+++ b/src/SMAPI/SMAPI.csproj
@@ -14,14 +14,13 @@
<ItemGroup>
<PackageReference Include="LargeAddressAware" Version="1.0.4" />
- <PackageReference Include="Lib.Harmony" Version="1.2.0.1" Condition="!Exists('..\..\build\0Harmony.dll')" />
<PackageReference Include="Mono.Cecil" Version="0.11.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Platonymous.TMXTile" Version="1.3.8" />
</ItemGroup>
<ItemGroup>
- <Reference Include="..\..\build\0Harmony.dll" Private="True" Condition="Exists('..\..\build\0Harmony.dll')" />
+ <Reference Include="..\..\build\0Harmony.dll" Private="True" />
<Reference Include="$(GameExecutableName)" HintPath="$(GamePath)\$(GameExecutableName).exe" Private="False" />
<Reference Include="StardewValley.GameData" HintPath="$(GamePath)\StardewValley.GameData.dll" Private="False" />
<Reference Include="System.Numerics" Private="True" />