Skip to content

Commit f9f2f78

Browse files
committed
Nuget - Add CefRedist32CopyResources/CefRedist64CopyResources targets
Can be called to copy the CEF resources to a target folder $(CefRedist32TargetDir)/$(CefRedist64TargetDir)
1 parent 5d0cd66 commit f9f2f78

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

NuGet/cef.redist.x64.props

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,25 @@
77
-->
88

99
<!--
10-
Using wildcard matching as per https://stackoverflow.com/a/17252671
10+
Using wildcard matching as per https://stackoverflow.com/a/17252671
1111
-->
1212
<ItemGroup>
1313
<CefRedist64 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
1414
</ItemGroup>
15+
16+
<Target Name="CefRedist64CopyResources">
17+
<PropertyGroup>
18+
<CefRedist64TargetDir Condition="'$(CefRedist64TargetDir)' == ''">$(TargetDir)</CefRedist64TargetDir>
19+
</PropertyGroup>
20+
<!--
21+
Cannot gurantee access to the main CefRedist64 ItemGroup here
22+
so we create a duplicate inside our target.
23+
https://github.com/dotnet/project-system/issues/4158
24+
-->
25+
<ItemGroup>
26+
<_CefRedist64 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
27+
</ItemGroup>
28+
<Message Importance="high" Text="Copying CEF Redist x64 files from $(MSBuildThisFileDirectory)..\CEF to $(CefRedist64TargetDir)" />
29+
<Copy SourceFiles="@(_CefRedist64)" DestinationFolder="$(CefRedist64TargetDir)" />
30+
</Target>
1531
</Project>

NuGet/cef.redist.x86.props

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,25 @@
77
-->
88

99
<!--
10-
Using wildcard matching as per https://stackoverflow.com/a/17252671
10+
Using wildcard matching as per https://stackoverflow.com/a/17252671
1111
-->
1212
<ItemGroup>
1313
<CefRedist32 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
1414
</ItemGroup>
15+
16+
<Target Name="CefRedist32CopyResources">
17+
<PropertyGroup>
18+
<CefRedist32TargetDir Condition="'$(CefRedist32TargetDir)' == ''">$(TargetDir)</CefRedist32TargetDir>
19+
</PropertyGroup>
20+
<!--
21+
Cannot gurantee access to the main CefRedist32 ItemGroup here
22+
so we create a duplicate inside our target.
23+
https://github.com/dotnet/project-system/issues/4158
24+
-->
25+
<ItemGroup>
26+
<_CefRedist32 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
27+
</ItemGroup>
28+
<Message Importance="high" Text="Copying CEF Redist x86 files from $(MSBuildThisFileDirectory)..\CEF to $(CefRedist32TargetDir)" />
29+
<Copy SourceFiles="@(_CefRedist32)" DestinationFolder="$(CefRedist32TargetDir)" />
30+
</Target>
1531
</Project>

0 commit comments

Comments
 (0)