From 2bbb0844b56c0064b43d56244b2c360dad3ecb16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 9 Jun 2017 09:34:05 +0200 Subject: [PATCH] Try to find version specific qmake first Improve logging --- shared/shared.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index a1cbe25..4415e03 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -1031,19 +1031,22 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a QString qmakePath = ""; - // The upstream name of the binary is "qmake", for Qt 4 and Qt 5 - qmakePath = QStandardPaths::findExecutable("qmake"); - // But openSUSE has qmake for Qt 4 and qmake-qt5 for Qt 5 + // Try to find a version specific qmake first + // openSUSE has qmake for Qt 4 and qmake-qt5 for Qt 5 // Qt 4 on Fedora comes with suffix -qt4 // http://www.geopsy.org/wiki/index.php/Installing_Qt_binary_packages + if(qtDetected == 5){ + qmakePath = QStandardPaths::findExecutable("qmake-qt5"); + LogDebug() << "qmake 5"; + } else if(qtDetected == 4){ + qmakePath = QStandardPaths::findExecutable("qmake-qt4"); + LogDebug() << "qmake 4"; + } + if(qmakePath == ""){ - if(qtDetected == 5){ - qmakePath = QStandardPaths::findExecutable("qmake-qt5"); - } - if(qtDetected == 4){ - qmakePath = QStandardPaths::findExecutable("qmake-qt4"); - } + // The upstream name of the binary is "qmake", for Qt 4 and Qt 5 + qmakePath = QStandardPaths::findExecutable("qmake"); } if(qmakePath == ""){ @@ -1051,6 +1054,7 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a exit(1); } + LogNormal() << "Using qmake: " << qmakePath; QString output = captureOutput(qmakePath + " -query"); LogDebug() << "-query output from qmake:" << output;