remove Costura assembly weaving (#166)

This didn't work on Linux or Mac, caused assembly resolution problems when rewritten mods referenced Json.NET, complicated debugging, and wasn't really needed since players use the installer to cleanly add or remove SMAPI.
This commit is contained in:
Jesse Plamondon-Willard 2016-12-01 01:48:39 -05:00
parent 33f46d26f4
commit 67feb7e9a9
5 changed files with 5 additions and 25 deletions

View File

@ -86,6 +86,9 @@ directory containing `src`).
steam_appid.txt
Windows/
Mods/*
Mono.Cecil.dll
Mono.Cecil.Rocks.dll
Newtonsoft.Json.dll
StardewModdingAPI.exe
StardewModdingAPI.pdb
StardewModdingAPI.xml

View File

@ -67,8 +67,8 @@
<Copy SourceFiles="$(TargetDir)\readme.txt" DestinationFiles="$(CompiledInstallerPath)\readme.txt" />
<!-- copy SMAPI files for Mono -->
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.Rocks.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe" DestinationFolder="$(CompiledInstallerPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe.mdb" DestinationFolder="$(CompiledInstallerPath)\Mono" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.AssemblyRewriters.dll" DestinationFolder="$(CompiledInstallerPath)\Mono" />
@ -80,6 +80,7 @@
<!-- copy SMAPI files for Windows -->
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(CompiledInstallerPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.Rocks.dll" DestinationFolder="$(CompiledInstallerPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(CompiledInstallerPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe" DestinationFolder="$(CompiledInstallerPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.pdb" DestinationFolder="$(CompiledInstallerPath)\Windows" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.xml" DestinationFolder="$(CompiledInstallerPath)\Windows" />

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Costura>
<ExcludeAssemblies>
StardewModdingAPI.AssemblyRewriters
Stardew Valley
xTile
Steamworks.NET
Lidgren.Network
</ExcludeAssemblies>
</Costura>
</Weavers>

View File

@ -198,7 +198,6 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
<Content Include="icon.ico" />
<Content Include="steam_appid.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@ -227,14 +226,6 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- merge Json.NET into the assembly (only in release mode to allow debugging, and only for Windows since Costura isn't crossplatform) -->
<Import Project="..\packages\Fody.1.29.4\build\dotnet\Fody.targets" Condition="$(Configuration) != 'Debug' AND $(OS) == 'WINDOWS_NT' AND Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.4\build\dotnet\Fody.targets'))" />
</Target>
<!-- if game path is invalid, show one user-friendly error instead of a slew of reference errors -->
<Target Name="BeforeBuild">
<Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically; edit the *.csproj file and manually add a &lt;GamePath&gt; setting with the full directory path containing the Stardew Valley executable." />

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="1.3.3.0" targetFramework="net461" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net461" developmentDependency="true" />
<package id="Mono.Cecil" version="0.9.6.4" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net461" />
</packages>