Skip to content

Commit

Permalink
Some build support changes needed to support 32-bit.
Browse files Browse the repository at this point in the history
Part of #5.
  • Loading branch information
alexrp committed Jul 5, 2022
1 parent bb3f8ca commit 1a194ce
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
22 changes: 19 additions & 3 deletions src/injection/injection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ assemblies into processes.</PackageDescription>
<PackageReference Include="PeNet" />
</ItemGroup>

<Target Name="_AddModuleContent"
DependsOnTargets="ResolveAssemblyReferences"
BeforeTargets="AssignTargetPaths">
<Target Name="_AddModule"
Returns="@(Content)">
<MSBuild Projects="../module/module.cproj"
Targets="GetTargetPath">
<Output TaskParameter="TargetOutputs"
Expand All @@ -53,4 +52,21 @@ assemblies into processes.</PackageDescription>
PackagePath="ruptura" />
</ItemGroup>
</Target>

<Target Name="_AddModules"
DependsOnTargets="ResolveAssemblyReferences"
BeforeTargets="AssignTargetPaths">
<ItemGroup>
<_RuntimeIdentifiers Include="win-x64" />
<_Projects Include="$(MSBuildProjectFullPath)"
Properties="RuntimeIdentifier=%(_RuntimeIdentifiers.Identity)" />
</ItemGroup>

<MSBuild Projects="@(_Projects)"
Targets="_AddModule"
BuildInParallel="$(BuildInParallel)">
<Output TaskParameter="TargetOutputs"
ItemName="Content" />
</MSBuild>
</Target>
</Project>
10 changes: 8 additions & 2 deletions src/module/module.cproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Vezel.Zig.Sdk">
<PropertyGroup>
<AssemblyName>ruptura-x64</AssemblyName>
<AssemblyName>ruptura</AssemblyName>
<DefineConstants>
$(DefineConstants);
WIN32_LEAN_AND_MEAN;
Expand All @@ -12,7 +12,13 @@
</DisableWarnings>
<!-- TODO: https://github.com/dotnet/msbuild/issues/6672 -->
<PackageDefines>false</PackageDefines>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>
win-x64
</RuntimeIdentifiers>
</PropertyGroup>

<PropertyGroup>
<AssemblyName Condition="'$(RuntimeIdentifier)' != ''">ruptura-$(RuntimeIdentifier.Split('-')[1])</AssemblyName>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 1a194ce

Please sign in to comment.