Improved the way Qt files are located

Using 'qmake -query' to get all information explicitly instead of parsing
the output of 'qmake -v' and deriving binary path, plugin path and QML
path from there.

Fixes #28
Fixes #37
This commit is contained in:
Thorbjørn Lindeijer
2016-11-04 09:35:59 +01:00
parent 799f704362
commit f45c7e3156
2 changed files with 42 additions and 27 deletions
+4 -2
View File
@@ -38,9 +38,10 @@ int main(int argc, char **argv)
QString appBinaryPath;
if (argc > 1)
if (argc > 1) {
appBinaryPath = QString::fromLocal8Bit(argv[1]);
appBinaryPath = QDir::cleanPath(appBinaryPath).trimmed();
}
if (argc < 2 || appBinaryPath.startsWith("-")) {
qDebug() << "Usage: linuxdeployqt app-binary [options]";
@@ -199,7 +200,8 @@ int main(int argc, char **argv)
}
if (plugins && !deploymentInfo.qtPath.isEmpty()) {
deploymentInfo.pluginPath = QDir::cleanPath(deploymentInfo.qtPath + "/../plugins");
if (deploymentInfo.pluginPath.isEmpty())
deploymentInfo.pluginPath = QDir::cleanPath(deploymentInfo.qtPath + "/../plugins");
deployPlugins(appDirPath, deploymentInfo);
createQtConf(appDirPath);
}