From ca47896204482bf4a6979e3838bf7f09f61cebeb Mon Sep 17 00:00:00 2001 From: giy <giy@omp-system.ru> Date: Fri, 02 Sep 2022 14:16:56 +0300 Subject: [PATCH] Обновление до версии 2.9.0 --- QtVsTools.Core/QMakeConf.cs | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/QtVsTools.Core/QMakeConf.cs b/QtVsTools.Core/QMakeConf.cs index c66a6c6..c719314 100644 --- a/QtVsTools.Core/QMakeConf.cs +++ b/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"); } -- Gitblit v1.9.1