| | |
| | | /****************************************************************************
|
| | | **
|
| | | ** Copyright (C) 2016 The Qt Company Ltd.
|
| | | ** Copyright (C) 2022 The Qt Company Ltd.
|
| | | ** Contact: https://www.qt.io/licensing/
|
| | | **
|
| | | ** This file is part of the Qt VS Tools.
|
| | |
| | | using System.Linq;
|
| | | using System.Text;
|
| | | using System.Text.RegularExpressions;
|
| | | using Microsoft.VisualStudio.Shell;
|
| | |
|
| | | namespace QtVsTools.Core
|
| | | {
|
| | |
| | | {
|
| | | //fields
|
| | | public string name;
|
| | | public string qtDir;
|
| | | public readonly string qtDir;
|
| | | public uint qtMajor; // X in version x.y.z
|
| | | public uint qtMinor; // Y in version x.y.z
|
| | | public uint qtPatch; // Z in version x.y.z
|
| | | public bool qt5Version = true;
|
| | | private QtConfig qtConfig;
|
| | | private QMakeConf qmakeConf;
|
| | | private string vsPlatformName;
|
| | |
| | | _cache.Clear();
|
| | | }
|
| | |
|
| | | Dictionary<string, bool> _IsModuleAvailable;
|
| | | readonly Dictionary<string, bool> _IsModuleAvailable;
|
| | | public bool IsModuleAvailable(string module)
|
| | | {
|
| | | return _IsModuleAvailable?[module] ?? false;
|
| | | }
|
| | |
|
| | | public string VC_MinimumVisualStudioVersion { get; private set; }
|
| | | public string VC_ApplicationTypeRevision { get; private set; }
|
| | | public string VC_WindowsTargetPlatformMinVersion { get; private set; }
|
| | | public string VC_WindowsTargetPlatformVersion { get; private set; }
|
| | | public string VC_Link_TargetMachine { get; private set; }
|
| | | public string VC_PlatformToolset { get; private set; }
|
| | | public string VC_MinimumVisualStudioVersion { get; }
|
| | | public string VC_ApplicationTypeRevision { get; }
|
| | | public string VC_WindowsTargetPlatformMinVersion { get; }
|
| | | public string VC_WindowsTargetPlatformVersion { get; }
|
| | | public string VC_Link_TargetMachine { get; }
|
| | | private string VC_PlatformToolset { get; }
|
| | |
|
| | | private VersionInformation(string qtDirIn)
|
| | | {
|
| | |
| | | qtMinor = (version >> 8) & 0xFF;
|
| | | qtPatch = version & 0xFF;
|
| | | }
|
| | | qt5Version = (qtMajor == 5);
|
| | |
|
| | | try {
|
| | | QtInstallDocs = qmakeQuery["QT_INSTALL_DOCS"];
|
| | |
| | | var tempProData = new StringBuilder();
|
| | | tempProData.AppendLine("SOURCES = main.cpp");
|
| | |
|
| | | var modules = QtModules.Instance.GetAvailableModules()
|
| | | var modules = QtModules.Instance.GetAvailableModules(qtMajor)
|
| | | .Where((QtModule mi) => mi.Selectable);
|
| | |
|
| | | foreach (QtModule mi in modules) {
|
| | |
| | |
|
| | | public string QtInstallDocs
|
| | | {
|
| | | get; private set;
|
| | | get;
|
| | | }
|
| | |
|
| | | public string QMakeSpecDirectory
|