From 551153bb00c8a3a448db4b3a059e8322108b772a Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 30 Mar 2021 20:10:55 -0400 Subject: prepare mod build package for 64-bit SMAPI (#767) --- build/find-game-folder.targets | 4 ++++ docs/technical/mod-package.md | 24 ++++++++++++++++++++++ .../SMAPI.ModBuildConfig.csproj | 5 ----- src/SMAPI.ModBuildConfig/build/smapi.targets | 21 ++++++++++++++----- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/build/find-game-folder.targets b/build/find-game-folder.targets index 0a766ad4..ec8a3787 100644 --- a/build/find-game-folder.targets +++ b/build/find-game-folder.targets @@ -44,7 +44,11 @@ + Stardew Valley StardewValley + + + StardewValley diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index f7475e37..d89f86c9 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -135,6 +135,15 @@ The absolute path to the folder containing the game's installed mods (defaults t The filename for the game's executable (i.e. `StardewValley.exe` on Linux/Mac or `Stardew Valley.exe` on Windows). This is auto-detected, and you should almost never change this. + + + +GameFramework + + +The game framework for which the mod is being compiled (one of `Xna` or `MonoGame`). This is +auto-detected based on the platform, and you should almost never change this. + @@ -291,6 +300,15 @@ Warning text: Your code accesses a field which is obsolete or no longer works. Use the suggested field instead. +### Wrong processor architecture +Warning text: +> The target platform should be set to 'Any CPU' for compatibility with both 32-bit and 64-bit +> versions of Stardew Valley (currently set to '{{current platform}}'). + +Mods can be used in either 32-bit or 64-bit mode. Your project's target platform isn't set to the +default 'Any CPU', so it won't work in both. You can fix it by [setting the target platform to +'Any CPU'](https://docs.microsoft.com/en-ca/visualstudio/ide/how-to-configure-projects-to-target-platforms). + ## FAQs ### How do I set the game path? The package detects where your game is installed automatically, so you usually don't need to set it @@ -347,6 +365,12 @@ The NuGet package is generated automatically in `StardewModdingAPI.ModBuildConfi when you compile it. ## Release notes +## Upcoming release +* Added a build warning when the mod isn't compiled for `Any CPU`. +* Added a `GameFramework` build property set to `MonoGame` or `Xna` based on the platform. This can be overridden to change which framework it references. +* Added support for building mods against the 64-bit Linux version of the game on Windows. +* The package now suppresses the misleading 'processor architecture mismatch' warnings. + ## 3.2.2 Released 23 September 2020. diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index 5992fbbf..2d15678c 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -15,10 +15,6 @@ MIT images/icon.png https://smapi.io/package/readme - - - Reworked and streamlined how the package is compiled. - - Added SMAPI-ModTranslationClassBuilder files to the ignore list. - false @@ -48,5 +44,4 @@ - diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 76a1536c..698765ad 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -15,6 +15,9 @@ $(AssemblySearchPaths);{GAC} + + None + $(MSBuildProjectName) $(TargetDir) @@ -24,6 +27,9 @@ false true false + + Xna + MonoGame @@ -54,7 +60,7 @@ - + @@ -71,14 +77,19 @@ + - - - + + + + + + + -- cgit From 58dde207afe2d99a5f4c047334a79acdd312ec58 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 30 Mar 2021 20:11:49 -0400 Subject: prepare for release --- docs/technical/mod-package.md | 4 +++- src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index d89f86c9..8c9c59fb 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -365,7 +365,9 @@ The NuGet package is generated automatically in `StardewModdingAPI.ModBuildConfi when you compile it. ## Release notes -## Upcoming release +## 3.3 +Released 30 March 2021. + * Added a build warning when the mod isn't compiled for `Any CPU`. * Added a `GameFramework` build property set to `MonoGame` or `Xna` based on the platform. This can be overridden to change which framework it references. * Added support for building mods against the 64-bit Linux version of the game on Windows. diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index 2d15678c..b18e79d5 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -9,7 +9,7 @@ Pathoschild.Stardew.ModBuildConfig Build package for SMAPI mods - 3.2.2 + 3.3.0 Pathoschild Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 3.0 or later. MIT -- cgit