Skip to content

Commit 8a902f2

Browse files
committed
Nuget - Add CefRedist32/CefRedist64 props and extra copy Targets to chromiumembeddedframework.runtime packages
Haven't tested to see if folder structure is preserved, still need to do that. Issue #93
1 parent 3ea969c commit 8a902f2

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

NuGet/chromiumembeddedframework.runtime.win-arm64.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
<ItemGroup>
77
<CefRuntimeWinArm64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-arm64\locales\*.*" />
88
<CefRuntimeWinArm64SwiftShader Include="$(MSBuildThisFileDirectory)..\CEF\win-arm64\swiftshader\*.*" />
9+
<CefRuntimeWinArm64Native Include="$(MSBuildThisFileDirectory)..\runtimes\win-arm64\native\*.*" />
910
</ItemGroup>
1011
</Project>

NuGet/chromiumembeddedframework.runtime.win-x64.props

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,27 @@
66
<ItemGroup>
77
<CefRuntimeWin64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\locales\*.*" />
88
<CefRuntimeWin64SwiftShader Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\swiftshader\*.*" />
9+
<CefRuntimeWin64Native Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\*.*" />
10+
<CefRedist64 Include="@(CefRuntimeWin64Native);@(CefRuntimeWin64SwiftShader);@(CefRuntimeWin64Locales)" />
911
</ItemGroup>
12+
13+
<Target Name="CefRedist64CopyResources">
14+
<PropertyGroup>
15+
<CefRedist64TargetDir Condition="'$(CefRedist64TargetDir)' == ''">$(TargetDir)</CefRedist64TargetDir>
16+
</PropertyGroup>
17+
<!--
18+
Cannot gurantee access to the main CefRedist64 ItemGroup here
19+
so we create a duplicate inside our target.
20+
https://github.com/dotnet/project-system/issues/4158
21+
-->
22+
<ItemGroup>
23+
<_CefRuntimeWin64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\locales\*.*" />
24+
<_CefRuntimeWin64SwiftShader Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\swiftshader\*.*" />
25+
<_CefRuntimeWin64Native Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\*.*" />
26+
</ItemGroup>
27+
<Message Importance="high" Text="Copying CEF Redist x64 files to $(CefRedist64TargetDir)" />
28+
<Copy SourceFiles="@(_CefRuntimeWin64Native)" DestinationFiles="@(_CefRuntimeWin64Native->'$(CefRedist64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
29+
<Copy SourceFiles="@(_CefRuntimeWin64Locales)" DestinationFiles="@(_CefRuntimeWin64Locales->'$(CefRedist64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
30+
<Copy SourceFiles="@(_CefRuntimeWin64SwiftShader)" DestinationFiles="@(_CefRuntimeWin64SwiftShader->'$(CefRedist64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
31+
</Target>
1032
</Project>

NuGet/chromiumembeddedframework.runtime.win-x86.props

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,27 @@
66
<ItemGroup>
77
<CefRuntimeWin32Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x86\locales\*.*" />
88
<CefRuntimeWin32SwiftShader Include="$(MSBuildThisFileDirectory)..\CEF\win-x86\swiftshader\*.*" />
9+
<CefRuntimeWin32Native Include="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\*.*" />
10+
<CefRedist32 Include="@(CefRuntimeWin32Native);@(CefRuntimeWin32SwiftShader);@(CefRuntimeWin32Locales)" />
911
</ItemGroup>
12+
13+
<Target Name="CefRedist32CopyResources">
14+
<PropertyGroup>
15+
<CefRedist32TargetDir Condition="'$(CefRedist32TargetDir)' == ''">$(TargetDir)</CefRedist32TargetDir>
16+
</PropertyGroup>
17+
<!--
18+
Cannot gurantee access to the main CefRedist32 ItemGroup here
19+
so we create a duplicate inside our target.
20+
https://github.com/dotnet/project-system/issues/4158
21+
-->
22+
<ItemGroup>
23+
<_CefRuntimeWin32Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x86\locales\*.*" />
24+
<_CefRuntimeWin32SwiftShader Include="$(MSBuildThisFileDirectory)..\CEF\win-x86\swiftshader\*.*" />
25+
<_CefRuntimeWin32Native Include="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\*.*" />
26+
</ItemGroup>
27+
<Message Importance="high" Text="Copying CEF Redist x86 files from $(MSBuildThisFileDirectory)..\CEF to $(CefRedist32TargetDir)" />
28+
<Copy SourceFiles="@(_CefRuntimeWin32Native)" DestinationFiles="@(_CefRuntimeWin32Native->'$(CefRedist32TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
29+
<Copy SourceFiles="@(_CefRuntimeWin32Locales)" DestinationFiles="@(_CefRuntimeWin32Locales->'$(CefRedist32TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
30+
<Copy SourceFiles="@(_CefRuntimeWin32SwiftShader)" DestinationFiles="@(_CefRuntimeWin32SwiftShader->'$(CefRedist32TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
31+
</Target>
1032
</Project>

0 commit comments

Comments
 (0)