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
Marco Bubke
flatpak-qt-creator
Commits
1166dc39
Commit
1166dc39
authored
Nov 17, 2010
by
Christian Kandeler
Browse files
Maemo: Use current build environment for packaging.
(Instead of the initial system environment.) Reviewed-by: kh1
parent
9235e936
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
View file @
1166dc39
...
...
@@ -54,10 +54,10 @@
#include
<qt4buildconfiguration.h>
#include
<qt4project.h>
#include
<qt4target.h>
#include
<utils/environment.h>
#include
<QtCore/QDateTime>
#include
<QtCore/QProcess>
#include
<QtCore/QProcessEnvironment>
#include
<QtCore/QRegExp>
#include
<QtCore/QStringBuilder>
#include
<QtGui/QWidget>
...
...
@@ -503,27 +503,18 @@ bool MaemoPackageCreationStep::preparePackagingProcess(QProcess *proc,
return
false
;
}
QProcess
Environment
env
=
QProcessEnvironment
::
systemE
nvironment
();
Utils
::
Environment
env
=
bc
->
e
nvironment
();
const
QString
&
path
=
QDir
::
toNativeSeparators
(
tc
->
maddeRoot
()
+
QLatin1Char
(
'/'
));
const
QLatin1String
key
(
"PATH"
);
QString
colon
=
QLatin1String
(
":"
);
#ifdef Q_OS_WIN
colon
=
QLatin1String
(
";"
);
env
.
insert
(
key
,
path
%
QLatin1String
(
"bin"
)
%
colon
%
env
.
value
(
key
));
env
.
prependOrSetPath
(
path
%
QLatin1String
(
"bin"
));
#endif
env
.
insert
(
key
,
tc
->
targetRoot
()
%
"/bin"
%
colon
%
env
.
value
(
key
));
env
.
insert
(
key
,
path
%
QLatin1String
(
"madbin"
)
%
colon
%
env
.
value
(
key
));
env
.
prependOrSetPath
(
tc
->
targetRoot
()
%
QLatin1String
(
"/bin"
));
env
.
prependOrSetPath
(
path
%
QLatin1String
(
"madbin"
));
if
(
bc
->
qmakeBuildConfiguration
()
&
QtVersion
::
DebugBuild
)
{
const
QLatin1String
debOptionsKey
(
"DEB_BUILD_OPTIONS"
);
QString
debOptions
=
env
.
value
(
debOptionsKey
);
if
(
!
debOptions
.
isEmpty
())
debOptions
+=
QLatin1Char
(
' '
);
debOptions
+=
QLatin1String
(
"nostrip"
);
env
.
insert
(
debOptionsKey
,
debOptions
);
env
.
appendOrSet
(
QLatin1String
(
"DEB_BUILD_OPTIONS"
),
QLatin1String
(
"nostrip"
),
QLatin1String
(
" "
));
}
QString
perlLib
...
...
@@ -532,18 +523,18 @@ bool MaemoPackageCreationStep::preparePackagingProcess(QProcess *proc,
perlLib
=
perlLib
.
remove
(
QLatin1Char
(
':'
));
perlLib
=
perlLib
.
prepend
(
QLatin1Char
(
'/'
));
#endif
env
.
in
se
r
t
(
QLatin1String
(
"PERL5LIB"
),
perlLib
);
env
.
in
se
r
t
(
QLatin1String
(
"PWD"
),
workingDir
);
env
.
set
(
QLatin1String
(
"PERL5LIB"
),
perlLib
);
env
.
set
(
QLatin1String
(
"PWD"
),
workingDir
);
const
QRegExp
envPattern
(
QLatin1String
(
"([^=]+)=[
\"
']?([^;
\"
']+)[
\"
']? ;.*"
));
QByteArray
line
;
do
{
line
=
configFile
.
readLine
(
200
);
if
(
envPattern
.
exactMatch
(
line
))
env
.
in
se
r
t
(
envPattern
.
cap
(
1
),
envPattern
.
cap
(
2
));
env
.
set
(
envPattern
.
cap
(
1
),
envPattern
.
cap
(
2
));
}
while
(
!
line
.
isEmpty
());
proc
->
set
Process
Environment
(
env
);
proc
->
setEnvironment
(
env
.
toStringList
()
);
proc
->
setWorkingDirectory
(
workingDir
);
proc
->
start
(
"cd "
+
workingDir
);
proc
->
waitForFinished
();
...
...
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