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
cdc54c3b
Commit
cdc54c3b
authored
15 years ago
by
con
Browse files
Options
Downloads
Patches
Plain Diff
System includes and defines for gcce tool chain.
parent
66c2c7c1
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
+76
-2
76 additions, 2 deletions
src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt
+1
-4
1 addition, 4 deletions
src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt
with
77 additions
and
6 deletions
src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
+
76
−
2
View file @
cdc54c3b
...
...
@@ -9,6 +9,10 @@
using
namespace
ProjectExplorer
;
using
namespace
Qt4ProjectManager
::
Internal
;
namespace
{
const
char
*
GCCE_COMMAND
=
"arm-none-symbianelf-gcc.exe"
;
}
GCCEToolChain
::
GCCEToolChain
(
S60Devices
::
Device
device
)
:
m_deviceId
(
device
.
id
),
m_deviceName
(
device
.
name
),
...
...
@@ -24,18 +28,88 @@ ToolChain::ToolChainType GCCEToolChain::type() const
QByteArray
GCCEToolChain
::
predefinedMacros
()
{
// TODO
if
(
m_predefinedMacros
.
isEmpty
())
{
QStringList
arguments
;
arguments
<<
QLatin1String
(
"-xc++"
)
<<
QLatin1String
(
"-E"
)
<<
QLatin1String
(
"-dM"
)
<<
QLatin1String
(
"-"
);
QProcess
cpp
;
ProjectExplorer
::
Environment
env
=
ProjectExplorer
::
Environment
::
systemEnvironment
();
addToEnvironment
(
env
);
cpp
.
setEnvironment
(
env
.
toStringList
());
cpp
.
start
(
QLatin1String
(
GCCE_COMMAND
),
arguments
);
cpp
.
closeWriteChannel
();
cpp
.
waitForFinished
();
m_predefinedMacros
=
cpp
.
readAllStandardOutput
();
}
return
m_predefinedMacros
;
}
QList
<
HeaderPath
>
GCCEToolChain
::
systemHeaderPaths
()
{
// TODO
if
(
m_systemHeaderPaths
.
isEmpty
())
{
QStringList
arguments
;
arguments
<<
QLatin1String
(
"-xc++"
)
<<
QLatin1String
(
"-E"
)
<<
QLatin1String
(
"-v"
)
<<
QLatin1String
(
"-"
);
QProcess
cpp
;
ProjectExplorer
::
Environment
env
=
ProjectExplorer
::
Environment
::
systemEnvironment
();
addToEnvironment
(
env
);
cpp
.
setEnvironment
(
env
.
toStringList
());
cpp
.
setReadChannelMode
(
QProcess
::
MergedChannels
);
cpp
.
start
(
QLatin1String
(
GCCE_COMMAND
),
arguments
);
cpp
.
closeWriteChannel
();
cpp
.
waitForFinished
();
QByteArray
line
;
while
(
cpp
.
canReadLine
())
{
line
=
cpp
.
readLine
();
if
(
line
.
startsWith
(
"#include"
))
break
;
}
if
(
!
line
.
isEmpty
()
&&
line
.
startsWith
(
"#include"
))
{
HeaderPath
::
Kind
kind
=
HeaderPath
::
UserHeaderPath
;
while
(
cpp
.
canReadLine
())
{
line
=
cpp
.
readLine
();
if
(
line
.
startsWith
(
"#include"
))
{
kind
=
HeaderPath
::
GlobalHeaderPath
;
}
else
if
(
!
line
.
isEmpty
()
&&
QChar
(
line
.
at
(
0
)).
isSpace
())
{
HeaderPath
::
Kind
thisHeaderKind
=
kind
;
line
=
line
.
trimmed
();
if
(
line
.
endsWith
(
'\n'
))
line
.
chop
(
1
);
int
index
=
line
.
indexOf
(
" (framework directory)"
);
if
(
index
!=
-
1
)
{
line
=
line
.
left
(
index
);
thisHeaderKind
=
HeaderPath
::
FrameworkHeaderPath
;
}
m_systemHeaderPaths
.
append
(
HeaderPath
(
QFile
::
decodeName
(
line
),
thisHeaderKind
));
}
else
if
(
line
.
startsWith
(
"End of search list."
))
{
break
;
}
else
{
qWarning
()
<<
"ignore line:"
<<
line
;
}
}
}
}
m_systemHeaderPaths
.
append
(
HeaderPath
(
QString
(
"%1
\\
epoc32
\\
include"
).
arg
(
m_deviceRoot
),
HeaderPath
::
GlobalHeaderPath
));
m_systemHeaderPaths
.
append
(
HeaderPath
(
QString
(
"%1
\\
epoc32
\\
include
\\
stdapis"
).
arg
(
m_deviceRoot
),
HeaderPath
::
GlobalHeaderPath
));
m_systemHeaderPaths
.
append
(
HeaderPath
(
QString
(
"%1
\\
epoc32
\\
include
\\
stdapis
\\
sys"
).
arg
(
m_deviceRoot
),
HeaderPath
::
GlobalHeaderPath
));
m_systemHeaderPaths
.
append
(
HeaderPath
(
QString
(
"%1
\\
epoc32
\\
include
\\
variant"
).
arg
(
m_deviceRoot
),
HeaderPath
::
GlobalHeaderPath
));
return
m_systemHeaderPaths
;
}
void
GCCEToolChain
::
addToEnvironment
(
ProjectExplorer
::
Environment
&
env
)
{
// TODO: do we need to set path to gcce?
env
.
prependOrSetPath
(
QString
(
"%1
\\
epoc32
\\
tools"
).
arg
(
m_deviceRoot
));
// e.g. make.exe
env
.
prependOrSetPath
(
QString
(
"%1
\\
epoc32
\\
gcc
\\
bin"
).
arg
(
m_deviceRoot
));
// e.g. gcc.exe
env
.
set
(
"EPOCDEVICE"
,
QString
(
"%1:%2"
).
arg
(
m_deviceId
,
m_deviceName
));
...
...
This diff is collapsed.
Click to expand it.
src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt
+
1
−
4
View file @
cdc54c3b
...
...
@@ -19,9 +19,6 @@
* predefined macros
* system includes
* GCCE tool chain:
* predefined macros
* system includes
* Run WINSCW executables
* Deploy gcce executables
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