| diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autogenstep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autogenstep.cpp |
| --- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autogenstep.cpp 2015-04-14 19:57:23.551710900 +0100 |
| +++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autogenstep.cpp 2015-04-14 19:57:53.638531400 +0100 |
| @@ -34,6 +34,7 @@ |
| #include "autotoolsproject.h" |
| #include "autotoolsbuildconfiguration.h" |
| #include "autotoolsprojectconstants.h" |
| +#include "shellprocessparameters.h" |
| |
| #include <projectexplorer/buildsteplist.h> |
| #include <projectexplorer/target.h> |
| @@ -107,11 +107,12 @@ |
| |
| ProcessParameters *pp = processParameters(); |
| pp->setMacroExpander(bc->macroExpander()); |
| - pp->setEnvironment(bc->environment()); |
| const QString projectDir(bc->target()->project()->projectDirectory().toString()); |
| pp->setWorkingDirectory(projectDir); |
| - pp->setCommand("./autogen.sh"); |
| - pp->setArguments(additionalArguments()); |
| + ShellScriptProcessParametersSetCommandAndArguments(pp, |
| + bc->environment(), |
| + QLatin1String("./autogen.sh"), |
| + additionalArguments()); |
| pp->resolveAll(); |
| |
| return AbstractProcessStep::init(earlierSteps); |
| @@ -223,11 +225,12 @@ |
| |
| ProcessParameters param; |
| param.setMacroExpander(bc->macroExpander()); |
| - param.setEnvironment(bc->environment()); |
| const QString projectDir(bc->target()->project()->projectDirectory().toString()); |
| param.setWorkingDirectory(projectDir); |
| - param.setCommand("./autogen.sh"); |
| - param.setArguments(m_autogenStep->additionalArguments()); |
| + ShellScriptProcessParametersSetCommandAndArguments(¶m, |
| + bc->environment(), |
| + QLatin1String("./autogen.sh"), |
| + m_autogenStep->additionalArguments()); |
| m_summaryText = param.summary(displayName()); |
| emit updateSummary(); |
| } |
| diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp |
| --- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp 2015-04-14 19:57:23.552210900 +0100 |
| +++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp 2015-04-14 19:57:53.676036200 +0100 |
| @@ -34,6 +34,7 @@ |
| #include "autotoolsproject.h" |
| #include "autotoolsbuildconfiguration.h" |
| #include "autotoolsprojectconstants.h" |
| +#include "shellprocessparameters.h" |
| |
| #include <projectexplorer/buildsteplist.h> |
| #include <projectexplorer/target.h> |
| @@ -157,11 +158,12 @@ |
| |
| ProcessParameters *pp = processParameters(); |
| pp->setMacroExpander(bc->macroExpander()); |
| - pp->setEnvironment(bc->environment()); |
| const QString projectDir(bc->target()->project()->projectDirectory().toString()); |
| pp->setWorkingDirectory(projectDir); |
| - pp->setCommand("autoreconf"); |
| - pp->setArguments(additionalArguments()); |
| + ShellScriptProcessParametersSetCommandAndArguments(pp, |
| + bc->environment(), |
| + QLatin1String("autoreconf"), |
| + additionalArguments()); |
| pp->resolveAll(); |
| |
| return AbstractProcessStep::init(earlierSteps); |
| @@ -270,11 +272,12 @@ |
| |
| ProcessParameters param; |
| param.setMacroExpander(bc->macroExpander()); |
| - param.setEnvironment(bc->environment()); |
| const QString projectDir(bc->target()->project()->projectDirectory().toString()); |
| param.setWorkingDirectory(projectDir); |
| - param.setCommand("autoreconf"); |
| - param.setArguments(m_autoreconfStep->additionalArguments()); |
| + ShellScriptProcessParametersSetCommandAndArguments(¶m, |
| + bc->environment(), |
| + QLatin1String("autoreconf"), |
| + m_autoreconfStep->additionalArguments()); |
| m_summaryText = param.summary(displayName()); |
| emit updateSummary(); |
| } |
| diff -urN qt-creator-opensource-src-3.4.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro qt-creator-opensource-src-3.4.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro |
| --- qt-creator-opensource-src-3.4.0.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro 2015-04-21 16:56:56.000000000 +0100 |
| +++ qt-creator-opensource-src-3.4.0/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro 2015-04-24 00:37:06.163960200 +0100 |
| @@ -14,7 +14,8 @@ |
| autoreconfstep.h\ |
| configurestep.h\ |
| makefileparserthread.h\ |
| - makefileparser.h |
| + makefileparser.h \ |
| + shellprocessparameters.h |
| SOURCES = autotoolsprojectplugin.cpp\ |
| autotoolsopenprojectwizard.cpp\ |
| autotoolsmanager.cpp\ |
| @@ -28,4 +29,5 @@ |
| autoreconfstep.cpp\ |
| configurestep.cpp\ |
| makefileparserthread.cpp\ |
| - makefileparser.cpp |
| + makefileparser.cpp\ |
| + shellprocessparameters.cpp |
| diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs |
| --- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs 2015-04-14 19:57:23.592716100 +0100 |
| +++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs 2015-04-14 19:57:53.873561300 +0100 |
| @@ -41,5 +41,7 @@ |
| "makefileparserthread.h", |
| "makestep.cpp", |
| "makestep.h", |
| + "shellprocessparameters.cpp", |
| + "shellprocessparameters.h", |
| ] |
| } |
| diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/configurestep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/configurestep.cpp |
| --- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/configurestep.cpp 2015-04-14 19:57:23.594216300 +0100 |
| +++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/configurestep.cpp 2015-04-14 19:57:53.912566200 +0100 |
| @@ -34,6 +34,7 @@ |
| #include "autotoolsproject.h" |
| #include "autotoolsbuildconfiguration.h" |
| #include "autotoolsprojectconstants.h" |
| +#include "shellprocessparameters.h" |
| |
| #include <projectexplorer/buildsteplist.h> |
| #include <projectexplorer/target.h> |
| @@ -172,10 +173,11 @@ |
| |
| ProcessParameters *pp = processParameters(); |
| pp->setMacroExpander(bc->macroExpander()); |
| - pp->setEnvironment(bc->environment()); |
| pp->setWorkingDirectory(bc->buildDirectory().toString()); |
| - pp->setCommand(projectDirRelativeToBuildDir(bc) + "configure"); |
| - pp->setArguments(additionalArguments()); |
| + ShellScriptProcessParametersSetCommandAndArguments(pp, |
| + bc->environment(), |
| + projectDirRelativeToBuildDir(bc) + QLatin1String("configure"), |
| + additionalArguments()); |
| pp->resolveAll(); |
| |
| return AbstractProcessStep::init(earlierSteps); |
| @@ -295,10 +297,11 @@ |
| |
| ProcessParameters param; |
| param.setMacroExpander(bc->macroExpander()); |
| - param.setEnvironment(bc->environment()); |
| param.setWorkingDirectory(bc->buildDirectory().toString()); |
| - param.setCommand(projectDirRelativeToBuildDir(bc) + "configure"); |
| - param.setArguments(m_configureStep->additionalArguments()); |
| + ShellScriptProcessParametersSetCommandAndArguments(¶m, |
| + bc->environment(), |
| + projectDirRelativeToBuildDir(bc) + QLatin1String("configure"), |
| + m_configureStep->additionalArguments()); |
| m_summaryText = param.summaryInWorkdir(displayName()); |
| emit updateSummary(); |
| } |
| diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/makestep.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/makestep.cpp |
| --- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/makestep.cpp 2015-04-14 19:57:23.637221700 +0100 |
| +++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/makestep.cpp 2015-04-14 19:57:53.927568100 +0100 |
| @@ -34,6 +34,7 @@ |
| #include "autotoolsproject.h" |
| #include "autotoolsprojectconstants.h" |
| #include "autotoolsbuildconfiguration.h" |
| +#include "shellprocessparameters.h" |
| |
| #include <projectexplorer/buildsteplist.h> |
| #include <projectexplorer/target.h> |
| @@ -138,10 +139,8 @@ |
| pp->setMacroExpander(bc->macroExpander()); |
| Utils::Environment env = bc->environment(); |
| Utils::Environment::setupEnglishOutput(&env); |
| - pp->setEnvironment(env); |
| pp->setWorkingDirectory(bc->buildDirectory().toString()); |
| - pp->setCommand(tcList.at(0)->makeCommand(bc->environment())); |
| - pp->setArguments(arguments); |
| + ShellScriptProcessParametersSetMakeCommandAndArguments(pp, env, tcList.at(0), bc, arguments); |
| pp->resolveAll(); |
| |
| setOutputParser(new GnuMakeParser()); |
| @@ -262,10 +265,8 @@ |
| |
| ProcessParameters param; |
| param.setMacroExpander(m_makeStep->macroExpander()); |
| - param.setEnvironment(bc->environment()); |
| param.setWorkingDirectory(bc->buildDirectory().toString()); |
| - param.setCommand(tcList.at(0)->makeCommand(bc->environment())); |
| - param.setArguments(arguments); |
| + ShellScriptProcessParametersSetMakeCommandAndArguments(¶m, bc->environment(), tcList.at(0), bc, arguments); |
| m_summaryText = param.summary(displayName()); |
| } else { |
| m_summaryText = QLatin1String("<b>") + ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>"); |
| diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp |
| --- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp 1970-01-01 01:00:00.000000000 +0100 |
| +++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.cpp 2015-04-14 20:04:01.013682100 +0100 |
| @@ -0,0 +1,89 @@ |
| +/************************************************************************** |
| +** |
| +** Copyright (C) 2014 Ray Donnelly. |
| +** Author: Ray Donnelly (mingw.android@gmail.com) |
| +** Contact: http://www.qt-project.org/legal |
| +** |
| +** This file is part of Qt Creator. |
| +** |
| +** Commercial License Usage |
| +** Licensees holding valid commercial Qt licenses may use this file in |
| +** accordance with the commercial license agreement provided with the |
| +** Software or, alternatively, in accordance with the terms contained in |
| +** a written agreement between you and Digia. For licensing terms and |
| +** conditions see http://qt.digia.com/licensing. For further information |
| +** use the contact form at http://qt.digia.com/contact-us. |
| +** |
| +** GNU Lesser General Public License Usage |
| +** Alternatively, this file may be used under the terms of the GNU Lesser |
| +** General Public License version 2.1 as published by the Free Software |
| +** Foundation and appearing in the file LICENSE.LGPL included in the |
| +** packaging of this file. Please review the following information to |
| +** ensure the GNU Lesser General Public License version 2.1 requirements |
| +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
| +** |
| +** In addition, as a special exception, Digia gives you certain additional |
| +** rights. These rights are described in the Digia Qt LGPL Exception |
| +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
| +** |
| +****************************************************************************/ |
| + |
| +#include <QString> |
| +#include <QProcess> |
| +#include <QDir> |
| +#include <QFileInfo> |
| + |
| +#include "shellprocessparameters.h" |
| + |
| +using namespace Utils; |
| +using namespace ProjectExplorer; |
| + |
| +void ShellScriptProcessParametersSetCommandAndArguments(ProcessParameters *procParams, |
| + Environment const& env, |
| + QString command, QString args) |
| +{ |
| +#if defined(Q_OS_WIN) |
| + /* MSYS2 specific. This could be improved with a setting in Tools->Options */ |
| + QString sh_dir = QFileInfo(QCoreApplication::applicationDirPath() |
| + + QLatin1String("\\..\\..\\usr\\bin")).absoluteFilePath(); |
| + QString sh_exe = QFileInfo(sh_dir |
| + + QLatin1String("\\sh.exe")).absoluteFilePath(); |
| + QString sh_dir_native = QDir::toNativeSeparators(sh_dir); |
| + Utils::Environment envCopy(env); |
| + if (!env.path().contains(FileName::fromString(sh_dir)) && !env.path().contains(FileName::fromString(sh_dir_native))) { |
| + envCopy.prependOrSetPath(sh_dir); |
| + } |
| + procParams->setEnvironment(envCopy); |
| + procParams->setCommand(sh_exe); |
| + procParams->setArguments(QLatin1String("-c \"") |
| + + command |
| + + QLatin1String(" ") |
| + + args |
| + + QLatin1String("\"")); |
| +#else |
| + procParams->setEnvironment(env); |
| + procParams->setCommand(command); |
| + procParams->setArguments(args); |
| +#endif |
| +} |
| + |
| +void ShellScriptProcessParametersSetMakeCommandAndArguments(ProcessParameters *procParams, |
| + Environment const& env, |
| + ToolChain const* toolchain, |
| + BuildConfiguration *buildConfig, |
| + QString args) |
| +{ |
| +#if defined(Q_OS_WIN) |
| + Q_UNUSED(buildConfig); |
| + Q_UNUSED(toolchain); |
| + QString makeCommand = QLatin1String("make"); |
| +#else |
| + QString makeCommand = (toolchain && buildConfig) |
| + ? toolchain->makeCommand(buildConfig->environment()) |
| + : QLatin1String("make"); |
| +#endif |
| + ShellScriptProcessParametersSetCommandAndArguments(procParams, |
| + env, |
| + makeCommand, |
| + args); |
| +} |
| diff -urN qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.h qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.h |
| --- qt-creator-opensource-src-3.3.2.orig/src/plugins/autotoolsprojectmanager/shellprocessparameters.h 1970-01-01 01:00:00.000000000 +0100 |
| +++ qt-creator-opensource-src-3.3.2/src/plugins/autotoolsprojectmanager/shellprocessparameters.h 2015-04-14 19:57:53.980574800 +0100 |
| @@ -0,0 +1,49 @@ |
| +/************************************************************************** |
| +** |
| +** Copyright (C) 2014 Ray Donnelly. |
| +** Author: Ray Donnelly (mingw.android@gmail.com) |
| +** Contact: http://www.qt-project.org/legal |
| +** |
| +** This file is part of Qt Creator. |
| +** |
| +** Commercial License Usage |
| +** Licensees holding valid commercial Qt licenses may use this file in |
| +** accordance with the commercial license agreement provided with the |
| +** Software or, alternatively, in accordance with the terms contained in |
| +** a written agreement between you and Digia. For licensing terms and |
| +** conditions see http://qt.digia.com/licensing. For further information |
| +** use the contact form at http://qt.digia.com/contact-us. |
| +** |
| +** GNU Lesser General Public License Usage |
| +** Alternatively, this file may be used under the terms of the GNU Lesser |
| +** General Public License version 2.1 as published by the Free Software |
| +** Foundation and appearing in the file LICENSE.LGPL included in the |
| +** packaging of this file. Please review the following information to |
| +** ensure the GNU Lesser General Public License version 2.1 requirements |
| +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
| +** |
| +** In addition, as a special exception, Digia gives you certain additional |
| +** rights. These rights are described in the Digia Qt LGPL Exception |
| +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
| +** |
| +****************************************************************************/ |
| + |
| +#ifndef SHELLPROCESSPARAMETERS_H |
| +#define SHELLPROCESSPARAMETERS_H |
| + |
| +#include <projectexplorer/processparameters.h> |
| +#include <projectexplorer/toolchain.h> |
| +#include "autotoolsbuildconfiguration.h" |
| + |
| +void ShellScriptProcessParametersSetCommandAndArguments(ProjectExplorer::ProcessParameters *pp, |
| + Utils::Environment const& env, |
| + QString command, |
| + QString args); |
| + |
| +void ShellScriptProcessParametersSetMakeCommandAndArguments(ProjectExplorer::ProcessParameters *procParams, |
| + Utils::Environment const& env, |
| + ProjectExplorer::ToolChain const* toolchain, |
| + ProjectExplorer::BuildConfiguration *buildConfig, |
| + QString args); |
| + |
| +#endif // SHELLPROCESSPARAMETERS_H |