Skip to content

Commit

Permalink
Add localization targets in projects with resources to be localized (#27
Browse files Browse the repository at this point in the history
)

* Add loc targets in proj files

* only real sign when we need to
  • Loading branch information
spebl authored Sep 1, 2017
1 parent e55bd4e commit bf415d0
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 0 deletions.
15 changes: 15 additions & 0 deletions GoogleTestAdapter/Common.Dynamic.TAfGT/Common.Dynamic.TAfGT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)\GoogleTestAdapter.Common.Dynamic.dll">
<TranslationFile>$(MSBuildThisFileDirectory)..\loc\lcl\{Lang}\GoogleTestAdapter.Common.Dynamic.lcl</TranslationFile>
</FilesToLocalize>
<FilesToSign Include="$(OutDir)\GoogleTestAdapter.Common.Dynamic.dll" Condition="'$(RealSign)' == 'True'">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<SignFilesDependsOn Include="GatherLocalizedOutputsForSigning">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</SignFilesDependsOn>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -84,4 +91,12 @@
copy "$(SolutionDir)Keys\Key_Debug.snk" "$(ProjectDir)Key.snk"
)</PreBuildEvent>
</PropertyGroup>
<Target Name="GatherLocalizedOutputsForSigning" Condition="'$(LocalizationEnabled)' == 'true' AND '$(RealSign)' == 'True'">
<ItemGroup>
<FilesToSign Include="$(OutDir)\localize\**\$(AssemblyName).resources.dll">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
</ItemGroup>
</Target>
</Project>
15 changes: 15 additions & 0 deletions GoogleTestAdapter/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,17 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)\GoogleTestAdapter.Core.dll">
<TranslationFile>$(MSBuildThisFileDirectory)..\loc\lcl\{Lang}\GoogleTestAdapter.Core.lcl</TranslationFile>
</FilesToLocalize>
<FilesToSign Include="$(OutDir)\GoogleTestAdapter.Core.dll" Condition="'$(RealSign)' == 'True'">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<SignFilesDependsOn Include="GatherLocalizedOutputsForSigning">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</SignFilesDependsOn>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -152,4 +159,12 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="GatherLocalizedOutputsForSigning" Condition="'$(LocalizationEnabled)' == 'true' AND '$(RealSign)' == 'True'">
<ItemGroup>
<FilesToSign Include="$(OutDir)\localize\**\$(AssemblyName).resources.dll">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
</ItemGroup>
</Target>
</Project>
15 changes: 15 additions & 0 deletions GoogleTestAdapter/DiaResolver/DiaResolver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)\GoogleTestAdapter.DiaResolver.dll">
<TranslationFile>$(MSBuildThisFileDirectory)..\loc\lcl\{Lang}\GoogleTestAdapter.DiaResolver.lcl</TranslationFile>
</FilesToLocalize>
<FilesToSign Include="$(OutDir)\GoogleTestAdapter.DiaResolver.dll" Condition="'$(RealSign)' == 'True'">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<SignFilesDependsOn Include="GatherLocalizedOutputsForSigning">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</SignFilesDependsOn>
</ItemGroup>
<ItemGroup>
<Reference Include="dia2">
Expand Down Expand Up @@ -118,4 +125,12 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="GatherLocalizedOutputsForSigning" Condition="'$(LocalizationEnabled)' == 'true' AND '$(RealSign)' == 'True'">
<ItemGroup>
<FilesToSign Include="$(OutDir)\localize\**\$(AssemblyName).resources.dll">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
</ItemGroup>
</Target>
</Project>
15 changes: 15 additions & 0 deletions GoogleTestAdapter/NewProjectWizard/NewProjectWizard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@
<DelaySign>true</DelaySign>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)\NewProjectWizard.dll">
<TranslationFile>$(MSBuildThisFileDirectory)..\loc\lcl\{Lang}\NewProjectWizard.lcl</TranslationFile>
</FilesToLocalize>
<FilesToSign Include="$(OutDir)\NewProjectWizard.dll" Condition="'$(RealSign)' == 'True'">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<SignFilesDependsOn Include="GatherLocalizedOutputsForSigning">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</SignFilesDependsOn>
</ItemGroup>
<ItemGroup>
<Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Expand Down Expand Up @@ -170,4 +177,12 @@
<Error Condition="!Exists('$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props'))" />
<Error Condition="!Exists('$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets'))" />
</Target>
<Target Name="GatherLocalizedOutputsForSigning" Condition="'$(LocalizationEnabled)' == 'true' AND '$(RealSign)' == 'True'">
<ItemGroup>
<FilesToSign Include="$(OutDir)\localize\**\$(AssemblyName).resources.dll">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
</ItemGroup>
</Target>
</Project>
15 changes: 15 additions & 0 deletions GoogleTestAdapter/TestAdapter/TestAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)\GoogleTestAdapter.TestAdapter.dll">
<TranslationFile>$(MSBuildThisFileDirectory)..\loc\lcl\{Lang}\GoogleTestAdapter.TestAdapter.lcl</TranslationFile>
</FilesToLocalize>
<FilesToSign Include="$(OutDir)\GoogleTestAdapter.TestAdapter.dll" Condition="'$(RealSign)' == 'True'">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<SignFilesDependsOn Include="GatherLocalizedOutputsForSigning">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</SignFilesDependsOn>
</ItemGroup>
<ItemGroup>
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
Expand Down Expand Up @@ -264,4 +271,12 @@
<StartProgram>$(DevEnvDir)CommonExtensions\Microsoft\TestWindow\vstest.console.exe</StartProgram>
<StartArguments>"$(SolutionDir)..\SampleTests\Debug\Tests_gta.exe" /Settings:"$(SolutionDir)..\SampleTests\SampleTests.gta.runsettings" /TestCaseFilter:"DisplayName=TestMath.AddPasses" /TestAdapterPath:"$(TargetDir)"</StartArguments>
</PropertyGroup>
<Target Name="GatherLocalizedOutputsForSigning" Condition="'$(LocalizationEnabled)' == 'true' AND '$(RealSign)' == 'True'">
<ItemGroup>
<FilesToSign Include="$(OutDir)\localize\**\$(AssemblyName).resources.dll">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
</ItemGroup>
</Target>
</Project>
15 changes: 15 additions & 0 deletions GoogleTestAdapter/VsPackage.TAfGT/VsPackage.TAfGT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,17 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)\GoogleTestAdapter.VsPackage.TAfGT.dll">
<TranslationFile>$(MSBuildThisFileDirectory)..\loc\lcl\{Lang}\GoogleTestAdapter.VsPackage.TAfGT.lcl</TranslationFile>
</FilesToLocalize>
<FilesToSign Include="$(OutDir)\GoogleTestAdapter.VsPackage.TAfGT.dll" Condition="'$(RealSign)' == 'True'">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<SignFilesDependsOn Include="GatherLocalizedOutputsForSigning">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</SignFilesDependsOn>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
Expand Down Expand Up @@ -267,4 +274,12 @@
<Error Condition="!Exists('$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets'))" />
</Target>
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" Condition="Exists('$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" />
<Target Name="GatherLocalizedOutputsForSigning" Condition="'$(LocalizationEnabled)' == 'true' AND '$(RealSign)' == 'True'">
<ItemGroup>
<FilesToSign Include="$(OutDir)\localize\**\$(AssemblyName).resources.dll">
<Authenticode>Microsoft</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
</ItemGroup>
</Target>
</Project>

0 comments on commit bf415d0

Please sign in to comment.