本文整理汇总了C++中projectexplorer::ToolChain::makeCommand方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolChain::makeCommand方法的具体用法?C++ ToolChain::makeCommand怎么用?C++ ToolChain::makeCommand使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类projectexplorer::ToolChain
的用法示例。
在下文中一共展示了ToolChain::makeCommand方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool AndroidPackageInstallationStep::init()
{
ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
QString dirPath = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
if (Utils::HostOsInfo::isWindowsHost())
if (bc->environment().searchInPath(QLatin1String("sh.exe")).isEmpty())
dirPath = QDir::toNativeSeparators(dirPath);
ProjectExplorer::ToolChain *tc
= ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
ProjectExplorer::ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setWorkingDirectory(bc->buildDirectory().toString());
pp->setCommand(tc->makeCommand(bc->environment()));
Utils::Environment env = bc->environment();
// Force output to english for the parsers. Do this here and not in the toolchain's
// addToEnvironment() to not screw up the users run environment.
env.set(QLatin1String("LC_ALL"), QLatin1String("C"));
pp->setEnvironment(env);
pp->setArguments(QString::fromLatin1("INSTALL_ROOT=\"%1\" install").arg(dirPath));
pp->resolveAll();
setOutputParser(new ProjectExplorer::GnuMakeParser());
ProjectExplorer::IOutputParser *parser = target()->kit()->createOutputParser();
if (parser)
appendOutputParser(parser);
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
m_androidDirToClean = dirPath;
return AbstractProcessStep::init();
}
示例2: buildCommand
QString PuppetCreator::buildCommand() const
{
Utils::Environment environment = Utils::Environment::systemEnvironment();
m_kit->addToEnvironment(environment);
ProjectExplorer::ToolChain *toolChain = ProjectExplorer::ToolChainKitInformation::toolChain(m_kit);
if (toolChain)
return toolChain->makeCommand(environment);
return QString();
}
示例3: updateDetails
void MakeStepConfigWidget::updateDetails()
{
CMakeBuildConfiguration *bc = m_makeStep->cmakeBuildConfiguration();
ProjectExplorer::ToolChain *tc = bc->toolChain();
if (tc) {
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets);
Utils::QtcProcess::addArgs(&arguments, m_makeStep->additionalArguments());
ProcessParameters param;
param.setMacroExpander(bc->macroExpander());
param.setEnvironment(bc->environment());
param.setWorkingDirectory(bc->buildDirectory());
param.setCommand(tc->makeCommand());
param.setArguments(arguments);
m_summaryText = param.summary(displayName());
} else {
m_summaryText = tr("<b>Unknown tool chain</b>");
}
emit updateSummary();
}
示例4: availableTools
DebuggingHelperBuildTask::DebuggingHelperBuildTask(const BaseQtVersion *version, Tools tools) :
m_tools(tools & availableTools(version)),
m_invalidQt(false),
m_showErrors(true)
{
if (!version || !version->isValid())
return;
// allow type to be used in queued connections.
qRegisterMetaType<DebuggingHelperBuildTask::Tools>("DebuggingHelperBuildTask::Tools");
// Print result in application ouptut
Core::MessageManager *messageManager = Core::MessageManager::instance();
connect(this, SIGNAL(logOutput(QString,bool)),
messageManager, SLOT(printToOutputPane(QString,bool)),
Qt::QueuedConnection);
//
// Extract all information we need from version, such that we don't depend on the existence
// of the version pointer while compiling
//
m_qtId = version->uniqueId();
m_qtInstallData = version->versionInfo().value("QT_INSTALL_DATA");
if (m_qtInstallData.isEmpty()) {
const QString error
= QCoreApplication::translate(
"QtVersion",
"Cannot determine the installation path for Qt version '%1'."
).arg(version->displayName());
log(QString(), error);
m_invalidQt = true;
return;
}
m_environment = Utils::Environment::systemEnvironment();
version->addToEnvironment(m_environment);
// TODO: the debugging helper doesn't comply to actual tool chain yet
QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->findToolChains(version->qtAbis().at(0));
if (tcList.isEmpty()) {
const QString error
= QCoreApplication::translate(
"QtVersion",
"The Qt Version has no tool chain.");
log(QString(), error);
m_invalidQt = true;
return;
}
ProjectExplorer::ToolChain *tc = tcList.at(0);
tc->addToEnvironment(m_environment);
if (tc->targetAbi().os() == ProjectExplorer::Abi::LinuxOS
&& ProjectExplorer::Abi::hostAbi().os() == ProjectExplorer::Abi::WindowsOS)
m_target = QLatin1String("-unix");
m_qmakeCommand = version->qmakeCommand();
m_makeCommand = tc->makeCommand();
m_mkspec = version->mkspec();
// Make sure QtVersion cache is invalidated
connect(this, SIGNAL(finished(int,QString,DebuggingHelperBuildTask::Tools)),
QtVersionManager::instance(), SLOT(updateQtVersion(int)),
Qt::QueuedConnection);
}
示例5: init
bool MakeStep::init()
{
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
if (!bc)
bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
m_tasks.clear();
if (!bc) {
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
tr("Qt Creator needs a build configuration set up to build. Configure a tool chain in Project mode."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return false;
}
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
if (!tc) {
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
tr("Qt Creator needs a tool chain set up to build. Configure a tool chain the profile options."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return false;
}
ProjectExplorer::ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
QString workingDirectory;
if (bc->subNodeBuild())
workingDirectory = bc->subNodeBuild()->buildDir();
else
workingDirectory = bc->buildDirectory();
pp->setWorkingDirectory(workingDirectory);
QString makeCmd = tc->makeCommand();
if (!m_makeCmd.isEmpty())
makeCmd = m_makeCmd;
pp->setCommand(makeCmd);
// If we are cleaning, then make can fail with a error code, but that doesn't mean
// we should stop the clean queue
// That is mostly so that rebuild works on a already clean project
setIgnoreReturnValue(m_clean);
QString args;
Qt4ProjectManager::Qt4ProFileNode *subNode = bc->subNodeBuild();
if (subNode) {
QString makefile = subNode->makefile();
if (makefile.isEmpty())
makefile = QLatin1String("Makefile");
if (subNode->isDebugAndRelease()) {
if (bc->buildType() == Qt4BuildConfiguration::Debug)
makefile += QLatin1String(".Debug");
else
makefile += QLatin1String(".Release");
}
if (makefile != QLatin1String("Makefile")) {
Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
Utils::QtcProcess::addArg(&args, makefile);
}
m_makeFileToCheck = QDir(workingDirectory).filePath(makefile);
} else {
if (!bc->makefile().isEmpty()) {
Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
Utils::QtcProcess::addArg(&args, bc->makefile());
m_makeFileToCheck = QDir(workingDirectory).filePath(bc->makefile());
} else {
m_makeFileToCheck = QDir(workingDirectory).filePath(QLatin1String("Makefile"));
}
}
Utils::QtcProcess::addArgs(&args, m_userArgs);
if (!isClean()) {
if (!bc->defaultMakeTarget().isEmpty())
Utils::QtcProcess::addArg(&args, bc->defaultMakeTarget());
}
if (bc->fileNodeBuild() && subNode) {
QString objectsDir = subNode->objectsDirectory();
if (objectsDir.isEmpty()) {
objectsDir = subNode->buildDir(bc);
if (subNode->isDebugAndRelease()) {
if (bc->buildType() == Qt4BuildConfiguration::Debug)
objectsDir += QLatin1String("/debug");
else
objectsDir += QLatin1String("/release");
}
}
QString relObjectsDir = QDir(pp->workingDirectory()).relativeFilePath(objectsDir);
if (!relObjectsDir.isEmpty())
relObjectsDir += QLatin1Char('/');
QString objectFile = relObjectsDir +
QFileInfo(bc->fileNodeBuild()->path()).baseName() +
subNode->objectExtension();
Utils::QtcProcess::addArg(&args, objectFile);
}
Utils::Environment env = bc->environment();
// Force output to english for the parsers. Do this here and not in the toolchain's
//.........这里部分代码省略.........