OSDN Git Service

It's 2011 now.
[qt-creator-jp/qt-creator-jp.git] / src / plugins / qt4projectmanager / qt-s60 / rvcttoolchain.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 ** No Commercial Usage
10 **
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
15 **
16 ** GNU Lesser General Public License Usage
17 **
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights.  These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
31 **
32 **************************************************************************/
33
34 #ifndef RVCTTOOLCHAIN_H
35 #define RVCTTOOLCHAIN_H
36
37 #include "s60devices.h"
38
39 #include <projectexplorer/toolchain.h>
40
41 namespace Qt4ProjectManager {
42 namespace Internal {
43
44 // ==========================================================================
45 // RVCTToolChain
46 // ==========================================================================
47
48 class RVCTToolChain : public ProjectExplorer::ToolChain
49 {
50 public:
51     explicit RVCTToolChain(const S60Devices::Device &device,
52                            ProjectExplorer::ToolChainType type);
53     QByteArray predefinedMacros();
54     QList<ProjectExplorer::HeaderPath> systemHeaderPaths();
55     void addToEnvironment(Utils::Environment &env);
56     ProjectExplorer::ToolChainType type() const;
57     QString makeCommand() const;
58     ProjectExplorer::IOutputParser *outputParser() const;
59
60     static QSet<QPair<int, int> > configuredRvctVersions();
61
62     // Return the environment variable indicating the RVCT version
63     // 'RVCT2<minor>BIN' and its setting
64     virtual QByteArray rvctBinEnvironmentVariable() = 0;
65
66     QString rvctBinPath();
67     QString rvctBinary();
68
69 protected:
70     bool equals(const ToolChain *other) const = 0;
71
72     QStringList configuredEnvironment();
73
74     QByteArray rvctBinEnvironmentVariableForVersion(int major);
75     void addToRVCTPathVariable(const QString &postfix, const QStringList &values,
76                                Utils::Environment &env) const;
77     QStringList libPaths();
78     void updateVersion();
79
80     QByteArray m_predefinedMacros;
81     QList<ProjectExplorer::HeaderPath> m_systemHeaderPaths;
82
83     const S60ToolChainMixin m_mixin;
84     const ProjectExplorer::ToolChainType m_type;
85     bool m_versionUpToDate;
86     int m_major;
87     int m_minor;
88     int m_build;
89
90 private:
91     QString m_binPath;
92     QStringList m_additionalEnvironment;
93 };
94
95 // ==========================================================================
96 // RVCT2ToolChain
97 // ==========================================================================
98
99 class RVCT2ToolChain : public RVCTToolChain
100 {
101 public:
102     explicit RVCT2ToolChain(const S60Devices::Device &device,
103                             ProjectExplorer::ToolChainType type);
104     QByteArray rvctBinEnvironmentVariable();
105
106     QByteArray predefinedMacros();
107
108 protected:
109     bool equals(const ToolChain *other) const;
110 };
111
112 // ==========================================================================
113 // RVCT4ToolChain
114 // ==========================================================================
115
116 class RVCT4ToolChain : public RVCT2ToolChain
117 {
118 public:
119     explicit RVCT4ToolChain(const S60Devices::Device &device,
120                             ProjectExplorer::ToolChainType type);
121
122     QByteArray rvctBinEnvironmentVariable();
123
124     QByteArray predefinedMacros();
125
126 protected:
127     bool equals(const ToolChain *other) const;
128 };
129
130 } // namespace Internal
131 } // namespace Qt4ProjectManager
132
133 #endif // RVCTTOOLCHAIN_H