Skip to content
GitLab
Menu
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
655a1c91
Commit
655a1c91
authored
Jun 05, 2009
by
con
Browse files
Create a wingcce toolchain.
parent
6b3ef9f8
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/toolchain.cpp
View file @
655a1c91
...
...
@@ -100,7 +100,9 @@ QStringList ToolChain::supportedToolChains()
return
QStringList
()
<<
QLatin1String
(
"gcc"
)
<<
QLatin1String
(
"mingw"
)
<<
QLatin1String
(
"msvc"
)
<<
QLatin1String
(
"wince"
);
<<
QLatin1String
(
"wince"
)
<<
QLatin1String
(
"winscw"
)
<<
QLatin1String
(
"gcce"
);
}
QString
ToolChain
::
toolChainName
(
ToolChainType
tc
)
...
...
src/plugins/projectexplorer/toolchain.h
View file @
655a1c91
...
...
@@ -75,6 +75,7 @@ public:
WINCE
,
#ifdef QTCREATOR_WITH_S60
WINSCW
,
GCCE
,
#endif
OTHER
,
UNKNOWN
,
...
...
@@ -86,6 +87,7 @@ public:
virtual
void
addToEnvironment
(
ProjectExplorer
::
Environment
&
env
)
=
0
;
virtual
ToolChainType
type
()
const
=
0
;
virtual
QString
makeCommand
()
const
=
0
;
virtual
QString
defaultMakeTarget
()
const
=
0
;
ToolChain
();
virtual
~
ToolChain
();
...
...
@@ -115,6 +117,7 @@ public:
virtual
void
addToEnvironment
(
ProjectExplorer
::
Environment
&
env
);
virtual
ToolChainType
type
()
const
;
virtual
QString
makeCommand
()
const
;
virtual
QString
defaultMakeTarget
()
const
{
return
""
;
}
protected:
virtual
bool
equals
(
ToolChain
*
other
)
const
;
...
...
@@ -148,6 +151,7 @@ public:
virtual
void
addToEnvironment
(
ProjectExplorer
::
Environment
&
env
);
virtual
ToolChainType
type
()
const
;
virtual
QString
makeCommand
()
const
;
virtual
QString
defaultMakeTarget
()
const
{
return
""
;
}
protected:
virtual
bool
equals
(
ToolChain
*
other
)
const
;
QString
m_name
;
...
...
src/plugins/qt4projectmanager/makestep.cpp
View file @
655a1c91
...
...
@@ -68,7 +68,8 @@ bool MakeStep::init(const QString &name)
workingDirectory
=
QFileInfo
(
project
()
->
file
()
->
fileName
()).
absolutePath
();
setWorkingDirectory
(
name
,
workingDirectory
);
QString
makeCmd
=
qobject_cast
<
Qt4Project
*>
(
project
())
->
makeCommand
(
name
);
Qt4Project
*
qt4project
=
qobject_cast
<
Qt4Project
*>
(
project
());
QString
makeCmd
=
qt4project
->
makeCommand
(
name
);
if
(
!
value
(
name
,
"makeCmd"
).
toString
().
isEmpty
())
makeCmd
=
value
(
name
,
"makeCmd"
).
toString
();
if
(
!
QFileInfo
(
makeCmd
).
isAbsolute
())
{
...
...
@@ -92,6 +93,7 @@ bool MakeStep::init(const QString &name)
}
}
else
{
args
=
value
(
name
,
"makeargs"
).
toStringList
();
args
<<
qt4project
->
defaultMakeTarget
(
name
);
}
// -w option enables "Enter"/"Leaving directory" messages, which we need for detecting the
...
...
src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
0 → 100644
View file @
655a1c91
#include "gccetoolchain.h"
#include <coreplugin/icore.h>
#include <QtCore/QDir>
#include <QtDebug>
using
namespace
ProjectExplorer
;
using
namespace
Qt4ProjectManager
::
Internal
;
GCCEToolChain
::
GCCEToolChain
(
S60Devices
::
Device
device
)
:
m_deviceId
(
device
.
id
),
m_deviceName
(
device
.
name
),
m_deviceRoot
(
device
.
epocRoot
)
{
}
ToolChain
::
ToolChainType
GCCEToolChain
::
type
()
const
{
return
ToolChain
::
GCCE
;
}
QByteArray
GCCEToolChain
::
predefinedMacros
()
{
// TODO
return
m_predefinedMacros
;
}
QList
<
HeaderPath
>
GCCEToolChain
::
systemHeaderPaths
()
{
// TODO
return
m_systemHeaderPaths
;
}
void
GCCEToolChain
::
addToEnvironment
(
ProjectExplorer
::
Environment
&
env
)
{
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
));
env
.
set
(
"EPOCROOT"
,
S60Devices
::
cleanedRootPath
(
m_deviceRoot
));
}
QString
GCCEToolChain
::
makeCommand
()
const
{
return
"make"
;
}
QString
GCCEToolChain
::
defaultMakeTarget
()
const
{
return
"debug-gcce"
;
}
bool
GCCEToolChain
::
equals
(
ToolChain
*
other
)
const
{
return
(
other
->
type
()
==
type
()
&&
m_deviceId
==
static_cast
<
GCCEToolChain
*>
(
other
)
->
m_deviceId
&&
m_deviceName
==
static_cast
<
GCCEToolChain
*>
(
other
)
->
m_deviceName
);
}
src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h
0 → 100644
View file @
655a1c91
#ifndef GCCETOOLCHAIN_H
#define GCCETOOLCHAIN_H
#include "s60devices.h"
#include <projectexplorer/toolchain.h>
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
GCCEToolChain
:
public
ProjectExplorer
::
ToolChain
{
public:
GCCEToolChain
(
S60Devices
::
Device
device
);
QByteArray
predefinedMacros
();
QList
<
ProjectExplorer
::
HeaderPath
>
systemHeaderPaths
();
void
addToEnvironment
(
ProjectExplorer
::
Environment
&
env
);
ProjectExplorer
::
ToolChain
::
ToolChainType
type
()
const
;
QString
makeCommand
()
const
;
QString
defaultMakeTarget
()
const
;
protected:
bool
equals
(
ToolChain
*
other
)
const
;
private:
QString
m_deviceId
;
QString
m_deviceName
;
QString
m_deviceRoot
;
QByteArray
m_predefinedMacros
;
QList
<
ProjectExplorer
::
HeaderPath
>
m_systemHeaderPaths
;
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // GCCETOOLCHAIN_H
src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt
View file @
655a1c91
...
...
@@ -4,9 +4,16 @@
* QtVersion:
* support the different tool chains
* gui for overriding the default make target if necessary,
make arguments --> make options
* more general "debug / release" configuration to be used in toolchain
* WINSCW tool chain:
* predefined macros
* system includes
* GCCE tool chain:
* predefined macros
* system includes
* Run WINSCW executables
src/plugins/qt4projectmanager/qt-s60/qt-s60.pri
View file @
655a1c91
...
...
@@ -5,11 +5,13 @@ SUPPORT_QT_S60 = $$(QTCREATOR_WITH_S60)
SOURCES += $$PWD/s60devices.cpp \
$$PWD/s60devicespreferencepane.cpp \
$$PWD/s60manager.cpp \
$$PWD/winscwtoolchain.cpp
$$PWD/winscwtoolchain.cpp \
$$PWD/gccetoolchain.cpp
HEADERS += $$PWD/s60devices.h \
$$PWD/s60devicespreferencepane.h \
$$PWD/s60manager.h \
$$PWD/winscwtoolchain.h
$$PWD/winscwtoolchain.h \
$$PWD/gccetoolchain.h
FORMS += $$PWD/s60devicespreferencepane.ui
OTHER_FILES += qt-s60-todo.txt
}
src/plugins/qt4projectmanager/qt-s60/s60manager.cpp
View file @
655a1c91
...
...
@@ -32,6 +32,7 @@
#include "s60devices.h"
#include "s60devicespreferencepane.h"
#include "winscwtoolchain.h"
#include "gccetoolchain.h"
#include <extensionsystem/pluginmanager.h>
...
...
@@ -116,3 +117,9 @@ ProjectExplorer::ToolChain *S60Manager::createWINSCWToolChain(const Qt4ProjectMa
QString
id
=
version
->
autodetectionSource
().
mid
(
QString
(
S60_AUTODETECTION_SOURCE
).
length
()
+
1
);
return
new
WINSCWToolChain
(
m_devices
->
deviceForId
(
id
),
version
->
mwcDirectory
());
}
ProjectExplorer
::
ToolChain
*
S60Manager
::
createGCCEToolChain
(
const
Qt4ProjectManager
::
QtVersion
*
version
)
const
{
QString
id
=
version
->
autodetectionSource
().
mid
(
QString
(
S60_AUTODETECTION_SOURCE
).
length
()
+
1
);
return
new
GCCEToolChain
(
m_devices
->
deviceForId
(
id
));
}
src/plugins/qt4projectmanager/qt-s60/s60manager.h
View file @
655a1c91
...
...
@@ -53,6 +53,7 @@ public:
static
S60Manager
*
instance
();
ProjectExplorer
::
ToolChain
*
createWINSCWToolChain
(
const
Qt4ProjectManager
::
QtVersion
*
version
)
const
;
ProjectExplorer
::
ToolChain
*
createGCCEToolChain
(
const
Qt4ProjectManager
::
QtVersion
*
version
)
const
;
private
slots
:
void
updateQtVersions
();
...
...
src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
View file @
655a1c91
...
...
@@ -4,7 +4,6 @@ using namespace ProjectExplorer;
using
namespace
Qt4ProjectManager
::
Internal
;
WINSCWToolChain
::
WINSCWToolChain
(
S60Devices
::
Device
device
,
const
QString
&
mwcDirectory
)
// TODO get rid of hardcoded carbide path
:
m_carbidePath
(
mwcDirectory
),
m_deviceId
(
device
.
id
),
m_deviceName
(
device
.
name
),
...
...
@@ -62,8 +61,14 @@ QString WINSCWToolChain::makeCommand() const
return
"make"
;
}
QString
WINSCWToolChain
::
defaultMakeTarget
()
const
{
return
"debug-winscw"
;
}
bool
WINSCWToolChain
::
equals
(
ToolChain
*
other
)
const
{
return
(
m_deviceId
==
static_cast
<
WINSCWToolChain
*>
(
other
)
->
m_deviceId
return
(
other
->
type
()
==
type
()
&&
m_deviceId
==
static_cast
<
WINSCWToolChain
*>
(
other
)
->
m_deviceId
&&
m_deviceName
==
static_cast
<
WINSCWToolChain
*>
(
other
)
->
m_deviceName
);
}
src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.h
View file @
655a1c91
...
...
@@ -17,6 +17,7 @@ public:
void
addToEnvironment
(
ProjectExplorer
::
Environment
&
env
);
ProjectExplorer
::
ToolChain
::
ToolChainType
type
()
const
;
QString
makeCommand
()
const
;
QString
defaultMakeTarget
()
const
;
protected:
bool
equals
(
ToolChain
*
other
)
const
;
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
655a1c91
...
...
@@ -380,6 +380,11 @@ QString Qt4Project::makeCommand(const QString &buildConfiguration) const
return
qtVersion
(
buildConfiguration
)
->
toolChain
()
->
makeCommand
();
}
QString
Qt4Project
::
defaultMakeTarget
(
const
QString
&
buildConfiguration
)
const
{
return
qtVersion
(
buildConfiguration
)
->
toolChain
()
->
defaultMakeTarget
();
}
void
Qt4Project
::
updateCodeModel
()
{
if
(
debug
)
...
...
src/plugins/qt4projectmanager/qt4project.h
View file @
655a1c91
...
...
@@ -182,6 +182,7 @@ public:
void
notifyChanged
(
const
QString
&
name
);
QString
makeCommand
(
const
QString
&
buildConfiguration
)
const
;
QString
defaultMakeTarget
(
const
QString
&
buildConfiguration
)
const
;
// Is called by qmakestep qt4configurationwidget if the settings change
// Informs all Qt4RunConfigurations that their cached values are now invalid
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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