From e40e8dd42bf547fd6f04543cef01b5d685c3ba56 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 4 Sep 2020 23:40:16 -0400 Subject: reorganize mod build package readme for readability --- docs/technical/mod-package.md | 382 ++++++++++++++++++++++++------------------ 1 file changed, 223 insertions(+), 159 deletions(-) (limited to 'docs/technical/mod-package.md') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index e771d7a9..0f3afe9e 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -6,16 +6,12 @@ for SMAPI mods and related tools. The package is fully compatible with Linux, Ma ## Contents * [Use](#use) * [Features](#features) - * [Detect game path](#detect-game-path) - * [Add assembly references](#add-assembly-references) - * [Copy files into the `Mods` folder and create release zip](#copy-files-into-the-mods-folder-and-create-release-zip) - * [Launch or debug game](#launch-or-debug-game) - * [Preconfigure common settings](#preconfigure-common-settings) - * [Add code warnings](#add-code-warnings) +* [Configure](#configure) * [Code warnings](#code-warnings) -* [Special cases](#special-cases) - * [Custom game path](#custom-game-path) - * [Non-mod projects](#non-mod-projects) +* [FAQs](#faqs) + * [How do I set the game path?](#custom-game-path) + * [How do I change which files are included in the mod deploy/zip?](#how-do-i-change-which-files-are-included-in-the-mod-deployzip) + * [Can I use the package for non-mod projects?](#can-i-use-the-package-for-non-mod-projects) * [For SMAPI developers](#for-smapi-developers) * [Release notes](#release-notes) @@ -27,133 +23,218 @@ for SMAPI mods and related tools. The package is fully compatible with Linux, Ma 5. Run the game to play with your mod. ## Features -The package automatically makes the changes listed below. In some cases you can configure how it -works by editing your mod's `.csproj` file, and adding the given properties between the first -`` and `` tags. - -### Detect game path -The package finds your game folder by scanning the default install paths and Windows registry. It -adds two MSBuild properties for use in your `.csproj` file if needed: - -property | description --------- | ----------- -`$(GamePath)` | The absolute path to the detected game folder. -`$(GameExecutableName)` | The game's executable name for the current OS (`Stardew Valley` on Windows, or `StardewValley` on Linux/Mac). - -If you get a build error saying it can't find your game, see [_custom game path_](#custom-game-path). - -### Add assembly references -The package adds assembly references to SMAPI, Stardew Valley, xTile, and MonoGame (Linux/Mac) or XNA -Framework (Windows). It automatically adjusts depending on which OS you're compiling it on. - -The assemblies aren't copied to the build output, since mods loaded by SMAPI won't need them. For -non-mod projects like unit tests, you can set this property: +The package includes several features to simplify mod development (see [_configure_](#configure) to +change how these work): + +* **Detect game path:** + The package automatically finds your game folder by scanning the default install paths and + Windows registry. It adds two MSBuild properties for use in your `.csproj` file if needed: + $(GamePath)` and `$(GameExecutableName)`. + +* **Add assembly references:** + The package adds assembly references to SMAPI, Stardew Valley, xTile, and MonoGame (Linux/Mac) or + XNA Framework (Windows). It automatically adjusts depending on which OS you're compiling it on. + If you use [Harmony](https://github.com/pardeike/Harmony), it can optionally add a reference to + that too. + +* **Copy files into the `Mods` folder:** + The package automatically copies your mod's DLL and PDB files, `manifest.json`, [`i18n` + files](https://stardewvalleywiki.com/Modding:Translations) (if any), the `assets` folder (if + any), and [build output](https://stackoverflow.com/a/10828462/262123) into your game's `Mods` + folder when you rebuild the code, with a subfolder matching the mod's project name. That lets you + try the mod in-game right after building it. + +* **Create release zip:** + The package adds a zip file in your project's `bin` folder when you rebuild the code, in the + format recommended for uploading to mod sites like Nexus Mods. This includes the same files and + options as the previous feature. + +* **Launch or debug mod:** + On Windows only, the package configures Visual Studio so you can launch the game and attach a + debugger using _Debug > Start Debugging_ or _Debug > Start Without Debugging_. This lets you [set + breakpoints](https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2019) + in your code while the game is running, or [make simple changes to the mod code without needing to + restart the game](https://docs.microsoft.com/en-us/visualstudio/debugger/edit-and-continue?view=vs-2019). + + This is disabled on Linux/Mac due to limitations with the Mono wrapper. + +* **Preconfigure common settings:** + The package automatically enables `.pdb` files (so error logs show line numbers to simplify + debugging), and enables support for the simplified `.csproj` format. + +* **Add code warnings:** + The package runs code analysis on your mod and raises warnings for some common errors or + pitfalls. See [_code warnings_](#code-warnings) for more info. + +## Configure +### How to set options +You can configure the package by setting build properties, which are essentially tags like this: ```xml -true + + CustomModName + false + ``` -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 -``` +There are two places you can put them: -### Copy files into the `Mods` folder and create release zip -
-
Files considered part of your mod
-
+* **Global properties** apply to every mod project you open on your computer. That's recommended + for properties you want to set for all mods (e.g. a custom game path). Here's where to put them: -These files are selected by default: `manifest.json`, -[`i18n` files](https://stardewvalleywiki.com/Modding:Translations) (if any), the `assets` folder -(if any), and all files in the build output. You can select custom files by [adding them to the -build output](https://stackoverflow.com/a/10828462/262123). (If your project references another mod, -make sure the reference is [_not_ marked 'copy local'](https://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx).) - -You can deselect a file by removing it from the build output. For a default file, you can set the -property below to a comma-delimited list of regex patterns to ignore. For crossplatform -compatibility, you should replace path delimiters with `[/\\]`. + 1. Open the home folder on your computer (see instructions for + [Linux](https://superuser.com/questions/409218/where-is-my-users-home-folder-in-ubuntu), + [MacOS](https://www.cnet.com/how-to/how-to-find-your-macs-home-folder-and-add-it-to-finder/), + or [Windows](https://www.computerhope.com/issues/ch000109.htm)). + 2. Create a `stardewvalley.targets` file with this content: + ```xml + + + + + ``` + 3. Add the properties between the `` and ``. + +* **Project properties** apply to a specific project. This is mainly useful for mod-specific + options like the mod name. Here's where to put them: + + 1. Open the folder containing your mod's source code. + 2. Open the `.csproj` file in a text editor (Notepad is fine). + 3. Add the properties between the first `` and `` tags you find. + +### Available properties +These are the options you can set: + +
    +
  • Game properties: + + + + + + + + + + + + + +
    propertyeffect
    GamePath + +The absolute path to the Stardew Valley folder. This is auto-detected, so you shouldn't need to +change it in most cases. + +
    GameExecutableName + +The name of the game's executable file (i.e. `StardewValley.exe` on Linux/Mac or +`Stardew Valley.exe` on Windows). This is auto-detected, and you should almost never change this. + +
    +
  • + +
  • Mod build properties: + + + + + + + + + + + + + + + + + + + + + + + + + +
    propertyeffect
    EnableHarmony + +Whether to add a reference to [Harmony](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Harmony) +(default `false`). This is only needed if you use Harmony. + +
    ModFolderName + +The mod name for its folder under `Mods` and its release zip (defaults to the project name). + +
    EnableModDeploy + +Whether to copy the mod files into your game's `Mods` folder (default `true`). + +
    ModZipPath + +The folder path where the release zip is created (defaults to the project's `bin` folder). + +
    EnableModZip + +Whether to create a release-ready `.zip` file in the mod project's `bin` folder (default `true`). + +
    +
  • + +
  • Specialized properties: + + + + + + + + + + + + + + + + + +
    propertyeffect
    CopyModReferencesToBuildOutput + +Whether to copy game and framework DLLs into the mod folder (default `false`). This is useful for +unit test projects, but not needed for mods that'll be run through SMAPI. + +
    IgnoreModFilePatterns + +A comma-delimited list of regex patterns matching files to ignore when deploying or zipping the mod +files (default empty). For crossplatform compatibility, you should replace path delimiters with `[/\\]`. + +For example, this excludes all `.txt` and `.pdf` files, as well as the `assets/paths.png` file: ```xml \.txt$, \.pdf$, assets[/\\]paths.png ``` - -
    Copy files into the `Mods` folder
    -
    - -The package copies the selected files into your game's `Mods` folder when you rebuild the code, -with a subfolder matching the mod's project name. - -You can change the folder name: -```xml -YourModName -``` - -Or disable deploying the files: -```xml -false -``` - -
    -
    Create release zip
    -
    - -The package adds a zip file in your project's `bin` folder when you rebuild the code, in the format -recommended for sites like Nexus Mods. The zip filename can be changed using `ModFolderName` above. - -You can change the folder path where the zip is created: -```xml -$(SolutionDir)\_releases -``` - -Or disable zip creation: -```xml -false -``` - -
    - - -### Launch or debug game -On Windows only, the package configures Visual Studio so you can launch the game and attach a -debugger using _Debug > Start Debugging_ or _Debug > Start Without Debugging_. This lets you [set -breakpoints](https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2019) -in your code while the game is running, or [make simple changes to the mod code without needing to -restart the game](https://docs.microsoft.com/en-us/visualstudio/debugger/edit-and-continue?view=vs-2019). +
    EnableGameDebugging -This is disabled on Linux/Mac due to limitations with the Mono wrapper. +Whether to configure the project so you can launch or debug the game through the _Debug_ menu in +Visual Studio (default `true`). There's usually no reason to change this, unless it's a unit test +project. -To disable game debugging (only needed for some non-mod projects): - -```xml -false -``` - -### Preconfigure common settings -The package also automatically enables PDB files (so error logs show line numbers for simpler -debugging), and enables support for the simplified `.csproj` format. - -### Add code warnings -The package runs code analysis on your mod and raises warnings for some common errors or pitfalls. -See [_code warnings_](#code-warnings) for more info. +
    +
  • +
## Code warnings ### Overview The NuGet package adds code warnings in Visual Studio specific to Stardew Valley. For example: ![](screenshots/code-analyzer-example.png) -You can hide the warnings using the warning ID (shown under 'code' in the Error List). See... -* [for specific code](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-pragma-warning); -* for a method using this attribute: - ```cs - [System.Diagnostics.CodeAnalysis.SuppressMessage("SMAPI.CommonErrors", "AvoidNetField")] - ``` -* for an entire project: - 1. Expand the _References_ node for the project in Visual Studio. - 2. Right-click on _Analyzers_ and choose _Open Active Rule Set_. - 4. Expand _StardewModdingAPI.ModBuildConfig.Analyzer_ and uncheck the warnings you want to hide. +You can [hide the warnings](https://visualstudiomagazine.com/articles/2017/09/01/hide-compiler-warnings.aspx) +if needed using the warning ID (shown under 'code' in the Error List). -See below for help with each specific warning. +See below for help with specific warnings. ### Avoid implicit net field cast Warning text: @@ -202,57 +283,37 @@ Warning text: Your code accesses a field which is obsolete or no longer works. Use the suggested field instead. -## Special cases -### Custom game path -The package usually detects where your game is installed automatically. If it can't find your game -or you have multiple installs, you can specify the path yourself. There's two ways to do that: +## 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 +manually. If it can't find your game or you have multiple installs, you can specify the path +yourself. -* **Option 1: global game path (recommended).** - _This will apply to every project that uses the package._ +To do that: - 1. Get the full folder path containing the Stardew Valley executable. - 2. Create this file: - - platform | path - --------- | ---- - Linux/Mac | `~/stardewvalley.targets` - Windows | `%USERPROFILE%\stardewvalley.targets` - - 3. Save the file with this content: - - ```xml - - - PATH_HERE - - - ``` - - 4. Replace `PATH_HERE` with your game's folder path. - -* **Option 2: path in the project file.** - _You'll need to do this for each project that uses the package._ - - 1. Get the folder path containing the Stardew Valley `.exe` file. - 2. Add this to your `.csproj` file under the ` +1. Get the full path containing the Stardew Valley executable. +2. See [_configure_](#configure) to add this property: + ```xml + PATH_HERE - - ``` - - 3. Replace `PATH_HERE` with your custom game install path. + + ``` +3. Replace `PATH_HERE` with your game's folder path. The configuration will check your custom path first, then fall back to the default paths (so it'll still compile on a different computer). -You access the game path via `$(GamePath)` in MSBuild properties, if you need to reference another -file in the game folder. +### How do I change which files are included in the mod deploy/zip? +For custom files, you can [add/remove them in the build output](https://stackoverflow.com/a/10828462/262123). +(If your project references another mod, make sure the reference is [_not_ marked 'copy +local'](https://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx).) + +To exclude a file the package copies by default, see `IgnoreModFilePatterns` under +[_configure_](#configure). -### Non-mod projects +### Can I use the package for non-mod projects? You can use the package in non-mod projects too (e.g. unit tests or framework DLLs). Just disable -the mod-related package features: +the mod-related package features (see [_configure_](#configure)): ```xml false @@ -287,6 +348,9 @@ That will create a `Pathoschild.Stardew.ModBuildConfig-.nupkg` file in which can be uploaded to NuGet or referenced directly. ## Release notes +### Upcoming release +* Rewrote documentation to make it easier to read. + ### 3.1 * Added support for semantic versioning 2.0. * `0Harmony.dll` is now ignored if the mod references Harmony directly (it's bundled with SMAPI). -- cgit From 4ce572fca6b37851b6070d82f1f0a2b94a04df44 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 5 Sep 2020 00:14:13 -0400 Subject: add mod build package option to change the Mods path --- docs/technical/mod-package.md | 50 +++++++++++++++++----------- src/SMAPI.ModBuildConfig/DeployModTask.cs | 6 ++-- src/SMAPI.ModBuildConfig/build/smapi.targets | 3 +- 3 files changed, 35 insertions(+), 24 deletions(-) (limited to 'docs/technical/mod-package.md') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 0f3afe9e..5ac22167 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -115,8 +115,17 @@ These are the options you can set: GamePath -The absolute path to the Stardew Valley folder. This is auto-detected, so you shouldn't need to -change it in most cases. +The absolute path to the Stardew Valley folder. This is auto-detected, so you usually shouldn't +need to change it. + + + + +GameModsPath + + +The absolute path to the folder containing the game's installed mods (defaults to +`$(GamePath)/Mods`), used when deploying the mod files. @@ -148,34 +157,34 @@ Whether to add a reference to [Harmony](https://stardewvalleywiki.com/Modding:Mo -ModFolderName +EnableModDeploy -The mod name for its folder under `Mods` and its release zip (defaults to the project name). +Whether to copy the mod files into your game's `Mods` folder (default `true`). -EnableModDeploy +EnableModZip -Whether to copy the mod files into your game's `Mods` folder (default `true`). +Whether to create a release-ready `.zip` file in the mod project's `bin` folder (default `true`). -ModZipPath +ModFolderName -The folder path where the release zip is created (defaults to the project's `bin` folder). +The mod name for its folder under `Mods` and its release zip (defaults to the project name). -EnableModZip +ModZipPath -Whether to create a release-ready `.zip` file in the mod project's `bin` folder (default `true`). +The folder path where the release zip is created (defaults to the project's `bin` folder). @@ -195,6 +204,16 @@ Whether to create a release-ready `.zip` file in the mod project's `bin` folder Whether to copy game and framework DLLs into the mod folder (default `false`). This is useful for unit test projects, but not needed for mods that'll be run through SMAPI. + + + +EnableGameDebugging + + +Whether to configure the project so you can launch or debug the game through the _Debug_ menu in +Visual Studio (default `true`). There's usually no reason to change this, unless it's a unit test +project. + @@ -210,16 +229,6 @@ For example, this excludes all `.txt` and `.pdf` files, as well as the `assets/p \.txt$, \.pdf$, assets[/\\]paths.png ``` - - - -EnableGameDebugging - - -Whether to configure the project so you can launch or debug the game through the _Debug_ menu in -Visual Studio (default `true`). There's usually no reason to change this, unless it's a unit test -project. - @@ -349,6 +358,7 @@ which can be uploaded to NuGet or referenced directly. ## Release notes ### Upcoming release +* Added option to change `Mods` folder path. * Rewrote documentation to make it easier to read. ### 3.1 diff --git a/src/SMAPI.ModBuildConfig/DeployModTask.cs b/src/SMAPI.ModBuildConfig/DeployModTask.cs index ced05a28..c47c8ec4 100644 --- a/src/SMAPI.ModBuildConfig/DeployModTask.cs +++ b/src/SMAPI.ModBuildConfig/DeployModTask.cs @@ -32,9 +32,9 @@ namespace StardewModdingAPI.ModBuildConfig [Required] public string TargetDir { get; set; } - /// The folder containing the game files. + /// The folder containing the game's mod folders. [Required] - public string GameDir { get; set; } + public string GameModsDir { get; set; } /// Whether to enable copying the mod files into the game's Mods folder. [Required] @@ -69,7 +69,7 @@ namespace StardewModdingAPI.ModBuildConfig // deploy mod files if (this.EnableModDeploy) { - string outputPath = Path.Combine(this.GameDir, "Mods", this.EscapeInvalidFilenameCharacters(this.ModFolderName)); + string outputPath = Path.Combine(this.GameModsDir, this.EscapeInvalidFilenameCharacters(this.ModFolderName)); this.Log.LogMessage(MessageImportance.High, $"The mod build package is copying the mod files to {outputPath}..."); this.CreateModFolder(package.GetFiles(), outputPath); } diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 03db7490..0a0db190 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -18,6 +18,7 @@ $(MSBuildProjectName) $(TargetDir) + $([System.IO.Path]::Combine($(GamePath), 'Mods') true true false @@ -86,7 +87,7 @@ ProjectDir="$(ProjectDir)" TargetDir="$(TargetDir)" - GameDir="$(GamePath)" + GameModsDir="$(GameModsPath)" IgnoreModFilePatterns="$(IgnoreModFilePatterns)" /> -- cgit From 9ff6126a662791f511829ca7df0cc0cd96700761 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 5 Sep 2020 11:31:15 -0400 Subject: add dates to package release notes, add missing notes --- docs/technical/mod-package.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'docs/technical/mod-package.md') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 5ac22167..460b5ef7 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -362,10 +362,14 @@ which can be uploaded to NuGet or referenced directly. * Rewrote documentation to make it easier to read. ### 3.1 +Released 01 February 2020. + * Added support for semantic versioning 2.0. * `0Harmony.dll` is now ignored if the mod references Harmony directly (it's bundled with SMAPI). ### 3.0 +Released 26 November 2019. + * Updated for SMAPI 3.0 and Stardew Valley 1.4. * Added automatic support for `assets` folders. * Added `$(GameExecutableName)` MSBuild variable. @@ -379,11 +383,15 @@ which can be uploaded to NuGet or referenced directly. * Migrated package icon to NuGet's new format. ### 2.2 +Released 28 October 2018. + * Added support for SMAPI 2.8+ (still compatible with earlier versions). * Added default game paths for 32-bit Windows. * Fixed valid manifests marked invalid in some cases. ### 2.1 +Released 27 July 2018. + * Added support for Stardew Valley 1.3. * Added support for non-mod projects. * Added C# analyzers to warn about implicit conversions of Netcode fields in Stardew Valley 1.3. @@ -392,12 +400,18 @@ which can be uploaded to NuGet or referenced directly. * Fixed some game paths not detected by NuGet package. ### 2.0.2 +Released 01 November 2017. + * Fixed compatibility issue on Linux. ### 2.0.1 +Released 11 October 2017. + * Fixed mod deploy failing to create subfolders if they don't already exist. ### 2.0 +Released 11 October 2017. + * Added: mods are now copied into the `Mods` folder automatically (configurable). * Added: release zips are now created automatically in your build output folder (configurable). * Added: mod deploy and release zips now exclude Json.NET automatically, since it's provided by SMAPI. @@ -407,38 +421,67 @@ which can be uploaded to NuGet or referenced directly. * Fixed release zip failing if mod name contains characters that aren't valid in a filename. ### 1.7.1 +Released 28 July 2017. + * Fixed issue where i18n folders were flattened. * The manifest/i18n files in the project now take precedence over those in the build output if both are present. ### 1.7 +Released 28 July 2017. + * Added option to create release zips on build. * Added reference to XNA's XACT library for audio-related mods. +### 1.6.2 +Released 10 July 2017. + +* Further improved crossplatform game path detection. +* Removed undocumented `GamePlatform` build property. + +### 1.6.1 +Released 09 July 2017. + +* Improved crossplatform game path detection. + ### 1.6 +Released 05 June 2017. + * Added support for deploying mod files into `Mods` automatically. * Added a build error if a game folder is found, but doesn't contain Stardew Valley or SMAPI. ### 1.5 +Released 23 January 2017. + * Added support for setting a custom game path globally. * Added default GOG path on Mac. ### 1.4 +Released 11 January 2017. + * Fixed detection of non-default game paths on 32-bit Windows. * Removed support for SilVerPLuM (discontinued). * Removed support for overriding the target platform (no longer needed since SMAPI crossplatforms mods automatically). ### 1.3 +Released 31 December 2016. + * Added support for non-default game paths on Windows. ### 1.2 +Released 24 October 2016. + * Exclude game binaries from mod build output. ### 1.1 +Released 21 October 2016. + * Added support for overriding the target platform. ### 1.0 +Released 21 October 2016. + * Initial release. * Added support for detecting the game path automatically. * Added support for injecting XNA/MonoGame references automatically based on the OS. -- cgit From a9ec5a6e9165fe18cc6fca60b81a330bce0e1904 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 5 Sep 2020 14:55:40 -0400 Subject: copyedit package readme --- docs/technical/mod-package.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'docs/technical/mod-package.md') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 460b5ef7..0547b3ff 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -29,13 +29,13 @@ change how these work): * **Detect game path:** The package automatically finds your game folder by scanning the default install paths and Windows registry. It adds two MSBuild properties for use in your `.csproj` file if needed: - $(GamePath)` and `$(GameExecutableName)`. + `$(GamePath)` and `$(GameExecutableName)`. * **Add assembly references:** - The package adds assembly references to SMAPI, Stardew Valley, xTile, and MonoGame (Linux/Mac) or - XNA Framework (Windows). It automatically adjusts depending on which OS you're compiling it on. - If you use [Harmony](https://github.com/pardeike/Harmony), it can optionally add a reference to - that too. + The package adds assembly references to SMAPI, Stardew Valley, xTile, and the game framework + (MonoGame on Linux/Mac, XNA Framework on Windows). It automatically adjusts depending on which OS + you're compiling it on. If you use [Harmony](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Harmony), + it can optionally add a reference to that too. * **Copy files into the `Mods` folder:** The package automatically copies your mod's DLL and PDB files, `manifest.json`, [`i18n` @@ -46,8 +46,8 @@ change how these work): * **Create release zip:** The package adds a zip file in your project's `bin` folder when you rebuild the code, in the - format recommended for uploading to mod sites like Nexus Mods. This includes the same files and - options as the previous feature. + format recommended for uploading to mod sites like Nexus Mods. This includes the same files as + the previous feature. * **Launch or debug mod:** On Windows only, the package configures Visual Studio so you can launch the game and attach a @@ -55,12 +55,11 @@ change how these work): breakpoints](https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2019) in your code while the game is running, or [make simple changes to the mod code without needing to restart the game](https://docs.microsoft.com/en-us/visualstudio/debugger/edit-and-continue?view=vs-2019). - This is disabled on Linux/Mac due to limitations with the Mono wrapper. * **Preconfigure common settings:** The package automatically enables `.pdb` files (so error logs show line numbers to simplify - debugging), and enables support for the simplified `.csproj` format. + debugging), and enables support for the simplified SDK-style `.csproj` format. * **Add code warnings:** The package runs code analysis on your mod and raises warnings for some common errors or @@ -115,8 +114,8 @@ These are the options you can set: GamePath -The absolute path to the Stardew Valley folder. This is auto-detected, so you usually shouldn't -need to change it. +The absolute path to the Stardew Valley folder. This is auto-detected, so you usually don't need to +change it. @@ -133,7 +132,7 @@ The absolute path to the folder containing the game's installed mods (defaults t GameExecutableName -The name of the game's executable file (i.e. `StardewValley.exe` on Linux/Mac or +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. @@ -300,7 +299,7 @@ yourself. To do that: -1. Get the full path containing the Stardew Valley executable. +1. Get the full folder path containing the Stardew Valley executable. 2. See [_configure_](#configure) to add this property: ```xml @@ -348,7 +347,7 @@ To prepare a build of the NuGet package: 1. Install the [NuGet CLI](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#nugetexe-cli). 1. Change the version and release notes in `package.nuspec`. 2. Rebuild the solution in _Release_ mode. -3. Open a terminal in the `bin/Pathoschild.Stardew.ModBuildConfig` package and run this command: +3. Open a terminal in the `bin/Pathoschild.Stardew.ModBuildConfig` folder and run this command: ```bash nuget.exe pack ``` -- cgit From 2022836b819241842acae1d20c61895025bf364b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 6 Sep 2020 20:59:19 -0400 Subject: prepare for release --- build/common.targets | 2 +- docs/release-notes.md | 8 +++++--- docs/technical/mod-package.md | 4 +++- src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj | 2 +- src/SMAPI.ModBuildConfig/package.nuspec | 8 ++++---- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 8 files changed, 19 insertions(+), 15 deletions(-) (limited to 'docs/technical/mod-package.md') diff --git a/build/common.targets b/build/common.targets index 43bbcba5..021e1fe6 100644 --- a/build/common.targets +++ b/build/common.targets @@ -4,7 +4,7 @@ - 3.6.2 + 3.7.0 SMAPI latest diff --git a/docs/release-notes.md b/docs/release-notes.md index b43489d3..3b8b0f8b 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,11 +7,13 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> -## Upcoming release +## 3.7 +Released 07 September 2020 for Stardew Valley 1.4.1 or later. + * For players: * Added heuristic compatibility rewrites. (This improves mod compatibility with Android and future game updates.) * Tweaked the rules for showing update alerts (see _for SMAPI developers_ below for details). - * Simplified error shown for duplicate mods. + * Simplified the error shown for duplicate mods. * Fixed crossplatform compatibility for mods which use the `[HarmonyPatch(type)]` attribute (thanks to spacechase0!). * Fixed map tile rotation broken when you return to the title screen and reload a save. * Fixed broken URL in update alerts for unofficial versions. @@ -31,7 +33,7 @@ * For SMAPI developers: * The web API now returns an update alert in two new cases: any newer unofficial update (previously only shown if the mod was incompatible), and a newer prerelease version if the installed non-prerelease version is broken (previously only shown if the installed version was prerelease). - * Reorganised SMAPI core to reduce coupling to `Game1`, make it easier to navigate, and simplify future game updates. + * Reorganised the SMAPI core to reduce coupling to game types like `Game1`, make it easier to navigate, and simplify future game updates. * SMAPI now automatically fixes code broken by these changes in game code, so manual rewriters are no longer needed: * reference to a method with new optional parameters; * reference to a field replaced by a property; diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 0547b3ff..26ef019f 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -356,7 +356,9 @@ That will create a `Pathoschild.Stardew.ModBuildConfig-.nupkg` file in which can be uploaded to NuGet or referenced directly. ## Release notes -### Upcoming release +### 3.2 +Released 07 September 2020. + * Added option to change `Mods` folder path. * Rewrote documentation to make it easier to read. diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index 5061b01b..5e35b7e9 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -1,7 +1,7 @@  StardewModdingAPI.ModBuildConfig - 3.1.0 + 3.2.0 net45 x86 false diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index afb03cec..c0b0799a 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 3.1.0 + 3.2.0 Build package for SMAPI mods Pathoschild Pathoschild @@ -14,9 +14,9 @@ https://raw.githubusercontent.com/Pathoschild/SMAPI/develop/src/SMAPI.ModBuildConfig/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 3.0 or later. - 3.1.0: - - Added support for semantic versioning 2.0. - - 0Harmony.dll is now ignored if the mod references it directly (it's bundled with SMAPI). + 3.2.0: + - Added option to change `Mods` folder path. + - Rewrote documentation to make it easier to read. diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index 1be55776..368f470c 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,9 +1,9 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "3.6.2", + "Version": "3.7.0", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "3.6.2" + "MinimumApiVersion": "3.7.0" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index c57ac162..8a95a78f 100644 --- a/src/SMAPI.Mods.SaveBackup/manifest.json +++ b/src/SMAPI.Mods.SaveBackup/manifest.json @@ -1,9 +1,9 @@ { "Name": "Save Backup", "Author": "SMAPI", - "Version": "3.6.2", + "Version": "3.7.0", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "3.6.2" + "MinimumApiVersion": "3.7.0" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 485e35fa..858e832f 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -51,7 +51,7 @@ namespace StardewModdingAPI ** Public ****/ /// SMAPI's current semantic version. - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.6.2"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.0"); /// The minimum supported version of Stardew Valley. public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.1"); -- cgit