From 1ffd6fc620195523dc29173780cc92373454928a Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Fri, 23 Nov 2018 18:07:43 +0100 Subject: Automate change of version number Before this patch, there were 40+ different locations in the source files where the version number was stored. The version number is now defined in a single source file as the property $(QtVSToolsVersion). Other sources that use the version string are then generated from corresponding templates using the template engine included in Visual Studio (Text Template Transformation Toolkit, or T4). Projects that integrate with the Qt VS Tools will also have access to the version definition property. Change-Id: Ib3a372c6f0e0c446eef98b4fa26b58e1565bb025 Reviewed-by: Oliver Wolff --- .gitignore | 26 +++++ src/QtVsTools.sln | 11 ++ src/common.tt | 41 ++++++++ src/config/12.0/qtvstools.targets | 1 - src/config/12.0/source.extension.vsixmanifest | 96 ----------------- src/config/12.0/source.extension.vsixmanifest_TT | 105 +++++++++++++++++++ src/config/14.0/qtvstools.targets | 1 - src/config/14.0/source.extension.vsixmanifest | 96 ----------------- src/config/14.0/source.extension.vsixmanifest_TT | 105 +++++++++++++++++++ src/config/15.0/qtvstools.targets | 1 - src/config/15.0/source.extension.vsixmanifest | 107 ------------------- src/config/15.0/source.extension.vsixmanifest_TT | 116 +++++++++++++++++++++ src/qtappwrapper/Properties/AssemblyInfo.cs | 8 +- src/qtappwrapper/QtAppWrapper.csproj | 15 ++- src/qtmsbuild/qt_globals.targets | 3 +- src/qtprojectlib/Properties/AssemblyInfo.cs | 8 +- src/qtprojectlib/QtProjectLib.csproj | 15 ++- src/qttemplates/console/Console.csproj | 25 ++++- src/qttemplates/console/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/console/console.vstemplate | 62 ----------- src/qttemplates/console/console.vstemplate_TT | 68 ++++++++++++ src/qttemplates/designer/Designer.csproj | 24 ++++- .../designer/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/designer/designer.vstemplate | 73 ------------- src/qttemplates/designer/designer.vstemplate_TT | 79 ++++++++++++++ .../dialogbuttonbottom/DialogButtonBottom.csproj | 15 ++- .../dialogbuttonbottom/Properties/AssemblyInfo.cs | 8 +- .../dialogbuttonright/DialogButtonRight.csproj | 15 ++- .../dialogbuttonright/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/gui/Gui.csproj | 24 ++++- src/qttemplates/gui/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/gui/gui.vstemplate | 71 ------------- src/qttemplates/gui/gui.vstemplate_TT | 77 ++++++++++++++ src/qttemplates/lib/Lib.csproj | 24 ++++- src/qttemplates/lib/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/lib/lib.vstemplate | 69 ------------ src/qttemplates/lib/lib.vstemplate_TT | 75 +++++++++++++ src/qttemplates/mainwindow/MainWindow.csproj | 15 ++- .../mainwindow/Properties/AssemblyInfo.cs | 8 +- .../resource/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/resource/Resource.csproj | 15 ++- src/qttemplates/server/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/server/Server.csproj | 24 ++++- src/qttemplates/server/server.vstemplate | 75 ------------- src/qttemplates/server/server.vstemplate_TT | 81 ++++++++++++++ src/qttemplates/widget/Properties/AssemblyInfo.cs | 8 +- src/qttemplates/widget/Widget.csproj | 15 ++- src/qtvstools/Properties/AssemblyInfo.cs | 10 +- src/qtvstools/QtVsTools.csproj | 110 ++++++++++++++++++- src/qtvstools/Version.cs | 40 +++++++ src/qtvstools/Vsix.cs | 2 +- src/qtwizard/Properties/AssemblyInfo.cs | 8 +- src/qtwizard/QtProjectWizard.csproj | 15 ++- src/version.targets | 6 ++ src/version.tt | 46 ++++++++ vstools.pri | 34 ------ vstools.pri_TT | 39 +++++++ 57 files changed, 1337 insertions(+), 734 deletions(-) create mode 100644 src/common.tt delete mode 100644 src/config/12.0/source.extension.vsixmanifest create mode 100644 src/config/12.0/source.extension.vsixmanifest_TT delete mode 100644 src/config/14.0/source.extension.vsixmanifest create mode 100644 src/config/14.0/source.extension.vsixmanifest_TT delete mode 100644 src/config/15.0/source.extension.vsixmanifest create mode 100644 src/config/15.0/source.extension.vsixmanifest_TT delete mode 100644 src/qttemplates/console/console.vstemplate create mode 100644 src/qttemplates/console/console.vstemplate_TT delete mode 100644 src/qttemplates/designer/designer.vstemplate create mode 100644 src/qttemplates/designer/designer.vstemplate_TT delete mode 100644 src/qttemplates/gui/gui.vstemplate create mode 100644 src/qttemplates/gui/gui.vstemplate_TT delete mode 100644 src/qttemplates/lib/lib.vstemplate create mode 100644 src/qttemplates/lib/lib.vstemplate_TT delete mode 100644 src/qttemplates/server/server.vstemplate create mode 100644 src/qttemplates/server/server.vstemplate_TT create mode 100644 src/qtvstools/Version.cs create mode 100644 src/version.targets create mode 100644 src/version.tt delete mode 100644 vstools.pri create mode 100644 vstools.pri_TT diff --git a/.gitignore b/.gitignore index 98eae150..9f5750f6 100644 --- a/.gitignore +++ b/.gitignore @@ -267,3 +267,29 @@ ModelManifest.xml # FAKE - F# Make .fake/ + +# Generated Files +vstools.pri +src/config/12.0/source.extension.vsixmanifest +src/config/14.0/source.extension.vsixmanifest +src/config/15.0/source.extension.vsixmanifest +src/qtappwrapper/Properties/AssemblyInfo.tt.cs +src/qtprojectlib/Properties/AssemblyInfo.tt.cs +src/qttemplates/console/Properties/AssemblyInfo.tt.cs +src/qttemplates/designer/Properties/AssemblyInfo.tt.cs +src/qttemplates/dialogbuttonbottom/Properties/AssemblyInfo.tt.cs +src/qttemplates/dialogbuttonright/Properties/AssemblyInfo.tt.cs +src/qttemplates/gui/Properties/AssemblyInfo.tt.cs +src/qttemplates/lib/Properties/AssemblyInfo.tt.cs +src/qttemplates/mainwindow/Properties/AssemblyInfo.tt.cs +src/qttemplates/resource/Properties/AssemblyInfo.tt.cs +src/qttemplates/server/Properties/AssemblyInfo.tt.cs +src/qttemplates/widget/Properties/AssemblyInfo.tt.cs +src/qtvstools/Version.tt.cs +src/qtvstools/Properties/AssemblyInfo.tt.cs +src/qtwizard/Properties/AssemblyInfo.tt.cs +src/qttemplates/console/console.vstemplate +src/qttemplates/designer/designer.vstemplate +src/qttemplates/gui/gui.vstemplate +src/qttemplates/lib/lib.vstemplate +src/qttemplates/server/server.vstemplate diff --git a/src/QtVsTools.sln b/src/QtVsTools.sln index 0b360df5..32ebe5e8 100644 --- a/src/QtVsTools.sln +++ b/src/QtVsTools.sln @@ -80,6 +80,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "qt", "qt", "{62102FDD-016A- EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vsqml", "vsqml\vsqml.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "T4 Templates", "T4 Templates", "{24A01B54-CE41-4559-8418-0723F8DF723F}" + ProjectSection(SolutionItems) = preProject + common.tt = common.tt + version.tt = version.tt + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "QtVSTools Version", "QtVSTools Version", "{8307D2C5-3736-4AED-9E65-330DA4C67EA3}" + ProjectSection(SolutionItems) = preProject + version.targets = version.targets + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/common.tt b/src/common.tt new file mode 100644 index 00000000..eb604192 --- /dev/null +++ b/src/common.tt @@ -0,0 +1,41 @@ +<#@template hostspecific="true" language="C#" #> +<#@assembly Name="System.Core" #> +<#@import namespace="System" #> +<#@import namespace="System.IO" #> +<#@assembly name="EnvDTE" #> +<#@import namespace="EnvDTE" #> +<# +/**************************************************************************** +** +** Copyright (C) 2018 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$ +** +****************************************************************************/ + var Dte = ((IServiceProvider)Host).GetService(typeof(DTE)) as DTE; + string SolutionDir = Path.GetDirectoryName(Dte.Solution.FullName); +/***************************************************************************/ + string WARNING_GENERATED_FILE = "This file was generated automatically."; + string XML_COMMENT_BEGIN = ""; +#> \ No newline at end of file diff --git a/src/config/12.0/qtvstools.targets b/src/config/12.0/qtvstools.targets index 56c4a020..9012df1c 100644 --- a/src/config/12.0/qtvstools.targets +++ b/src/config/12.0/qtvstools.targets @@ -3,7 +3,6 @@ $(DefineConstants);VS2013 - 2.2.1 diff --git a/src/config/12.0/source.extension.vsixmanifest b/src/config/12.0/source.extension.vsixmanifest deleted file mode 100644 index 9e530fae..00000000 --- a/src/config/12.0/source.extension.vsixmanifest +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - Qt Visual Studio Tools - The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools. - http://www.qt.io - LICENSE.GPL3-EXCEPT - Changelog - qt.ico - preview.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/config/12.0/source.extension.vsixmanifest_TT b/src/config/12.0/source.extension.vsixmanifest_TT new file mode 100644 index 00000000..ca17f5fa --- /dev/null +++ b/src/config/12.0/source.extension.vsixmanifest_TT @@ -0,0 +1,105 @@ + + + + + + + Qt Visual Studio Tools + The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools. + http://www.qt.io + LICENSE.GPL3-EXCEPT + Changelog + qt.ico + preview.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/config/14.0/qtvstools.targets b/src/config/14.0/qtvstools.targets index 30084841..1a4db24a 100644 --- a/src/config/14.0/qtvstools.targets +++ b/src/config/14.0/qtvstools.targets @@ -3,7 +3,6 @@ $(DefineConstants);VS2015 - 2.2.1 diff --git a/src/config/14.0/source.extension.vsixmanifest b/src/config/14.0/source.extension.vsixmanifest deleted file mode 100644 index 71c98d2b..00000000 --- a/src/config/14.0/source.extension.vsixmanifest +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - Qt Visual Studio Tools - The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools. - http://www.qt.io - LICENSE.GPL3-EXCEPT - Changelog - qt.ico - preview.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/config/14.0/source.extension.vsixmanifest_TT b/src/config/14.0/source.extension.vsixmanifest_TT new file mode 100644 index 00000000..f3e340cc --- /dev/null +++ b/src/config/14.0/source.extension.vsixmanifest_TT @@ -0,0 +1,105 @@ + + + + + + + Qt Visual Studio Tools + The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools. + http://www.qt.io + LICENSE.GPL3-EXCEPT + Changelog + qt.ico + preview.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/config/15.0/qtvstools.targets b/src/config/15.0/qtvstools.targets index ce650dce..638f50a8 100644 --- a/src/config/15.0/qtvstools.targets +++ b/src/config/15.0/qtvstools.targets @@ -3,7 +3,6 @@ $(DefineConstants);VS2017 - 2.2.1 diff --git a/src/config/15.0/source.extension.vsixmanifest b/src/config/15.0/source.extension.vsixmanifest deleted file mode 100644 index 6c16ed9c..00000000 --- a/src/config/15.0/source.extension.vsixmanifest +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - Qt Visual Studio Tools - The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools. - http://www.qt.io - LICENSE.GPL3-EXCEPT - Changelog - qt.ico - preview.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/config/15.0/source.extension.vsixmanifest_TT b/src/config/15.0/source.extension.vsixmanifest_TT new file mode 100644 index 00000000..2460b7e6 --- /dev/null +++ b/src/config/15.0/source.extension.vsixmanifest_TT @@ -0,0 +1,116 @@ + + + + + + + Qt Visual Studio Tools + The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools. + http://www.qt.io + LICENSE.GPL3-EXCEPT + Changelog + qt.ico + preview.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qtappwrapper/Properties/AssemblyInfo.cs b/src/qtappwrapper/Properties/AssemblyInfo.cs index 36f6246d..45d75415 100644 --- a/src/qtappwrapper/Properties/AssemblyInfo.cs +++ b/src/qtappwrapper/Properties/AssemblyInfo.cs @@ -24,6 +24,10 @@ ** ** $QT_END_LICENSE$ ** +**************************************************************************** +<#@output extension="tt.cs" #> +<#@include file="$(SolutionDir)\version.tt" #> +** <#=WARNING_GENERATED_FILE#> ****************************************************************************/ using System.Reflection; @@ -59,5 +63,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.2.1.0")] -[assembly: AssemblyFileVersion("2.2.1.0")] +[assembly: AssemblyVersion("<#=QT_VS_TOOLS_VERSION_ASSEMBLY#>")] +[assembly: AssemblyFileVersion("<#=QT_VS_TOOLS_VERSION_ASSEMBLY_FILE#>")] diff --git a/src/qtappwrapper/QtAppWrapper.csproj b/src/qtappwrapper/QtAppWrapper.csproj index ec9a5e87..d2e63d8d 100644 --- a/src/qtappwrapper/QtAppWrapper.csproj +++ b/src/qtappwrapper/QtAppWrapper.csproj @@ -45,11 +45,24 @@ - + + TextTemplatingFileGenerator + Properties\AssemblyInfo.tt.cs + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + AssemblyInfo.tt.cs + + + True + True + AssemblyInfo.cs + + + + + - 2.2.1 + $(QtVSToolsVersion) false $([System.IO.Path]::Combine($(ProjectDir),$(IntDir)qt_work.log)) diff --git a/src/qtprojectlib/Properties/AssemblyInfo.cs b/src/qtprojectlib/Properties/AssemblyInfo.cs index dfb22281..7d866854 100644 --- a/src/qtprojectlib/Properties/AssemblyInfo.cs +++ b/src/qtprojectlib/Properties/AssemblyInfo.cs @@ -24,6 +24,10 @@ ** ** $QT_END_LICENSE$ ** +**************************************************************************** +<#@output extension="tt.cs" #> +<#@include file="$(SolutionDir)\version.tt" #> +** <#=WARNING_GENERATED_FILE#> ****************************************************************************/ using System.Reflection; @@ -59,5 +63,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.2.1.0")] -[assembly: AssemblyFileVersion("2.2.1.0")] +[assembly: AssemblyVersion("<#=QT_VS_TOOLS_VERSION_ASSEMBLY#>")] +[assembly: AssemblyFileVersion("<#=QT_VS_TOOLS_VERSION_ASSEMBLY_FILE#>")] diff --git a/src/qtprojectlib/QtProjectLib.csproj b/src/qtprojectlib/QtProjectLib.csproj index 44f21a44..ed2c8bd5 100644 --- a/src/qtprojectlib/QtProjectLib.csproj +++ b/src/qtprojectlib/QtProjectLib.csproj @@ -65,7 +65,17 @@ - + + TextTemplatingFileGenerator + Properties\AssemblyInfo.tt.cs + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + AssemblyInfo.tt.cs + + + True + True + AssemblyInfo.cs + @@ -108,6 +118,9 @@ + + + - - - - Qt Console Application - This wizard generates a Qt console application project. - VC - 1000 - true - QtConsoleApplication - true - Enabled - true - console.ico - - - - main.cpp - console.vcxproj.filters - - - - QtProjectWizard, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null - QtProjectWizard.ConsoleWizard - - diff --git a/src/qttemplates/console/console.vstemplate_TT b/src/qttemplates/console/console.vstemplate_TT new file mode 100644 index 00000000..6833b2b1 --- /dev/null +++ b/src/qttemplates/console/console.vstemplate_TT @@ -0,0 +1,68 @@ + + + + + + Qt Console Application + This wizard generates a Qt console application project. + VC + 1000 + true + QtConsoleApplication + true + Enabled + true + console.ico + + + + main.cpp + console.vcxproj.filters + + + + + QtProjectWizard.ConsoleWizard + + diff --git a/src/qttemplates/designer/Designer.csproj b/src/qttemplates/designer/Designer.csproj index e709ef50..ea5e908e 100644 --- a/src/qttemplates/designer/Designer.csproj +++ b/src/qttemplates/designer/Designer.csproj @@ -50,7 +50,17 @@ false - + + TextTemplatingFileGenerator + Properties\AssemblyInfo.tt.cs + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + AssemblyInfo.tt.cs + + + True + True + AssemblyInfo.cs + @@ -61,9 +71,18 @@ Designer + + TextTemplatingFileGenerator + designer.vstemplate + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + designer.vstemplate + Designer Qt + True + True + designer.vstemplate_TT @@ -74,6 +93,9 @@ + + + - - - - Qt Designer Custom Widget - This wizard generates a Qt Designer Custom widget. - VC - 1000 - true - QtDesignerWidget - true - Enabled - true - designer.ico - - - - plugin.cpp - plugin.h - plugin.json - stdafx.cpp - stdafx.h - widget.cpp - widget.h - designer.vcxproj.filters - - - - QtProjectWizard, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null - QtProjectWizard.DesignerWizard - - diff --git a/src/qttemplates/designer/designer.vstemplate_TT b/src/qttemplates/designer/designer.vstemplate_TT new file mode 100644 index 00000000..d7aae360 --- /dev/null +++ b/src/qttemplates/designer/designer.vstemplate_TT @@ -0,0 +1,79 @@ + + + + + + Qt Designer Custom Widget + This wizard generates a Qt Designer Custom widget. + VC + 1000 + true + QtDesignerWidget + true + Enabled + true + designer.ico + + + + plugin.cpp + plugin.h + plugin.json + stdafx.cpp + stdafx.h + widget.cpp + widget.h + designer.vcxproj.filters + + + + + QtProjectWizard.DesignerWizard + + diff --git a/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj b/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj index 5fd84c86..bfa70d23 100644 --- a/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj +++ b/src/qttemplates/dialogbuttonbottom/DialogButtonBottom.csproj @@ -50,7 +50,17 @@ false - + + TextTemplatingFileGenerator + Properties\AssemblyInfo.tt.cs + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + AssemblyInfo.tt.cs + + + True + True + AssemblyInfo.cs + @@ -60,6 +70,9 @@ Designer + + + - - - - Qt GUI Application - This wizard generates a Qt GUI application project. - VC - 1000 - true - QtGuiApplication - true - Enabled - true - gui.ico - - - - main.cpp - stdafx.cpp - stdafx.h - widget.cpp - widget.h - widget.ui - gui.vcxproj.filters - gui.ico - - - - QtProjectWizard, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null - QtProjectWizard.GuiWizard - - diff --git a/src/qttemplates/gui/gui.vstemplate_TT b/src/qttemplates/gui/gui.vstemplate_TT new file mode 100644 index 00000000..9d58402f --- /dev/null +++ b/src/qttemplates/gui/gui.vstemplate_TT @@ -0,0 +1,77 @@ + + + + + + Qt GUI Application + This wizard generates a Qt GUI application project. + VC + 1000 + true + QtGuiApplication + true + Enabled + true + gui.ico + + + + main.cpp + stdafx.cpp + stdafx.h + widget.cpp + widget.h + widget.ui + gui.vcxproj.filters + gui.ico + + + + + QtProjectWizard.GuiWizard + + diff --git a/src/qttemplates/lib/Lib.csproj b/src/qttemplates/lib/Lib.csproj index 78fdf6ab..3770bdb3 100644 --- a/src/qttemplates/lib/Lib.csproj +++ b/src/qttemplates/lib/Lib.csproj @@ -50,7 +50,17 @@ false - + + TextTemplatingFileGenerator + Properties\AssemblyInfo.tt.cs + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + AssemblyInfo.tt.cs + + + True + True + AssemblyInfo.cs + @@ -60,9 +70,18 @@ Designer + + TextTemplatingFileGenerator + lib.vstemplate + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + lib.vstemplate + Designer Qt + True + True + lib.vstemplate_TT @@ -72,6 +91,9 @@ + + + - - - - Qt Class Library - This wizard generates a Qt class library project. - VC - 1000 - true - QtClassLibrary - true - Enabled - true - lib.ico - - - - source.cpp - header.h - global.h - stdafx.cpp - stdafx.h - lib.vcxproj.filters - - - - QtProjectWizard, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null - QtProjectWizard.LibraryWizard - - diff --git a/src/qttemplates/lib/lib.vstemplate_TT b/src/qttemplates/lib/lib.vstemplate_TT new file mode 100644 index 00000000..76193879 --- /dev/null +++ b/src/qttemplates/lib/lib.vstemplate_TT @@ -0,0 +1,75 @@ + + + + + + Qt Class Library + This wizard generates a Qt class library project. + VC + 1000 + true + QtClassLibrary + true + Enabled + true + lib.ico + + + + source.cpp + header.h + global.h + stdafx.cpp + stdafx.h + lib.vcxproj.filters + + + + + QtProjectWizard.LibraryWizard + + diff --git a/src/qttemplates/mainwindow/MainWindow.csproj b/src/qttemplates/mainwindow/MainWindow.csproj index 8d205bed..9d159309 100644 --- a/src/qttemplates/mainwindow/MainWindow.csproj +++ b/src/qttemplates/mainwindow/MainWindow.csproj @@ -50,7 +50,17 @@ false - + + TextTemplatingFileGenerator + Properties\AssemblyInfo.tt.cs + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + AssemblyInfo.tt.cs + + + True + True + AssemblyInfo.cs + @@ -60,6 +70,9 @@ Designer + + + - - - - Qt ActiveQt Server - This wizard generates a Qt ActiveQt server project. - VC - 1000 - true - ActiveQtServer - true - Enabled - true - server.ico - - - - header.h - server.def - server.ico - server.rc - server.vcxproj.filters - source.cpp - stdafx.cpp - stdafx.h - widget.ui - - - - QtProjectWizard, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null - QtProjectWizard.ServerWizard - - diff --git a/src/qttemplates/server/server.vstemplate_TT b/src/qttemplates/server/server.vstemplate_TT new file mode 100644 index 00000000..32efc59c --- /dev/null +++ b/src/qttemplates/server/server.vstemplate_TT @@ -0,0 +1,81 @@ + + + + + + Qt ActiveQt Server + This wizard generates a Qt ActiveQt server project. + VC + 1000 + true + ActiveQtServer + true + Enabled + true + server.ico + + + + header.h + server.def + server.ico + server.rc + server.vcxproj.filters + source.cpp + stdafx.cpp + stdafx.h + widget.ui + + + + + QtProjectWizard.ServerWizard + + diff --git a/src/qttemplates/widget/Properties/AssemblyInfo.cs b/src/qttemplates/widget/Properties/AssemblyInfo.cs index fde13344..ededfdc3 100644 --- a/src/qttemplates/widget/Properties/AssemblyInfo.cs +++ b/src/qttemplates/widget/Properties/AssemblyInfo.cs @@ -24,6 +24,10 @@ ** ** $QT_END_LICENSE$ ** +**************************************************************************** +<#@output extension="tt.cs" #> +<#@include file="$(SolutionDir)\version.tt" #> +** <#=WARNING_GENERATED_FILE#> ****************************************************************************/ using System.Reflection; @@ -59,5 +63,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.2.1.0")] -[assembly: AssemblyFileVersion("2.2.1.0")] +[assembly: AssemblyVersion("<#=QT_VS_TOOLS_VERSION_ASSEMBLY#>")] +[assembly: AssemblyFileVersion("<#=QT_VS_TOOLS_VERSION_ASSEMBLY_FILE#>")] diff --git a/src/qttemplates/widget/Widget.csproj b/src/qttemplates/widget/Widget.csproj index a96740ea..91cf7755 100644 --- a/src/qttemplates/widget/Widget.csproj +++ b/src/qttemplates/widget/Widget.csproj @@ -50,7 +50,17 @@ false - + + TextTemplatingFileGenerator + Properties\AssemblyInfo.tt.cs + $(SolutionDir)\version.tt;$(SolutionDir)\common.tt + AssemblyInfo.tt.cs + + + True + True + AssemblyInfo.cs + @@ -59,6 +69,9 @@ Qt + + +