diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-30 13:26:49 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-30 13:27:06 +0200 |
commit | c47bef4a01bad47fb904e174ce8ce269678fd682 (patch) | |
tree | d050f406ceb4690fc982d1d03649cd86a34ff12a /src/lib/corelib/api | |
parent | fbf8249a897596dc584ac44ad6a8d705017799ad (diff) | |
parent | fa9c21d6908e0dad805113f570ac883c1dc5067a (diff) |
Merge 1.8 into master
Change-Id: Ide2b95fba4d91a5fe755c2d7a8375f87552d2e20
Diffstat (limited to 'src/lib/corelib/api')
-rw-r--r-- | src/lib/corelib/api/projectdata.cpp | 10 | ||||
-rw-r--r-- | src/lib/corelib/api/runenvironment.cpp | 21 |
2 files changed, 13 insertions, 18 deletions
diff --git a/src/lib/corelib/api/projectdata.cpp b/src/lib/corelib/api/projectdata.cpp index ed8b09149..987bd24a4 100644 --- a/src/lib/corelib/api/projectdata.cpp +++ b/src/lib/corelib/api/projectdata.cpp @@ -542,6 +542,16 @@ QList<ArtifactData> ProductData::installableArtifacts() const QString ProductData::targetExecutable() const { QBS_ASSERT(isValid(), return QString()); + if (d->moduleProperties.getModuleProperty(QLatin1String("bundle"), + QLatin1String("isBundle")).toBool()) { + for (const ArtifactData &ta : targetArtifacts()) { + if (ta.fileTags().contains(QLatin1String("bundle.application-executable"))) { + if (ta.installData().isInstallable()) + return ta.installData().localInstallFilePath(); + return ta.filePath(); + } + } + } for (const ArtifactData &ta : targetArtifacts()) { if (ta.isExecutable()) { if (ta.installData().isInstallable()) diff --git a/src/lib/corelib/api/runenvironment.cpp b/src/lib/corelib/api/runenvironment.cpp index c9095b708..a2caea987 100644 --- a/src/lib/corelib/api/runenvironment.cpp +++ b/src/lib/corelib/api/runenvironment.cpp @@ -219,23 +219,8 @@ int RunEnvironment::doRunTarget(const QString &targetBin, const QStringList &arg QStringList targetArguments = arguments; const QString completeSuffix = QFileInfo(targetBin).completeSuffix(); - if (targetOS.contains(QLatin1String("ios"))) { - QString bundlePath = d->resolvedProduct->buildDirectory(); - const bool install = d->resolvedProduct->moduleProperties->qbsPropertyValue( - QLatin1String("install")).toBool(); - if (install) { - bundlePath = d->installOptions.installRoot(); - const QString installDir = d->resolvedProduct->moduleProperties->qbsPropertyValue( - QLatin1String("installDir")).toString(); - bundlePath += QLatin1Char('/') + installDir; - } - - const QString bundleName = d->resolvedProduct->moduleProperties->moduleProperty( - QLatin1String("bundle"), - QLatin1String("bundleName")).toString(); - bundlePath += QLatin1Char('/') + bundleName; - - QBS_CHECK(targetExecutable.startsWith(bundlePath)); + if (targetOS.contains(QLatin1String("ios")) || targetOS.contains(QLatin1String("tvos"))) { + const QString bundlePath = targetBin + QLatin1String("/.."); if (QFileInfo(targetExecutable = findExecutable(QStringList() << QStringLiteral("iostool"))).isExecutable()) { @@ -256,7 +241,7 @@ int RunEnvironment::doRunTarget(const QString &targetBin, const QStringList &arg targetArguments << QStringLiteral("--args") << arguments; } else { d->logger.qbsLog(LoggerError) - << Tr::tr("No suitable iOS deployment tools were found in the environment. " + << Tr::tr("No suitable deployment tools were found in the environment. " "Consider installing ios-deploy."); return EXIT_FAILURE; } |