Skip to content

Commit 982a633

Browse files
committed
Refactor nuspec and targets for swiftshader support
Previously we used a different ItemGroup for every resources/binaries/pak files, we need to add swiftshader support which would have been a 4th target, all files are always copied in the case of CefSharp, so just switching to one. The ItemGroup was selectively being created on the presence of the x86 or x64 folder, have created a text file to do the same trick, it's a quick solution, not the cleanest, though can be revisited later without having to change anything downstream, so going with that for now.
1 parent d654b9b commit 982a633

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

NuGet/cef-binary-x64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This packages contains the x64 libs and resources

NuGet/cef-binary-x86.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This packages contains the x86 libs and resources

NuGet/cef.redist.nuspec

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@
1515
<copyright>Copyright © 2008-2015</copyright>
1616
</metadata>
1717
<files>
18-
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\*.dll" target="CEF\$Platform$" exclude="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\d3dcompiler_43.dll" />
19-
<!-- Since CEF 3.2357 the files natives_blob.bin and snapshot_blob.bin need to be distributed.
18+
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\*.dll" target="CEF\" exclude="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\d3dcompiler_43.dll" />
19+
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\swiftshader\*.dll" target="CEF\swiftshader" />
20+
<!-- Since CEF 3.2357 the files natives_blob.bin and snapshot_blob.bin need to be distributed.
2021
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-packagers/75J9Y1vIc_E
2122
http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=12580
2223
-->
23-
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\swiftshader\*.dll" target="CEF\$Platform$\swiftshader" />
24-
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\*.bin" target="CEF\$Platform$" />
24+
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\*.bin" target="CEF\" />
2525
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\*.pak" target="CEF\"/>
26-
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\icudtl.dat" target="CEF\"/>
26+
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\*.dat" target="CEF\"/>
2727
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\locales\*.pak" target="CEF\locales"/>
2828

2929
<file src="cef.redist.targets" target="build\cef.redist.$Platform$$DotConfiguration$.targets" />
30+
<file src="cef-binary-$Platform$.txt" target="CEF\" />
3031
</files>
3132
</package>

NuGet/cef.redist.targets

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@
1212
Example if this is a x64 package, their will be a x64 folder in the CEF
1313
directory, if that's the case this package contains the x64 files, so we'll
1414
define those properties.
15+
16+
Using wildcard matching as per https://stackoverflow.com/a/17252671
1517
-->
16-
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\CEF\x86')">
17-
<CefBinaries32 Include="$(MSBuildThisFileDirectory)..\CEF\x86\*.*" />
18-
<CefPakFiles32 Include="$(MSBuildThisFileDirectory)..\CEF\*.*" />
19-
<CefLocales32 Include="$(MSBuildThisFileDirectory)..\CEF\locales\*.*" />
18+
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\CEF\cef-binary-x86.txt')">
19+
<CefRedist32 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
2020
</ItemGroup>
2121

22-
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\CEF\x64')">
23-
<CefBinaries64 Include="$(MSBuildThisFileDirectory)..\CEF\x64\*.*" />
24-
<CefPakFiles64 Include="$(MSBuildThisFileDirectory)..\CEF\*.*" />
25-
<CefLocales64 Include="$(MSBuildThisFileDirectory)..\CEF\locales\*.*" />
22+
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\CEF\cef-binary-x64.txt')">
23+
<CefRedist64 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
2624
</ItemGroup>
2725
</Project>

0 commit comments

Comments
 (0)