Browse Source

Merge pull request #137 from adrianschroeter/master

Fix version detection for Qt
master
probonopd 8 years ago
committed by GitHub
parent
commit
adcde9365b
  1. 18
      shared/shared.cpp

18
shared/shared.cpp

@ -54,7 +54,7 @@ bool alwaysOwerwriteEnabled = false;
QStringList librarySearchPath; QStringList librarySearchPath;
bool appstoreCompliant = false; bool appstoreCompliant = false;
int logLevel = 1; int logLevel = 1;
bool qtDetected = 0; int qtDetected = 0;
bool qtDetectionComplete = 0; // As long as Qt is not detected yet, ldd may encounter "not found" messages, continue anyway bool qtDetectionComplete = 0; // As long as Qt is not detected yet, ldd may encounter "not found" messages, continue anyway
bool deployLibrary = false; bool deployLibrary = false;
@ -1031,19 +1031,22 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a
QString qmakePath = ""; 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 // Qt 4 on Fedora comes with suffix -qt4
// http://www.geopsy.org/wiki/index.php/Installing_Qt_binary_packages // http://www.geopsy.org/wiki/index.php/Installing_Qt_binary_packages
if(qmakePath == ""){
if(qtDetected == 5){ if(qtDetected == 5){
qmakePath = QStandardPaths::findExecutable("qmake-qt5"); qmakePath = QStandardPaths::findExecutable("qmake-qt5");
} LogDebug() << "qmake 5";
if(qtDetected == 4){ } else if(qtDetected == 4){
qmakePath = QStandardPaths::findExecutable("qmake-qt4"); qmakePath = QStandardPaths::findExecutable("qmake-qt4");
LogDebug() << "qmake 4";
} }
if(qmakePath == ""){
// The upstream name of the binary is "qmake", for Qt 4 and Qt 5
qmakePath = QStandardPaths::findExecutable("qmake");
} }
if(qmakePath == ""){ if(qmakePath == ""){
@ -1051,6 +1054,7 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a
exit(1); exit(1);
} }
LogNormal() << "Using qmake: " << qmakePath;
QString output = captureOutput(qmakePath + " -query"); QString output = captureOutput(qmakePath + " -query");
LogDebug() << "-query output from qmake:" << output; LogDebug() << "-query output from qmake:" << output;

Loading…
Cancel
Save