forked from qt-creator/qt-creator
Maemo: Set DISPLAY for non-Maemo systems.
This commit is contained in:
@@ -81,8 +81,8 @@ RunControl *MaemoDebugSupport::createDebugRunControl(MaemoRunConfiguration *runC
|
||||
if (runConfig->useRemoteGdb()) {
|
||||
params.startMode = StartRemoteGdb;
|
||||
params.executable = runConfig->remoteExecutableFilePath();
|
||||
params.debuggerCommand
|
||||
= MaemoGlobal::remoteCommandPrefix(runConfig->remoteExecutableFilePath())
|
||||
params.debuggerCommand = MaemoGlobal::remoteCommandPrefix(runConfig->deviceConfig()->osVersion(),
|
||||
runConfig->remoteExecutableFilePath())
|
||||
+ MaemoGlobal::remoteEnvironment(runConfig->userEnvironmentChanges())
|
||||
+ QLatin1String(" /usr/bin/gdb");
|
||||
params.connParams = devConf->sshParameters();
|
||||
@@ -289,7 +289,8 @@ void MaemoDebugSupport::startDebugging()
|
||||
SLOT(handleRemoteProcessStarted()));
|
||||
}
|
||||
const QString &remoteExe = m_runner->remoteExecutable();
|
||||
const QString cmdPrefix = MaemoGlobal::remoteCommandPrefix(remoteExe);
|
||||
const QString cmdPrefix = MaemoGlobal::remoteCommandPrefix(m_deviceConfig->osVersion(),
|
||||
remoteExe);
|
||||
const QString env = MaemoGlobal::remoteEnvironment(m_userEnvChanges);
|
||||
QString args = m_runner->arguments();
|
||||
if (m_debuggingType != MaemoRunConfiguration::DebugCppOnly) {
|
||||
|
||||
@@ -113,10 +113,14 @@ QString MaemoGlobal::remoteSudo()
|
||||
return QLatin1String("/usr/lib/mad-developer/devrootsh");
|
||||
}
|
||||
|
||||
QString MaemoGlobal::remoteCommandPrefix(const QString &commandFilePath)
|
||||
QString MaemoGlobal::remoteCommandPrefix(MaemoVersion maemoVersion,
|
||||
const QString &commandFilePath)
|
||||
{
|
||||
return QString::fromLocal8Bit("%1 chmod a+x %2; %3; ")
|
||||
QString prefix = QString::fromLocal8Bit("%1 chmod a+x %2; %3; ")
|
||||
.arg(remoteSudo(), commandFilePath, remoteSourceProfilesCommand());
|
||||
if (maemoVersion != Maemo5 && maemoVersion != Maemo6)
|
||||
prefix += QLatin1String("DISPLAY=:0.0 ");
|
||||
return prefix;
|
||||
}
|
||||
|
||||
QString MaemoGlobal::remoteSourceProfilesCommand()
|
||||
|
||||
@@ -79,7 +79,8 @@ public:
|
||||
|
||||
static QString homeDirOnDevice(const QString &uname);
|
||||
static QString remoteSudo();
|
||||
static QString remoteCommandPrefix(const QString &commandFilePath);
|
||||
static QString remoteCommandPrefix(MaemoVersion maemoVersion,
|
||||
const QString &commandFilePath);
|
||||
static QString remoteEnvironment(const QList<Utils::EnvironmentItem> &list);
|
||||
static QString remoteSourceProfilesCommand();
|
||||
static QString failedToConnectToServerMessage(const QSharedPointer<Utils::SshConnection> &connection,
|
||||
|
||||
@@ -102,7 +102,8 @@ void MaemoRunControl::startExecution()
|
||||
{
|
||||
appendMessage(tr("Starting remote process ..."), NormalMessageFormat);
|
||||
m_runner->startExecution(QString::fromLocal8Bit("%1 %2 %3 %4")
|
||||
.arg(MaemoGlobal::remoteCommandPrefix(m_runner->remoteExecutable()))
|
||||
.arg(MaemoGlobal::remoteCommandPrefix(m_runner->devConfig()->osVersion(),
|
||||
m_runner->remoteExecutable()))
|
||||
.arg(MaemoGlobal::remoteEnvironment(m_runner->userEnvChanges()))
|
||||
.arg(m_runner->remoteExecutable())
|
||||
.arg(m_runner->arguments()).toUtf8());
|
||||
|
||||
@@ -74,6 +74,7 @@ public:
|
||||
QString remoteExecutable() const { return m_remoteExecutable; }
|
||||
QString arguments() const { return m_appArguments; }
|
||||
QList<Utils::EnvironmentItem> userEnvChanges() const { return m_userEnvChanges; }
|
||||
const QSharedPointer<const MaemoDeviceConfig> devConfig() const { return m_devConfig; }
|
||||
|
||||
static const qint64 InvalidExitCode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user