Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
947f0f3a
Commit
947f0f3a
authored
Sep 13, 2010
by
Christian Kandeler
Browse files
Maemo: source all relevant profiles and ignore non-existing ones.
Reviewed-by: kh1
parent
8194d228
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemodeviceenvreader.cpp
View file @
947f0f3a
...
...
@@ -34,6 +34,7 @@
#include
"maemodeviceenvreader.h"
#include
"maemoglobal.h"
#include
"maemorunconfiguration.h"
#include
<coreplugin/ssh/sshconnection.h>
...
...
@@ -101,8 +102,7 @@ void MaemoDeviceEnvReader::executeRemoteCall()
if
(
m_stop
)
return
;
const
QByteArray
remoteCall
(
"test -f /etc/profile && source /etc/profile; "
"test -f ~/.profile && source ~/.profile; env"
);
const
QByteArray
remoteCall
=
MaemoGlobal
::
remoteSourceProfilesCommand
().
toUtf8
()
+
"; env"
;
m_remoteProcess
=
m_connection
->
createRemoteProcess
(
remoteCall
);
connect
(
m_remoteProcess
.
data
(),
SIGNAL
(
closed
(
int
)),
this
,
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
View file @
947f0f3a
...
...
@@ -48,8 +48,18 @@ QString MaemoGlobal::remoteSudo()
QString
MaemoGlobal
::
remoteCommandPrefix
(
const
QString
&
commandFilePath
)
{
return
QString
::
fromLocal8Bit
(
"%1 chmod a+x %2 && source /etc/profile; "
"source /home/user/.profile; "
).
arg
(
remoteSudo
(),
commandFilePath
);
return
QString
::
fromLocal8Bit
(
"%1 chmod a+x %2; %3; "
)
.
arg
(
remoteSudo
(),
commandFilePath
,
remoteSourceProfilesCommand
());
}
QString
MaemoGlobal
::
remoteSourceProfilesCommand
()
{
const
QList
<
QByteArray
>
profiles
=
QList
<
QByteArray
>
()
<<
"/etc/profile"
<<
"/home/user/.profile"
<<
"~/.profile"
;
QByteArray
remoteCall
(
":"
);
foreach
(
const
QByteArray
&
profile
,
profiles
)
remoteCall
+=
"; test -f "
+
profile
+
" && source "
+
profile
;
return
QString
::
fromAscii
(
remoteCall
);
}
QString
MaemoGlobal
::
remoteEnvironment
(
const
QList
<
ProjectExplorer
::
EnvironmentItem
>
&
list
)
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
View file @
947f0f3a
...
...
@@ -52,6 +52,7 @@ public:
static
QString
remoteCommandPrefix
(
const
QString
&
commandFilePath
);
static
QString
remoteEnvironment
(
const
QList
<
ProjectExplorer
::
EnvironmentItem
>
&
list
);
static
QString
remoteProjectSourcesMountPoint
();
static
QString
remoteSourceProfilesCommand
();
template
<
class
T
>
static
T
*
buildStep
(
const
ProjectExplorer
::
DeployConfiguration
*
dc
)
{
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
View file @
947f0f3a
...
...
@@ -240,7 +240,9 @@ void MaemoRemoteMounter::startUtfsClients()
.
arg
(
mountSpec
.
remoteMountPoint
);
if
(
mountInfo
.
mountAsRoot
)
utfsClient
.
prepend
(
MaemoGlobal
::
remoteSudo
()
+
QLatin1Char
(
' '
));
remoteCall
+=
andOp
+
mkdir
+
andOp
+
chmod
+
andOp
+
utfsClient
;
QLatin1String
seqOp
(
"; "
);
remoteCall
+=
seqOp
+
MaemoGlobal
::
remoteSourceProfilesCommand
()
+
seqOp
+
mkdir
+
andOp
+
chmod
+
andOp
+
utfsClient
;
}
emit
reportProgress
(
tr
(
"Starting remote UTFS clients..."
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment