aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2017-11-16 10:41:04 +0100
committerMiguel Costa <miguel.costa@qt.io>2017-12-01 12:19:17 +0000
commitd22f0aa651ad794fea6ec036a67ed2e112f41bdf (patch)
tree4a8606af18c38b6e687653d1e29913a7cb493b19
parentda4ee15e3f2221c24fe0de653b755ce38695a98b (diff)
Add MSBuild targets for Qt
Added MSBuild customization files to support Qt-specific tasks like moc, rcc, uic. Instead of custom build steps that only allow a command line field, which has to be specified for each project item, MSBuild targets allow each tool to have a dedicated dialog (or "property page") with one field per tool option. Common options can be specified only once at project/configuration level and inherited by all items of the same type. Unlike custom build steps that can only run in sequence, using the Qt MSBuild targets it is possible to run the tools in parallel processes. Change-Id: Ie348bccec0402c10299096e51381a88e4a58dad2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/config/12.0/source.extension.vsixmanifest5
-rw-r--r--src/config/14.0/source.extension.vsixmanifest5
-rw-r--r--src/config/15.0/source.extension.vsixmanifest5
-rw-r--r--src/qtmsbuild/qt.props71
-rw-r--r--src/qtmsbuild/qt.targets415
-rw-r--r--src/qtmsbuild/qtmoc.xml244
-rw-r--r--src/qtmsbuild/qtrcc.xml270
-rw-r--r--src/qtmsbuild/qtuic.xml190
-rw-r--r--src/qttemplates/console/console.vcxproj15
-rw-r--r--src/qttemplates/designer/designer.vcxproj15
-rw-r--r--src/qttemplates/gui/gui.vcxproj15
-rw-r--r--src/qttemplates/lib/lib.vcxproj15
-rw-r--r--src/qttemplates/server/server.vcxproj15
-rw-r--r--src/qtvstools/QtVsTools.csproj25
-rw-r--r--src/qtvstools/Vsix.cs11
15 files changed, 1316 insertions, 0 deletions
diff --git a/src/config/12.0/source.extension.vsixmanifest b/src/config/12.0/source.extension.vsixmanifest
index 739bc19f..39afee71 100644
--- a/src/config/12.0/source.extension.vsixmanifest
+++ b/src/config/12.0/source.extension.vsixmanifest
@@ -77,5 +77,10 @@
d:Source="File"
Path="x86\SQLite.Interop.dll"
d:VsixSubPath="x86" />
+ <Asset Type="File" d:Source="File" Path="qtmsbuild\qt.props" d:VsixSubPath="qtmsbuild" />
+ <Asset Type="File" d:Source="File" Path="qtmsbuild\qt.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\qtuic.xml" d:VsixSubPath="qtmsbuild" />
</Assets>
</PackageManifest>
diff --git a/src/config/14.0/source.extension.vsixmanifest b/src/config/14.0/source.extension.vsixmanifest
index 7b5f743f..4e9b2056 100644
--- a/src/config/14.0/source.extension.vsixmanifest
+++ b/src/config/14.0/source.extension.vsixmanifest
@@ -77,5 +77,10 @@
d:Source="File"
Path="x86\SQLite.Interop.dll"
d:VsixSubPath="x86" />
+ <Asset Type="File" d:Source="File" Path="qtmsbuild\qt.props" d:VsixSubPath="qtmsbuild" />
+ <Asset Type="File" d:Source="File" Path="qtmsbuild\qt.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\qtuic.xml" d:VsixSubPath="qtmsbuild" />
</Assets>
</PackageManifest>
diff --git a/src/config/15.0/source.extension.vsixmanifest b/src/config/15.0/source.extension.vsixmanifest
index b37c28f4..b2978032 100644
--- a/src/config/15.0/source.extension.vsixmanifest
+++ b/src/config/15.0/source.extension.vsixmanifest
@@ -77,6 +77,11 @@
d:Source="File"
Path="x86\SQLite.Interop.dll"
d:VsixSubPath="x86" />
+ <Asset Type="File" d:Source="File" Path="qtmsbuild\qt.props" d:VsixSubPath="qtmsbuild" />
+ <Asset Type="File" d:Source="File" Path="qtmsbuild\qt.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\qtuic.xml" d:VsixSubPath="qtmsbuild" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor"
diff --git a/src/qtmsbuild/qt.props b/src/qtmsbuild/qt.props
new file mode 100644
index 00000000..24a80970
--- /dev/null
+++ b/src/qtmsbuild/qt.props
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup
+ Condition="'$(QtMocBeforeTargets)' == '' and '$(QtMocAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
+ <QtMocBeforeTargets>ClCompile</QtMocBeforeTargets>
+ <QtMocAfterTargets>CustomBuild</QtMocAfterTargets>
+ </PropertyGroup>
+ <PropertyGroup>
+ <QtMocDependsOn
+ Condition="'$(ConfigurationType)' != 'Makefile'">
+ _SelectedFiles;$(QtMocDependsOn)
+ </QtMocDependsOn>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <QtMoc>
+ <ExecutionDescription>Moc%27ing %(Identity)...</ExecutionDescription>
+ <QTDIR>$(QTDIR)</QTDIR>
+ <InputFile>%(FullPath)</InputFile>
+ <OutputFile>$(ProjectDir)GeneratedFiles\$(Configuration)\moc_%(Filename).cpp</OutputFile>
+ <ParallelProcess>true</ParallelProcess>
+ <CommandLineTemplate>[AllOptions] [AdditionalOptions]</CommandLineTemplate>
+ <Outputs>%(OutputFile)</Outputs>
+ </QtMoc>
+ </ItemDefinitionGroup>
+ <PropertyGroup
+ Condition="'$(QtRccBeforeTargets)' == '' and '$(QtRccAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
+ <QtRccBeforeTargets>ClCompile</QtRccBeforeTargets>
+ <QtRccAfterTargets>CustomBuild</QtRccAfterTargets>
+ </PropertyGroup>
+ <PropertyGroup>
+ <QtRccDependsOn
+ Condition="'$(ConfigurationType)' != 'Makefile'">
+ _SelectedFiles;$(QtRccDependsOn)
+ </QtRccDependsOn>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <QtRcc>
+ <ExecutionDescription>Rcc%27ing %(Identity)...</ExecutionDescription>
+ <QTDIR>$(QTDIR)</QTDIR>
+ <InputFile>%(FullPath)</InputFile>
+ <OutputFile>$(ProjectDir)GeneratedFiles\qrc_%(Filename).cpp</OutputFile>
+ <InitFuncName>%(Filename)</InitFuncName>
+ <Compression>default</Compression>
+ <ParallelProcess>true</ParallelProcess>
+ <CommandLineTemplate>[AllOptions] [AdditionalOptions]</CommandLineTemplate>
+ <Outputs>%(OutputFile)</Outputs>
+ </QtRcc>
+ </ItemDefinitionGroup>
+ <PropertyGroup
+ Condition="'$(QtUicBeforeTargets)' == '' and '$(QtUicAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
+ <QtUicBeforeTargets>ClCompile</QtUicBeforeTargets>
+ <QtUicAfterTargets>CustomBuild</QtUicAfterTargets>
+ </PropertyGroup>
+ <PropertyGroup>
+ <QtUicDependsOn
+ Condition="'$(ConfigurationType)' != 'Makefile'">
+ _SelectedFiles;$(QtUicDependsOn)
+ </QtUicDependsOn>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <QtUic>
+ <ExecutionDescription>Uic%27ing %(Identity)...</ExecutionDescription>
+ <QTDIR>$(QTDIR)</QTDIR>
+ <InputFile>%(FullPath)</InputFile>
+ <OutputFile>$(ProjectDir)GeneratedFiles\ui_%(Filename).h</OutputFile>
+ <ParallelProcess>true</ParallelProcess>
+ <CommandLineTemplate>[AllOptions] [AdditionalOptions]</CommandLineTemplate>
+ <Outputs>%(OutputFile)</Outputs>
+ </QtUic>
+ </ItemDefinitionGroup>
+</Project>
diff --git a/src/qtmsbuild/qt.targets b/src/qtmsbuild/qt.targets
new file mode 100644
index 00000000..ec12d249
--- /dev/null
+++ b/src/qtmsbuild/qt.targets
@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Target Name="QtPrepare" AfterTargets="CustomBuild" BeforeTargets="ClCompile">
+ <PropertyGroup Condition="'$(QtDebug)' == ''">
+ <QtDebug>false</QtDebug>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(QtWorkFilePath)' == ''">
+ <QtWorkFilePath>$(ProjectDir)$(IntDir)qt.txt</QtWorkFilePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(QtMaxProcs)' == ''">
+ <QtMaxProcs>$([System.Environment]::ProcessorCount)</QtMaxProcs>
+ </PropertyGroup>
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="# BEGIN Qt" />
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtPrepare" />
+ <Delete Files="$(QtWorkFilePath)"/>
+ <Delete Condition="'$(SelectedFiles)' == '%(QtMoc.Identity)'" Files="%(QtMoc.OutputFile)" />
+ <Delete Condition="'$(SelectedFiles)' == '%(QtRcc.Identity)'" Files="%(QtRcc.OutputFile)" />
+ <Delete Condition="'$(SelectedFiles)' == '%(QtUic.Identity)'" Files="%(QtUic.OutputFile)" />
+ </Target>
+ <ItemGroup>
+ <PropertyPageSchema
+ Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName)moc.xml" />
+ <AvailableItemName Include="QtMoc">
+ <Targets>QtMoc</Targets>
+ </AvailableItemName>
+ </ItemGroup>
+ <UsingTask
+ TaskName="QtMoc"
+ TaskFactory="XamlTaskFactory"
+ AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName)moc.xml</Task>
+ </UsingTask>
+ <Target
+ Name="QtMoc"
+ BeforeTargets="$(QtMocBeforeTargets)"
+ AfterTargets="$(QtMocAfterTargets)"
+ Condition="'@(QtMoc)' != ''"
+ Inputs="%(QtMoc.FullPath);%(QtMoc.AdditionalDependencies);$(MSBuildProjectFile)"
+ Outputs="@(QtMoc-&gt;'%(OutputFile)')"
+ DependsOnTargets="$(QtMocDependsOn);QtPrepare">
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtMoc @(QtMoc)" />
+ <ItemGroup Condition="'@(SelectedFiles)' != ''">
+ <QtMoc Remove="@(QtMoc)" Condition="'%(Identity)' != '@(SelectedFiles)'" />
+ </ItemGroup>
+ <ItemGroup>
+ <QtMoc_tlog
+ Include="%(QtMoc.OutputFile)"
+ Condition="'%(QtMoc.OutputFile)' != '' and '%(QtMoc.ExcludedFromBuild)' != 'true'">
+ <Source>@(QtMoc, '|')</Source>
+ </QtMoc_tlog>
+ </ItemGroup>
+ <Message
+ Condition="'@(QtMoc)' != '' and '%(QtMoc.ExcludedFromBuild)' != 'true' and ('%(QtMoc.ParallelProcess)' != 'true' or '@(SelectedFiles)' != '')"
+ Importance="High"
+ Text="%(QtMoc.ExecutionDescription)" />
+ <WriteLinesToFile
+ Condition="'@(QtMoc_tlog)' != '' and '%(QtMoc_tlog.ExcludedFromBuild)' != 'true'"
+ File="$(TLogLocation)$(ProjectName).write.1u.tlog"
+ Lines="^%(QtMoc_tlog.Source);@(QtMoc_tlog-&gt;'%(Fullpath)')"
+ Encoding="Unicode"/>
+ <MakeDir
+ Condition="'@(QtMoc)' != '' and '%(QtMoc.ExcludedFromBuild)' != 'true'"
+ Directories="$([System.IO.Path]::GetDirectoryName(%(QtMoc.OutputFile)))"/>
+ <QtMoc
+ Condition="'@(QtMoc)' != '' and '%(QtMoc.ExcludedFromBuild)' != 'true' and '%(QtMoc.ParallelProcess)' == 'true' and '@(SelectedFiles)' == ''"
+ CommandLineTemplate="echo %(QtMoc.ExecutionDescription);%(QtMoc.QTDIR)\bin\moc.exe;%(QtMoc.CommandLineTemplate) &gt;&gt; &quot;$(QtWorkFilePath)&quot;"
+ InputFile="%(QtMoc.InputFile)"
+ OutputFile="%(QtMoc.OutputFile)"
+ IncludePath="%(QtMoc.IncludePath)"
+ MacFramework="%(QtMoc.MacFramework)"
+ PreprocessOnly="%(QtMoc.PreprocessOnly)"
+ Define="%(QtMoc.Define)"
+ Undefine="%(QtMoc.Undefine)"
+ Metadata="%(QtMoc.Metadata)"
+ CompilerFlavor="%(QtMoc.CompilerFlavor)"
+ NoInclude="%(QtMoc.NoInclude)"
+ PathPrefix="%(QtMoc.PathPrefix)"
+ ForceInclude="%(QtMoc.ForceInclude)"
+ PrependInclude="%(QtMoc.PrependInclude)"
+ Include="%(QtMoc.Include)"
+ NoNotesWarnings="%(QtMoc.NoNotesWarnings)"
+ NoNotes="%(QtMoc.NoNotes)"
+ NoWarnings="%(QtMoc.NoWarnings)"
+ IgnoreConflicts="%(QtMoc.IgnoreConflicts)"
+ OptionsFile="%(QtMoc.OptionsFile)"
+ AdditionalOptions="%(QtMoc.AdditionalOptions)"
+ Inputs="@(QtMoc)" />
+ <QtMoc
+ Condition="'@(QtMoc)' != '' and '%(QtMoc.ExcludedFromBuild)' != 'true' and ('%(QtMoc.ParallelProcess)' != 'true' or '@(SelectedFiles)' != '')"
+ CommandLineTemplate="%(QtMoc.QTDIR)\bin\moc.exe %(QtMoc.CommandLineTemplate)"
+ InputFile="%(QtMoc.InputFile)"
+ OutputFile="%(QtMoc.OutputFile)"
+ IncludePath="%(QtMoc.IncludePath)"
+ MacFramework="%(QtMoc.MacFramework)"
+ PreprocessOnly="%(QtMoc.PreprocessOnly)"
+ Define="%(QtMoc.Define)"
+ Undefine="%(QtMoc.Undefine)"
+ Metadata="%(QtMoc.Metadata)"
+ CompilerFlavor="%(QtMoc.CompilerFlavor)"
+ NoInclude="%(QtMoc.NoInclude)"
+ PathPrefix="%(QtMoc.PathPrefix)"
+ ForceInclude="%(QtMoc.ForceInclude)"
+ PrependInclude="%(QtMoc.PrependInclude)"
+ Include="%(QtMoc.Include)"
+ NoNotesWarnings="%(QtMoc.NoNotesWarnings)"
+ NoNotes="%(QtMoc.NoNotes)"
+ NoWarnings="%(QtMoc.NoWarnings)"
+ IgnoreConflicts="%(QtMoc.IgnoreConflicts)"
+ OptionsFile="%(QtMoc.OptionsFile)"
+ AdditionalOptions="%(QtMoc.AdditionalOptions)"
+ Inputs="@(QtMoc)" />
+ </Target>
+ <Target Name="QtMocPrep" BeforeTargets="QtMoc" Condition="'@(QtMoc)' != ''">
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtMocPrep @(QtMoc)" />
+ <ItemGroup>
+ <QtMoc
+ Remove="@(QtMoc)"
+ Condition="'@(QtMoc)' != '' and '%(QtMoc.ExcludedFromBuild)' == 'true' and '@(SelectedFiles)' == ''"/>
+ </ItemGroup>
+ </Target>
+ <ItemGroup>
+ <PropertyPageSchema
+ Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName)rcc.xml" />
+ <AvailableItemName Include="QtRcc">
+ <Targets>QtRcc</Targets>
+ </AvailableItemName>
+ </ItemGroup>
+ <UsingTask
+ TaskName="QtRcc"
+ TaskFactory="XamlTaskFactory"
+ AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName)rcc.xml</Task>
+ </UsingTask>
+ <Target
+ Name="QtRcc"
+ BeforeTargets="$(QtRccBeforeTargets)"
+ AfterTargets="$(QtRccAfterTargets)"
+ Condition="'@(QtRcc)' != ''"
+ Inputs="%(QtRcc.FullPath);%(QtRcc.AdditionalDependencies);$(MSBuildProjectFile)"
+ Outputs="@(QtRcc-&gt;'%(OutputFile)')"
+ DependsOnTargets="$(QtRccDependsOn);QtMoc">
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtRcc @(QtRcc)" />
+ <ItemGroup Condition="'@(SelectedFiles)' != ''">
+ <QtRcc Remove="@(QtRcc)" Condition="'%(Identity)' != '@(SelectedFiles)'" />
+ </ItemGroup>
+ <ItemGroup>
+ <QtRcc_tlog
+ Include="%(QtRcc.OutputFile)"
+ Condition="'%(QtRcc.OutputFile)' != '' and '%(QtRcc.ExcludedFromBuild)' != 'true'">
+ <Source>@(QtRcc, '|')</Source>
+ </QtRcc_tlog>
+ </ItemGroup>
+ <Message
+ Condition="'@(QtRcc)' != '' and '%(QtRcc.ExcludedFromBuild)' != 'true' and ('%(QtRcc.ParallelProcess)' != 'true' or '@(SelectedFiles)' != '')"
+ Importance="High"
+ Text="%(QtRcc.ExecutionDescription)" />
+ <WriteLinesToFile
+ Condition="'@(QtRcc_tlog)' != '' and '%(QtRcc_tlog.ExcludedFromBuild)' != 'true'"
+ File="$(TLogLocation)$(ProjectName).write.1u.tlog"
+ Lines="^%(QtRcc_tlog.Source);@(QtRcc_tlog-&gt;'%(Fullpath)')"
+ Encoding="Unicode"/>
+ <MakeDir
+ Condition="'@(QtRcc)' != '' and '%(QtRcc.ExcludedFromBuild)' != 'true'"
+ Directories="$([System.IO.Path]::GetDirectoryName(%(QtRcc.OutputFile)))"/>
+ <QtRcc
+ Condition="'@(QtRcc)' != '' and '%(QtRcc.ExcludedFromBuild)' != 'true' and '%(QtRcc.ParallelProcess)' == 'true' and '@(SelectedFiles)' == ''"
+ CommandLineTemplate="echo %(QtRcc.ExecutionDescription);%(QtRcc.QTDIR)\bin\rcc.exe;%(QtRcc.CommandLineTemplate) &gt;&gt; &quot;$(QtWorkFilePath)&quot;"
+ InputFile="%(QtRcc.InputFile)"
+ OutputFile="%(QtRcc.OutputFile)"
+ TempFile="%(QtRcc.TempFile)"
+ InitFuncName="%(QtRcc.InitFuncName)"
+ Root="%(QtRcc.Root)"
+ Compression="%(QtRcc.Compression)"
+ NoCompression="%(QtRcc.NoCompression)"
+ CompressThreshold="%(QtRcc.CompressThreshold)"
+ BinaryOutput="%(QtRcc.BinaryOutput)"
+ PassNumber="%(QtRcc.PassNumber)"
+ NoNamespace="%(QtRcc.NoNamespace)"
+ Verbose="%(QtRcc.Verbose)"
+ List="%(QtRcc.List)"
+ Project="%(QtRcc.Project)"
+ FormatVersion="%(QtRcc.FormatVersion)"
+ AdditionalOptions="%(QtRcc.AdditionalOptions)"
+ Inputs="@(QtRcc)" />
+ <QtRcc
+ Condition="'@(QtRcc)' != '' and '%(QtRcc.ExcludedFromBuild)' != 'true' and ('%(QtRcc.ParallelProcess)' != 'true' or '@(SelectedFiles)' != '')"
+ CommandLineTemplate="%(QtRcc.QTDIR)\bin\rcc.exe %(QtRcc.CommandLineTemplate)"
+ InputFile="%(QtRcc.InputFile)"
+ OutputFile="%(QtRcc.OutputFile)"
+ TempFile="%(QtRcc.TempFile)"
+ InitFuncName="%(QtRcc.InitFuncName)"
+ Root="%(QtRcc.Root)"
+ Compression="%(QtRcc.Compression)"
+ NoCompression="%(QtRcc.NoCompression)"
+ CompressThreshold="%(QtRcc.CompressThreshold)"
+ BinaryOutput="%(QtRcc.BinaryOutput)"
+ PassNumber="%(QtRcc.PassNumber)"
+ NoNamespace="%(QtRcc.NoNamespace)"
+ Verbose="%(QtRcc.Verbose)"
+ List="%(QtRcc.List)"
+ Project="%(QtRcc.Project)"
+ FormatVersion="%(QtRcc.FormatVersion)"
+ AdditionalOptions="%(QtRcc.AdditionalOptions)"
+ Inputs="@(QtRcc)" />
+ </Target>
+ <Target Name="QtRccPrep" BeforeTargets="QtRcc" Condition="'@(QtRcc)' != ''">
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtRccPrep @(QtRcc)" />
+ <ItemGroup>
+ <QtRcc
+ Remove="@(QtRcc)"
+ Condition="'@(QtRcc)' != '' and '%(QtRcc.ExcludedFromBuild)' == 'true' and '@(SelectedFiles)' == ''"/>
+ </ItemGroup>
+ </Target>
+ <ItemGroup>
+ <PropertyPageSchema
+ Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName)uic.xml" />
+ <AvailableItemName Include="QtUic">
+ <Targets>QtUic</Targets>
+ </AvailableItemName>
+ </ItemGroup>
+ <UsingTask
+ TaskName="QtUic"
+ TaskFactory="XamlTaskFactory"
+ AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName)uic.xml</Task>
+ </UsingTask>
+ <Target
+ Name="QtUic"
+ BeforeTargets="$(QtUicBeforeTargets)"
+ AfterTargets="$(QtUicAfterTargets)"
+ Condition="'@(QtUic)' != ''"
+ Inputs="%(QtUic.FullPath);%(QtUic.AdditionalDependencies);$(MSBuildProjectFile)"
+ Outputs="@(QtUic-&gt;'%(OutputFile)')"
+ DependsOnTargets="$(QtUicDependsOn);QtRcc">
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtUic @(QtUic)" />
+ <ItemGroup Condition="'@(SelectedFiles)' != ''">
+ <QtUic Remove="@(QtUic)" Condition="'%(Identity)' != '@(SelectedFiles)'" />
+ </ItemGroup>
+ <ItemGroup>
+ <QtUic_tlog
+ Include="%(QtUic.OutputFile)"
+ Condition="'%(QtUic.OutputFile)' != '' and '%(QtUic.ExcludedFromBuild)' != 'true'">
+ <Source>@(QtUic, '|')</Source>
+ </QtUic_tlog>
+ </ItemGroup>
+ <Message
+ Condition="'@(QtUic)' != '' and '%(QtUic.ExcludedFromBuild)' != 'true' and ('%(QtUic.ParallelProcess)' != 'true' or '@(SelectedFiles)' != '')"
+ Importance="High"
+ Text="%(QtUic.ExecutionDescription)" />
+ <WriteLinesToFile
+ Condition="'@(QtUic_tlog)' != '' and '%(QtUic_tlog.ExcludedFromBuild)' != 'true'"
+ File="$(TLogLocation)$(ProjectName).write.1u.tlog"
+ Lines="^%(QtUic_tlog.Source);@(QtUic_tlog-&gt;'%(Fullpath)')"
+ Encoding="Unicode"/>
+ <MakeDir
+ Condition="'@(QtUic)' != '' and '%(QtUic.ExcludedFromBuild)' != 'true'"
+ Directories="$([System.IO.Path]::GetDirectoryName(%(QtUic.OutputFile)))"/>
+ <QtUic
+ Condition="'@(QtUic)' != '' and '%(QtUic.ExcludedFromBuild)' != 'true' and '%(QtUic.ParallelProcess)' == 'true' and '@(SelectedFiles)' == ''"
+ CommandLineTemplate="echo %(QtUic.ExecutionDescription);%(QtUic.QTDIR)\bin\uic.exe;%(QtUic.CommandLineTemplate) &gt;&gt; &quot;$(QtWorkFilePath)&quot;"
+ InputFile="%(QtUic.InputFile)"
+ OutputFile="%(QtUic.OutputFile)"
+ DisplayDependencies="%(QtUic.DisplayDependencies)"
+ NoProtection="%(QtUic.NoProtection)"
+ NoImplicitIncludes="%(QtUic.NoImplicitIncludes)"
+ Postfix="%(QtUic.Postfix)"
+ Translate="%(QtUic.Translate)"
+ Include="%(QtUic.Include)"
+ Generator="%(QtUic.Generator)"
+ IdBased="%(QtUic.IdBased)"
+ AdditionalOptions="%(QtUic.AdditionalOptions)"
+ Inputs="@(QtUic)" />
+ <QtUic
+ Condition="'@(QtUic)' != '' and '%(QtUic.ExcludedFromBuild)' != 'true' and ('%(QtUic.ParallelProcess)' != 'true' or '@(SelectedFiles)' != '')"
+ CommandLineTemplate="%(QtUic.QTDIR)\bin\uic.exe %(QtUic.CommandLineTemplate)"
+ InputFile="%(QtUic.InputFile)"
+ OutputFile="%(QtUic.OutputFile)"
+ DisplayDependencies="%(QtUic.DisplayDependencies)"
+ NoProtection="%(QtUic.NoProtection)"
+ NoImplicitIncludes="%(QtUic.NoImplicitIncludes)"
+ Postfix="%(QtUic.Postfix)"
+ Translate="%(QtUic.Translate)"
+ Include="%(QtUic.Include)"
+ Generator="%(QtUic.Generator)"
+ IdBased="%(QtUic.IdBased)"
+ AdditionalOptions="%(QtUic.AdditionalOptions)"
+ Inputs="@(QtUic)" />
+ </Target>
+ <Target Name="QtUicPrep" BeforeTargets="QtUic" Condition="'@(QtUic)' != ''">
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtUicPrep @(QtUic)" />
+ <ItemGroup>
+ <QtUic
+ Remove="@(QtUic)"
+ Condition="'@(QtUic)' != '' and '%(QtUic.ExcludedFromBuild)' == 'true' and '@(SelectedFiles)' == ''"/>
+ </ItemGroup>
+ </Target>
+ <UsingTask
+ TaskName="QtFinalize"
+ TaskFactory="CodeTaskFactory"
+ AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <WorkFilePath ParameterType="System.String" Required="true" />
+ <MaxProcs ParameterType="System.Int32" Required="true" />
+ <QtDebug ParameterType="System.Boolean" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Using Namespace="System"/>
+ <Using Namespace="System.IO"/>
+ <Using Namespace="System.Diagnostics"/>
+ <Using Namespace="System.Collections.Generic"/>
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+
+ if (!File.Exists(WorkFilePath))
+ return true;
+
+ Queue<Process> childRunningProcs = new Queue<Process>();
+ bool ok = true;
+ foreach (var qtCmdLin in File.ReadLines(WorkFilePath)) {
+
+ if (!ok)
+ break;
+
+ string[] qtCmdCol = qtCmdLin.Split(new char[] { ';' });
+ if (qtCmdCol.Length < 3) {
+ ok = false;
+ break;
+ }
+
+ Log.LogMessage(MessageImportance.High, qtCmdCol[0]);
+
+ var procInfo = new ProcessStartInfo
+ {
+ FileName = qtCmdCol[1],
+ CreateNoWindow = true,
+ UseShellExecute = false,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true,
+ Arguments = qtCmdCol[2]
+ };
+ try {
+ var childProcess = Process.Start(procInfo);
+ childProcess.OutputDataReceived +=
+ (object sender, DataReceivedEventArgs e) => {
+ if (!string.IsNullOrEmpty(e.Data))
+ Log.LogMessage(MessageImportance.High, e.Data);
+ };
+ childProcess.ErrorDataReceived +=
+ (object sender, DataReceivedEventArgs e) => {
+ if (!string.IsNullOrEmpty(e.Data))
+ Log.LogMessage(MessageImportance.High, e.Data);
+ };
+ childProcess.BeginOutputReadLine();
+ childProcess.BeginErrorReadLine();
+ childRunningProcs.Enqueue(childProcess);
+ } catch (Exception e) {
+ Log.LogMessage(
+ MessageImportance.High,
+ string.Format("Error starting process {0}: {1}", qtCmdCol[1], e.Message));
+ ok = false;
+ }
+
+ while (ok
+ && (childRunningProcs.Peek().HasExited
+ || childRunningProcs.Count >= MaxProcs)) {
+ var childRunningProcess = childRunningProcs.Dequeue();
+ childRunningProcess.WaitForExit();
+ int exitCode = childRunningProcess.ExitCode;
+ childRunningProcess.Close();
+ if (exitCode != 0)
+ ok = false;
+ }
+ }
+
+ foreach (var childRunningProcess in childRunningProcs) {
+ childRunningProcess.WaitForExit();
+ int exitCode = childRunningProcess.ExitCode;
+ childRunningProcess.Close();
+ if (exitCode != 0) {
+ ok = false;
+ }
+ }
+
+ if (!ok)
+ return false;
+
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+ <Target Name="QtFinalize"
+ AfterTargets="CustomBuild"
+ BeforeTargets="ClCompile"
+ DependsOnTargets="QtUic">
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="## QtFinalize" />
+ <QtFinalize WorkFilePath="$(QtWorkFilePath)" MaxProcs="$(QtMaxProcs)" QtDebug="$(QtDebug)"/>
+ <Message Importance="High" Condition="'$(QtDebug)' == 'true'" Text="# END Qt" />
+ </Target>
+ <Target Name="QtDebug">
+ <PropertyGroup>
+ <QtDebug>true</QtDebug>
+ </PropertyGroup>
+ <CallTarget Targets="QtFinalize"/>
+ </Target>
+ <PropertyGroup>
+ <CleanDependsOn>
+ $(CleanDependsOn);
+ QtClean;
+ </CleanDependsOn>
+ </PropertyGroup>
+ <Target Name="QtClean">
+ <Delete
+ Files="@(QtMoc->'%(OutputFile)');@(QtRcc->'%(OutputFile)');@(QtUic->'%(OutputFile)')" />
+ </Target>
+</Project>
diff --git a/src/qtmsbuild/qtmoc.xml b/src/qtmsbuild/qtmoc.xml
new file mode 100644
index 00000000..11cfb36c
--- /dev/null
+++ b/src/qtmsbuild/qtmoc.xml
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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="QtMoc"
+ PageTemplate="tool"
+ DisplayName="Qt Meta-Object Compiler"
+ Order="9">
+ <Rule.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType="QtMoc" />
+ </Rule.DataSource>
+ <Rule.Categories>
+ <Category
+ Name="General">
+ <Category.DisplayName>
+ <sys:String>moc.exe</sys:String>
+ </Category.DisplayName>
+ </Category>
+ </Rule.Categories>
+ <StringListProperty
+ Name="Inputs"
+ Category="General"
+ IsRequired="true"
+ Visible="False">
+ <StringListProperty.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType="QtMoc"
+ 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."/>
+ <StringProperty
+ Name="InputFile"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Input File"
+ Description="Specifies the full path of the input file. (&lt;file&gt;)"
+ Switch="&quot;[value]&quot;" />
+ <StringProperty
+ Name="OutputFile"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Output File"
+ Description="Specifies the full path of the output file. (-o &lt;file&gt;)"
+ Switch="-o &quot;[value]&quot;" />
+ <StringListProperty
+ Name="IncludePath"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Include Path"
+ Description="Add &lt;dir&gt; to the include path for header files; separate with semicolons if more than one. (-I&lt;dir&gt;)"
+ Switch="&quot;-I[value]&quot;" />
+ <StringProperty
+ Name="MacFramework"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="macOS Framework"
+ Description="Add macOS &lt;framework&gt; to the include path for header files. (-F &lt;framework&gt;)"
+ Switch="-F &quot;[value]&quot;"
+ Visible="False"/>
+ <BoolProperty
+ Name="PreprocessOnly"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Preprocess Only"
+ Description="Preprocess only; do not generate meta object code. (-E)"
+ Switch="-E"
+ Visible="False"/>
+ <StringListProperty
+ Name="Define"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Macro Definitions"
+ Description="Define macro, with optional definition; separate with semicolons if more than one. (-D&lt;macro&gt;[=&lt;def&gt;])"
+ Switch="-D[value]" />
+ <StringListProperty
+ Name="Undefine"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Undefine Macro Definitions"
+ Description="Undefine macro; separate with semicolons if more than one. (-U&lt;macro&gt;)"
+ Switch="-U[value]" />
+ <StringListProperty
+ Name="Metadata"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Plugin Meta Data"
+ Description="Add key/value pair to plugin meta data; separate with semicolons if more than one. (-M&lt;key=value&gt;)"
+ Switch="-M[value]" />
+ <StringProperty
+ Name="CompilerFlavor"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Compiler Flavor"
+ Description="Set the compiler &lt;flavor&gt;: either &quot;msvc&quot; or &quot;unix&quot;. (--compiler-flavor &lt;flavor&gt;)"
+ Switch="--compiler-flavor [value]"/>
+ <BoolProperty
+ Name="NoInclude"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="No Include"
+ Description="Do not generate an #include statement. (-i)"
+ Switch="-i"/>
+ <StringProperty
+ Name="PathPrefix"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Path Prefix"
+ Description="&lt;path&gt; prefix for included file. (-p &lt;path&gt;)"
+ Switch="-p [value]"/>
+ <StringListProperty
+ Name="ForceInclude"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Force Include"
+ Description="Force #include &lt;file&gt; (overwrite default); separate with semicolons if more than one. (-f &lt;file&gt;)"
+ Switch="-f &quot;[value]&quot;"/>
+ <StringListProperty
+ Name="PrependInclude"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Prepend Include"
+ Description="Prepend #include &lt;file&gt; (overwrite default); separate with semicolons if more than one. (-b &lt;file&gt;)"
+ Switch="-b &quot;[value]&quot;"/>
+ <StringListProperty
+ Name="Include"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Include"
+ Description="Parse &lt;file&gt; as an #include before the main source(s); separate with semicolons if more than one. (--include &lt;file&gt;)"
+ Switch="--include &quot;[value]&quot;"/>
+ <StringListProperty
+ Name="NoNotesWarnings"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="No Notes Or Warnings"
+ Description="Do not display notes (-nn) or warnings (-nw); Compatibility option; separate with semicolons if more than one. (-n&lt;n|w&gt;)"
+ Switch="-n[value]"
+ Visible="False"/>
+ <BoolProperty
+ Name="NoNotes"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="No Notes"
+ Description="Do not display notes. (--no-notes)"
+ Switch="--no-notes"/>
+ <BoolProperty
+ Name="NoWarnings"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="No Warnings"
+ Description="Do not display warnings (implies --no-notes). (--no-warnings)"
+ Switch="--no-warnings"/>
+ <BoolProperty
+ Name="IgnoreConflicts"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Ignore Conflicts"
+ Description="Ignore all options that conflict with compilers, like -pthread conflicting with moc's -p option. (--ignore-option-clashes)"
+ Switch="--ignore-option-clashes"/>
+ <StringProperty
+ Name="OptionsFile"
+ HelpUrl="http://doc.qt.io/qt-5/moc.html"
+ DisplayName="Options File"
+ Description="Read additional command-line options from &lt;file&gt;. (@&lt;file&gt;)"
+ Switch="&quot;@[value]&quot;" />
+ <StringProperty
+ Name="CommandLineTemplate"
+ DisplayName="Command Line"
+ Visible="False"
+ IncludeInCommandLine="False" />
+ <DynamicEnumProperty
+ Name="QtMocBeforeTargets"
+ 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="^QtMocBeforeTargets|^Compute" />
+ </DynamicEnumProperty.ProviderSettings>
+ <DynamicEnumProperty.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType=""
+ HasConfigurationCondition="true" />
+ </DynamicEnumProperty.DataSource>
+ </DynamicEnumProperty>
+ <DynamicEnumProperty
+ Name="QtMocAfterTargets"
+ 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="^QtMocAfterTargets|^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>
+ <BoolProperty
+ Name="ParallelProcess"
+ DisplayName="Parallel Process"
+ Description="Run tool in parallel process."/>
+ </Rule>
+ <ItemType
+ Name="QtMoc"
+ DisplayName="Qt Meta-Object Compiler (moc)" />
+ <ContentType
+ Name="QtMoc"
+ DisplayName="Qt Meta-Object Compiler (moc)"
+ ItemType="QtMoc" />
+</ProjectSchemaDefinitions>
diff --git a/src/qtmsbuild/qtrcc.xml b/src/qtmsbuild/qtrcc.xml
new file mode 100644
index 00000000..82dea845
--- /dev/null
+++ b/src/qtmsbuild/qtrcc.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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="QtRcc"
+ PageTemplate="tool"
+ DisplayName="Qt Resource Compiler"
+ Order="9">
+ <Rule.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType="QtRcc" />
+ </Rule.DataSource>
+ <Rule.Categories>
+ <Category
+ Name="General">
+ <Category.DisplayName>
+ <sys:String>rcc.exe</sys:String>
+ </Category.DisplayName>
+ </Category>
+ </Rule.Categories>
+ <StringListProperty
+ Name="Inputs"
+ Category="General"
+ IsRequired="true"
+ Visible="False">
+ <StringListProperty.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType="QtRcc"
+ 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."/>
+ <StringProperty
+ Name="InputFile"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Input File"
+ Description="Specifies the full path of the input file. (&lt;file&gt;)"
+ Switch="&quot;[value]&quot;" />
+ <StringProperty
+ Name="OutputFile"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Output File"
+ Description="Specifies the full path of the output file. (-o &lt;file&gt;)"
+ Switch="-o &quot;[value]&quot;" />
+ <StringProperty
+ Name="TempFile"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Temporary File"
+ Description="Use temporary &lt;file&gt; for big resources. (--temp &lt;file&gt;)"
+ Switch="--temp &quot;[value]&quot;" />
+ <StringProperty
+ Name="InitFuncName"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Initialization Function Name"
+ Description="Create an external initialization function with &lt;name&gt;. (--name &lt;name&gt;)"
+ Switch="--name [value]" />
+ <StringProperty
+ Name="Root"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Root"
+ Description="Prefix resource access path with root &lt;path&gt;. (--root &lt;path&gt;)"
+ Switch="--root &quot;[value]&quot;" />
+ <EnumProperty
+ Name="Compression"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Compression"
+ Description="Compress input files to the given compression level.">
+ <EnumValue
+ Name="default"
+ Switch=""
+ DisplayName="Default (use zlib's default compression level)"
+ Description="The default value for level is -1, which means use zlib's default compression level."/>
+ <EnumValue
+ Name="level1"
+ Switch="--compress 1"
+ DisplayName="Level 1 (least compression / fastest)"
+ Description="Compression level 1. (--compress 1)"/>
+ <EnumValue
+ Name="level2"
+ Switch="--compress 2"
+ DisplayName="Level 2"
+ Description="Compression level 2. (--compress 2)"/>
+ <EnumValue
+ Name="level3"
+ Switch="--compress 3"
+ DisplayName="Level 3"
+ Description="Compression level 3. (--compress 3)"/>
+ <EnumValue
+ Name="level4"
+ Switch="--compress 4"
+ DisplayName="Level 4"
+ Description="Compression level 4. (--compress 4)"/>
+ <EnumValue
+ Name="level5"
+ Switch="--compress 5"
+ DisplayName="Level 5"
+ Description="Compression level 5. (--compress 5)"/>
+ <EnumValue
+ Name="level6"
+ Switch="--compress 6"
+ DisplayName="Level 6"
+ Description="Compression level 6. (--compress 6)"/>
+ <EnumValue
+ Name="level7"
+ Switch="--compress 7"
+ DisplayName="Level 7"
+ Description="Compression level 7. (--compress 7)"/>
+ <EnumValue
+ Name="level8"
+ Switch="--compress 8"
+ DisplayName="Level 8"
+ Description="Compression level 8. (--compress 8)"/>
+ <EnumValue
+ Name="level9"
+ Switch="--compress 9"
+ DisplayName="Level 9 (most compression / slowest)"
+ Description="Compression level 9. (--compress 9)"/>
+ </EnumProperty>
+ <BoolProperty
+ Name="NoCompression"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="No Compression"
+ Description="Disable all compression. (--no-compress)"
+ Switch="--no-compress"/>
+ <StringProperty
+ Name="CompressThreshold"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Compression Threshold"
+ Description="Threshold &lt;level&gt; to consider compressing files. (--threshold &lt;level&gt;)"
+ Switch="--threshold [value]" />
+ <BoolProperty
+ Name="BinaryOutput"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Binary Output"
+ Description="Output a binary file for use as a dynamic resource. (--binary)"
+ Switch="--binary"/>
+ <StringProperty
+ Name="PassNumber"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Pass Number"
+ Description="Pass &lt;number&gt; for big resources. (--pass &lt;number&gt;)"
+ Switch="--pass [value]" />
+ <BoolProperty
+ Name="NoNamespace"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Disable Namespace Macros"
+ Description="Turn off namespace macros. (--namespace)"
+ Switch="--namespace"/>
+ <BoolProperty
+ Name="Verbose"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Verbose"
+ Description="Enable verbose mode. (--verbose)"
+ Switch="--verbose"/>
+ <BoolProperty
+ Name="List"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="List"
+ Description="Only list .qrc file entries, do not generate code. (--list)"
+ Switch="--list"/>
+ <BoolProperty
+ Name="Project"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Project"
+ Description="Output a resource file containing all files from the current directory. (--project)"
+ Switch="--project"/>
+ <StringProperty
+ Name="FormatVersion"
+ HelpUrl="http://doc.qt.io/qt-5/rcc.html"
+ DisplayName="Format Version"
+ Description="The RCC format version to write. (--format-version &lt;number&gt;)"
+ Switch="--format-version [value]" />
+ <StringProperty
+ Name="CommandLineTemplate"
+ DisplayName="Command Line"
+ Visible="False"
+ IncludeInCommandLine="False" />
+ <DynamicEnumProperty
+ Name="QtRccBeforeTargets"
+ 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="^QtRccBeforeTargets|^Compute" />
+ </DynamicEnumProperty.ProviderSettings>
+ <DynamicEnumProperty.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType=""
+ HasConfigurationCondition="true" />
+ </DynamicEnumProperty.DataSource>
+ </DynamicEnumProperty>
+ <DynamicEnumProperty
+ Name="QtRccAfterTargets"
+ 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="^QtRccAfterTargets|^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>
+ <BoolProperty
+ Name="ParallelProcess"
+ DisplayName="Parallel Process"
+ Description="Run tool in parallel process."/>
+ </Rule>
+ <ItemType
+ Name="QtRcc"
+ DisplayName="Qt Resource Compiler (rcc)" />
+ <FileExtension
+ Name="*.qrc"
+ ContentType="QtRcc" />
+ <ContentType
+ Name="QtRcc"
+ DisplayName="Qt Resource Compiler (rcc)"
+ ItemType="QtRcc" />
+</ProjectSchemaDefinitions>
diff --git a/src/qtmsbuild/qtuic.xml b/src/qtmsbuild/qtuic.xml
new file mode 100644
index 00000000..14cf279d
--- /dev/null
+++ b/src/qtmsbuild/qtuic.xml
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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="QtUic"
+ PageTemplate="tool"
+ DisplayName="Qt User Interface Compiler"
+ Order="9">
+ <Rule.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType="QtUic" />
+ </Rule.DataSource>
+ <Rule.Categories>
+ <Category
+ Name="General">
+ <Category.DisplayName>
+ <sys:String>uic.exe</sys:String>
+ </Category.DisplayName>
+ </Category>
+ </Rule.Categories>
+ <StringListProperty
+ Name="Inputs"
+ Category="General"
+ IsRequired="true"
+ Visible="False">
+ <StringListProperty.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType="QtUic"
+ 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."/>
+ <StringProperty
+ Name="InputFile"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="Input File"
+ Description="Specifies the full path of the input file. (&lt;file&gt;)"
+ Switch="&quot;[value]&quot;" />
+ <StringProperty
+ Name="OutputFile"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="Output File"
+ Description="Specifies the full path of the output file. (-o &lt;file&gt;)"
+ Switch="-o &quot;[value]&quot;" />
+ <BoolProperty
+ Name="DisplayDependencies"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="Display Dependencies"
+ Description="Display the dependencies. (--dependencies)"
+ Switch="--dependencies"/>
+ <BoolProperty
+ Name="NoProtection"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="No Protection"
+ Description="Disable header protection. (--no-protection)"
+ Switch="--no-protection"/>
+ <BoolProperty
+ Name="NoImplicitIncludes"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="No Implicit Includes"
+ Description="Disable generation of #include-directives. (--no-implicit-includes)"
+ Switch="--no-implicit-includes"/>
+ <StringProperty
+ Name="Postfix"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="Postfix"
+ Description="&lt;postfix&gt; to add to all generated classnames. (--postfix &lt;postfix&gt;)"
+ Switch="--postfix [value]"/>
+ <StringProperty
+ Name="Translate"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="Translate"
+ Description="Use &lt;function&gt; for i18n. (--tr &lt;function&gt;)"
+ Switch="--tr [value]" />
+ <StringProperty
+ Name="Include"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="Include"
+ Description="Add #include &lt;file&gt; to the output. (--include &lt;file&gt;)"
+ Switch="--include &quot;[value]&quot;" />
+ <StringProperty
+ Name="Generator"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="Generator"
+ Description="Select generator. (-g &lt;java|cpp&gt;)"
+ Switch="-g [value]" />
+ <BoolProperty
+ Name="IdBased"
+ HelpUrl="http://doc.qt.io/qt-5/uic.html"
+ DisplayName="ID Based"
+ Description="Use id based function for i18n. (--idbased)"
+ Switch="--idbased"/>
+ <StringProperty
+ Name="CommandLineTemplate"
+ DisplayName="Command Line"
+ Visible="False"
+ IncludeInCommandLine="False" />
+ <DynamicEnumProperty
+ Name="QtUicBeforeTargets"
+ 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="^QtUicBeforeTargets|^Compute" />
+ </DynamicEnumProperty.ProviderSettings>
+ <DynamicEnumProperty.DataSource>
+ <DataSource
+ Persistence="ProjectFile"
+ ItemType=""
+ HasConfigurationCondition="true" />
+ </DynamicEnumProperty.DataSource>
+ </DynamicEnumProperty>
+ <DynamicEnumProperty
+ Name="QtUicAfterTargets"
+ 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="^QtUicAfterTargets|^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>
+ <BoolProperty
+ Name="ParallelProcess"
+ DisplayName="Parallel Process"
+ Description="Run tool in parallel process."/>
+ </Rule>
+ <ItemType
+ Name="QtUic"
+ DisplayName="Qt User Interface Compiler (uic)" />
+ <FileExtension
+ Name="*.ui"
+ ContentType="QtUic" />
+ <ContentType
+ Name="QtUic"
+ DisplayName="Qt User Interface Compiler (uic)"
+ ItemType="QtUic" />
+</ProjectSchemaDefinitions>
diff --git a/src/qttemplates/console/console.vcxproj b/src/qttemplates/console/console.vcxproj
index 0582df26..7e36610f 100644
--- a/src/qttemplates/console/console.vcxproj
+++ b/src/qttemplates/console/console.vcxproj
@@ -24,6 +24,18 @@
<PlatformToolset>v$PlatformToolset$</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup Condition="'$(QtMsBuild)'==''">
+ <QtMsBuild>$(Registry:HKEY_CURRENT_USER\Environment@QtMsBuild)</QtMsBuild>
+ </PropertyGroup>
+ <Target Name="QtMsBuildNotFound"
+ BeforeTargets="CustomBuild;ClCompile"
+ Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
+ <Message Importance="High"
+ Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
+ </Target>
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
+ <Import Project="$(QtMsBuild)\qt.props" />
+ </ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
@@ -34,6 +46,9 @@
<ClCompile Include="main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
+ <Import Project="$(QtMsBuild)\qt.targets" />
+ </ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> \ No newline at end of file
diff --git a/src/qttemplates/designer/designer.vcxproj b/src/qttemplates/designer/designer.vcxproj
index ce21d976..af9a2245 100644
--- a/src/qttemplates/designer/designer.vcxproj
+++ b/src/qttemplates/designer/designer.vcxproj
@@ -24,6 +24,18 @@
<PlatformToolset>v$PlatformToolset$</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup Condition="'$(QtMsBuild)'==''">
+ <QtMsBuild>$(Registry:HKEY_CURRENT_USER\Environment@QtMsBuild)</QtMsBuild>
+ </PropertyGroup>
+ <Target Name="QtMsBuildNotFound"
+ BeforeTargets="CustomBuild;ClCompile"
+ Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
+ <Message Importance="High"
+ Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
+ </Target>
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
+ <Import Project="$(QtMsBuild)\qt.props" />
+ </ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
@@ -40,6 +52,9 @@
<None Include="$headerfilename$" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
+ <Import Project="$(QtMsBuild)\qt.targets" />
+ </ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> \ No newline at end of file
diff --git a/src/qttemplates/gui/gui.vcxproj b/src/qttemplates/gui/gui.vcxproj
index 96d716a3..5be7bbca 100644
--- a/src/qttemplates/gui/gui.vcxproj
+++ b/src/qttemplates/gui/gui.vcxproj
@@ -24,6 +24,18 @@
<PlatformToolset>v$PlatformToolset$</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup Condition="'$(QtMsBuild)'==''">
+ <QtMsBuild>$(Registry:HKEY_CURRENT_USER\Environment@QtMsBuild)</QtMsBuild>
+ </PropertyGroup>
+ <Target Name="QtMsBuildNotFound"
+ BeforeTargets="CustomBuild;ClCompile"
+ Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
+ <Message Importance="High"
+ Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
+ </Target>
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
+ <Import Project="$(QtMsBuild)\qt.props" />
+ </ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
@@ -42,6 +54,9 @@
<None Include="$sourcefilename$" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
+ <Import Project="$(QtMsBuild)\qt.targets" />
+ </ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> \ No newline at end of file
diff --git a/src/qttemplates/lib/lib.vcxproj b/src/qttemplates/lib/lib.vcxproj
index 0116af43..97054d33 100644
--- a/src/qttemplates/lib/lib.vcxproj
+++ b/src/qttemplates/lib/lib.vcxproj
@@ -24,6 +24,18 @@
<PlatformToolset>v$PlatformToolset$</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup Condition="'$(QtMsBuild)'==''">
+ <QtMsBuild>$(Registry:HKEY_CURRENT_USER\Environment@QtMsBuild)</QtMsBuild>
+ </PropertyGroup>
+ <Target Name="QtMsBuildNotFound"
+ BeforeTargets="CustomBuild;ClCompile"
+ Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
+ <Message Importance="High"
+ Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
+ </Target>
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
+ <Import Project="$(QtMsBuild)\qt.props" />
+ </ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
@@ -42,6 +54,9 @@
$precompiledsource$
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
+ <Import Project="$(QtMsBuild)\qt.targets" />
+ </ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> \ No newline at end of file
diff --git a/src/qttemplates/server/server.vcxproj b/src/qttemplates/server/server.vcxproj
index dc099046..38019e3a 100644
--- a/src/qttemplates/server/server.vcxproj
+++ b/src/qttemplates/server/server.vcxproj
@@ -24,6 +24,18 @@
<PlatformToolset>v$PlatformToolset$</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup Condition="'$(QtMsBuild)'==''">
+ <QtMsBuild>$(Registry:HKEY_CURRENT_USER\Environment@QtMsBuild)</QtMsBuild>
+ </PropertyGroup>
+ <Target Name="QtMsBuildNotFound"
+ BeforeTargets="CustomBuild;ClCompile"
+ Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
+ <Message Importance="High"
+ Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
+ </Target>
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
+ <Import Project="$(QtMsBuild)\qt.props" />
+ </ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
@@ -41,6 +53,9 @@
<None Include="$sourcefilename$" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
+ <Import Project="$(QtMsBuild)\qt.targets" />
+ </ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> \ No newline at end of file
diff --git a/src/qtvstools/QtVsTools.csproj b/src/qtvstools/QtVsTools.csproj
index a5c8c89a..c76b8607 100644
--- a/src/qtvstools/QtVsTools.csproj
+++ b/src/qtvstools/QtVsTools.csproj
@@ -164,6 +164,31 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
+ <Content Include="..\qtmsbuild\qt.props">
+ <Link>QtMsBuild\qt.props</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="..\qtmsbuild\qt.targets">
+ <Link>QtMsBuild\qt.targets</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="..\qtmsbuild\qtmoc.xml">
+ <Link>QtMsBuild\qtmoc.xml</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="..\qtmsbuild\qtrcc.xml">
+ <Link>QtMsBuild\qtrcc.xml</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="..\qtmsbuild\qtuic.xml">
+ <Link>QtMsBuild\qtuic.xml</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
<Content Include="preview.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
diff --git a/src/qtvstools/Vsix.cs b/src/qtvstools/Vsix.cs
index f96bf7e1..b88791f3 100644
--- a/src/qtvstools/Vsix.cs
+++ b/src/qtvstools/Vsix.cs
@@ -43,6 +43,7 @@ namespace QtVsTools
[InstalledProductRegistration("#110", "#112", "2.1.2", IconResourceID = 400)]
[ProvideMenuResource("Menus.ctmenu", 1)]
[ProvideAutoLoad(Microsoft.VisualStudio.Shell.Interop.UIContextGuids.SolutionExists)]
+ [ProvideAutoLoad(Microsoft.VisualStudio.Shell.Interop.UIContextGuids.NoSolution)]
public sealed class Vsix : Package
{
/// <summary>
@@ -115,6 +116,16 @@ namespace QtVsTools
var uri = new Uri(System.Reflection.Assembly.GetExecutingAssembly().EscapedCodeBase);
PkgInstallPath = Path.GetDirectoryName(Uri.UnescapeDataString(uri.AbsolutePath)) + @"\";
+ Environment.SetEnvironmentVariable(
+ "QtVsTools",
+ PkgInstallPath,
+ EnvironmentVariableTarget.User);
+
+ Environment.SetEnvironmentVariable(
+ "QtMsBuild",
+ Path.Combine(PkgInstallPath, "QtMsBuild"),
+ EnvironmentVariableTarget.User);
+
var vm = QtVersionManager.The();
var error = string.Empty;
if (vm.HasInvalidVersions(out error))