remove GameFramework build property from package

This commit is contained in:
Jesse Plamondon-Willard 2021-09-16 18:59:25 -04:00
parent 4a26c96fbe
commit bf10aeef0a
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
5 changed files with 11 additions and 22 deletions

View File

@ -32,10 +32,10 @@ change how these work):
`$(GamePath)` and `$(GameModsPath)`.
* **Add assembly references:**
The package adds assembly references to SMAPI, Stardew Valley, xTile, and the game framework
(MonoGame on Linux/macOS, 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.
The package adds assembly references to MonoGame, SMAPI, Stardew Valley, and xTile. 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`
@ -129,14 +129,6 @@ The absolute path to the folder containing the game's installed mods (defaults t
</td>
</tr>
<tr>
<td><code>GameFramework</code></td>
<td>
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.
</td>
</tr>
</table>
</li>
@ -373,7 +365,8 @@ when you compile it.
## Upcoming release
* 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.
* Removed the `GameExecutableName` build property (since it now has the same value on all platforms).
* Removed the `GameExecutableName` and `GameFramework` build properties (since they now have the
same value on all platforms).
* Improved analyzer performance by enabling parallel execution.
**Migration guide for mod authors:**
@ -381,6 +374,7 @@ when you compile it.
[_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:
* If you use `$(GameExecutableName)`, replace it with `Stardew Valley`.
* If you use `$(GameFramework)`, replace it with `MonoGame` and remove any XNA-specific logic.
## 3.3.0
Released 30 March 2021.

View File

@ -30,9 +30,6 @@
<EnableHarmony Condition="'$(EnableHarmony)' == ''">false</EnableHarmony>
<EnableGameDebugging Condition="'$(EnableGameDebugging)' == ''">true</EnableGameDebugging>
<CopyModReferencesToBuildOutput Condition="'$(CopyModReferencesToBuildOutput)' == '' OR ('$(CopyModReferencesToBuildOutput)' != 'true' AND '$(CopyModReferencesToBuildOutput)' != 'false')">false</CopyModReferencesToBuildOutput>
<GameFramework Condition="'$(GameFramework)' == '' AND '$(OS)' == 'Windows_NT'">Xna</GameFramework>
<GameFramework Condition="'$(GameFramework)' == ''">MonoGame</GameFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' AND '$(EnableGameDebugging)' == 'true'">

View File

@ -241,8 +241,7 @@ namespace StardewModdingAPI
/// <summary>Get metadata for mapping assemblies to the current platform.</summary>
/// <param name="targetPlatform">The target game platform.</param>
/// <param name="framework">The game framework running the game.</param>
internal static PlatformAssemblyMap GetAssemblyMap(Platform targetPlatform, GameFramework framework)
internal static PlatformAssemblyMap GetAssemblyMap(Platform targetPlatform)
{
var removeAssemblyReferences = new List<string>();
var targetAssemblies = new List<Assembly>();

View File

@ -53,16 +53,15 @@ namespace StardewModdingAPI.Framework.ModLoading
*********/
/// <summary>Construct an instance.</summary>
/// <param name="targetPlatform">The current game platform.</param>
/// <param name="framework">The game framework running the game.</param>
/// <param name="monitor">Encapsulates monitoring and logging.</param>
/// <param name="paranoidMode">Whether to detect paranoid mode issues.</param>
/// <param name="rewriteMods">Whether to rewrite mods for compatibility.</param>
public AssemblyLoader(Platform targetPlatform, GameFramework framework, IMonitor monitor, bool paranoidMode, bool rewriteMods)
public AssemblyLoader(Platform targetPlatform, IMonitor monitor, bool paranoidMode, bool rewriteMods)
{
this.Monitor = monitor;
this.ParanoidMode = paranoidMode;
this.RewriteMods = rewriteMods;
this.AssemblyMap = this.TrackForDisposal(Constants.GetAssemblyMap(targetPlatform, framework));
this.AssemblyMap = this.TrackForDisposal(Constants.GetAssemblyMap(targetPlatform));
// init resolver
this.AssemblyDefinitionResolver = this.TrackForDisposal(new AssemblyDefinitionResolver());

View File

@ -1473,7 +1473,7 @@ namespace StardewModdingAPI.Framework
// load mods
IList<IModMetadata> skippedMods = new List<IModMetadata>();
using (AssemblyLoader modAssemblyLoader = new AssemblyLoader(Constants.Platform, Constants.GameFramework, this.Monitor, this.Settings.ParanoidWarnings, this.Settings.RewriteMods))
using (AssemblyLoader modAssemblyLoader = new AssemblyLoader(Constants.Platform, this.Monitor, this.Settings.ParanoidWarnings, this.Settings.RewriteMods))
{
// init
HashSet<string> suppressUpdateChecks = new HashSet<string>(this.Settings.SuppressUpdateChecks, StringComparer.OrdinalIgnoreCase);