From a54db1b33019645f862b0552ad2cd0700074c592 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Jun 2019 13:47:05 -0400 Subject: [PATCH] add optional Harmony reference to mod build package --- docs/mod-build-config.md | 7 +++++++ src/SMAPI.ModBuildConfig/build/smapi.targets | 8 ++++++++ src/SMAPI.ModBuildConfig/package.nuspec | 1 + 3 files changed, 16 insertions(+) diff --git a/docs/mod-build-config.md b/docs/mod-build-config.md index 87e0cf30..9121c175 100644 --- a/docs/mod-build-config.md +++ b/docs/mod-build-config.md @@ -49,6 +49,12 @@ non-mod projects like unit tests, you can set this property: true ``` +If your mod uses [Harmony](https://github.com/pardeike/Harmony) (not recommended for most mods), +the package can add a reference to SMAPI's Harmony DLL for you: +```xml +true +``` + ### Copy files into the `Mods` folder and create release zip
Files considered part of your mod
@@ -269,6 +275,7 @@ If you need to copy the referenced DLLs into your build output, add this too: * added GAC to assembly search paths to fix references to XNA Framework. * Added option to disable game debugging config. * Added `.pdb` files to builds by default (to enable line numbers in error stack traces). +* Added optional Harmony reference. * Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. * Fixed `` not working for `i18n` files. * Dropped support for older versions of SMAPI and Visual Studio. diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 1f512400..0daf40a1 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -24,6 +24,7 @@ $(TargetDir) true true + false true false @@ -32,6 +33,13 @@ + + + $(GamePath)\smapi-internal\0Harmony.dll + false + true + + diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index 60f14efe..524cadfd 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -22,6 +22,7 @@ - added GAC to assembly search paths to fix references to XNA Framework. - Added option to disable game debugging config. - Added `.pdb` files to builds by default (to enable line numbers in error stack traces). + - Added optional Harmony reference. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. - Fixed `<IgnoreModFilePatterns>` not working for `i18n` files. - Dropped support for older versions of SMAPI and Visual Studio.