Skip to content

phlebos/vstools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to build
============

The instructions should help you build the Qt Visual Studio Tools from scratch.



Get the sources
---------------

Use Git to check out the Qt Visual Studio Tools sources that are hosted at:

http://code.qt.io/cgit/qt-labs/vstools.git/



Build a static Qt
-----------------

Building the Qt Visual Studio Tools from sources requires a static build of Qt (version 5.6.0
or newer). Supported compilers are MSVC 2013 or newer, GCC 4.7 or newer, and Clang 3.1 or newer.

See the Qt documentation for the prerequisites and steps to build Qt from sources.
https://wiki.qt.io/Building_Qt_5_from_Git#Windows

Recommended configuration options:
configure -prefix %CD%\qtbase -release -static -static-runtime -opensource -nomake examples -nomake tests

Recommended (n)make options: (n)make module-qtbase



Build the Qt Visual Studio Tools
--------------------------------

Change the directory into 'src' and run 'qmake && make' (or 'mingw32-make', 'nmake' ...) to build
the Qt Visual Studio Tools command line applications. Once finished, open the solution QtVsTools.sln
in Visual Studio and build the solution.

To debug the resulting VSIX, select the 'QtVsTools' node, right click and choose 'Properties|Debug'.
Update 'Start Action|Start external program:' to point to your Visual Studio 'devenv.exe' application.
Update 'Start Options|Command line arguments:' with '/rootSuffix Exp'. Note: The implemented post
build targets will only work reliable if you use the 'Exp' hive of Visual Studio.



Build the Qt Visual Studio Tools documentation
----------------------------------------------

Run 'qmake && make docs' (or 'mingw32-make docs', 'nmake docs' ...) from the root directory to
build the Qt Visual Studio Tools documentation. You need to have 'qdoc' and friends built already.

See the Qt documentation for the prerequisites and steps to build Qt documentation from sources.
https://wiki.qt.io/Building_Qt_Documentation




Product name or Publisher name update
-------------------------------------

Open the file 'source.extension.vsixmanifest' inside the 'src\config\$(VisualStudioVersion)'
directory and update the 'DisplayName' tag's value or the 'Identity' tag's 'Publisher' attribute.
Important: Updating the information requires also updating the MsBuild 'AfterTargets' information
inside the 'qtvstools.afterbuild.targets' file in the 'src\config' directory.



Version number update
---------------------

Open the file 'source.extension.vsixmanifest' inside the 'src\config\$(VisualStudioVersion)'
directory and update the 'Identity' tag's 'Version' attribute.
Important: Updating the version number there requires also updating the 'VsixVersion' tag at the
top of the 'qtvstools.targets' file in the same directory.
There are some other parts that need to be updated:

    - 'vstools.pri'
        adapt QTVSTOOLS_VERSION and QTVSTOOLS_VERSION_TAG
    - 'src\qtvstools\Vsix.cs'
        search for the line containing "InstalledProductRegistration", adapt the third argument)
    - 'src\qtvstools\Properties\AssemblyInfo.cs'
        adapt [assembly: AssemblyVersion(...)] and [assembly: AssemblyFileVersion(...)]

Depending on the amount of changes done to other libraries of the projects, adjust their respective
assembly infos as well.

Note: Some extra caution is required while changing the qtwizard assembly info, because most of
      the templates (e.g. console, gui, etc.) depend on that version number and need to be adjusted
      as well (see gui.vstemplate 'Assembly' tag for example).



Support for newer Visual Studio Versions
----------------------------------------

Add a new directory in 'src\config' matching '$(VisualStudioVersion)' by copying one of the existing
directories.

Minimum changes to the 'qtvstools.targets' file:

Update the 'Project' tag's 'ToolsVersion' attribute to match the new VS tools version.
Update the 'DefineConstants' tag's value to match the new VS version.
Update the 'ItemGroup' tag's 'Condition' attribute to match the new VS version.
Update the 'Reference' tag's 'Include' attribute to match the new VS version, most likely the following:
    - Microsoft.VisualStudio.ExtensionsExplorer.UI
    - Microsoft.VisualStudio.Shell.{VersionNumber}
    - Microsoft.VisualStudio.VCCodeModel
    - Microsoft.VisualStudio.VCProjectEngine

Minimum changes to the 'source.extension.vsixmanifest' file:

Update the 'Identity' tag's 'Id' attribute with a new GUID.



How to locally test the Qt Visual Studio Tools update
-----------------------------------------------------

Inside the src\config directory, edit the qt.io.xml file and modify the following tags:

    <updated>2016-11-11T10:51:55Z</updated>   Use the current date and time, keep the 'T' and 'Z'
    <id>{ Product ID }</id>                   Set to the Product ID that can be found in the 'source.extension.vsixmanifest' file,
                                              for example: <id>QtVsTools.30112013-cd02-4fd0-89bd-e36f85abe16a</id>
    <Version>{ Version }</Version>            Set to the Version that can be found in the 'source.extension.vsixmanifest' file,
                                              for example: <Version>2.0.0</Version>

Copy the XML file and the VSIX package inside a new folder side by side and open the
'Tools | Options | Extensions and Updates' settings dialog in Visual Studio. Add a new entry in the
Additional Extension Gallery, like this:

    Name: qt.io
    Url: file://path/to/your/atom.xml

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 73.5%
  • C++ 25.9%
  • Other 0.6%