Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathoschild committed Nov 4, 2024
2 parents 74e20ea + f0e74ea commit 7a91eee
Show file tree
Hide file tree
Showing 716 changed files with 46,169 additions and 44,805 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,22 @@ csharp_prefer_braces = false:hint
##########
[*.md]
guidelines = 100

##########
## Suppress warnings in rewrite facades
## See ReSharper docs: https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html.
##########
[src/SMAPI/Framework/ModLoading/Rewriters/**/*Facade.cs]
dotnet_diagnostic.CS1591.severity = none # missing XML doc comment -- not meant to be used directly
resharper_identifier_typo_highlighting = none # identifier typo -- matches game code
resharper_inconsistent_naming_highlighting = none # inconsistent naming -- matches game code
resharper_local_variable_hides_member_highlighting = none # local variable hides member -- matches game code
resharper_parameter_hides_member_highlighting = none # parameter hides member -- matches game code
resharper_redundant_base_qualifier_highlighting = none # redundant base qualifier -- deliberate for clarity, and to avoid accidentally calling a facade method
resharper_unused_member_global_highlighting = none # unused member -- used via rewriting

##########
## Suppress warnings in event interfaces
##########
[src/SMAPI/Events/I*Events.cs]
dotnet_diagnostic.CS1572.severity = none # docblock has 'param' tag for missing parameter -- this is deliberate to let mods use <inheritdoc />
2 changes: 1 addition & 1 deletion build/common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repo. It imports the other MSBuild files as needed.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--set general build properties -->
<Version>4.0.8</Version>
<Version>4.1.0</Version>
<Product>SMAPI</Product>
<LangVersion>latest</LangVersion>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
Expand Down
5 changes: 0 additions & 5 deletions build/deploy-local-smapi.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ This assumes `find-game-folder.targets` has already been imported and validated.

<!-- .NET dependencies -->
<Copy SourceFiles="$(TargetDir)\System.Management.dll" DestinationFolder="$(GamePath)\smapi-internal" Condition="$(OS) == 'Windows_NT'" />

<!-- Legacy .NET dependencies (remove in SMAPI 4.0.0) -->
<Copy SourceFiles="$(TargetDir)\System.Configuration.ConfigurationManager.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\System.Runtime.Caching.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\System.Security.Permissions.dll" DestinationFolder="$(GamePath)\smapi-internal" />
</Target>

<!-- .NET metadata files -->
Expand Down
7 changes: 1 addition & 6 deletions build/unix/prepare-install-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for folder in ${folders[@]}; do

echo "Compiling installer for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI.Installer --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" -p:PublishTrimmed=True -p:TrimMode=Link --self-contained true
dotnet publish src/SMAPI.Installer --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" --self-contained true
echo ""
echo ""

Expand Down Expand Up @@ -151,11 +151,6 @@ for folder in ${folders[@]}; do
cp "$smapiBin/System.Management.dll" "$bundlePath/smapi-internal"
fi

# copy legacy .NET dependencies (remove in SMAPI 4.0.0)
cp "$smapiBin/System.Configuration.ConfigurationManager.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Runtime.Caching.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Security.Permissions.dll" "$bundlePath/smapi-internal"

# copy bundled mods
for modName in ${bundleModNames[@]}; do
fromPath="src/SMAPI.Mods.$modName/bin/$buildConfig/$runtime/publish"
Expand Down
7 changes: 1 addition & 6 deletions build/windows/prepare-install-package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ foreach ($folder in $folders) {

echo "Compiling installer for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI.Installer --configuration $buildConfig -v minimal --runtime "$runtime" --framework "$framework" -p:OS="$msbuildPlatformName" -p:TargetFrameworks="$framework" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" -p:PublishTrimmed=True -p:TrimMode=Link --self-contained true
dotnet publish src/SMAPI.Installer --configuration $buildConfig -v minimal --runtime "$runtime" --framework "$framework" -p:OS="$msbuildPlatformName" -p:TargetFrameworks="$framework" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" --self-contained true
echo ""
echo ""

Expand Down Expand Up @@ -177,11 +177,6 @@ foreach ($folder in $folders) {
cp "$smapiBin/System.Management.dll" "$bundlePath/smapi-internal"
}

# copy legacy .NET dependencies (remove in SMAPI 4.0.0)
cp "$smapiBin/System.Configuration.ConfigurationManager.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Runtime.Caching.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Security.Permissions.dll" "$bundlePath/smapi-internal"

# copy bundled mods
foreach ($modName in $bundleModNames) {
$fromPath = "src/SMAPI.Mods.$modName/bin/$buildConfig/$runtime/publish"
Expand Down
65 changes: 64 additions & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
[README](README.md)

# Release notes
## 4.1.0
Released 04 November 2024 for Stardew Valley 1.6.9 or later. See [release highlights](https://www.patreon.com/posts/115304143).

* For players:
* Updated for Stardew Valley 1.6.9.
* SMAPI now auto-detects missing or modified content files, and logs a warning if found.
* SMAPI now uses iTerm2 on macOS if it's installed (thanks to yinxiangshi!).
* SMAPI now enables GameMode on Linux if it's installed (thanks to noah1510!).
* SMAPI now anonymizes paths containing your home path (thanks to AnotherPillow!).
* Removed confusing "Found X mods with warnings:" log message.
* The installer on Linux now tries to open a terminal if needed (thanks to HoodedDeath!).
* Fixed installer not detecting Linux Flatpak install paths.
* Fixed various content issues for non-English players (e.g. content packs not detecting the current festival correctly).
* Fixed dependencies on obsolete redundant mods not ignored in some cases.
* Fixed issues in Console Commands:
* Fixed `list_items` & `player_add` not handling dried items, pickled forage, smoked fish, and specific bait correctly.
* Fixed `list_items` & `player_add` listing some flooring & wallpaper items twice.
* Fixed `show_data_files` & `show_game_files` no longer working correctly (thanks to jakerosado!).
* Fixed some mod overlays mispositioned when your UI scale is non-100% and zoom level is 100%.
* Fixed incorrect 'direct console access' warnings.
* Updated mod compatibility list.

* For mod authors:
* Added support for [private assembly references](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest#Private_assemblies) (thanks to Shockah!).
* Added support for [i18n subfolders](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Translation#i18n_folder) (thanks to spacechase0!).
* Added asset propagation for `Data/ChairTiles`.
* Added new C# API methods:
* Added `DoesAssetExist` methods to `helper.GameContent` and `helper.ModContent` (thanks to KhloeLeclair!).
* Added scroll wheel suppression via `helper.Input.SuppressScrollWheel()` (thanks to MercuriusXeno!).
* Added `PathUtilities.AnonymizePathForDisplay` to anonymize home paths (thanks to AnotherPillow!).
* Added parameter docs to event interfaces. This lets you fully document your event handlers like `/// <inheritdoc cref="IGameLoopEvents.SaveLoaded" />`.
* Translations now support [gender switch blocks](https://stardewvalleywiki.com/Modding:Dialogue#Gender_switch).
* Translations now support tokens in their placeholder text.
* SMAPI no longer blocks map edits which change the tilesheet order, since that no longer causes crashes in Stardew Valley 1.6.9.
* The SMAPI log now includes the assembly version of each loaded mod (thanks to spacechase0!).
* Updated dependencies, including...
* [FluentHttpClient](https://github.com/Pathoschild/FluentHttpClient#readme) 4.3.0 → 4.4.1 (see [changes](https://github.com/Pathoschild/FluentHttpClient/blob/develop/RELEASE-NOTES.md#441));
* [Pintail](https://github.com/Nanoray-pl/Pintail) 2.3.0 → 2.6.0 (see [changes](https://github.com/Nanoray-pl/Pintail/blob/master/docs/release-notes.md#260)).
* Fixed `content.Load` ignoring language override in recent versions.
* Fixed player sprites and building paint masks not always propagated on change.
* Fixed `.tmx` map tile sizes being premultiplied, which is inconsistent with the game's `.tbin` maps.
* Fixed various edge cases when chaining methods on `Translation` instances.

* For the update check server:
* Rewrote update checks for mods on CurseForge and ModDrop to use new export API endpoints.
_This should result in much faster update checks for those sites, and less chance of update-check errors when their servers are under heavy load._
* Added workaround for CurseForge auto-syncing prerelease versions with an invalid version number.

* For the log parser:
* Clicking a checkbox in the mod list now always only changes that checkbox, to allow hiding a single mod.
* Fixed the wrong game folder path shown if the `Mods` folder path was customized.

* For the JSON validator:
* Updated for Content Patcher 2.1.0 &ndash; 2.4.0, and fixed validation for `Priority` fields.
* Fixed incorrect errors shown for..
* some valid `Entries`, `Fields`, `MapProperties`, `MapTiles`, and `When` field values;
* `CustomLocations` entries which use the new [unique string ID](https://stardewvalleywiki.com/Modding:Common_data_field_types#Unique_string_ID) format;
* `AddWarps` warps when a location name contains a dot.

* For the web API:
* The [anonymized metrics for update check requests](technical/web.md#modsmetrics) now counts requests by SMAPI and game version.

## 4.0.8
Released 21 April 2024 for Stardew Valley 1.6.4 or later.

Expand All @@ -19,7 +81,7 @@ Released 21 April 2024 for Stardew Valley 1.6.4 or later.
Released 18 April 2024 for Stardew Valley 1.6.4 or later.

* For players:
* Updated for Stardew Valley 1.6.4. **This drops compatibility with Stardew Valley 1.6.0–1.6.3.**
* Updated for Stardew Valley 1.6.4.
* The installer now lists detected game folders with an incompatible version to simplify troubleshooting.
* When the installer asks for a game folder path, entering an incorrect path to a file inside it will now still select the folder.
* Fixed installer not detecting 1.6 compatibility branch.
Expand Down Expand Up @@ -119,6 +181,7 @@ Released 19 March 2024 for Stardew Valley 1.6.0 or later. See [release highlight

* For the web UI:
* Updated JSON validator for Content Patcher 2.0.0.
* Added [anonymized metrics for update check requests](technical/web.md#modsmetrics).
* Fixed uploaded log/JSON file expiry alway shown as renewed.
* Fixed update check for mods with a prerelease version tag not recognized by the ModDrop API. SMAPI now parses the version itself if needed.

Expand Down
217 changes: 217 additions & 0 deletions docs/technical/mod-package-release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
&larr; [mod build config](./mod-build-config.md)

## Release notes
## Upcoming release
* Removed build warnings for implicit net field conversions, which were removed in Stardew Valley 1.6.9.

## 4.3.0
Released 06 October 2024 for SMAPI 3.13.0 or later.

* You can now [bundle content packs with your mod](mod-package.md#bundle-content-packs) (thanks to abhiaagarwal!).

### 4.2.0
Released 05 September 2024 for SMAPI 3.13.0 or later.

* Added support for `i18n` subfolders (thanks to spacechase0!).
* Updated dependencies.

### 4.1.1
Released 24 June 2023 for SMAPI 3.13.0 or later.

* Replaced `.pdb` files with embedded symbols by default. This fixes logged errors not having line numbers on Linux/macOS.

### 4.1.0
Released 08 January 2023 for SMAPI 3.13.0 or later.

* Added `manifest.json` format validation on build (thanks to tylergibbs2!).
* Fixed game DLLs not excluded from the release zip when they're referenced explicitly but `BundleExtraAssemblies` isn't set.

### 4.0.2
Released 09 October 2022 for SMAPI 3.13.0 or later.

* Switched to the newer crossplatform `portable` debug symbols (thanks to lanturnalis!).
* Fixed `BundleExtraAssemblies` option being partly case-sensitive.
* Fixed `BundleExtraAssemblies` not applying `All` value to game assemblies.

### 4.0.1
Released 14 April 2022 for SMAPI 3.13.0 or later.

* Added detection for Xbox app game folders.
* Fixed "_conflicts between different versions of Microsoft.Win32.Registry_" warnings in recent SMAPI versions.
* Internal refactoring.

### 4.0.0
Released 30 November 2021 for SMAPI 3.13.0 or later.

* Updated for Stardew Valley 1.5.5 and SMAPI 3.13.0. (Older versions are no longer supported.)
* Added `IgnoreModFilePaths` option to ignore literal paths.
* Added `BundleExtraAssemblies` option to copy bundled DLLs into the mod zip/folder.
* Removed the `GameExecutableName` and `GameFramework` options (since they now have the same value
on all platforms).
* Removed the `CopyModReferencesToBuildOutput` option (superseded by `BundleExtraAssemblies`).
* Improved analyzer performance by enabling parallel execution.

**Migration guide for mod authors:**
1. See [_migrate to 64-bit_](https://stardewvalleywiki.com/Modding:Migrate_to_64-bit_on_Windows) and
[_migrate to Stardew Valley 1.5.5_](https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.5.5).
2. Possible changes in your `.csproj` or `.targets` files:
* Replace `$(GameExecutableName)` with `Stardew Valley`.
* Replace `$(GameFramework)` with `MonoGame` and remove any XNA Framework-specific logic.
* Replace `<CopyModReferencesToBuildOutput>true</CopyModReferencesToBuildOutput>` with
`<BundleExtraAssemblies>Game</BundleExtraAssemblies>`.
* If you need to bundle extra DLLs besides your mod DLL, see the [`BundleExtraAssemblies`
documentation](#configure).

### 3.3.0
Released 30 March 2021 for SMAPI 3.0.0 or later.

* 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 for SMAPI 3.0.0 or later.

* Reworked and streamlined how the package is compiled.
* Added [SMAPI-ModTranslationClassBuilder](https://github.com/Pathoschild/SMAPI-ModTranslationClassBuilder)
files to the ignore list.

### 3.2.1
Released 11 September 2020 for SMAPI 3.0.0 or later.

* Added more detailed logging.
* Fixed _path's format is not supported_ error when using default `Mods` path in 3.2.

### 3.2.0
Released 07 September 2020 for SMAPI 3.0.0 or later.

* Added option to change `Mods` folder path.
* Rewrote documentation to make it easier to read.

### 3.1.0
Released 01 February 2020 for SMAPI 3.0.0 or later.

* 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.0
Released 26 November 2019 for SMAPI 3.0.0 or later.

* Updated for SMAPI 3.0 and Stardew Valley 1.4.
* Added automatic support for `assets` folders.
* Added `$(GameExecutableName)` MSBuild variable.
* Added support for projects using the simplified `.csproj` format.
* 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.
* Migrated package icon to NuGet's new format.

### 2.2.0
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.0
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.
* Added option to ignore files by regex pattern.
* Added reference to new SMAPI DLL.
* 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.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.
* Added mod's version to release zip filename.
* Improved errors to simplify troubleshooting.
* Fixed release zip not having a mod folder.
* 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.0
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.0
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.0
Released 23 January 2017.

* Added support for setting a custom game path globally.
* Added default GOG path on macOS.

### 1.4.0
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.0
Released 31 December 2016.

* Added support for non-default game paths on Windows.

### 1.2.0
Released 24 October 2016.

* Exclude game binaries from mod build output.

### 1.1.0
Released 21 October 2016.

* Added support for overriding the target platform.

### 1.0.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.
* Added support for mod builders like SilVerPLuM.
Loading

0 comments on commit 7a91eee

Please sign in to comment.