forked from qt-creator/qt-creator
AppMan: Improve RunControl handling
* Native Runtime apps are now supported properly * Support using a vanilla appman-controller by NOT closing the write channel. Change-Id: If2d4367595f12f0e46a8dbcda4a26d5dc03be324 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -54,6 +54,8 @@ public:
|
||||
if (!targetInformation.isValid())
|
||||
return;
|
||||
|
||||
// Prevent the write channel to be closed, otherwise the appman-controller will exit
|
||||
setProcessMode(ProcessMode::Writer);
|
||||
setWorkingDirectory(targetInformation.workingDirectory());
|
||||
setCommandLine({FilePath::fromString(getToolFilePath(Constants::APPMAN_CONTROLLER, runControl->kit(),
|
||||
targetInformation.device)),
|
||||
@@ -102,6 +104,8 @@ public:
|
||||
cmd.addArg("-eio");
|
||||
cmd.addArg(targetInformation.manifest.id);
|
||||
|
||||
// Prevent the write channel to be closed, otherwise the appman-controller will exit
|
||||
setProcessMode(ProcessMode::Writer);
|
||||
setCommandLine(cmd);
|
||||
setWorkingDirectory(targetInformation.workingDirectory());
|
||||
|
||||
@@ -139,7 +143,7 @@ public:
|
||||
const Utils::FilePath dir = SysRootKitAspect::sysRoot(target->kit());
|
||||
// TODO: get real aspect from deploy configuration
|
||||
QString amfolder = Constants::REMOTE_DEFAULT_BIN_PATH;
|
||||
m_symbolFile = dir.toString() + amfolder + Constants::APPMAN_LAUNCHER_QML;
|
||||
m_symbolFile = dir.toString() + amfolder + QDir::separator() + Constants::APPMAN_LAUNCHER_QML;
|
||||
} else if (targetInformation.manifest.isNativeRuntime()) {
|
||||
m_symbolFile = Utils::findOrDefault(target->buildSystem()->applicationTargets(), [&](const BuildTargetInfo &ti) {
|
||||
return ti.buildKey == targetInformation.manifest.code || ti.projectFilePath.toString() == targetInformation.manifest.code;
|
||||
|
||||
@@ -53,6 +53,7 @@ QList<TargetInformation> TargetInformation::readFromProject(const Target *target
|
||||
auto createTargetInformation = [buildKey, manifestFilePath, cmakeTarget, packageFilePath, isBuiltinPackage, &result](const YAML::Node &document) {
|
||||
const QString id = QString::fromStdString(document["id"].as<std::string>());
|
||||
const QString runtime = QString::fromStdString(document["runtime"].as<std::string>());
|
||||
const QString code = QString::fromStdString(document["code"].as<std::string>());
|
||||
|
||||
if (!buildKey.isEmpty() && buildKey != id)
|
||||
return;
|
||||
@@ -64,6 +65,7 @@ QList<TargetInformation> TargetInformation::readFromProject(const Target *target
|
||||
ati.manifest.fileName = manifestFilePath.path();
|
||||
ati.manifest.id = id;
|
||||
ati.manifest.runtime = runtime;
|
||||
ati.manifest.code = code;
|
||||
ati.isBuiltin = isBuiltinPackage;
|
||||
ati.cmakeBuildTarget = cmakeTarget;
|
||||
ati.packageFile = QFileInfo(packageFilePath.path());
|
||||
|
||||
Reference in New Issue
Block a user