diff options
author | Miguel Costa <miguel.costa@qt.io> | 2021-03-31 20:33:14 +0200 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2021-04-01 08:57:28 +0000 |
commit | 71de348ac7a36c28e251062af46fed8424ea7eee (patch) | |
tree | 9f8fa0a9615d433926b2a9458677bd34559bd772 /src | |
parent | 3efedacef8a0e8531e8ae810380d0e7ef744b02d (diff) |
Fix errors processing .ts files
Fixed the following issues in the processing of .ts files:
* lrelease called at the end of build, which caused errors in other
tools that tried to access the generated .qm files (e.g. rcc)
* The Output Directory and Output File Name properties of lrelease
were ignored when generating the tool's command line
Task-number: QTVSADDINBUG-898
Change-Id: Id2d8664bac4b0e29006e1c63344334065c67f0ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
3 files changed, 13 insertions, 3 deletions
diff --git a/src/qtmsbuild/QtMsBuild/translation/qttranslation.props b/src/qtmsbuild/QtMsBuild/translation/qttranslation.props index a2faf733..5f37dae5 100644 --- a/src/qtmsbuild/QtMsBuild/translation/qttranslation.props +++ b/src/qtmsbuild/QtMsBuild/translation/qttranslation.props @@ -74,6 +74,8 @@ <DisableNumberHeuristic>false</DisableNumberHeuristic> <!-- lrelease --> <ReleaseDescription>lrelease %(Identity)</ReleaseDescription> + <QmOutputDir>$(OutDir)</QmOutputDir> + <QmOutputFile>%(Filename).qm</QmOutputFile> <ReleaseAdditionalOptions>$(QtLReleaseOptions)</ReleaseAdditionalOptions> <IdBased>false</IdBased> <Compress>false</Compress> diff --git a/src/qtmsbuild/QtMsBuild/translation/qttranslation.targets b/src/qtmsbuild/QtMsBuild/translation/qttranslation.targets index 2bc67f0a..9f137a07 100644 --- a/src/qtmsbuild/QtMsBuild/translation/qttranslation.targets +++ b/src/qtmsbuild/QtMsBuild/translation/qttranslation.targets @@ -45,6 +45,14 @@ <!-- ///////////////////////////////////////////////////////////////////////////////////////////////// + // Qt/MSBuild global properties + // --> + <PropertyGroup> + <QtDependsOn>$(QtDependsOn);QtTranslation</QtDependsOn> + </PropertyGroup> + + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// // Build integration // --> <PropertyGroup> @@ -89,7 +97,7 @@ <TsFile >%(Identity)</TsFile> <QmFile - >$([System.IO.Path]::Combine('$(OutDir)', '%(Filename).qm'))</QmFile> + >$([System.IO.Path]::Combine('%(QmOutputDir)', '%(QmOutputFile)'))</QmFile> <InputListFile >$([System.IO.Path]::Combine('$(IntDir)', '%(Filename).in.txt'))</InputListFile> </QtTranslation> diff --git a/src/qtmsbuild/QtMsBuild/translation/qttranslation.xml b/src/qtmsbuild/QtMsBuild/translation/qttranslation.xml index ddf1b039..a83bc23b 100644 --- a/src/qtmsbuild/QtMsBuild/translation/qttranslation.xml +++ b/src/qtmsbuild/QtMsBuild/translation/qttranslation.xml @@ -110,10 +110,10 @@ <StringProperty Name="ReleaseDescription" Category="lrelease" DisplayName="Execution Description" /> <StringProperty - Name="OutputDir" Category="lrelease" DisplayName="Output Directory" + Name="QmOutputDir" Category="lrelease" DisplayName="Output Directory" Description="Specifies the path of the generated QM output directory."/> <StringProperty - Name="OutputFile" Category="lrelease" DisplayName="Output File Name" + Name="QmOutputFile" Category="lrelease" DisplayName="Output File Name" Description="Specifies the name of the generated QM output file."/> <BoolProperty Name="IdBased" Category="lrelease" DisplayName="ID Based" |