Skip to content

Commit

Permalink
Include locales in chromiumembeddedframework.runtime.win packages
Browse files Browse the repository at this point in the history
Issue #93
  • Loading branch information
amaitland committed Feb 4, 2024
1 parent 7ef312f commit 8bee0fd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 54 deletions.
54 changes: 0 additions & 54 deletions NuGet/chromiumembeddedframework.runtime.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,4 @@
<CefRuntimeWin64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\locales\*.*" />
<CefRuntimeWinArm64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-arm64\locales\*.*" />
</ItemGroup>

<Target Name="CefRedist32CopyLocales">
<PropertyGroup>
<_CefRedist32TargetDir>$(CefRedist32TargetDir)</_CefRedist32TargetDir>
<_CefRedist32TargetDir Condition="'$(_CefRedist32TargetDir)' == ''">$(TargetDir)</_CefRedist32TargetDir>
<_CefRedist32TargetDir>$(_CefRedist32TargetDir)\locales</_CefRedist32TargetDir>
</PropertyGroup>
<!--
Cannot gurantee access to the main CefRuntimeWin32Locales ItemGroup here
so we create a duplicate inside our target.
https://github.com/dotnet/project-system/issues/4158
-->
<ItemGroup>
<_CefRedist32Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x86\locales\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying Chromium Embedded Framework Locales x86 files from $(MSBuildThisFileDirectory)..\CEF\win-x86\locales to $(CefRedist32TargetDir)\locales" />
<Copy SourceFiles="@(_CefRedist32)" DestinationFiles="@(_CefRedist32Locales->'$(_CefRedist32TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>

<Target Name="CefRedist64CopyLocales">
<PropertyGroup>
<_CefRedist64TargetDir>$(CefRedist64TargetDir)</_CefRedist64TargetDir>
<_CefRedist64TargetDir Condition="'$(_CefRedist64TargetDir)' == ''">$(TargetDir)</_CefRedist64TargetDir>
<_CefRedist64TargetDir>$(_CefRedist64TargetDir)\locales</_CefRedist64TargetDir>
</PropertyGroup>
<!--
Cannot gurantee access to the main CefRuntimeWin64Locales ItemGroup here
so we create a duplicate inside our target.
https://github.com/dotnet/project-system/issues/4158
-->
<ItemGroup>
<_CefRedist64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\locales\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying Chromium Embedded Framework Locales x64 files from $(MSBuildThisFileDirectory)..\CEF\win-x64\locales to $(CefRedist64TargetDir)\locales" />
<Copy SourceFiles="@(_CefRedist64)" DestinationFiles="@(_CefRedist64Locales->'$(_CefRedist64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>

<Target Name="CefRedistArm64CopyLocales">
<PropertyGroup>
<_CefRedistArm64TargetDir>$(CefRedistArm64TargetDir)</_CefRedistArm64TargetDir>
<_CefRedistArm64TargetDir Condition="'$(_CefRedistArm64TargetDir)' == ''">$(TargetDir)</_CefRedistArm64TargetDir>
<_CefRedistArm64TargetDir>$(_CefRedistArm64TargetDir)\locales</_CefRedistArm64TargetDir>
</PropertyGroup>
<!--
Cannot gurantee access to the main CefRuntimeWinArm64Locales ItemGroup here
so we create a duplicate inside our target.
https://github.com/dotnet/project-system/issues/4158
-->
<ItemGroup>
<_CefRedistArm64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-arm64\locales\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying Chromium Embedded Framework Locales arm64 files from $(MSBuildThisFileDirectory)..\CEF\win-arm64\locales\ to $(CefRedistArm64TargetDir)\locales" />
<Copy SourceFiles="@(_CefRedistArm64)" DestinationFiles="@(_CefRedistArm64Locales->'$(_CefRedistArm64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
</Project>
6 changes: 6 additions & 0 deletions NuGet/chromiumembeddedframework.runtime.win-arm64.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

<ItemGroup>
<CefRuntimeWinArm64 Include="$(MSBuildThisFileDirectory)..\runtimes\win-arm64\native\*.*" />
<CefRuntimeWinArm64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-arm64\locales\*.*" />
</ItemGroup>

<Target Name="CefRedistArm64CopyResources">
<PropertyGroup>
<CefRedistArm64TargetDir Condition="'$(CefRedistArm64TargetDir)' == ''">$(TargetDir)</CefRedistArm64TargetDir>
<_CefRedistArm64LocalesTargetDir>$(CefRedistArm64TargetDir)\locales</_CefRedistArm64LocalesTargetDir>
</PropertyGroup>
<!--
Cannot gurantee access to the main CefRuntimeWinArm64 ItemGroup here
Expand All @@ -21,8 +23,12 @@
-->
<ItemGroup>
<_CefRuntimeWinArm64 Include="$(MSBuildThisFileDirectory)..\runtimes\win-arm64\native\*.*" />
<_CefRuntimeWinArm64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-arm64\locales\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying Chromium Embedded Framework Runtime arm64 files from $(MSBuildThisFileDirectory)..\runtimes\win-arm64\native to $(CefRedistArm64TargetDir)" />
<Copy SourceFiles="@(_CefRuntimeWinArm64)" DestinationFiles="@(_CefRuntimeWinArm64->'$(CefRedistArm64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />

<Message Importance="high" Text="Copying Chromium Embedded Framework Locales x86 files from $(MSBuildThisFileDirectory)..\CEF\win-x86\locales to $(_CefRedistArm64LocalesTargetDir)" />
<Copy SourceFiles="@(_CefRuntimeWinArm64Locales)" DestinationFiles="@(_CefRuntimeWinArm64Locales->'$(_CefRedistArm64LocalesTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
</Project>
6 changes: 6 additions & 0 deletions NuGet/chromiumembeddedframework.runtime.win-x64.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

<ItemGroup>
<CefRuntimeWin64 Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\*.*" />
<CefRuntimeWin64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\locales\*.*" />
</ItemGroup>

<Target Name="CefRedist64CopyResources">
<PropertyGroup>
<CefRedist64TargetDir Condition="'$(CefRedist64TargetDir)' == ''">$(TargetDir)</CefRedist64TargetDir>
<_CefRedist64LocalesTargetDir>$(CefRedist64TargetDir)\locales</_CefRedist64LocalesTargetDir>
</PropertyGroup>
<!--
Cannot gurantee access to the main CefRuntimeWin64 ItemGroup here
Expand All @@ -21,8 +23,12 @@
-->
<ItemGroup>
<_CefRuntimeWin64 Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\*.*" />
<_CefRuntimeWin64Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x64\locales\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying Chromium Embedded Framework Runtime x64 files from $(MSBuildThisFileDirectory)..\runtimes\win-x64\native to $(CefRedist64TargetDir)" />
<Copy SourceFiles="@(_CefRuntimeWin64)" DestinationFiles="@(_CefRuntimeWin64->'$(CefRedist64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />

<Message Importance="high" Text="Copying Chromium Embedded Framework Locales x86 files from $(MSBuildThisFileDirectory)..\CEF\win-x86\locales to $(_CefRedist64LocalesTargetDir)" />
<Copy SourceFiles="@(_CefRuntimeWin64Locales)" DestinationFiles="@(_CefRuntimeWin64Locales->'$(_CefRedist64LocalesTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
</Project>
6 changes: 6 additions & 0 deletions NuGet/chromiumembeddedframework.runtime.win-x86.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

<ItemGroup>
<CefRuntimeWin32 Include="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\*.*" />
<CefRuntimeWin32Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x86\locales\*.*" />
</ItemGroup>

<Target Name="CefRedist32CopyResources">
<PropertyGroup>
<CefRedist32TargetDir Condition="'$(CefRedist32TargetDir)' == ''">$(TargetDir)</CefRedist32TargetDir>
<_CefRedist32LocalesTargetDir>$(CefRedist32TargetDir)\locales</_CefRedist32LocalesTargetDir>
</PropertyGroup>
<!--
Cannot gurantee access to the main CefRuntimeWin32 ItemGroup here
Expand All @@ -21,8 +23,12 @@
-->
<ItemGroup>
<_CefRuntimeWin32 Include="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\*.*" />
<_CefRuntimeWin32Locales Include="$(MSBuildThisFileDirectory)..\CEF\win-x86\locales\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying Chromium Embedded Framework Runtime x86 files from $(MSBuildThisFileDirectory)..\runtimes\win-x86\native to $(CefRedist32TargetDir)" />
<Copy SourceFiles="@(_CefRuntimeWin32)" DestinationFiles="@(_CefRuntimeWin32->'$(CefRedist32TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />

<Message Importance="high" Text="Copying Chromium Embedded Framework Locales x86 files from $(MSBuildThisFileDirectory)..\CEF\win-x86\locales to $(_CefRedist32LocalesTargetDir)" />
<Copy SourceFiles="@(_CefRuntimeWin32Locales)" DestinationFiles="@(_CefRuntimeWin32Locales->'$(_CefRedist32LocalesTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
</Project>
1 change: 1 addition & 0 deletions NuGet/chromiumembeddedframework.runtime.win.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<file src="..\cef_binary_3.y.z_$CPlatform$\$Configuration$\*.json" target="runtimes\win-$Platform$\native\" />
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\*.pak" target="runtimes\win-$Platform$\native\"/>
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\*.dat" target="runtimes\win-$Platform$\native\"/>
<file src="..\cef_binary_3.y.z_$CPlatform$\Resources\locales\*.pak" target="CEF\win-$Platform$\locales"/>
<file src="..\cef_binary_3.y.z_$CPlatform$\Readme.txt" target="\"/>
<file src="chromiumembeddedframework.runtime.win-$Platform$.props" target="build\" />
<file src="chromiumembeddedframework.runtime.win-$Platform$.props" target="buildTransitive\" />
Expand Down

0 comments on commit 8bee0fd

Please sign in to comment.