diff options
author | Miguel Costa <miguel.costa@qt.io> | 2019-01-09 16:28:40 +0100 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2019-04-03 13:58:46 +0000 |
commit | 94e16a7b1e7b3941e321b7398fca28c5473fd440 (patch) | |
tree | aeaa0e8dd1189df98fd6672397c525c1e89b8963 /src | |
parent | 2dea1b2bb1c0b410cee08c1d65fa8baae649d90d (diff) |
Add support for repc
In Qt/MSBuild, added support for the Qt Remote Objects Compiler (repc).
Adding .rep files to a project will automatically associate them with
the repc property page, and will add the processing of those files to
the Qt tools build step.
Task-number: QTVSADDINBUG-585
Change-Id: Ibd3d7496640954d9631dc2b5b1050edce3bee8e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/config/12.0/source.extension.vsixmanifest_TT | 2 | ||||
-rw-r--r-- | src/config/14.0/source.extension.vsixmanifest_TT | 2 | ||||
-rw-r--r-- | src/config/15.0/source.extension.vsixmanifest_TT | 2 | ||||
-rw-r--r-- | src/config/16.0/source.extension.vsixmanifest_TT | 2 | ||||
-rw-r--r-- | src/qtmsbuild/qt.props | 19 | ||||
-rw-r--r-- | src/qtmsbuild/qt.targets | 1 | ||||
-rw-r--r-- | src/qtmsbuild/qtrepc.targets | 294 | ||||
-rw-r--r-- | src/qtmsbuild/qtrepc.xml | 237 | ||||
-rw-r--r-- | src/qtvstools/QtVsTools.csproj | 14 |
9 files changed, 572 insertions, 1 deletions
diff --git a/src/config/12.0/source.extension.vsixmanifest_TT b/src/config/12.0/source.extension.vsixmanifest_TT index ca17f5fa..e0805a52 100644 --- a/src/config/12.0/source.extension.vsixmanifest_TT +++ b/src/config/12.0/source.extension.vsixmanifest_TT @@ -95,9 +95,11 @@ <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtqml.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.targets" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.xml" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmodules.xml" /> <Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="QtVsTools.Qml.Debug.pkgdef" /> diff --git a/src/config/14.0/source.extension.vsixmanifest_TT b/src/config/14.0/source.extension.vsixmanifest_TT index f3e340cc..8e552c7f 100644 --- a/src/config/14.0/source.extension.vsixmanifest_TT +++ b/src/config/14.0/source.extension.vsixmanifest_TT @@ -95,9 +95,11 @@ <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtqml.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.targets" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.xml" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmodules.xml" /> <Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="QtVsTools.Qml.Debug.pkgdef" /> diff --git a/src/config/15.0/source.extension.vsixmanifest_TT b/src/config/15.0/source.extension.vsixmanifest_TT index 2460b7e6..beab84a9 100644 --- a/src/config/15.0/source.extension.vsixmanifest_TT +++ b/src/config/15.0/source.extension.vsixmanifest_TT @@ -95,9 +95,11 @@ <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtqml.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.targets" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.xml" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmodules.xml" /> <Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="QtVsTools.Qml.Debug.pkgdef" /> diff --git a/src/config/16.0/source.extension.vsixmanifest_TT b/src/config/16.0/source.extension.vsixmanifest_TT index a18d44bf..14e01755 100644 --- a/src/config/16.0/source.extension.vsixmanifest_TT +++ b/src/config/16.0/source.extension.vsixmanifest_TT @@ -95,9 +95,11 @@ <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtqml.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.targets" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.targets" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtmoc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrcc.xml" d:VsixSubPath="qtmsbuild" /> + <Asset Type="File" d:Source="File" Path="qtmsbuild\qtrepc.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmsbuild\qtuic.xml" d:VsixSubPath="qtmsbuild" /> <Asset Type="File" d:Source="File" Path="qtmodules.xml" /> <Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="QtVsTools.Qml.Debug.pkgdef" /> diff --git a/src/qtmsbuild/qt.props b/src/qtmsbuild/qt.props index c885df0d..1c566a9a 100644 --- a/src/qtmsbuild/qt.props +++ b/src/qtmsbuild/qt.props @@ -114,4 +114,23 @@ <Outputs>%(OutputFile)</Outputs> </QtUic> </ItemDefinitionGroup> + + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// + // QtRepc + // --> + <ItemDefinitionGroup> + <QtRepc> + <ExecutionDescription>repc: %(Identity)...</ExecutionDescription> + <QTDIR>$(QTDIR)</QTDIR> + <InputFile>%(FullPath)</InputFile> + <OutputFileType>replica</OutputFileType> + <OutputFile><![CDATA[$(IntDir)\repc\rep_%(Filename)_%<OutputFileType>.h]]></OutputFile> + <InputFileType>rep</InputFileType> + <DynamicSource>moc_cpp</DynamicSource> + <ParallelProcess>true</ParallelProcess> + <CommandLineTemplate>[AllOptions] [AdditionalOptions]</CommandLineTemplate> + <Outputs>%(OutputFile)</Outputs> + </QtRepc> + </ItemDefinitionGroup> </Project> diff --git a/src/qtmsbuild/qt.targets b/src/qtmsbuild/qt.targets index c7989a55..c8fce0f2 100644 --- a/src/qtmsbuild/qt.targets +++ b/src/qtmsbuild/qt.targets @@ -44,4 +44,5 @@ <Import Project="qtqml.targets"/> <Import Project="qtrcc.targets"/> <Import Project="qtuic.targets"/> + <Import Project="qtrepc.targets"/> </Project> diff --git a/src/qtmsbuild/qtrepc.targets b/src/qtmsbuild/qtrepc.targets new file mode 100644 index 00000000..44ede95e --- /dev/null +++ b/src/qtmsbuild/qtrepc.targets @@ -0,0 +1,294 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt VS Tools. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> + +<!-- +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Definitions specific to repc +/////////////////////////////////////////////////////////////////////////////////////////////////// +// --> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// + // Qt/MSBuild global properties + // --> + <PropertyGroup> + <QtBuildTargets>QtRepc;$(QtBuildTargets)</QtBuildTargets> + </PropertyGroup> + + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// + // Setup item type and property page + // --> + <ItemGroup> + <PropertyPageSchema + Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" /> + <AvailableItemName Include="QtRepc"> + <Targets>Qt</Targets> + </AvailableItemName> + </ItemGroup> + + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// + /// TARGET QtRepcPrepare + ///////////////////////////////////////////////////////////////////////////////////////////////// + // Prepare to process sources + // --> + <Target Name="QtRepcPrepare" DependsOnTargets="_SelectedFiles" + Inputs="%(QtRepc.Identity)" Outputs="@(QtRepc->'####### Don't skip this target #######')"> + + <Message Importance="High" Condition="'$(QtDebug)' == 'true'" + Text="## QtRepcPrepare @(QtRepc)"/> + + <!--// Expand build-time metadata ( %<Foo> ) --> + <Expand Condition="'@(QtRepc)' != ''" + Items="@(QtRepc)" BaseItem="@(QtRepc)" Template="@(QtRepc)"> + <Output TaskParameter="Result" ItemName="QtRepcExp"/> + </Expand> + <ItemGroup> + <QtRepc Remove="@(QtRepc)"/> + <QtRepc Include="@(QtRepcExp->'%(Identity)')"/> + <QtRepcExp Remove="@(QtRepcExp)"/> + </ItemGroup> + + <PropertyGroup> + <selected_files>[@(SelectedFiles->'%(Identity)','][')]</selected_files> + <file>[@(QtRepc->'%(Identity)')]</file> + <output_file>@(QtRepc->'%(OutputFile)')</output_file> + <is_selected Condition="$(selected_files.Contains('$(file)'))">true</is_selected> + <is_selected Condition="!$(selected_files.Contains('$(file)'))">false</is_selected> + </PropertyGroup> + + <!--// Delete output file to force build of source if it was manually selected to build + // (e.g. by the 'Compile' option in the context menu for the file) --> + <Delete Files="$(output_file)" + Condition="'$(SelectedFiles)' != '' AND '$(is_selected)' == 'true'" /> + + <!--// If a source was manually selected to build, remove all other sources --> + <ItemGroup Condition="'@(SelectedFiles)' != ''"> + <QtRepc Remove="@(QtRepc)" + Condition="'$(SelectedFiles)' != '' AND '$(is_selected)' != 'true'" /> + </ItemGroup> + + <!--// Remove sources excluded from build --> + <ItemGroup> + <QtRepc Remove="@(QtRepc)" + Condition="'$(SelectedFiles)' == '' AND '%(QtRepc.ExcludedFromBuild)' == 'true'"/> + </ItemGroup> + + <!--// Clean-up --> + <PropertyGroup> + <selected_files/> + <file/> + <output_file/> + <is_selected/> + </PropertyGroup> + </Target> + + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// + /// TARGET QtRepcSetModified + ///////////////////////////////////////////////////////////////////////////////////////////////// + // Set InputChanged flag if source file or dependencies have been modified + // --> + <Target Name="QtRepcSetModified" DependsOnTargets="QtRepcPrepare" + Condition="'@(QtRepc)' != ''" + Inputs="%(QtRepc.FullPath);%(QtRepc.AdditionalDependencies)" Outputs="@(QtRepc->'%(OutputFile)')"> + + <Message Importance="High" Condition="'$(QtDebug)' == 'true'" + Text="## QtRepcSetModified @(QtRepc)" /> + + <CreateProperty Value="true"> + <!-- // Using ValueSetByTask ensures $(input_changed) is only set to 'true' when the target + // is actually executed and not when MSBuild is figuring out which targets to run --> + <Output TaskParameter="ValueSetByTask" PropertyName="input_changed" /> + </CreateProperty> + <ItemGroup> + <QtRepc> + <InputChanged>$(input_changed)</InputChanged> + </QtRepc> + </ItemGroup> + </Target> + + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////////// + /// TARGET QtRepc + ///////////////////////////////////////////////////////////////////////////////////////////////// + // Process each source file and produce the corresponding QtWork items + // --> + <Target Name="QtRepc" + DependsOnTargets="QtPrepare;$(QtRepcDependsOn);QtRepcPrepare;QtRepcSetModified" + BeforeTargets="$(QtRepcBeforeTargets)" AfterTargets="$(QtRepcAfterTargets)" + Condition="'@(QtRepc)' != ''" + Inputs="%(QtRepc.FullPath);%(QtRepc.AdditionalDependencies);$(MSBuildProjectFile)" + Outputs="@(QtRepc->'%(OutputFile)')"> + + <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtRepc @(QtRepc)" /> + + <CreateProperty Value="true"> + <Output TaskParameter="ValueSetByTask" PropertyName="dependencies_changed" /> + </CreateProperty> + + <!-- + /////////////////////////////////////////////////////////////////////////////////////////////// + // Convert string lists in source item properties to lists of items + // --> + <ItemGroup> + <repc_InputFile Include="%(QtRepc.InputFile)"/> + <repc_OutputFile Include="%(QtRepc.OutputFile)"/> + <repc_InputFileType Include="%(QtRepc.InputFileType)"/> + <repc_OutputFileType Include="%(QtRepc.OutputFileType)"/> + <repc_IncludePath Include="%(QtRepc.IncludePath)"/> + <repc_AlwaysClass Include="%(QtRepc.AlwaysClass)"/> + <repc_PrintDebug Include="%(QtRepc.PrintDebug)"/> + </ItemGroup> + + <ItemGroup> + <!-- + ///////////////////////////////////////////////////////////////////////////////////////////// + // Escape trailing back-slash in paths + // --> + <repc_IncludePath> + <Escaped Condition="$([System.String]::Copy('%(Identity)').EndsWith('\'))" + >%(Identity)\</Escaped> + <Escaped Condition="!$([System.String]::Copy('%(Identity)').EndsWith('\'))" + >%(Identity)</Escaped> + </repc_IncludePath> + </ItemGroup> + + <!-- + /////////////////////////////////////////////////////////////////////////////////////////////// + // Generate tool command line arguments + // --> + <PropertyGroup> + + <!--// -i <rep|src> Input file type --> + <options Condition="'@(repc_InputFileType)' != ''" + >$(options);@(repc_InputFileType->'-i %(Identity)')</options> + + <!--// -o <source|replica|merged|rep> Output file type --> + <options Condition="'@(repc_OutputFileType)' != ''" + >$(options);@(repc_OutputFileType->'-o %(Identity)')</options> + + <!--// -I <dir> Add dir to the include path for header files --> + <options Condition="'@(repc_IncludePath)' != ''" + >$(options);@(repc_IncludePath->'"-I%(Escaped)"')</options> + + <!--// -c Always output 'class' type for .rep files --> + <options Condition="'@(repc_AlwaysClass)' == 'true'" + >$(options);-c</options> + + <!--// -d Print out parsing debug information --> + <options Condition="'@(repc_PrintDebug)' == 'true'" + >$(options);-c</options> + + <!--// [header-file/rep-file] Input header/rep file to read from --> + <options Condition="'@(repc_InputFile)' != ''" + >$(options);@(repc_InputFile->'"%(Identity)"')</options> + + <!--// [rep-file/header-file] Output header/rep file to write to --> + <options Condition="'@(repc_OutputFile)' != ''" + >$(options);@(repc_OutputFile->'"%(Identity)"')</options> + + <options>$(options.Replace(';',' ').Trim())</options> + </PropertyGroup> + + <!-- + /////////////////////////////////////////////////////////////////////////////////////////////// + // Aux properties + // --> + <PropertyGroup> + <!--// Force modified flag if source was manually selected to build --> + <input_changed Condition="'$(SelectedFiles)' != ''" + >true</input_changed> + <input_changed Condition="'$(SelectedFiles)' == ''" + >%(QtRepc.InputChanged)</input_changed> + + <!--// Run work in parallel processes --> + <run_parallel Condition="'@(QtRepc)' != '' + AND '%(QtRepc.ParallelProcess)' == 'true' + AND '$(SelectedFiles)' == ''" + >true</run_parallel> + + <!--// Run work in single process --> + <run_single Condition="'@(QtRepc)' != '' + AND ('%(QtRepc.ParallelProcess)' != 'true' + OR '$(SelectedFiles)' != '')" + >true</run_single> + </PropertyGroup> + + <!-- + /////////////////////////////////////////////////////////////////////////////////////////////// + // Create work item + // --> + <ItemGroup Condition="'$(run_parallel)' == 'true' OR '$(run_single)' == 'true'"> + <QtWork Include="@(QtRepc)"> + <WorkType>repc</WorkType> + <ToolPath>%(QtRepc.QTDIR)\bin\repc.exe</ToolPath> + <Options>$(options)</Options> + <Message>%(QtRepc.ExecutionDescription)</Message> + <DependenciesChanged>$(dependencies_changed)</DependenciesChanged> + <InputChanged>$(input_changed)</InputChanged> + <ParallelBuild Condition="'$(run_parallel)' == 'true'">true</ParallelBuild> + <ParallelBuild Condition="'$(run_single)' == 'true'">false</ParallelBuild> + </QtWork> + </ItemGroup> + + <ItemGroup Condition="'@(QtRepc)' != '' AND '@(QtRepc->'%(DynamicSource)')' != 'false'"> + <QtMoc Include="%(QtRepc.OutputFile)"> + <DependsOn>@(QtRepc)</DependsOn> + <DynamicSource Condition="'%(QtRepc.DynamicSource)' == 'moc_cpp'">output</DynamicSource> + <DynamicSource Condition="'%(QtRepc.DynamicSource)' == 'moc'">false</DynamicSource> + </QtMoc> + </ItemGroup> + + <!-- + /////////////////////////////////////////////////////////////////////////////////////////////// + // Clean-up + // --> + <PropertyGroup> + <options/> + <dependencies_changed/> + <input_changed/> + <run_parallel/> + <run_single/> + </PropertyGroup> + <ItemGroup> + <repc_InputFile Remove="%(QtRepc.InputFile)"/> + <repc_OutputFile Remove="%(QtRepc.OutputFile)"/> + <repc_InputFileType Remove="%(QtRepc.InputFileType)"/> + <repc_OutputFileType Remove="%(QtRepc.OutputFileType)"/> + <repc_IncludePath Remove="%(QtRepc.IncludePath)"/> + <repc_AlwaysClass Remove="%(QtRepc.AlwaysClass)"/> + <repc_PrintDebug Remove="%(QtRepc.PrintDebug)"/> + </ItemGroup> + </Target> +</Project> diff --git a/src/qtmsbuild/qtrepc.xml b/src/qtmsbuild/qtrepc.xml new file mode 100644 index 00000000..ff99243c --- /dev/null +++ b/src/qtmsbuild/qtrepc.xml @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt VS Tools. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> + +<!-- +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Defines the fields included in the repc property page, as well as any +// other metadata associated to QtRepc items +// --> +<ProjectSchemaDefinitions + xmlns="http://schemas.microsoft.com/build/2009/properties" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:sys="clr-namespace:System;assembly=mscorlib"> + <Rule + Name="QtRepc" + PageTemplate="tool" + DisplayName="Qt Remote Objects Compiler" + Order="9"> + <Rule.DataSource> + <DataSource + Persistence="ProjectFile" + ItemType="QtRepc" /> + </Rule.DataSource> + <Rule.Categories> + <Category + Name="General"> + <Category.DisplayName> + <sys:String>repc.exe</sys:String> + </Category.DisplayName> + </Category> + </Rule.Categories> + <StringListProperty + Name="Inputs" + Category="General" + IsRequired="true" + Visible="False"> + <StringListProperty.DataSource> + <DataSource + Persistence="ProjectFile" + ItemType="QtRepc" + SourceType="Item" /> + </StringListProperty.DataSource> + </StringListProperty> + <StringProperty + Name="ExecutionDescription" + DisplayName="Execution Description" + IncludeInCommandLine="False" /> + <StringProperty + Name="QTDIR" + DisplayName="Qt Directory" + Description="Path to installation of Qt."/> + <EnumProperty + Name="InputFileType" + HelpUrl="https://doc.qt.io/qt-5/qtremoteobjects-repc.html" + DisplayName="Input File Type"> + <EnumValue + Name="rep" + DisplayName="Replicant template"/> + <EnumValue + Name="src" + DisplayName="C++ QObject derived classes"/> + </EnumProperty> + <StringProperty + Name="InputFile" + HelpUrl="https://doc.qt.io/qt-5/qtremoteobjects-repc.html" + DisplayName="Input File" + Description="Input header/rep file to read from. ([header-file/rep-file])" /> + <EnumProperty + Name="OutputFileType" + HelpUrl="https://doc.qt.io/qt-5/qtremoteobjects-repc.html" + DisplayName="Output File Type"> + <EnumValue + Name="source" + DisplayName="source (Source header)"/> + <EnumValue + Name="replica" + DisplayName="replica (Replica header)"/> + <EnumValue + Name="merged" + DisplayName="merged (Combined replica/source)"/> + <EnumValue + Name="rep" + DisplayName="rep (Replicant template)"/> + </EnumProperty> + <StringProperty + Name="OutputFile" + HelpUrl="https://doc.qt.io/qt-5/qtremoteobjects-repc.html" + DisplayName="Output File" + Description="Output header/rep file to write to. ([rep-file/header-file])" /> + <StringListProperty + Name="IncludePath" + HelpUrl="https://doc.qt.io/qt-5/qtremoteobjects-repc.html" + DisplayName="Include Path" + Description= +"Add <dir> to the include path for header files. This parameter is needed only if the input +file type is src (.h file). Separate with semicolons if more than one. (-I<dir>)"/> + <BoolProperty + Name="AlwaysClass" + HelpUrl="https://doc.qt.io/qt-5/qtremoteobjects-repc.html" + DisplayName="Always Output Class Type" + Description="Always output 'class' type for .rep files and never 'POD'. (-c)"/> + <BoolProperty + Name="PrintDebug" + HelpUrl="https://doc.qt.io/qt-5/qtremoteobjects-repc.html" + DisplayName="Print Debug Information" + Description="Print out parsing debug information (for troubleshooting). (-d)"/> + <StringProperty + Name="CommandLineTemplate" + DisplayName="Command Line" + Visible="False" + IncludeInCommandLine="False" /> + <DynamicEnumProperty + Name="QtRepcBeforeTargets" + Category="General" + EnumProvider="Targets" + IncludeInCommandLine="False" Visible="False"> + <DynamicEnumProperty.DisplayName> + <sys:String>Execute Before</sys:String> + </DynamicEnumProperty.DisplayName> + <DynamicEnumProperty.Description> + <sys:String>Specifies the targets for the build customization to run before.</sys:String> + </DynamicEnumProperty.Description> + <DynamicEnumProperty.ProviderSettings> + <NameValuePair + Name="Exclude" + Value="^QtRepcBeforeTargets|^Compute" /> + </DynamicEnumProperty.ProviderSettings> + <DynamicEnumProperty.DataSource> + <DataSource + Persistence="ProjectFile" + ItemType="" + HasConfigurationCondition="true" /> + </DynamicEnumProperty.DataSource> + </DynamicEnumProperty> + <DynamicEnumProperty + Name="QtRepcAfterTargets" + Category="General" + EnumProvider="Targets" + IncludeInCommandLine="False" Visible="False"> + <DynamicEnumProperty.DisplayName> + <sys:String>Execute After</sys:String> + </DynamicEnumProperty.DisplayName> + <DynamicEnumProperty.Description> + <sys:String>Specifies the targets for the build customization to run after.</sys:String> + </DynamicEnumProperty.Description> + <DynamicEnumProperty.ProviderSettings> + <NameValuePair + Name="Exclude" + Value="^QtRepcAfterTargets|^Compute" /> + </DynamicEnumProperty.ProviderSettings> + <DynamicEnumProperty.DataSource> + <DataSource + Persistence="ProjectFile" + ItemType="" + HasConfigurationCondition="true" /> + </DynamicEnumProperty.DataSource> + </DynamicEnumProperty> + <StringListProperty + Name="Outputs" + DisplayName="Outputs" + IncludeInCommandLine="False" + Visible="False" /> + <StringListProperty + Name="AdditionalDependencies" + DisplayName="Additional Dependencies" + IncludeInCommandLine="False"/> + <StringProperty + Subtype="AdditionalOptions" + Name="AdditionalOptions" + Category="General"> + <StringProperty.DisplayName> + <sys:String>Additional Options</sys:String> + </StringProperty.DisplayName> + <StringProperty.Description> + <sys:String>Additional Options</sys:String> + </StringProperty.Description> + </StringProperty> + <EnumProperty + Name="DynamicSource" + DisplayName="Dynamic moc Source" + Description="Add output file to list of moc sources during build."> + <EnumValue + Name="moc_cpp" + DisplayName="Output moc header and moc-generated C++" + Description="Use output as dynamic moc source, and output of moc as dynamic C++ source."/> + <EnumValue + Name="moc" + DisplayName="Output moc header" + Description="Use output as dynamic moc source."/> + <EnumValue + Name="false" + DisplayName="Disable" + Description="Disable dynamic source."/> + </EnumProperty> + <BoolProperty + Name="ParallelProcess" + DisplayName="Parallel Process" + Description="Run tool in parallel process."/> + </Rule> + <ItemType + Name="QtRepc" + DisplayName="Qt Remote Objects Compiler (repc)" /> + <FileExtension + Name="*.rep" + ContentType="QtRepc" /> + <ContentType + Name="QtRepc" + DisplayName="Qt Remote Objects Compiler (repc)" + ItemType="QtRepc" /> +</ProjectSchemaDefinitions> diff --git a/src/qtvstools/QtVsTools.csproj b/src/qtvstools/QtVsTools.csproj index ab1f547c..82f23813 100644 --- a/src/qtvstools/QtVsTools.csproj +++ b/src/qtvstools/QtVsTools.csproj @@ -281,6 +281,12 @@ <CopyToOutputDirectory>Always</CopyToOutputDirectory> <IncludeInVSIX>true</IncludeInVSIX> </Content> + <Content Include="..\qtmsbuild\qtrepc.targets"> + <Link>QtMsBuild\qtrepc.targets</Link> + <SubType>Designer</SubType> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <IncludeInVSIX>true</IncludeInVSIX> + </Content> <None Include="packages.config" /> </ItemGroup> <PropertyGroup> @@ -342,6 +348,12 @@ <CopyToOutputDirectory>Always</CopyToOutputDirectory> <IncludeInVSIX>true</IncludeInVSIX> </Content> + <Content Include="..\qtmsbuild\qtrepc.xml"> + <Link>QtMsBuild\qtrepc.xml</Link> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <IncludeInVSIX>true</IncludeInVSIX> + <SubType>Designer</SubType> + </Content> <Content Include="..\vsqml\bin\vsqml.dll"> <Link>vsqml.dll</Link> <CopyToOutputDirectory>Always</CopyToOutputDirectory> @@ -568,4 +580,4 @@ <Target Name="CheckT4Templates" BeforeTargets="Build" Inputs="%(T4Template.FullPath);%(T4Template.DependsOn)" Outputs="@(T4Template->'%(OutputFile)')"> <Error Text="T4 templates out-of-date; update by selecting "Build" > "Transform All T4 Templates"" /> </Target> -</Project>
\ No newline at end of file +</Project> |