** $QT_END_LICENSE$
**
****************************************************************************/
+#include <QCoreApplication>
+#include <QDir>
+
#include "../shared/shared.h"
-#include <qdir.h>
int main(int argc, char **argv)
{
+ QCoreApplication app(argc, argv);
+
QString appBundlePath;
if (argc > 1)
appBundlePath = QString::fromLocal8Bit(argv[1]);
** $QT_END_LICENSE$
**
****************************************************************************/
+#include <QCoreApplication>
#include <QString>
#include <QStringList>
#include <QDebug>
LogNormal() << "Deploying QML imports ";
LogNormal() << "Application QML file search path(s) is" << qmlDirs;
- // verify that qmlimportscanner is in BinariesPath
+ // Use qmlimportscanner from QLibraryInfo::BinariesPath
QString qmlImportScannerPath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlimportscanner");
+
+ // Fallback: Look relative to the macdeployqt binary
+ if (!QFile(qmlImportScannerPath).exists())
+ qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner";
+
+ // Verify that we found a qmlimportscanner binary
if (!QFile(qmlImportScannerPath).exists()) {
LogError() << "qmlimportscanner not found at" << qmlImportScannerPath;
LogError() << "Rebuild qtdeclarative/tools/qmlimportscanner";