Skip to content

Commit

Permalink
Seems costura does NOT include SQLite.Interop.dll in the builds autom…
Browse files Browse the repository at this point in the history
…atically.

Gotta configure it to do that include. :sadcthulhu:
  • Loading branch information
CaitSith2 committed Feb 2, 2017
1 parent 42a26ca commit 2276e41
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ios-steamguard-extractor/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Costura/>

<Costura>
<Unmanaged32Assemblies>
SQLite.Interop
</Unmanaged32Assemblies>
<Unmanaged64Assemblies>
SQLite.Interop
</Unmanaged64Assemblies>
</Costura>
</Weavers>
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions ios-steamguard-extractor/ios-steamguard-extractor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="costura32\SQLite.Interop.dll" />
<EmbeddedResource Include="costura64\SQLite.Interop.dll" />
<Content Include="docs\ChangeLog.txt" />
<Content Include="docs\html\Claunia.PropertyList\ASCIIPropertyListParser.html" />
<Content Include="docs\html\Claunia.PropertyList\BinaryPropertyListParser.html" />
Expand Down Expand Up @@ -161,6 +163,42 @@
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets'))" />
</Target>
<Import Project="..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets')" />
<UsingTask TaskName="CosturaCleanup" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" TaskFactory="CodeTaskFactory">
<ParameterGroup>
<Config Output="false" Required="true" ParameterType="Microsoft.Build.Framework.ITaskItem" />
<Files Output="false" Required="true" ParameterType="Microsoft.Build.Framework.ITaskItem[]" />
</ParameterGroup>
<Task Evaluate="true">
<Reference xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Include="System.Xml" />
<Reference xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Include="System.Xml.Linq" />
<Using xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Namespace="System" />
<Using xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Namespace="System.IO" />
<Using xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Namespace="System.Xml.Linq" />
<Code xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Type="Fragment" Language="cs"><![CDATA[
var config = XElement.Load(Config.ItemSpec).Elements("Costura").FirstOrDefault();
if (config == null) return true;
var excludedAssemblies = new List<string>();
var attribute = config.Attribute("ExcludeAssemblies");
if (attribute != null)
foreach (var item in attribute.Value.Split('|').Select(x => x.Trim()).Where(x => x != string.Empty))
excludedAssemblies.Add(item);
var element = config.Element("ExcludeAssemblies");
if (element != null)
foreach (var item in element.Value.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).Where(x => x != string.Empty))
excludedAssemblies.Add(item);
var filesToCleanup = Files.Select(f => f.ItemSpec).Where(f => !excludedAssemblies.Contains(Path.GetFileNameWithoutExtension(f), StringComparer.InvariantCultureIgnoreCase));
foreach (var item in filesToCleanup)
File.Delete(item);
]]></Code>
</Task>
</UsingTask>
<Target Name="CleanReferenceCopyLocalPaths" AfterTargets="AfterBuild;NonWinFodyTarget">
<CosturaCleanup Config="FodyWeavers.xml" Files="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')" />
</Target>
<!-- 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">
Expand Down

0 comments on commit 2276e41

Please sign in to comment.