Наша сборка Qt VS Tools
giy
2022-09-02 ca47896204482bf4a6979e3838bf7f09f61cebeb
QtVsTools.Core/QMakeConf.cs
@@ -29,13 +29,14 @@
using System;
using System.Collections;
using System.IO;
using Microsoft.VisualStudio.Shell;
namespace QtVsTools.Core
{
    public class QMakeConf
    {
        public Hashtable Entries { get; private set; }
        public string QMakeSpecDirectory { get; private set; }
        public Hashtable Entries { get; }
        public string QMakeSpecDirectory { get; }
        public QMakeConf(VersionInformation versionInfo, QMakeQuery qmakeQuery = null)
        {
@@ -64,6 +65,17 @@
                qmakeConf = Path.Combine(qtPrefix, qtArchData, "mkspecs", qmakeXSpec, "qmake.conf");
                if (!File.Exists(qmakeConf)) {
                    // Check if this is a shadow build of Qt.
                    qtPrefix = qmakeQuery["QT_INSTALL_PREFIX/src"];
                    if (string.IsNullOrEmpty(qtPrefix))
                        throw new QtVSException("qmake error: no value for QT_INSTALL_PREFIX/src");
                    qtArchData = qmakeQuery["QT_INSTALL_ARCHDATA/src"];
                    if (string.IsNullOrEmpty(qtArchData))
                        throw new QtVSException("qmake error: no value for QT_INSTALL_ARCHDATA/src");
                    qmakeConf = Path.Combine(qtPrefix, qtArchData, "mkspecs", qmakeXSpec, "qmake.conf");
                }
                if (!File.Exists(qmakeConf))
                    throw new QtVSException("qmake.conf expected at " + qmakeConf + " not found");
            }