MSBuild: Copy base translation files

This commit is contained in:
Connor McLaughlin 2021-08-17 13:39:06 +10:00
parent 15b1420246
commit 74bf021c2f
2 changed files with 18 additions and 1 deletions

@ -1 +1 @@
Subproject commit 4d453164dfd7b0793653e59ba70ed64a2f5ca2a4
Subproject commit fb9018121818293b72e9f5064b2cb202e713c501

View File

@ -14,6 +14,7 @@
<QtBinDir>$(QTDIR)bin\</QtBinDir>
<QtHostBinDir>$(QTDIRHost)bin\</QtHostBinDir>
<QtPluginsDir>$(QTDIR)plugins\</QtPluginsDir>
<QtTranslationsDir>$(QTDIR)translations\</QtTranslationsDir>
<QtToolOutDir>$(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\</QtToolOutDir>
<QtMocOutPrefix>$(QtToolOutDir)moc_</QtMocOutPrefix>
<QtTsOutDir>$(BinaryOutputDir)translations\</QtTsOutDir>
@ -165,6 +166,22 @@
/>
</Target>
<!--Copies base translation files-->
<ItemGroup>
<BaseTsFiles Include="$(QtTranslationsDir)\*.qm" />
</ItemGroup>
<Target Name="QtCopyBaseTranslations"
AfterTargets="Build"
Inputs="@(BaseTsFiles)"
Outputs="@(BaseTsFiles -> '$(QtTsOutDir)%(RecursiveDir)%(Filename)%(Extension)')">
<Message Text="Copying base translation files" Importance="High" />
<Copy
SourceFiles="@(BaseTsFiles)"
DestinationFolder="$(QtTsOutDir)"
SkipUnchangedFiles="true"
/>
</Target>
<!--Compiles all translation files-->
<ItemGroup>
<TsFiles Include="$(MSBuildProjectDirectory)\**\*.ts" />