diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-30 20:12:44 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-30 20:12:44 -0400 |
commit | c48f6d78cc412c5f2e40a8b460b7b3c1c993c51a (patch) | |
tree | 5214374bfeac75000bf1f3b051d8217422f2fe67 /src | |
parent | 75f3600ab1eae06463ae8f386c5ab71f3815142f (diff) | |
parent | 58dde207afe2d99a5f4c047334a79acdd312ec58 (diff) | |
download | SMAPI-c48f6d78cc412c5f2e40a8b460b7b3c1c993c51a.tar.gz SMAPI-c48f6d78cc412c5f2e40a8b460b7b3c1c993c51a.tar.bz2 SMAPI-c48f6d78cc412c5f2e40a8b460b7b3c1c993c51a.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj | 7 | ||||
-rw-r--r-- | src/SMAPI.ModBuildConfig/build/smapi.targets | 21 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index 5992fbbf..b18e79d5 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -9,16 +9,12 @@ <!--NuGet package--> <PackageId>Pathoschild.Stardew.ModBuildConfig</PackageId> <Title>Build package for SMAPI mods</Title> - <Version>3.2.2</Version> + <Version>3.3.0</Version> <Authors>Pathoschild</Authors> <Description>Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 3.0 or later.</Description> <PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageIcon>images/icon.png</PackageIcon> <PackageProjectUrl>https://smapi.io/package/readme</PackageProjectUrl> - <PackageReleaseNotes> - - Reworked and streamlined how the package is compiled. - - Added SMAPI-ModTranslationClassBuilder files to the ignore list. - </PackageReleaseNotes> <IncludeBuildOutput>false</IncludeBuildOutput> </PropertyGroup> @@ -48,5 +44,4 @@ <None PackagePath="build/Pathoschild.Stardew.ModBuildConfig.targets" Include="build\smapi.targets" Pack="true" /> <None PackagePath="images/icon.png" Include="assets\nuget-icon.png" Pack="true" /> </ItemGroup> - </Project> 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 @@ <!-- recognise XNA Framework DLLs in the GAC (only affects mods using new csproj format) --> <AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths> + <!-- suppress processor architecture mismatch warning (mods should be compiled in 'Any CPU' so they work in both 32-bit and 64-bit mode) --> + <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> + <!-- set default package options --> <ModFolderName Condition="'$(ModFolderName)' == ''">$(MSBuildProjectName)</ModFolderName> <ModZipPath Condition="'$(ModZipPath)' == ''">$(TargetDir)</ModZipPath> @@ -24,6 +27,9 @@ <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'"> @@ -54,7 +60,7 @@ <!-- Game framework --> <Choose> - <When Condition="$(DefineConstants.Contains(SMAPI_FOR_XNA))"> + <When Condition="'$(GameFramework)' == 'Xna'"> <ItemGroup> <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" Private="$(CopyModReferencesToBuildOutput)" /> <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" Private="$(CopyModReferencesToBuildOutput)" /> @@ -71,14 +77,19 @@ <!--********************************************* - ** Show friendly error for invalid OS or game path + ** Show validation messages **********************************************--> <Target Name="BeforeBuild"> + <!-- unknown OS type --> <Error Condition="'$(OS)' != 'OSX' AND '$(OS)' != 'Unix' AND '$(OS)' != 'Windows_NT'" Text="The mod build package doesn't recognise OS type '$(OS)'." /> - <Error Condition="!Exists('$(GamePath)')" Text="The mod build package can't find your game folder. You can specify where to find it; see https://smapi.io/package/custom-game-path." /> - <Error Condition="!Exists('$(GamePath)\$(GameExecutableName).exe')" Text="The mod build package found a game folder at $(GamePath), but it doesn't contain the $(GameExecutableName) file. If this folder is invalid, delete it and the package will autodetect another game install path." /> - <Error Condition="!Exists('$(GamePath)\StardewModdingAPI.exe')" Text="The mod build package found a game folder at $(GamePath), but it doesn't contain SMAPI. You need to install SMAPI before building the mod." /> + <!-- invalid game path --> + <Error Condition="!Exists('$(GamePath)')" Text="The mod build package can't find your game folder. You can specify where to find it; see https://smapi.io/package/custom-game-path." ContinueOnError="false" /> + <Error Condition="!Exists('$(GamePath)\$(GameExecutableName).exe')" Text="The mod build package found a game folder at $(GamePath), but it doesn't contain the $(GameExecutableName) file. If this folder is invalid, delete it and the package will autodetect another game install path." ContinueOnError="false" /> + <Error Condition="!Exists('$(GamePath)\StardewModdingAPI.exe')" Text="The mod build package found a game folder at $(GamePath), but it doesn't contain SMAPI. You need to install SMAPI before building the mod." ContinueOnError="false" /> + + <!-- invalid target architecture (note: internal value is 'AnyCPU', value shown in Visual Studio is 'Any CPU') --> + <Warning Condition="'$(Platform)' != 'AnyCPU'" 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 '$(Platform)'). See https://smapi.io/package/wrong-processor-architecture for details." HelpLink="https://smapi.io/package/wrong-processor-architecture" /> </Target> |