Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
be3c59e9
Commit
be3c59e9
authored
15 years ago
by
kh1
Browse files
Options
Downloads
Patches
Plain Diff
The path separator depends on the OS.
parent
362ec515
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
+19
-10
19 additions, 10 deletions
...s/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
with
19 additions
and
10 deletions
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
+
19
−
10
View file @
be3c59e9
...
...
@@ -105,30 +105,39 @@ bool MaemoPackageCreationStep::createPackage()
if
(
!
packagingNeeded
())
return
true
;
const
QString
projectDir
=
QFileInfo
(
executable
()).
absolutePath
();
QFile
configFile
(
targetRoot
()
%
QLatin1String
(
"/config.sh"
));
if
(
!
configFile
.
open
(
QIODevice
::
ReadOnly
))
{
qDebug
(
"Cannot open config file '%s'"
,
qPrintable
(
configFile
.
fileName
()));
return
false
;
}
QProcessEnvironment
env
=
QProcessEnvironment
::
systemEnvironment
();
const
QLatin1String
pathKey
(
"PATH"
);
env
.
insert
(
pathKey
,
maddeRoot
()
%
QLatin1String
(
"/madbin:"
)
%
env
.
value
(
pathKey
));
env
.
insert
(
QLatin1String
(
"PERL5LIB"
),
maddeRoot
()
%
QLatin1String
(
"/madlib/perl5"
));
const
QRegExp
envPattern
(
QLatin1String
(
"([^=]+)=[
\"
']?([^;
\"
']+)[
\"
']? ;.*"
));
const
QString
&
path
=
QDir
::
toNativeSeparators
(
maddeRoot
()
+
QLatin1Char
(
'/'
));
const
QLatin1String
key
(
"PATH"
);
#ifdef Q_OS_WIN
const
QLatin1String
colon
(
";"
);
env
.
insert
(
key
,
path
%
QLatin1String
(
"bin"
)
%
colon
%
env
.
value
(
key
));
#elif defined(Q_OS_UNIX)
const
QLatin1String
colon
(
":"
);
#endif
env
.
insert
(
key
,
path
%
QLatin1String
(
"madbin"
)
%
colon
%
env
.
value
(
key
));
env
.
insert
(
QLatin1String
(
"PERL5LIB"
),
path
%
QLatin1String
(
"madlib/perl5"
));
const
QString
projectDir
=
QFileInfo
(
executable
()).
absolutePath
();
env
.
insert
(
QLatin1String
(
"PWD"
),
projectDir
);
const
QRegExp
envPattern
(
QLatin1String
(
"([^=]+)=[
\"
']?([^;
\"
']+)[
\"
']? ;.*"
));
QByteArray
line
;
do
{
line
=
configFile
.
readLine
(
200
);
if
(
envPattern
.
exactMatch
(
line
))
env
.
insert
(
envPattern
.
cap
(
1
),
envPattern
.
cap
(
2
));
}
while
(
!
line
.
isEmpty
());
qDebug
(
"Process environment: %s"
,
qPrintable
(
env
.
toStringList
().
join
(
QLatin1String
(
":"
)
)));
qDebug
(
"Process environment: %s"
,
qPrintable
(
env
.
toStringList
().
join
(
colon
)));
qDebug
(
"sysroot: '%s'"
,
qPrintable
(
env
.
value
(
QLatin1String
(
"SYSROOT_DIR"
))));
QProcess
buildProc
;
buildProc
.
setProcessEnvironment
(
env
);
buildProc
.
setWorkingDirectory
(
projectDir
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment