Utils::Environment MerQtVersion::qmakeRunEnvironment() const { Utils::Environment env = BaseQtVersion::qmakeRunEnvironment(); env.appendOrSet(QLatin1String(Constants::MER_SSH_TARGET_NAME),m_targetName); env.appendOrSet(QLatin1String(Constants::MER_SSH_SDK_TOOLS),qmakeCommand().parentDir().toString()); return env; }
void AbstractMaemoPackageCreationStep::preparePackagingProcess(QProcess *proc, const Qt4BuildConfiguration *bc, const QString &workingDir) { Utils::Environment env = bc->environment(); if (bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild) { env.appendOrSet(QLatin1String("DEB_BUILD_OPTIONS"), QLatin1String("nostrip"), QLatin1String(" ")); } proc->setEnvironment(env.toStringList()); proc->setWorkingDirectory(workingDir); }
bool MerLocalRsyncDeployStep::init() { Qt4ProjectManager::Qt4BuildConfiguration *bc = qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration*>(buildConfiguration()); if (!bc) bc = qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration*>(target()->activeBuildConfiguration()); if (!bc) { addOutput(tr("Cannot deploy: No active build configuration."), ErrorMessageOutput); return false; } const MerSdk *const merSdk = MerSdkKitInformation::sdk(target()->kit()); if (!merSdk) { addOutput(tr("Cannot deploy: Missing MerSdk information in the kit"),ErrorMessageOutput); return false; } const QString target = MerTargetKitInformation::targetName(this->target()->kit()); if (target.isEmpty()) { addOutput(tr("Cannot deploy: Missing MerTarget information in the kit"),ErrorMessageOutput); return false; } IDevice::ConstPtr device = DeviceKitInformation::device(this->target()->kit()); //TODO: HACK if (device.isNull() && DeviceTypeKitInformation::deviceTypeId(this->target()->kit()) != Constants::MER_DEVICE_TYPE_ARM) { addOutput(tr("Cannot deploy: Missing MerDevice information in the kit"),ErrorMessageOutput); return false; } const QString projectDirectory = bc->shadowBuild() ? bc->shadowBuildDirectory() : project()->projectDirectory(); const QString deployCommand = QLatin1String("rsync"); ProcessParameters *pp = processParameters(); Utils::Environment env = bc ? bc->environment() : Utils::Environment::systemEnvironment(); //TODO HACK if(!device.isNull()) env.appendOrSet(QLatin1String(Constants::MER_SSH_DEVICE_NAME),device->displayName()); pp->setMacroExpander(bc ? bc->macroExpander() : Core::VariableManager::instance()->macroExpander()); pp->setEnvironment(env); pp->setWorkingDirectory(projectDirectory); pp->setCommand(deployCommand); pp->setArguments(arguments()); return AbstractProcessStep::init(); }
void MerQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const { Q_UNUSED(k); env.appendOrSet(QLatin1String(Constants::MER_SSH_PROJECT_PATH), QLatin1String("%{CurrentProject:Path}")); env.appendOrSet(QLatin1String(Constants::MER_SSH_SDK_TOOLS),qmakeCommand().parentDir().toString()); }