Skip to content

Commit

Permalink
Adds post-build ILMerge support
Browse files Browse the repository at this point in the history
Mitigates 7.5.0 ModKit loading not loading dependencies first.
  • Loading branch information
Spoffy committed Jun 19, 2018
1 parent 8944157 commit 13e3f99
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
40 changes: 25 additions & 15 deletions DiscordLink/DiscordLink.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,34 @@
<HintPath>..\packages\DSharpPlus.WebSocket.WebSocket4Net.3.2.3\lib\net46\DSharpPlus.WebSocket.WebSocket4Net.dll</HintPath>
</Reference>
<Reference Include="Eco.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.core.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.core.dll</HintPath>
</Reference>
<Reference Include="Eco.Gameplay, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.gameplay.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.gameplay.dll</HintPath>
</Reference>
<Reference Include="Eco.ModKit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.modkit.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.modkit.dll</HintPath>
</Reference>
<Reference Include="Eco.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.plugins.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.plugins.dll</HintPath>
</Reference>
<Reference Include="Eco.Shared, Version=0.7.4.6, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.shared.dll</HintPath>
<Reference Include="Eco.Shared, Version=0.7.5.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.5.0\eco.shared.dll</HintPath>
</Reference>
<Reference Include="Eco.Simulation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.simulation.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.simulation.dll</HintPath>
</Reference>
<Reference Include="Eco.Stats, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.stats.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.stats.dll</HintPath>
</Reference>
<Reference Include="Eco.WebServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.webserver.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.webserver.dll</HintPath>
</Reference>
<Reference Include="Eco.World, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.world.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.world.dll</HintPath>
</Reference>
<Reference Include="Eco.WorldGenerator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\DLLs-7.4.6\eco.worldgenerator.dll</HintPath>
<HintPath>..\..\DLLs-7.5.0\eco.worldgenerator.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand Down Expand Up @@ -109,8 +109,18 @@
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Target> -->
<PropertyGroup>
<ILMergeConsoleCommand>C:\"Program Files (x86)"\Microsoft\ILMerge\ILMerge.exe</ILMergeConsoleCommand>
<MergeOutput>DiscordLinkUnified.dll</MergeOutput>
</PropertyGroup>
<Target Name="AfterBuild">
<GetFrameworkPath>
<Output
TaskParameter="Path"
PropertyName="FrameworkPath" />
</GetFrameworkPath>
<Exec Command="echo $(FrameworkPath)"/>
<Exec Command="$(ILMergeConsoleCommand) /lib:$(FrameworkPath) /targetplatform:v4 /out:$(OutputPath)$(MergeOutput) $(OutputPath)DiscordLink.dll $(OutputPath)DSharpPlus/DSharpPlus.dll $(OutputPath)Newtonsoft.json.dll $(OutputPath)DSharpPlus.CommandsNext.dll $(OutputPath)WebSocket4Net.dll $(OutputPath)DSharpPlus.WebSocket.WebSocket4Net.dll " />
</Target>
</Project>
1 change: 1 addition & 0 deletions DiscordLink/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<package id="DSharpPlus" version="3.2.3" targetFramework="net46" />
<package id="DSharpPlus.CommandsNext" version="3.2.3" targetFramework="net46" />
<package id="DSharpPlus.WebSocket.WebSocket4Net" version="3.2.3" targetFramework="net46" />
<package id="ILMerge" version="2.14.1208" targetFramework="net46" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
<package id="WebSocket4Net" version="0.14.1" targetFramework="net46" />
</packages>

0 comments on commit 13e3f99

Please sign in to comment.