author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 01:19:32 +0300 | |
changeset 37 | 758a864f9613 |
parent 33 | 3e2da88830cd |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the tools applications of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
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 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#include "configureapp.h" |
|
43 |
#include "environment.h" |
|
44 |
#ifdef COMMERCIAL_VERSION |
|
45 |
# include "tools.h" |
|
46 |
#endif |
|
47 |
||
48 |
#include <QDate> |
|
49 |
#include <qdir.h> |
|
50 |
#include <qtemporaryfile.h> |
|
51 |
#include <qstack.h> |
|
52 |
#include <qdebug.h> |
|
53 |
#include <qfileinfo.h> |
|
54 |
#include <qtextstream.h> |
|
55 |
#include <qregexp.h> |
|
56 |
#include <qhash.h> |
|
57 |
||
58 |
#include <iostream> |
|
59 |
#include <windows.h> |
|
60 |
#include <conio.h> |
|
61 |
||
62 |
QT_BEGIN_NAMESPACE |
|
63 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
64 |
std::ostream &operator<<(std::ostream &s, const QString &val) { |
0 | 65 |
s << val.toLocal8Bit().data(); |
66 |
return s; |
|
67 |
} |
|
68 |
||
69 |
||
70 |
using namespace std; |
|
71 |
||
72 |
// Macros to simplify options marking |
|
73 |
#define MARK_OPTION(x,y) ( dictionary[ #x ] == #y ? "*" : " " ) |
|
74 |
||
75 |
||
76 |
bool writeToFile(const char* text, const QString &filename) |
|
77 |
{ |
|
78 |
QByteArray symFile(text); |
|
79 |
QFile file(filename); |
|
80 |
QDir dir(QFileInfo(file).absoluteDir()); |
|
81 |
if (!dir.exists()) |
|
82 |
dir.mkpath(dir.absolutePath()); |
|
83 |
if (!file.open(QFile::WriteOnly)) { |
|
84 |
cout << "Couldn't write to " << qPrintable(filename) << ": " << qPrintable(file.errorString()) |
|
85 |
<< endl; |
|
86 |
return false; |
|
87 |
} |
|
88 |
file.write(symFile); |
|
89 |
return true; |
|
90 |
} |
|
91 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
92 |
Configure::Configure(int& argc, char** argv) |
0 | 93 |
{ |
94 |
useUnixSeparators = false; |
|
95 |
// Default values for indentation |
|
96 |
optionIndent = 4; |
|
97 |
descIndent = 25; |
|
98 |
outputWidth = 0; |
|
99 |
// Get console buffer output width |
|
100 |
CONSOLE_SCREEN_BUFFER_INFO info; |
|
101 |
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE); |
|
102 |
if (GetConsoleScreenBufferInfo(hStdout, &info)) |
|
103 |
outputWidth = info.dwSize.X - 1; |
|
104 |
outputWidth = qMin(outputWidth, 79); // Anything wider gets unreadable |
|
105 |
if (outputWidth < 35) // Insanely small, just use 79 |
|
106 |
outputWidth = 79; |
|
107 |
int i; |
|
108 |
||
109 |
/* |
|
110 |
** Set up the initial state, the default |
|
111 |
*/ |
|
112 |
dictionary[ "CONFIGCMD" ] = argv[ 0 ]; |
|
113 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
114 |
for (i = 1; i < argc; i++) |
0 | 115 |
configCmdLine += argv[ i ]; |
116 |
||
117 |
||
118 |
// Get the path to the executable |
|
119 |
wchar_t module_name[MAX_PATH]; |
|
120 |
GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t)); |
|
121 |
QFileInfo sourcePathInfo = QString::fromWCharArray(module_name); |
|
122 |
sourcePath = sourcePathInfo.absolutePath(); |
|
123 |
sourceDir = sourcePathInfo.dir(); |
|
124 |
buildPath = QDir::currentPath(); |
|
125 |
#if 0 |
|
126 |
const QString installPath = QString("C:\\Qt\\%1").arg(QT_VERSION_STR); |
|
127 |
#else |
|
128 |
const QString installPath = buildPath; |
|
129 |
#endif |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
130 |
if (sourceDir != buildDir) { //shadow builds! |
0 | 131 |
if (!findFile("perl") && !findFile("perl.exe")) { |
132 |
cout << "Error: Creating a shadow build of Qt requires" << endl |
|
133 |
<< "perl to be in the PATH environment"; |
|
134 |
exit(0); // Exit cleanly for Ctrl+C |
|
135 |
} |
|
136 |
||
137 |
cout << "Preparing build tree..." << endl; |
|
138 |
QDir(buildPath).mkpath("bin"); |
|
139 |
||
140 |
{ //duplicate qmake |
|
141 |
QStack<QString> qmake_dirs; |
|
142 |
qmake_dirs.push("qmake"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
143 |
while (!qmake_dirs.isEmpty()) { |
0 | 144 |
QString dir = qmake_dirs.pop(); |
145 |
QString od(buildPath + "/" + dir); |
|
146 |
QString id(sourcePath + "/" + dir); |
|
147 |
QFileInfoList entries = QDir(id).entryInfoList(QDir::NoDotAndDotDot|QDir::AllEntries); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
148 |
for (int i = 0; i < entries.size(); ++i) { |
0 | 149 |
QFileInfo fi(entries.at(i)); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
150 |
if (fi.isDir()) { |
0 | 151 |
qmake_dirs.push(dir + "/" + fi.fileName()); |
152 |
QDir().mkpath(od + "/" + fi.fileName()); |
|
153 |
} else { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
154 |
QDir().mkpath(od); |
0 | 155 |
bool justCopy = true; |
156 |
const QString fname = fi.fileName(); |
|
157 |
const QString outFile(od + "/" + fname), inFile(id + "/" + fname); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
158 |
if (fi.fileName() == "Makefile") { //ignore |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
159 |
} else if (fi.suffix() == "h" || fi.suffix() == "cpp") { |
0 | 160 |
QTemporaryFile tmpFile; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
161 |
if (tmpFile.open()) { |
0 | 162 |
QTextStream stream(&tmpFile); |
163 |
stream << "#include \"" << inFile << "\"" << endl; |
|
164 |
justCopy = false; |
|
165 |
stream.flush(); |
|
166 |
tmpFile.flush(); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
167 |
if (filesDiffer(tmpFile.fileName(), outFile)) { |
0 | 168 |
QFile::remove(outFile); |
169 |
tmpFile.copy(outFile); |
|
170 |
} |
|
171 |
} |
|
172 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
173 |
if (justCopy && filesDiffer(inFile, outFile)) |
0 | 174 |
QFile::copy(inFile, outFile); |
175 |
} |
|
176 |
} |
|
177 |
} |
|
178 |
} |
|
179 |
||
180 |
{ //make a syncqt script(s) that can be used in the shadow |
|
181 |
QFile syncqt(buildPath + "/bin/syncqt"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
182 |
if (syncqt.open(QFile::WriteOnly)) { |
0 | 183 |
QTextStream stream(&syncqt); |
184 |
stream << "#!/usr/bin/perl -w" << endl |
|
185 |
<< "require \"" << sourcePath + "/bin/syncqt\";" << endl; |
|
186 |
} |
|
187 |
QFile syncqt_bat(buildPath + "/bin/syncqt.bat"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
188 |
if (syncqt_bat.open(QFile::WriteOnly)) { |
0 | 189 |
QTextStream stream(&syncqt_bat); |
190 |
stream << "@echo off" << endl |
|
191 |
<< "set QTDIR=" << QDir::toNativeSeparators(sourcePath) << endl |
|
192 |
<< "call " << fixSeparators(sourcePath) << fixSeparators("/bin/syncqt.bat -outdir \"") << fixSeparators(buildPath) << "\"" << endl |
|
193 |
<< "set QTDIR=" << QDir::toNativeSeparators(buildPath) << endl; |
|
194 |
syncqt_bat.close(); |
|
195 |
} |
|
196 |
} |
|
197 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
198 |
// make patch_capabilities and createpackage scripts for Symbian that can be used from the shadow build |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
199 |
QFile patch_capabilities(buildPath + "/bin/patch_capabilities"); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
200 |
if (patch_capabilities.open(QFile::WriteOnly)) { |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
201 |
QTextStream stream(&patch_capabilities); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
202 |
stream << "#!/usr/bin/perl -w" << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
203 |
<< "require \"" << sourcePath + "/bin/patch_capabilities\";" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
204 |
} |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
205 |
QFile patch_capabilities_bat(buildPath + "/bin/patch_capabilities.bat"); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
206 |
if (patch_capabilities_bat.open(QFile::WriteOnly)) { |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
207 |
QTextStream stream(&patch_capabilities_bat); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
208 |
stream << "@echo off" << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
209 |
<< "call " << fixSeparators(sourcePath) << fixSeparators("/bin/patch_capabilities.bat %*") << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
210 |
patch_capabilities_bat.close(); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
211 |
} |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
212 |
QFile createpackage(buildPath + "/bin/createpackage"); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
213 |
if (createpackage.open(QFile::WriteOnly)) { |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
214 |
QTextStream stream(&createpackage); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
215 |
stream << "#!/usr/bin/perl -w" << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
216 |
<< "require \"" << sourcePath + "/bin/createpackage\";" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
217 |
} |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
218 |
QFile createpackage_bat(buildPath + "/bin/createpackage.bat"); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
219 |
if (createpackage_bat.open(QFile::WriteOnly)) { |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
220 |
QTextStream stream(&createpackage_bat); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
221 |
stream << "@echo off" << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
222 |
<< "call " << fixSeparators(sourcePath) << fixSeparators("/bin/createpackage.bat %*") << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
223 |
createpackage_bat.close(); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
224 |
} |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
225 |
|
0 | 226 |
// For Windows CE and shadow builds we need to copy these to the |
227 |
// build directory. |
|
228 |
QFile::copy(sourcePath + "/bin/setcepaths.bat" , buildPath + "/bin/setcepaths.bat"); |
|
229 |
//copy the mkspecs |
|
230 |
buildDir.mkpath("mkspecs"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
231 |
if (!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){ |
0 | 232 |
cout << "Couldn't copy mkspecs!" << sourcePath << " " << buildPath << endl; |
233 |
dictionary["DONE"] = "error"; |
|
234 |
return; |
|
235 |
} |
|
236 |
} |
|
237 |
||
238 |
dictionary[ "QT_SOURCE_TREE" ] = fixSeparators(sourcePath); |
|
239 |
dictionary[ "QT_BUILD_TREE" ] = fixSeparators(buildPath); |
|
240 |
dictionary[ "QT_INSTALL_PREFIX" ] = fixSeparators(installPath); |
|
241 |
||
242 |
dictionary[ "QMAKESPEC" ] = getenv("QMAKESPEC"); |
|
243 |
if (dictionary[ "QMAKESPEC" ].size() == 0) { |
|
244 |
dictionary[ "QMAKESPEC" ] = Environment::detectQMakeSpec(); |
|
245 |
dictionary[ "QMAKESPEC_FROM" ] = "detected"; |
|
246 |
} else { |
|
247 |
dictionary[ "QMAKESPEC_FROM" ] = "env"; |
|
248 |
} |
|
249 |
||
250 |
dictionary[ "ARCHITECTURE" ] = "windows"; |
|
251 |
dictionary[ "QCONFIG" ] = "full"; |
|
252 |
dictionary[ "EMBEDDED" ] = "no"; |
|
253 |
dictionary[ "BUILD_QMAKE" ] = "yes"; |
|
254 |
dictionary[ "DSPFILES" ] = "yes"; |
|
255 |
dictionary[ "VCPROJFILES" ] = "yes"; |
|
256 |
dictionary[ "QMAKE_INTERNAL" ] = "no"; |
|
257 |
dictionary[ "FAST" ] = "no"; |
|
258 |
dictionary[ "NOPROCESS" ] = "no"; |
|
259 |
dictionary[ "STL" ] = "yes"; |
|
260 |
dictionary[ "EXCEPTIONS" ] = "yes"; |
|
261 |
dictionary[ "RTTI" ] = "yes"; |
|
262 |
dictionary[ "MMX" ] = "auto"; |
|
263 |
dictionary[ "3DNOW" ] = "auto"; |
|
264 |
dictionary[ "SSE" ] = "auto"; |
|
265 |
dictionary[ "SSE2" ] = "auto"; |
|
266 |
dictionary[ "IWMMXT" ] = "auto"; |
|
267 |
dictionary[ "SYNCQT" ] = "auto"; |
|
268 |
dictionary[ "CE_CRT" ] = "no"; |
|
269 |
dictionary[ "CETEST" ] = "auto"; |
|
270 |
dictionary[ "CE_SIGNATURE" ] = "no"; |
|
271 |
dictionary[ "SCRIPT" ] = "auto"; |
|
272 |
dictionary[ "SCRIPTTOOLS" ] = "auto"; |
|
273 |
dictionary[ "XMLPATTERNS" ] = "auto"; |
|
274 |
dictionary[ "PHONON" ] = "auto"; |
|
275 |
dictionary[ "PHONON_BACKEND" ] = "yes"; |
|
276 |
dictionary[ "MULTIMEDIA" ] = "yes"; |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
277 |
dictionary[ "AUDIO_BACKEND" ] = "auto"; |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
278 |
dictionary[ "WMSDK" ] = "auto"; |
0 | 279 |
dictionary[ "DIRECTSHOW" ] = "no"; |
280 |
dictionary[ "WEBKIT" ] = "auto"; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
281 |
dictionary[ "DECLARATIVE" ] = "auto"; |
0 | 282 |
dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; |
283 |
||
284 |
QString version; |
|
285 |
QFile qglobal_h(sourcePath + "/src/corelib/global/qglobal.h"); |
|
286 |
if (qglobal_h.open(QFile::ReadOnly)) { |
|
287 |
QTextStream read(&qglobal_h); |
|
288 |
QRegExp version_regexp("^# *define *QT_VERSION_STR *\"([^\"]*)\""); |
|
289 |
QString line; |
|
290 |
while (!read.atEnd()) { |
|
291 |
line = read.readLine(); |
|
292 |
if (version_regexp.exactMatch(line)) { |
|
293 |
version = version_regexp.cap(1).trimmed(); |
|
294 |
if (!version.isEmpty()) |
|
295 |
break; |
|
296 |
} |
|
297 |
} |
|
298 |
qglobal_h.close(); |
|
299 |
} |
|
300 |
||
301 |
if (version.isEmpty()) |
|
302 |
version = QString("%1.%2.%3").arg(QT_VERSION>>16).arg(((QT_VERSION>>8)&0xff)).arg(QT_VERSION&0xff); |
|
303 |
||
304 |
dictionary[ "VERSION" ] = version; |
|
305 |
{ |
|
306 |
QRegExp version_re("([0-9]*)\\.([0-9]*)\\.([0-9]*)(|-.*)"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
307 |
if (version_re.exactMatch(version)) { |
0 | 308 |
dictionary[ "VERSION_MAJOR" ] = version_re.cap(1); |
309 |
dictionary[ "VERSION_MINOR" ] = version_re.cap(2); |
|
310 |
dictionary[ "VERSION_PATCH" ] = version_re.cap(3); |
|
311 |
} |
|
312 |
} |
|
313 |
||
314 |
dictionary[ "REDO" ] = "no"; |
|
315 |
dictionary[ "DEPENDENCIES" ] = "no"; |
|
316 |
||
317 |
dictionary[ "BUILD" ] = "debug"; |
|
318 |
dictionary[ "BUILDALL" ] = "auto"; // Means yes, but not explicitly |
|
319 |
||
320 |
dictionary[ "BUILDTYPE" ] = "none"; |
|
321 |
||
322 |
dictionary[ "BUILDDEV" ] = "no"; |
|
323 |
dictionary[ "BUILDNOKIA" ] = "no"; |
|
324 |
||
325 |
dictionary[ "SHARED" ] = "yes"; |
|
326 |
||
327 |
dictionary[ "ZLIB" ] = "auto"; |
|
328 |
||
329 |
dictionary[ "GIF" ] = "auto"; |
|
330 |
dictionary[ "TIFF" ] = "auto"; |
|
331 |
dictionary[ "JPEG" ] = "auto"; |
|
332 |
dictionary[ "PNG" ] = "auto"; |
|
333 |
dictionary[ "MNG" ] = "auto"; |
|
334 |
dictionary[ "LIBTIFF" ] = "auto"; |
|
335 |
dictionary[ "LIBJPEG" ] = "auto"; |
|
336 |
dictionary[ "LIBPNG" ] = "auto"; |
|
337 |
dictionary[ "LIBMNG" ] = "auto"; |
|
338 |
dictionary[ "FREETYPE" ] = "no"; |
|
339 |
||
340 |
dictionary[ "QT3SUPPORT" ] = "yes"; |
|
341 |
dictionary[ "ACCESSIBILITY" ] = "yes"; |
|
342 |
dictionary[ "OPENGL" ] = "yes"; |
|
343 |
dictionary[ "OPENVG" ] = "no"; |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
344 |
dictionary[ "IPV6" ] = "yes"; // Always, dynamically loaded |
0 | 345 |
dictionary[ "OPENSSL" ] = "auto"; |
346 |
dictionary[ "DBUS" ] = "auto"; |
|
347 |
dictionary[ "S60" ] = "yes"; |
|
348 |
||
349 |
dictionary[ "STYLE_WINDOWS" ] = "yes"; |
|
350 |
dictionary[ "STYLE_WINDOWSXP" ] = "auto"; |
|
351 |
dictionary[ "STYLE_WINDOWSVISTA" ] = "auto"; |
|
352 |
dictionary[ "STYLE_PLASTIQUE" ] = "yes"; |
|
353 |
dictionary[ "STYLE_CLEANLOOKS" ]= "yes"; |
|
354 |
dictionary[ "STYLE_WINDOWSCE" ] = "no"; |
|
355 |
dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; |
|
356 |
dictionary[ "STYLE_MOTIF" ] = "yes"; |
|
357 |
dictionary[ "STYLE_CDE" ] = "yes"; |
|
358 |
dictionary[ "STYLE_S60" ] = "no"; |
|
359 |
dictionary[ "STYLE_GTK" ] = "no"; |
|
360 |
||
361 |
dictionary[ "SQL_MYSQL" ] = "no"; |
|
362 |
dictionary[ "SQL_ODBC" ] = "no"; |
|
363 |
dictionary[ "SQL_OCI" ] = "no"; |
|
364 |
dictionary[ "SQL_PSQL" ] = "no"; |
|
365 |
dictionary[ "SQL_TDS" ] = "no"; |
|
366 |
dictionary[ "SQL_DB2" ] = "no"; |
|
367 |
dictionary[ "SQL_SQLITE" ] = "auto"; |
|
368 |
dictionary[ "SQL_SQLITE_LIB" ] = "qt"; |
|
369 |
dictionary[ "SQL_SQLITE2" ] = "no"; |
|
370 |
dictionary[ "SQL_IBASE" ] = "no"; |
|
371 |
dictionary[ "GRAPHICS_SYSTEM" ] = "raster"; |
|
372 |
||
373 |
QString tmp = dictionary[ "QMAKESPEC" ]; |
|
374 |
if (tmp.contains("\\")) { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
375 |
tmp = tmp.mid(tmp.lastIndexOf("\\") + 1); |
0 | 376 |
} else { |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
377 |
tmp = tmp.mid(tmp.lastIndexOf("/") + 1); |
0 | 378 |
} |
379 |
dictionary[ "QMAKESPEC" ] = tmp; |
|
380 |
||
381 |
dictionary[ "INCREDIBUILD_XGE" ] = "auto"; |
|
382 |
dictionary[ "LTCG" ] = "no"; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
383 |
dictionary[ "NATIVE_GESTURES" ] = "yes"; |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
384 |
dictionary[ "MSVC_MP" ] = "no"; |
0 | 385 |
} |
386 |
||
387 |
Configure::~Configure() |
|
388 |
{ |
|
389 |
for (int i=0; i<3; ++i) { |
|
390 |
QList<MakeItem*> items = makeList[i]; |
|
391 |
for (int j=0; j<items.size(); ++j) |
|
392 |
delete items[j]; |
|
393 |
} |
|
394 |
} |
|
395 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
396 |
QString Configure::fixSeparators(const QString &somePath, bool escape) |
0 | 397 |
{ |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
398 |
if (useUnixSeparators) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
399 |
return QDir::fromNativeSeparators(somePath); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
400 |
QString ret = QDir::toNativeSeparators(somePath); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
401 |
return escape ? escapeSeparators(ret) : ret; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
402 |
} |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
403 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
404 |
QString Configure::escapeSeparators(const QString &somePath) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
405 |
{ |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
406 |
QString out = somePath; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
407 |
out.replace(QLatin1Char('\\'), QLatin1String("\\\\")); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
408 |
return out; |
0 | 409 |
} |
410 |
||
411 |
// We could use QDir::homePath() + "/.qt-license", but |
|
412 |
// that will only look in the first of $HOME,$USERPROFILE |
|
413 |
// or $HOMEDRIVE$HOMEPATH. So, here we try'em all to be |
|
414 |
// more forgiving for the end user.. |
|
415 |
QString Configure::firstLicensePath() |
|
416 |
{ |
|
417 |
QStringList allPaths; |
|
418 |
allPaths << "./.qt-license" |
|
419 |
<< QString::fromLocal8Bit(getenv("HOME")) + "/.qt-license" |
|
420 |
<< QString::fromLocal8Bit(getenv("USERPROFILE")) + "/.qt-license" |
|
421 |
<< QString::fromLocal8Bit(getenv("HOMEDRIVE")) + QString::fromLocal8Bit(getenv("HOMEPATH")) + "/.qt-license"; |
|
422 |
for (int i = 0; i< allPaths.count(); ++i) |
|
423 |
if (QFile::exists(allPaths.at(i))) |
|
424 |
return allPaths.at(i); |
|
425 |
return QString(); |
|
426 |
} |
|
427 |
||
428 |
||
429 |
// #### somehow I get a compiler error about vc++ reaching the nesting limit without |
|
430 |
// undefining the ansi for scoping. |
|
431 |
#ifdef for |
|
432 |
#undef for |
|
433 |
#endif |
|
434 |
||
435 |
void Configure::parseCmdLine() |
|
436 |
{ |
|
437 |
int argCount = configCmdLine.size(); |
|
438 |
int i = 0; |
|
439 |
||
440 |
#if !defined(EVAL) |
|
441 |
if (argCount < 1) // skip rest if no arguments |
|
442 |
; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
443 |
else if (configCmdLine.at(i) == "-redo") { |
0 | 444 |
dictionary[ "REDO" ] = "yes"; |
445 |
configCmdLine.clear(); |
|
446 |
reloadCmdLine(); |
|
447 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
448 |
else if (configCmdLine.at(i) == "-loadconfig") { |
0 | 449 |
++i; |
450 |
if (i != argCount) { |
|
451 |
dictionary[ "REDO" ] = "yes"; |
|
452 |
dictionary[ "CUSTOMCONFIG" ] = "_" + configCmdLine.at(i); |
|
453 |
configCmdLine.clear(); |
|
454 |
reloadCmdLine(); |
|
455 |
} else { |
|
456 |
dictionary[ "HELP" ] = "yes"; |
|
457 |
} |
|
458 |
i = 0; |
|
459 |
} |
|
460 |
argCount = configCmdLine.size(); |
|
461 |
#endif |
|
462 |
||
463 |
// Look first for XQMAKESPEC |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
464 |
for (int j = 0 ; j < argCount; ++j) |
0 | 465 |
{ |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
466 |
if (configCmdLine.at(j) == "-xplatform") { |
0 | 467 |
++j; |
468 |
if (j == argCount) |
|
469 |
break; |
|
470 |
dictionary["XQMAKESPEC"] = configCmdLine.at(j); |
|
471 |
if (!dictionary[ "XQMAKESPEC" ].isEmpty()) |
|
472 |
applySpecSpecifics(); |
|
473 |
} |
|
474 |
} |
|
475 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
476 |
for (; i<configCmdLine.size(); ++i) { |
0 | 477 |
bool continueElse[] = {false, false}; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
478 |
if (configCmdLine.at(i) == "-help" |
0 | 479 |
|| configCmdLine.at(i) == "-h" |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
480 |
|| configCmdLine.at(i) == "-?") |
0 | 481 |
dictionary[ "HELP" ] = "yes"; |
482 |
||
483 |
#if !defined(EVAL) |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
484 |
else if (configCmdLine.at(i) == "-qconfig") { |
0 | 485 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
486 |
if (i == argCount) |
0 | 487 |
break; |
488 |
dictionary[ "QCONFIG" ] = configCmdLine.at(i); |
|
489 |
} |
|
490 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
491 |
else if (configCmdLine.at(i) == "-buildkey") { |
0 | 492 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
493 |
if (i == argCount) |
0 | 494 |
break; |
495 |
dictionary[ "USER_BUILD_KEY" ] = configCmdLine.at(i); |
|
496 |
} |
|
497 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
498 |
else if (configCmdLine.at(i) == "-release") { |
0 | 499 |
dictionary[ "BUILD" ] = "release"; |
500 |
if (dictionary[ "BUILDALL" ] == "auto") |
|
501 |
dictionary[ "BUILDALL" ] = "no"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
502 |
} else if (configCmdLine.at(i) == "-debug") { |
0 | 503 |
dictionary[ "BUILD" ] = "debug"; |
504 |
if (dictionary[ "BUILDALL" ] == "auto") |
|
505 |
dictionary[ "BUILDALL" ] = "no"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
506 |
} else if (configCmdLine.at(i) == "-debug-and-release") |
0 | 507 |
dictionary[ "BUILDALL" ] = "yes"; |
508 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
509 |
else if (configCmdLine.at(i) == "-shared") |
0 | 510 |
dictionary[ "SHARED" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
511 |
else if (configCmdLine.at(i) == "-static") |
0 | 512 |
dictionary[ "SHARED" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
513 |
else if (configCmdLine.at(i) == "-developer-build") |
0 | 514 |
dictionary[ "BUILDDEV" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
515 |
else if (configCmdLine.at(i) == "-nokia-developer") { |
0 | 516 |
cout << "Detected -nokia-developer option" << endl; |
517 |
cout << "Nokia employees and agents are allowed to use this software under" << endl; |
|
518 |
cout << "the authority of Nokia Corporation and/or its subsidiary(-ies)" << endl; |
|
519 |
dictionary[ "BUILDNOKIA" ] = "yes"; |
|
520 |
dictionary[ "BUILDDEV" ] = "yes"; |
|
521 |
dictionary["LICENSE_CONFIRMED"] = "yes"; |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
522 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
523 |
dictionary[ "SYMBIAN_DEFFILES" ] = "no"; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
524 |
} |
0 | 525 |
} |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
526 |
else if (configCmdLine.at(i) == "-opensource") { |
0 | 527 |
dictionary[ "BUILDTYPE" ] = "opensource"; |
528 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
529 |
else if (configCmdLine.at(i) == "-commercial") { |
0 | 530 |
dictionary[ "BUILDTYPE" ] = "commercial"; |
531 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
532 |
else if (configCmdLine.at(i) == "-ltcg") { |
0 | 533 |
dictionary[ "LTCG" ] = "yes"; |
534 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
535 |
else if (configCmdLine.at(i) == "-no-ltcg") { |
0 | 536 |
dictionary[ "LTCG" ] = "no"; |
537 |
} |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
538 |
else if (configCmdLine.at(i) == "-mp") { |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
539 |
dictionary[ "MSVC_MP" ] = "yes"; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
540 |
} |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
541 |
else if (configCmdLine.at(i) == "-no-mp") { |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
542 |
dictionary[ "MSVC_MP" ] = "no"; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
543 |
} |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
544 |
|
0 | 545 |
#endif |
546 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
547 |
else if (configCmdLine.at(i) == "-platform") { |
0 | 548 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
549 |
if (i == argCount) |
0 | 550 |
break; |
551 |
dictionary[ "QMAKESPEC" ] = configCmdLine.at(i); |
|
552 |
dictionary[ "QMAKESPEC_FROM" ] = "commandline"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
553 |
} else if (configCmdLine.at(i) == "-arch") { |
0 | 554 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
555 |
if (i == argCount) |
0 | 556 |
break; |
557 |
dictionary[ "ARCHITECTURE" ] = configCmdLine.at(i); |
|
558 |
if (configCmdLine.at(i) == "boundschecker") { |
|
559 |
dictionary[ "ARCHITECTURE" ] = "generic"; // Boundschecker uses the generic arch, |
|
560 |
qtConfig += "boundschecker"; // but also needs this CONFIG option |
|
561 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
562 |
} else if (configCmdLine.at(i) == "-embedded") { |
0 | 563 |
dictionary[ "EMBEDDED" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
564 |
} else if (configCmdLine.at(i) == "-xplatform") { |
0 | 565 |
++i; |
566 |
// do nothing |
|
567 |
} |
|
568 |
||
569 |
||
570 |
#if !defined(EVAL) |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
571 |
else if (configCmdLine.at(i) == "-no-zlib") { |
0 | 572 |
// No longer supported since Qt 4.4.0 |
573 |
// But save the information for later so that we can print a warning |
|
574 |
// |
|
575 |
// If you REALLY really need no zlib support, you can still disable |
|
576 |
// it by doing the following: |
|
577 |
// add "no-zlib" to mkspecs/qconfig.pri |
|
578 |
// #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h) |
|
579 |
// |
|
580 |
// There's no guarantee that Qt will build under those conditions |
|
581 |
||
582 |
dictionary[ "ZLIB_FORCED" ] = "yes"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
583 |
} else if (configCmdLine.at(i) == "-qt-zlib") { |
0 | 584 |
dictionary[ "ZLIB" ] = "qt"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
585 |
} else if (configCmdLine.at(i) == "-system-zlib") { |
0 | 586 |
dictionary[ "ZLIB" ] = "system"; |
587 |
} |
|
588 |
||
589 |
// Image formats -------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
590 |
else if (configCmdLine.at(i) == "-no-gif") |
0 | 591 |
dictionary[ "GIF" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
592 |
else if (configCmdLine.at(i) == "-qt-gif") |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
593 |
dictionary[ "GIF" ] = "plugin"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
594 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
595 |
else if (configCmdLine.at(i) == "-no-libtiff") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
596 |
dictionary[ "TIFF"] = "no"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
597 |
dictionary[ "LIBTIFF" ] = "no"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
598 |
} else if (configCmdLine.at(i) == "-qt-libtiff") { |
0 | 599 |
dictionary[ "LIBTIFF" ] = "qt"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
600 |
} else if (configCmdLine.at(i) == "-system-libtiff") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
601 |
dictionary[ "LIBTIFF" ] = "system"; |
0 | 602 |
} |
603 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
604 |
else if (configCmdLine.at(i) == "-no-libjpeg") { |
0 | 605 |
dictionary[ "JPEG" ] = "no"; |
606 |
dictionary[ "LIBJPEG" ] = "no"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
607 |
} else if (configCmdLine.at(i) == "-qt-libjpeg") { |
0 | 608 |
dictionary[ "LIBJPEG" ] = "qt"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
609 |
} else if (configCmdLine.at(i) == "-system-libjpeg") { |
0 | 610 |
dictionary[ "LIBJPEG" ] = "system"; |
611 |
} |
|
612 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
613 |
else if (configCmdLine.at(i) == "-no-libpng") { |
0 | 614 |
dictionary[ "PNG" ] = "no"; |
615 |
dictionary[ "LIBPNG" ] = "no"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
616 |
} else if (configCmdLine.at(i) == "-qt-libpng") { |
0 | 617 |
dictionary[ "LIBPNG" ] = "qt"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
618 |
} else if (configCmdLine.at(i) == "-system-libpng") { |
0 | 619 |
dictionary[ "LIBPNG" ] = "system"; |
620 |
} |
|
621 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
622 |
else if (configCmdLine.at(i) == "-no-libmng") { |
0 | 623 |
dictionary[ "MNG" ] = "no"; |
624 |
dictionary[ "LIBMNG" ] = "no"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
625 |
} else if (configCmdLine.at(i) == "-qt-libmng") { |
0 | 626 |
dictionary[ "LIBMNG" ] = "qt"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
627 |
} else if (configCmdLine.at(i) == "-system-libmng") { |
0 | 628 |
dictionary[ "LIBMNG" ] = "system"; |
629 |
} |
|
630 |
||
631 |
// Text Rendering -------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
632 |
else if (configCmdLine.at(i) == "-no-freetype") |
0 | 633 |
dictionary[ "FREETYPE" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
634 |
else if (configCmdLine.at(i) == "-qt-freetype") |
0 | 635 |
dictionary[ "FREETYPE" ] = "yes"; |
636 |
||
637 |
// CE- C runtime -------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
638 |
else if (configCmdLine.at(i) == "-crt") { |
0 | 639 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
640 |
if (i == argCount) |
0 | 641 |
break; |
642 |
QDir cDir(configCmdLine.at(i)); |
|
643 |
if (!cDir.exists()) |
|
644 |
cout << "WARNING: Could not find directory (" << qPrintable(configCmdLine.at(i)) << ")for C runtime deployment" << endl; |
|
645 |
else |
|
646 |
dictionary[ "CE_CRT" ] = QDir::toNativeSeparators(cDir.absolutePath()); |
|
647 |
} else if (configCmdLine.at(i) == "-qt-crt") { |
|
648 |
dictionary[ "CE_CRT" ] = "yes"; |
|
649 |
} else if (configCmdLine.at(i) == "-no-crt") { |
|
650 |
dictionary[ "CE_CRT" ] = "no"; |
|
651 |
} |
|
652 |
// cetest --------------------------------------------------- |
|
653 |
else if (configCmdLine.at(i) == "-no-cetest") { |
|
654 |
dictionary[ "CETEST" ] = "no"; |
|
655 |
dictionary[ "CETEST_REQUESTED" ] = "no"; |
|
656 |
} else if (configCmdLine.at(i) == "-cetest") { |
|
657 |
// although specified to use it, we stay at "auto" state |
|
658 |
// this is because checkAvailability() adds variables |
|
659 |
// we need for crosscompilation; but remember if we asked |
|
660 |
// for it. |
|
661 |
dictionary[ "CETEST_REQUESTED" ] = "yes"; |
|
662 |
} |
|
663 |
// Qt/CE - signing tool ------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
664 |
else if (configCmdLine.at(i) == "-signature") { |
0 | 665 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
666 |
if (i == argCount) |
0 | 667 |
break; |
668 |
QFileInfo info(configCmdLine.at(i)); |
|
669 |
if (!info.exists()) |
|
670 |
cout << "WARNING: Could not find signature file (" << qPrintable(configCmdLine.at(i)) << ")" << endl; |
|
671 |
else |
|
672 |
dictionary[ "CE_SIGNATURE" ] = QDir::toNativeSeparators(info.absoluteFilePath()); |
|
673 |
} |
|
674 |
// Styles --------------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
675 |
else if (configCmdLine.at(i) == "-qt-style-windows") |
0 | 676 |
dictionary[ "STYLE_WINDOWS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
677 |
else if (configCmdLine.at(i) == "-no-style-windows") |
0 | 678 |
dictionary[ "STYLE_WINDOWS" ] = "no"; |
679 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
680 |
else if (configCmdLine.at(i) == "-qt-style-windowsce") |
0 | 681 |
dictionary[ "STYLE_WINDOWSCE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
682 |
else if (configCmdLine.at(i) == "-no-style-windowsce") |
0 | 683 |
dictionary[ "STYLE_WINDOWSCE" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
684 |
else if (configCmdLine.at(i) == "-qt-style-windowsmobile") |
0 | 685 |
dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
686 |
else if (configCmdLine.at(i) == "-no-style-windowsmobile") |
0 | 687 |
dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; |
688 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
689 |
else if (configCmdLine.at(i) == "-qt-style-windowsxp") |
0 | 690 |
dictionary[ "STYLE_WINDOWSXP" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
691 |
else if (configCmdLine.at(i) == "-no-style-windowsxp") |
0 | 692 |
dictionary[ "STYLE_WINDOWSXP" ] = "no"; |
693 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
694 |
else if (configCmdLine.at(i) == "-qt-style-windowsvista") |
0 | 695 |
dictionary[ "STYLE_WINDOWSVISTA" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
696 |
else if (configCmdLine.at(i) == "-no-style-windowsvista") |
0 | 697 |
dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; |
698 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
699 |
else if (configCmdLine.at(i) == "-qt-style-plastique") |
0 | 700 |
dictionary[ "STYLE_PLASTIQUE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
701 |
else if (configCmdLine.at(i) == "-no-style-plastique") |
0 | 702 |
dictionary[ "STYLE_PLASTIQUE" ] = "no"; |
703 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
704 |
else if (configCmdLine.at(i) == "-qt-style-cleanlooks") |
0 | 705 |
dictionary[ "STYLE_CLEANLOOKS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
706 |
else if (configCmdLine.at(i) == "-no-style-cleanlooks") |
0 | 707 |
dictionary[ "STYLE_CLEANLOOKS" ] = "no"; |
708 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
709 |
else if (configCmdLine.at(i) == "-qt-style-motif") |
0 | 710 |
dictionary[ "STYLE_MOTIF" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
711 |
else if (configCmdLine.at(i) == "-no-style-motif") |
0 | 712 |
dictionary[ "STYLE_MOTIF" ] = "no"; |
713 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
714 |
else if (configCmdLine.at(i) == "-qt-style-cde") |
0 | 715 |
dictionary[ "STYLE_CDE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
716 |
else if (configCmdLine.at(i) == "-no-style-cde") |
0 | 717 |
dictionary[ "STYLE_CDE" ] = "no"; |
718 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
719 |
else if (configCmdLine.at(i) == "-qt-style-s60") |
0 | 720 |
dictionary[ "STYLE_S60" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
721 |
else if (configCmdLine.at(i) == "-no-style-s60") |
0 | 722 |
dictionary[ "STYLE_S60" ] = "no"; |
723 |
||
724 |
// Qt 3 Support --------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
725 |
else if (configCmdLine.at(i) == "-no-qt3support") |
0 | 726 |
dictionary[ "QT3SUPPORT" ] = "no"; |
727 |
||
728 |
// Work around compiler nesting limitation |
|
729 |
else |
|
730 |
continueElse[1] = true; |
|
731 |
if (!continueElse[1]) { |
|
732 |
} |
|
733 |
||
734 |
// OpenGL Support ------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
735 |
else if (configCmdLine.at(i) == "-no-opengl") { |
0 | 736 |
dictionary[ "OPENGL" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
737 |
} else if (configCmdLine.at(i) == "-opengl-es-cm") { |
0 | 738 |
dictionary[ "OPENGL" ] = "yes"; |
739 |
dictionary[ "OPENGL_ES_CM" ] = "yes"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
740 |
} else if (configCmdLine.at(i) == "-opengl-es-2") { |
0 | 741 |
dictionary[ "OPENGL" ] = "yes"; |
742 |
dictionary[ "OPENGL_ES_2" ] = "yes"; |
|
743 |
} |
|
744 |
||
745 |
// OpenVG Support ------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
746 |
else if (configCmdLine.at(i) == "-openvg") { |
0 | 747 |
dictionary[ "OPENVG" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
748 |
} else if (configCmdLine.at(i) == "-no-openvg") { |
0 | 749 |
dictionary[ "OPENVG" ] = "no"; |
750 |
} |
|
751 |
||
752 |
// Databases ------------------------------------------------ |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
753 |
else if (configCmdLine.at(i) == "-qt-sql-mysql") |
0 | 754 |
dictionary[ "SQL_MYSQL" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
755 |
else if (configCmdLine.at(i) == "-plugin-sql-mysql") |
0 | 756 |
dictionary[ "SQL_MYSQL" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
757 |
else if (configCmdLine.at(i) == "-no-sql-mysql") |
0 | 758 |
dictionary[ "SQL_MYSQL" ] = "no"; |
759 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
760 |
else if (configCmdLine.at(i) == "-qt-sql-odbc") |
0 | 761 |
dictionary[ "SQL_ODBC" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
762 |
else if (configCmdLine.at(i) == "-plugin-sql-odbc") |
0 | 763 |
dictionary[ "SQL_ODBC" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
764 |
else if (configCmdLine.at(i) == "-no-sql-odbc") |
0 | 765 |
dictionary[ "SQL_ODBC" ] = "no"; |
766 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
767 |
else if (configCmdLine.at(i) == "-qt-sql-oci") |
0 | 768 |
dictionary[ "SQL_OCI" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
769 |
else if (configCmdLine.at(i) == "-plugin-sql-oci") |
0 | 770 |
dictionary[ "SQL_OCI" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
771 |
else if (configCmdLine.at(i) == "-no-sql-oci") |
0 | 772 |
dictionary[ "SQL_OCI" ] = "no"; |
773 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
774 |
else if (configCmdLine.at(i) == "-qt-sql-psql") |
0 | 775 |
dictionary[ "SQL_PSQL" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
776 |
else if (configCmdLine.at(i) == "-plugin-sql-psql") |
0 | 777 |
dictionary[ "SQL_PSQL" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
778 |
else if (configCmdLine.at(i) == "-no-sql-psql") |
0 | 779 |
dictionary[ "SQL_PSQL" ] = "no"; |
780 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
781 |
else if (configCmdLine.at(i) == "-qt-sql-tds") |
0 | 782 |
dictionary[ "SQL_TDS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
783 |
else if (configCmdLine.at(i) == "-plugin-sql-tds") |
0 | 784 |
dictionary[ "SQL_TDS" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
785 |
else if (configCmdLine.at(i) == "-no-sql-tds") |
0 | 786 |
dictionary[ "SQL_TDS" ] = "no"; |
787 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
788 |
else if (configCmdLine.at(i) == "-qt-sql-db2") |
0 | 789 |
dictionary[ "SQL_DB2" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
790 |
else if (configCmdLine.at(i) == "-plugin-sql-db2") |
0 | 791 |
dictionary[ "SQL_DB2" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
792 |
else if (configCmdLine.at(i) == "-no-sql-db2") |
0 | 793 |
dictionary[ "SQL_DB2" ] = "no"; |
794 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
795 |
else if (configCmdLine.at(i) == "-qt-sql-sqlite") |
0 | 796 |
dictionary[ "SQL_SQLITE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
797 |
else if (configCmdLine.at(i) == "-plugin-sql-sqlite") |
0 | 798 |
dictionary[ "SQL_SQLITE" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
799 |
else if (configCmdLine.at(i) == "-no-sql-sqlite") |
0 | 800 |
dictionary[ "SQL_SQLITE" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
801 |
else if (configCmdLine.at(i) == "-system-sqlite") |
0 | 802 |
dictionary[ "SQL_SQLITE_LIB" ] = "system"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
803 |
else if (configCmdLine.at(i) == "-qt-sql-sqlite2") |
0 | 804 |
dictionary[ "SQL_SQLITE2" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
805 |
else if (configCmdLine.at(i) == "-plugin-sql-sqlite2") |
0 | 806 |
dictionary[ "SQL_SQLITE2" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
807 |
else if (configCmdLine.at(i) == "-no-sql-sqlite2") |
0 | 808 |
dictionary[ "SQL_SQLITE2" ] = "no"; |
809 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
810 |
else if (configCmdLine.at(i) == "-qt-sql-ibase") |
0 | 811 |
dictionary[ "SQL_IBASE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
812 |
else if (configCmdLine.at(i) == "-plugin-sql-ibase") |
0 | 813 |
dictionary[ "SQL_IBASE" ] = "plugin"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
814 |
else if (configCmdLine.at(i) == "-no-sql-ibase") |
0 | 815 |
dictionary[ "SQL_IBASE" ] = "no"; |
816 |
#endif |
|
817 |
// IDE project generation ----------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
818 |
else if (configCmdLine.at(i) == "-no-dsp") |
0 | 819 |
dictionary[ "DSPFILES" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
820 |
else if (configCmdLine.at(i) == "-dsp") |
0 | 821 |
dictionary[ "DSPFILES" ] = "yes"; |
822 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
823 |
else if (configCmdLine.at(i) == "-no-vcp") |
0 | 824 |
dictionary[ "VCPFILES" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
825 |
else if (configCmdLine.at(i) == "-vcp") |
0 | 826 |
dictionary[ "VCPFILES" ] = "yes"; |
827 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
828 |
else if (configCmdLine.at(i) == "-no-vcproj") |
0 | 829 |
dictionary[ "VCPROJFILES" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
830 |
else if (configCmdLine.at(i) == "-vcproj") |
0 | 831 |
dictionary[ "VCPROJFILES" ] = "yes"; |
832 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
833 |
else if (configCmdLine.at(i) == "-no-incredibuild-xge") |
0 | 834 |
dictionary[ "INCREDIBUILD_XGE" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
835 |
else if (configCmdLine.at(i) == "-incredibuild-xge") |
0 | 836 |
dictionary[ "INCREDIBUILD_XGE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
837 |
else if (configCmdLine.at(i) == "-native-gestures") |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
838 |
dictionary[ "NATIVE_GESTURES" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
839 |
else if (configCmdLine.at(i) == "-no-native-gestures") |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
840 |
dictionary[ "NATIVE_GESTURES" ] = "no"; |
0 | 841 |
#if !defined(EVAL) |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
842 |
// Symbian Support ------------------------------------------- |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
843 |
else if (configCmdLine.at(i) == "-fpu") |
0 | 844 |
{ |
845 |
++i; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
846 |
if (i == argCount) |
0 | 847 |
break; |
848 |
dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i); |
|
849 |
} |
|
850 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
851 |
else if (configCmdLine.at(i) == "-s60") |
0 | 852 |
dictionary[ "S60" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
853 |
else if (configCmdLine.at(i) == "-no-s60") |
0 | 854 |
dictionary[ "S60" ] = "no"; |
855 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
856 |
else if (configCmdLine.at(i) == "-usedeffiles") |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
857 |
dictionary[ "SYMBIAN_DEFFILES" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
858 |
else if (configCmdLine.at(i) == "-no-usedeffiles") |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
859 |
dictionary[ "SYMBIAN_DEFFILES" ] = "no"; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
860 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
861 |
// Others --------------------------------------------------- |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
862 |
else if (configCmdLine.at(i) == "-fast") |
0 | 863 |
dictionary[ "FAST" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
864 |
else if (configCmdLine.at(i) == "-no-fast") |
0 | 865 |
dictionary[ "FAST" ] = "no"; |
866 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
867 |
else if (configCmdLine.at(i) == "-stl") |
0 | 868 |
dictionary[ "STL" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
869 |
else if (configCmdLine.at(i) == "-no-stl") |
0 | 870 |
dictionary[ "STL" ] = "no"; |
871 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
872 |
else if (configCmdLine.at(i) == "-exceptions") |
0 | 873 |
dictionary[ "EXCEPTIONS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
874 |
else if (configCmdLine.at(i) == "-no-exceptions") |
0 | 875 |
dictionary[ "EXCEPTIONS" ] = "no"; |
876 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
877 |
else if (configCmdLine.at(i) == "-rtti") |
0 | 878 |
dictionary[ "RTTI" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
879 |
else if (configCmdLine.at(i) == "-no-rtti") |
0 | 880 |
dictionary[ "RTTI" ] = "no"; |
881 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
882 |
else if (configCmdLine.at(i) == "-accessibility") |
0 | 883 |
dictionary[ "ACCESSIBILITY" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
884 |
else if (configCmdLine.at(i) == "-no-accessibility") { |
0 | 885 |
dictionary[ "ACCESSIBILITY" ] = "no"; |
886 |
cout << "Setting accessibility to NO" << endl; |
|
887 |
} |
|
888 |
||
889 |
else if (configCmdLine.at(i) == "-no-mmx") |
|
890 |
dictionary[ "MMX" ] = "no"; |
|
891 |
else if (configCmdLine.at(i) == "-mmx") |
|
892 |
dictionary[ "MMX" ] = "yes"; |
|
893 |
else if (configCmdLine.at(i) == "-no-3dnow") |
|
894 |
dictionary[ "3DNOW" ] = "no"; |
|
895 |
else if (configCmdLine.at(i) == "-3dnow") |
|
896 |
dictionary[ "3DNOW" ] = "yes"; |
|
897 |
else if (configCmdLine.at(i) == "-no-sse") |
|
898 |
dictionary[ "SSE" ] = "no"; |
|
899 |
else if (configCmdLine.at(i) == "-sse") |
|
900 |
dictionary[ "SSE" ] = "yes"; |
|
901 |
else if (configCmdLine.at(i) == "-no-sse2") |
|
902 |
dictionary[ "SSE2" ] = "no"; |
|
903 |
else if (configCmdLine.at(i) == "-sse2") |
|
904 |
dictionary[ "SSE2" ] = "yes"; |
|
905 |
else if (configCmdLine.at(i) == "-no-iwmmxt") |
|
906 |
dictionary[ "IWMMXT" ] = "no"; |
|
907 |
else if (configCmdLine.at(i) == "-iwmmxt") |
|
908 |
dictionary[ "IWMMXT" ] = "yes"; |
|
909 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
910 |
else if (configCmdLine.at(i) == "-no-openssl") { |
0 | 911 |
dictionary[ "OPENSSL"] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
912 |
} else if (configCmdLine.at(i) == "-openssl") { |
0 | 913 |
dictionary[ "OPENSSL" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
914 |
} else if (configCmdLine.at(i) == "-openssl-linked") { |
0 | 915 |
dictionary[ "OPENSSL" ] = "linked"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
916 |
} else if (configCmdLine.at(i) == "-no-qdbus") { |
0 | 917 |
dictionary[ "DBUS" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
918 |
} else if (configCmdLine.at(i) == "-qdbus") { |
0 | 919 |
dictionary[ "DBUS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
920 |
} else if (configCmdLine.at(i) == "-no-dbus") { |
0 | 921 |
dictionary[ "DBUS" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
922 |
} else if (configCmdLine.at(i) == "-dbus") { |
0 | 923 |
dictionary[ "DBUS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
924 |
} else if (configCmdLine.at(i) == "-dbus-linked") { |
0 | 925 |
dictionary[ "DBUS" ] = "linked"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
926 |
} else if (configCmdLine.at(i) == "-no-script") { |
0 | 927 |
dictionary[ "SCRIPT" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
928 |
} else if (configCmdLine.at(i) == "-script") { |
0 | 929 |
dictionary[ "SCRIPT" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
930 |
} else if (configCmdLine.at(i) == "-no-scripttools") { |
0 | 931 |
dictionary[ "SCRIPTTOOLS" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
932 |
} else if (configCmdLine.at(i) == "-scripttools") { |
0 | 933 |
dictionary[ "SCRIPTTOOLS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
934 |
} else if (configCmdLine.at(i) == "-no-xmlpatterns") { |
0 | 935 |
dictionary[ "XMLPATTERNS" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
936 |
} else if (configCmdLine.at(i) == "-xmlpatterns") { |
0 | 937 |
dictionary[ "XMLPATTERNS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
938 |
} else if (configCmdLine.at(i) == "-no-multimedia") { |
0 | 939 |
dictionary[ "MULTIMEDIA" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
940 |
} else if (configCmdLine.at(i) == "-multimedia") { |
0 | 941 |
dictionary[ "MULTIMEDIA" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
942 |
} else if (configCmdLine.at(i) == "-audio-backend") { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
943 |
dictionary[ "AUDIO_BACKEND" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
944 |
} else if (configCmdLine.at(i) == "-no-audio-backend") { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
945 |
dictionary[ "AUDIO_BACKEND" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
946 |
} else if (configCmdLine.at(i) == "-no-phonon") { |
0 | 947 |
dictionary[ "PHONON" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
948 |
} else if (configCmdLine.at(i) == "-phonon") { |
0 | 949 |
dictionary[ "PHONON" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
950 |
} else if (configCmdLine.at(i) == "-no-phonon-backend") { |
0 | 951 |
dictionary[ "PHONON_BACKEND" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
952 |
} else if (configCmdLine.at(i) == "-phonon-backend") { |
0 | 953 |
dictionary[ "PHONON_BACKEND" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
954 |
} else if (configCmdLine.at(i) == "-phonon-wince-ds9") { |
0 | 955 |
dictionary[ "DIRECTSHOW" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
956 |
} else if (configCmdLine.at(i) == "-no-webkit") { |
0 | 957 |
dictionary[ "WEBKIT" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
958 |
} else if (configCmdLine.at(i) == "-webkit") { |
0 | 959 |
dictionary[ "WEBKIT" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
960 |
} else if (configCmdLine.at(i) == "-no-declarative") { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
961 |
dictionary[ "DECLARATIVE" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
962 |
} else if (configCmdLine.at(i) == "-declarative") { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
963 |
dictionary[ "DECLARATIVE" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
964 |
} else if (configCmdLine.at(i) == "-no-plugin-manifests") { |
0 | 965 |
dictionary[ "PLUGIN_MANIFESTS" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
966 |
} else if (configCmdLine.at(i) == "-plugin-manifests") { |
0 | 967 |
dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; |
968 |
} |
|
969 |
||
970 |
// Work around compiler nesting limitation |
|
971 |
else |
|
972 |
continueElse[0] = true; |
|
973 |
if (!continueElse[0]) { |
|
974 |
} |
|
975 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
976 |
else if (configCmdLine.at(i) == "-internal") |
0 | 977 |
dictionary[ "QMAKE_INTERNAL" ] = "yes"; |
978 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
979 |
else if (configCmdLine.at(i) == "-no-qmake") |
0 | 980 |
dictionary[ "BUILD_QMAKE" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
981 |
else if (configCmdLine.at(i) == "-qmake") |
0 | 982 |
dictionary[ "BUILD_QMAKE" ] = "yes"; |
983 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
984 |
else if (configCmdLine.at(i) == "-dont-process") |
0 | 985 |
dictionary[ "NOPROCESS" ] = "yes"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
986 |
else if (configCmdLine.at(i) == "-process") |
0 | 987 |
dictionary[ "NOPROCESS" ] = "no"; |
988 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
989 |
else if (configCmdLine.at(i) == "-no-qmake-deps") |
0 | 990 |
dictionary[ "DEPENDENCIES" ] = "no"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
991 |
else if (configCmdLine.at(i) == "-qmake-deps") |
0 | 992 |
dictionary[ "DEPENDENCIES" ] = "yes"; |
993 |
||
994 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
995 |
else if (configCmdLine.at(i) == "-qtnamespace") { |
0 | 996 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
997 |
if (i == argCount) |
0 | 998 |
break; |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
999 |
dictionary[ "QT_NAMESPACE" ] = configCmdLine.at(i); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1000 |
} else if (configCmdLine.at(i) == "-qtlibinfix") { |
0 | 1001 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1002 |
if (i == argCount) |
0 | 1003 |
break; |
1004 |
dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i); |
|
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
1005 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
1006 |
dictionary[ "QT_INSTALL_PLUGINS" ] = |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
1007 |
QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]); |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
1008 |
} |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1009 |
} else if (configCmdLine.at(i) == "-D") { |
0 | 1010 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1011 |
if (i == argCount) |
0 | 1012 |
break; |
1013 |
qmakeDefines += configCmdLine.at(i); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1014 |
} else if (configCmdLine.at(i) == "-I") { |
0 | 1015 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1016 |
if (i == argCount) |
0 | 1017 |
break; |
1018 |
qmakeIncludes += configCmdLine.at(i); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1019 |
} else if (configCmdLine.at(i) == "-L") { |
0 | 1020 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1021 |
if (i == argCount) |
0 | 1022 |
break; |
1023 |
QFileInfo check(configCmdLine.at(i)); |
|
1024 |
if (!check.isDir()) { |
|
1025 |
cout << "Argument passed to -L option is not a directory path. Did you mean the -l option?" << endl; |
|
1026 |
dictionary[ "DONE" ] = "error"; |
|
1027 |
break; |
|
1028 |
} |
|
1029 |
qmakeLibs += QString("-L" + configCmdLine.at(i)); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1030 |
} else if (configCmdLine.at(i) == "-l") { |
0 | 1031 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1032 |
if (i == argCount) |
0 | 1033 |
break; |
1034 |
qmakeLibs += QString("-l" + configCmdLine.at(i)); |
|
1035 |
} else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS=")) { |
|
1036 |
opensslLibs = configCmdLine.at(i); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1037 |
} else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1038 |
psqlLibs = configCmdLine.at(i); |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1039 |
} else if (configCmdLine.at(i).startsWith("SYBASE=")) { |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1040 |
sybase = configCmdLine.at(i); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1041 |
} else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) { |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1042 |
sybaseLibs = configCmdLine.at(i); |
0 | 1043 |
} |
1044 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1045 |
else if ((configCmdLine.at(i) == "-override-version") || (configCmdLine.at(i) == "-version-override")){ |
0 | 1046 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1047 |
if (i == argCount) |
0 | 1048 |
break; |
1049 |
dictionary[ "VERSION" ] = configCmdLine.at(i); |
|
1050 |
} |
|
1051 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1052 |
else if (configCmdLine.at(i) == "-saveconfig") { |
0 | 1053 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1054 |
if (i == argCount) |
0 | 1055 |
break; |
1056 |
dictionary[ "CUSTOMCONFIG" ] = "_" + configCmdLine.at(i); |
|
1057 |
} |
|
1058 |
||
1059 |
else if (configCmdLine.at(i) == "-confirm-license") { |
|
1060 |
dictionary["LICENSE_CONFIRMED"] = "yes"; |
|
1061 |
} |
|
1062 |
||
1063 |
else if (configCmdLine.at(i) == "-nomake") { |
|
1064 |
++i; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1065 |
if (i == argCount) |
0 | 1066 |
break; |
1067 |
disabledBuildParts += configCmdLine.at(i); |
|
1068 |
} |
|
1069 |
||
1070 |
// Directories ---------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1071 |
else if (configCmdLine.at(i) == "-prefix") { |
0 | 1072 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1073 |
if (i == argCount) |
0 | 1074 |
break; |
1075 |
dictionary[ "QT_INSTALL_PREFIX" ] = configCmdLine.at(i); |
|
1076 |
} |
|
1077 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1078 |
else if (configCmdLine.at(i) == "-bindir") { |
0 | 1079 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1080 |
if (i == argCount) |
0 | 1081 |
break; |
1082 |
dictionary[ "QT_INSTALL_BINS" ] = configCmdLine.at(i); |
|
1083 |
} |
|
1084 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1085 |
else if (configCmdLine.at(i) == "-libdir") { |
0 | 1086 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1087 |
if (i == argCount) |
0 | 1088 |
break; |
1089 |
dictionary[ "QT_INSTALL_LIBS" ] = configCmdLine.at(i); |
|
1090 |
} |
|
1091 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1092 |
else if (configCmdLine.at(i) == "-docdir") { |
0 | 1093 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1094 |
if (i == argCount) |
0 | 1095 |
break; |
1096 |
dictionary[ "QT_INSTALL_DOCS" ] = configCmdLine.at(i); |
|
1097 |
} |
|
1098 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1099 |
else if (configCmdLine.at(i) == "-headerdir") { |
0 | 1100 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1101 |
if (i == argCount) |
0 | 1102 |
break; |
1103 |
dictionary[ "QT_INSTALL_HEADERS" ] = configCmdLine.at(i); |
|
1104 |
} |
|
1105 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1106 |
else if (configCmdLine.at(i) == "-plugindir") { |
0 | 1107 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1108 |
if (i == argCount) |
0 | 1109 |
break; |
1110 |
dictionary[ "QT_INSTALL_PLUGINS" ] = configCmdLine.at(i); |
|
1111 |
} |
|
1112 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1113 |
else if (configCmdLine.at(i) == "-importdir") { |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1114 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1115 |
if (i == argCount) |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1116 |
break; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1117 |
dictionary[ "QT_INSTALL_IMPORTS" ] = configCmdLine.at(i); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1118 |
} |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1119 |
else if (configCmdLine.at(i) == "-datadir") { |
0 | 1120 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1121 |
if (i == argCount) |
0 | 1122 |
break; |
1123 |
dictionary[ "QT_INSTALL_DATA" ] = configCmdLine.at(i); |
|
1124 |
} |
|
1125 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1126 |
else if (configCmdLine.at(i) == "-translationdir") { |
0 | 1127 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1128 |
if (i == argCount) |
0 | 1129 |
break; |
1130 |
dictionary[ "QT_INSTALL_TRANSLATIONS" ] = configCmdLine.at(i); |
|
1131 |
} |
|
1132 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1133 |
else if (configCmdLine.at(i) == "-examplesdir") { |
0 | 1134 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1135 |
if (i == argCount) |
0 | 1136 |
break; |
1137 |
dictionary[ "QT_INSTALL_EXAMPLES" ] = configCmdLine.at(i); |
|
1138 |
} |
|
1139 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1140 |
else if (configCmdLine.at(i) == "-demosdir") { |
0 | 1141 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1142 |
if (i == argCount) |
0 | 1143 |
break; |
1144 |
dictionary[ "QT_INSTALL_DEMOS" ] = configCmdLine.at(i); |
|
1145 |
} |
|
1146 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1147 |
else if (configCmdLine.at(i) == "-hostprefix") { |
0 | 1148 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1149 |
if (i == argCount) |
0 | 1150 |
break; |
1151 |
dictionary[ "QT_HOST_PREFIX" ] = configCmdLine.at(i); |
|
1152 |
} |
|
1153 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1154 |
else if (configCmdLine.at(i) == "-make") { |
0 | 1155 |
++i; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1156 |
if (i == argCount) |
0 | 1157 |
break; |
1158 |
dictionary[ "MAKE" ] = configCmdLine.at(i); |
|
1159 |
} |
|
1160 |
||
1161 |
else if (configCmdLine.at(i) == "-graphicssystem") { |
|
1162 |
++i; |
|
1163 |
if (i == argCount) |
|
1164 |
break; |
|
1165 |
QString system = configCmdLine.at(i); |
|
1166 |
if (system == QLatin1String("raster") |
|
1167 |
|| system == QLatin1String("opengl") |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1168 |
|| system == QLatin1String("openvg") |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1169 |
|| system == QLatin1String("runtime")) |
0 | 1170 |
dictionary["GRAPHICS_SYSTEM"] = configCmdLine.at(i); |
1171 |
} |
|
1172 |
||
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1173 |
else if (configCmdLine.at(i) == "-runtimegraphicssystem") { |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1174 |
++i; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1175 |
if (i == argCount) |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1176 |
break; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1177 |
dictionary["RUNTIME_SYSTEM"] = configCmdLine.at(i); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1178 |
} |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1179 |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1180 |
else if (configCmdLine.at(i).indexOf(QRegExp("^-(en|dis)able-")) != -1) { |
0 | 1181 |
// Scan to see if any specific modules and drivers are enabled or disabled |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1182 |
for (QStringList::Iterator module = modules.begin(); module != modules.end(); ++module) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1183 |
if (configCmdLine.at(i) == QString("-enable-") + (*module)) { |
0 | 1184 |
enabledModules += (*module); |
1185 |
break; |
|
1186 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1187 |
else if (configCmdLine.at(i) == QString("-disable-") + (*module)) { |
0 | 1188 |
disabledModules += (*module); |
1189 |
break; |
|
1190 |
} |
|
1191 |
} |
|
1192 |
} |
|
1193 |
||
1194 |
else { |
|
1195 |
dictionary[ "HELP" ] = "yes"; |
|
1196 |
cout << "Unknown option " << configCmdLine.at(i) << endl; |
|
1197 |
break; |
|
1198 |
} |
|
1199 |
||
1200 |
#endif |
|
1201 |
} |
|
1202 |
||
1203 |
// Ensure that QMAKESPEC exists in the mkspecs folder |
|
1204 |
QDir mkspec_dir = fixSeparators(sourcePath + "/mkspecs"); |
|
1205 |
QStringList mkspecs = mkspec_dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot); |
|
1206 |
||
1207 |
if (dictionary["QMAKESPEC"].toLower() == "features" |
|
1208 |
|| !mkspecs.contains(dictionary["QMAKESPEC"], Qt::CaseInsensitive)) { |
|
1209 |
dictionary[ "HELP" ] = "yes"; |
|
1210 |
if (dictionary ["QMAKESPEC_FROM"] == "commandline") { |
|
1211 |
cout << "Invalid option \"" << dictionary["QMAKESPEC"] << "\" for -platform." << endl; |
|
1212 |
} else if (dictionary ["QMAKESPEC_FROM"] == "env") { |
|
1213 |
cout << "QMAKESPEC environment variable is set to \"" << dictionary["QMAKESPEC"] |
|
1214 |
<< "\" which is not a supported platform" << endl; |
|
1215 |
} else { // was autodetected from environment |
|
1216 |
cout << "Unable to detect the platform from environment. Use -platform command line" |
|
1217 |
"argument or set the QMAKESPEC environment variable and run configure again" << endl; |
|
1218 |
} |
|
1219 |
cout << "See the README file for a list of supported operating systems and compilers." << endl; |
|
1220 |
} else { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1221 |
if (dictionary[ "QMAKESPEC" ].endsWith("-icc") || |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1222 |
dictionary[ "QMAKESPEC" ].endsWith("-msvc") || |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1223 |
dictionary[ "QMAKESPEC" ].endsWith("-msvc.net") || |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1224 |
dictionary[ "QMAKESPEC" ].endsWith("-msvc2002") || |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1225 |
dictionary[ "QMAKESPEC" ].endsWith("-msvc2003") || |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1226 |
dictionary[ "QMAKESPEC" ].endsWith("-msvc2005") || |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1227 |
dictionary[ "QMAKESPEC" ].endsWith("-msvc2008") || |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1228 |
dictionary[ "QMAKESPEC" ].endsWith("-msvc2010")) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1229 |
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake"; |
0 | 1230 |
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1231 |
} else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1232 |
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "mingw32-make"; |
0 | 1233 |
if (Environment::detectExecutable("sh.exe")) { |
1234 |
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++-sh"; |
|
1235 |
} else { |
|
1236 |
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++"; |
|
1237 |
} |
|
1238 |
} else if ( dictionary[ "QMAKESPEC" ] == QString( "win32-g++-symbian" ) ) { |
|
1239 |
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++-symbian"; |
|
1240 |
dictionary[ "MAKE" ] = "make"; |
|
1241 |
} else { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1242 |
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "make"; |
0 | 1243 |
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; |
1244 |
} |
|
1245 |
} |
|
1246 |
||
1247 |
// Tell the user how to proceed building Qt after configure finished its job |
|
1248 |
dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"]; |
|
1249 |
if (dictionary.contains("XQMAKESPEC")) { |
|
1250 |
if (dictionary["XQMAKESPEC"].startsWith("symbian")) { |
|
1251 |
dictionary["QTBUILDINSTRUCTION"] = QString("make debug-winscw|debug-armv5|release-armv5"); |
|
1252 |
} else if (dictionary["XQMAKESPEC"].startsWith("wince")) { |
|
1253 |
dictionary["QTBUILDINSTRUCTION"] = |
|
1254 |
QString("setcepaths.bat ") + dictionary["XQMAKESPEC"] + QString(" && ") + dictionary["MAKE"]; |
|
1255 |
} |
|
1256 |
} |
|
1257 |
||
1258 |
// Tell the user how to confclean before the next configure |
|
1259 |
dictionary["CONFCLEANINSTRUCTION"] = dictionary["MAKE"] + QString(" confclean"); |
|
1260 |
||
1261 |
// Ensure that -spec (XQMAKESPEC) exists in the mkspecs folder as well |
|
1262 |
if (dictionary.contains("XQMAKESPEC") && |
|
1263 |
!mkspecs.contains(dictionary["XQMAKESPEC"], Qt::CaseInsensitive)) { |
|
1264 |
dictionary["HELP"] = "yes"; |
|
1265 |
cout << "Invalid option \"" << dictionary["XQMAKESPEC"] << "\" for -xplatform." << endl; |
|
1266 |
} |
|
1267 |
||
1268 |
// Ensure that the crt to be deployed can be found |
|
1269 |
if (dictionary["CE_CRT"] != QLatin1String("yes") && dictionary["CE_CRT"] != QLatin1String("no")) { |
|
1270 |
QDir cDir(dictionary["CE_CRT"]); |
|
1271 |
QStringList entries = cDir.entryList(); |
|
1272 |
bool hasDebug = entries.contains("msvcr80.dll"); |
|
1273 |
bool hasRelease = entries.contains("msvcr80d.dll"); |
|
1274 |
if ((dictionary["BUILDALL"] == "auto") && (!hasDebug || !hasRelease)) { |
|
1275 |
cout << "Could not find debug and release c-runtime." << endl; |
|
1276 |
cout << "You need to have msvcr80.dll and msvcr80d.dll in" << endl; |
|
1277 |
cout << "the path specified. Setting to -no-crt"; |
|
1278 |
dictionary[ "CE_CRT" ] = "no"; |
|
1279 |
} else if ((dictionary["BUILD"] == "debug") && !hasDebug) { |
|
1280 |
cout << "Could not find debug c-runtime (msvcr80d.dll) in the directory specified." << endl; |
|
1281 |
cout << "Setting c-runtime automatic deployment to -no-crt" << endl; |
|
1282 |
dictionary[ "CE_CRT" ] = "no"; |
|
1283 |
} else if ((dictionary["BUILD"] == "release") && !hasRelease) { |
|
1284 |
cout << "Could not find release c-runtime (msvcr80.dll) in the directory specified." << endl; |
|
1285 |
cout << "Setting c-runtime automatic deployment to -no-crt" << endl; |
|
1286 |
dictionary[ "CE_CRT" ] = "no"; |
|
1287 |
} |
|
1288 |
} |
|
1289 |
||
1290 |
useUnixSeparators = (dictionary["QMAKESPEC"] == "win32-g++"); |
|
1291 |
||
1292 |
// Allow tests for private classes to be compiled against internal builds |
|
1293 |
if (dictionary["BUILDDEV"] == "yes") |
|
1294 |
qtConfig += "private_tests"; |
|
1295 |
||
1296 |
||
1297 |
#if !defined(EVAL) |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1298 |
for (QStringList::Iterator dis = disabledModules.begin(); dis != disabledModules.end(); ++dis) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1299 |
modules.removeAll((*dis)); |
0 | 1300 |
} |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1301 |
for (QStringList::Iterator ena = enabledModules.begin(); ena != enabledModules.end(); ++ena) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1302 |
if (modules.indexOf((*ena)) == -1) |
0 | 1303 |
modules += (*ena); |
1304 |
} |
|
1305 |
qtConfig += modules; |
|
1306 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1307 |
for (QStringList::Iterator it = disabledModules.begin(); it != disabledModules.end(); ++it) |
0 | 1308 |
qtConfig.removeAll(*it); |
1309 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1310 |
if ((dictionary[ "REDO" ] != "yes") && (dictionary[ "HELP" ] != "yes")) |
0 | 1311 |
saveCmdLine(); |
1312 |
#endif |
|
1313 |
} |
|
1314 |
||
1315 |
#if !defined(EVAL) |
|
1316 |
void Configure::validateArgs() |
|
1317 |
{ |
|
1318 |
// Validate the specified config |
|
1319 |
||
1320 |
// Get all possible configurations from the file system. |
|
1321 |
QDir dir; |
|
1322 |
QStringList filters; |
|
1323 |
filters << "qconfig-*.h"; |
|
1324 |
dir.setNameFilters(filters); |
|
1325 |
dir.setPath(sourcePath + "/src/corelib/global/"); |
|
1326 |
||
1327 |
QStringList stringList = dir.entryList(); |
|
1328 |
||
1329 |
QStringList::Iterator it; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1330 |
for (it = stringList.begin(); it != stringList.end(); ++it) |
0 | 1331 |
allConfigs << it->remove("qconfig-").remove(".h"); |
1332 |
allConfigs << "full"; |
|
1333 |
||
1334 |
// Try internal configurations first. |
|
1335 |
QStringList possible_configs = QStringList() |
|
1336 |
<< "minimal" |
|
1337 |
<< "small" |
|
1338 |
<< "medium" |
|
1339 |
<< "large" |
|
1340 |
<< "full"; |
|
1341 |
int index = possible_configs.indexOf(dictionary["QCONFIG"]); |
|
1342 |
if (index >= 0) { |
|
1343 |
for (int c = 0; c <= index; c++) { |
|
1344 |
qmakeConfig += possible_configs[c] + "-config"; |
|
1345 |
} |
|
1346 |
return; |
|
1347 |
} |
|
1348 |
||
1349 |
// If the internal configurations failed, try others. |
|
1350 |
QStringList::Iterator config; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1351 |
for (config = allConfigs.begin(); config != allConfigs.end(); ++config) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1352 |
if ((*config) == dictionary[ "QCONFIG" ]) |
0 | 1353 |
break; |
1354 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1355 |
if (config == allConfigs.end()) { |
0 | 1356 |
dictionary[ "HELP" ] = "yes"; |
1357 |
cout << "No such configuration \"" << qPrintable(dictionary[ "QCONFIG" ]) << "\"" << endl ; |
|
1358 |
} |
|
1359 |
else |
|
1360 |
qmakeConfig += (*config) + "-config"; |
|
1361 |
} |
|
1362 |
#endif |
|
1363 |
||
1364 |
||
1365 |
// Output helper functions --------------------------------[ Start ]- |
|
1366 |
/*! |
|
1367 |
Determines the length of a string token. |
|
1368 |
*/ |
|
1369 |
static int tokenLength(const char *str) |
|
1370 |
{ |
|
1371 |
if (*str == 0) |
|
1372 |
return 0; |
|
1373 |
||
1374 |
const char *nextToken = strpbrk(str, " _/\n\r"); |
|
1375 |
if (nextToken == str || !nextToken) |
|
1376 |
return 1; |
|
1377 |
||
1378 |
return int(nextToken - str); |
|
1379 |
} |
|
1380 |
||
1381 |
/*! |
|
1382 |
Prints out a string which starts at position \a startingAt, and |
|
1383 |
indents each wrapped line with \a wrapIndent characters. |
|
1384 |
The wrap point is set to the console width, unless that width |
|
1385 |
cannot be determined, or is too small. |
|
1386 |
*/ |
|
1387 |
void Configure::desc(const char *description, int startingAt, int wrapIndent) |
|
1388 |
{ |
|
1389 |
int linePos = startingAt; |
|
1390 |
||
1391 |
bool firstLine = true; |
|
1392 |
const char *nextToken = description; |
|
1393 |
while (*nextToken) { |
|
1394 |
int nextTokenLen = tokenLength(nextToken); |
|
1395 |
if (*nextToken == '\n' // Wrap on newline, duh |
|
1396 |
|| (linePos + nextTokenLen > outputWidth)) // Wrap at outputWidth |
|
1397 |
{ |
|
1398 |
printf("\n"); |
|
1399 |
linePos = 0; |
|
1400 |
firstLine = false; |
|
1401 |
if (*nextToken == '\n') |
|
1402 |
++nextToken; |
|
1403 |
continue; |
|
1404 |
} |
|
1405 |
if (!firstLine && linePos < wrapIndent) { // Indent to wrapIndent |
|
1406 |
printf("%*s", wrapIndent , ""); |
|
1407 |
linePos = wrapIndent; |
|
1408 |
if (*nextToken == ' ') { |
|
1409 |
++nextToken; |
|
1410 |
continue; |
|
1411 |
} |
|
1412 |
} |
|
1413 |
printf("%.*s", nextTokenLen, nextToken); |
|
1414 |
linePos += nextTokenLen; |
|
1415 |
nextToken += nextTokenLen; |
|
1416 |
} |
|
1417 |
} |
|
1418 |
||
1419 |
/*! |
|
1420 |
Prints out an option with its description wrapped at the |
|
1421 |
description starting point. If \a skipIndent is true, the |
|
1422 |
indentation to the option is not outputted (used by marked option |
|
1423 |
version of desc()). Extra spaces between option and its |
|
1424 |
description is filled with\a fillChar, if there's available |
|
1425 |
space. |
|
1426 |
*/ |
|
1427 |
void Configure::desc(const char *option, const char *description, bool skipIndent, char fillChar) |
|
1428 |
{ |
|
1429 |
if (!skipIndent) |
|
1430 |
printf("%*s", optionIndent, ""); |
|
1431 |
||
1432 |
int remaining = descIndent - optionIndent - strlen(option); |
|
1433 |
int wrapIndent = descIndent + qMax(0, 1 - remaining); |
|
1434 |
printf("%s", option); |
|
1435 |
||
1436 |
if (remaining > 2) { |
|
1437 |
printf(" "); // Space in front |
|
1438 |
for (int i = remaining; i > 2; --i) |
|
1439 |
printf("%c", fillChar); // Fill, if available space |
|
1440 |
} |
|
1441 |
printf(" "); // Space between option and description |
|
1442 |
||
1443 |
desc(description, wrapIndent, wrapIndent); |
|
1444 |
printf("\n"); |
|
1445 |
} |
|
1446 |
||
1447 |
/*! |
|
1448 |
Same as above, except it also marks an option with an '*', if |
|
1449 |
the option is default action. |
|
1450 |
*/ |
|
1451 |
void Configure::desc(const char *mark_option, const char *mark, const char *option, const char *description, char fillChar) |
|
1452 |
{ |
|
1453 |
const QString markedAs = dictionary.value(mark_option); |
|
1454 |
if (markedAs == "auto" && markedAs == mark) // both "auto", always => + |
|
1455 |
printf(" + "); |
|
1456 |
else if (markedAs == "auto") // setting marked as "auto" and option is default => + |
|
1457 |
printf(" %c " , (defaultTo(mark_option) == QLatin1String(mark))? '+' : ' '); |
|
1458 |
else if (QLatin1String(mark) == "auto" && markedAs != "no") // description marked as "auto" and option is available => + |
|
1459 |
printf(" %c " , checkAvailability(mark_option) ? '+' : ' '); |
|
1460 |
else // None are "auto", (markedAs == mark) => * |
|
1461 |
printf(" %c " , markedAs == QLatin1String(mark) ? '*' : ' '); |
|
1462 |
||
1463 |
desc(option, description, true, fillChar); |
|
1464 |
} |
|
1465 |
||
1466 |
/*! |
|
1467 |
Modifies the default configuration based on given -platform option. |
|
1468 |
Eg. switches to different default styles for Windows CE. |
|
1469 |
*/ |
|
1470 |
void Configure::applySpecSpecifics() |
|
1471 |
{ |
|
1472 |
if (dictionary[ "XQMAKESPEC" ].startsWith("wince")) { |
|
1473 |
dictionary[ "STYLE_WINDOWSXP" ] = "no"; |
|
1474 |
dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; |
|
1475 |
dictionary[ "STYLE_PLASTIQUE" ] = "no"; |
|
1476 |
dictionary[ "STYLE_CLEANLOOKS" ] = "no"; |
|
1477 |
dictionary[ "STYLE_WINDOWSCE" ] = "yes"; |
|
1478 |
dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes"; |
|
1479 |
dictionary[ "STYLE_MOTIF" ] = "no"; |
|
1480 |
dictionary[ "STYLE_CDE" ] = "no"; |
|
1481 |
dictionary[ "STYLE_S60" ] = "no"; |
|
1482 |
dictionary[ "FREETYPE" ] = "no"; |
|
1483 |
dictionary[ "QT3SUPPORT" ] = "no"; |
|
1484 |
dictionary[ "OPENGL" ] = "no"; |
|
1485 |
dictionary[ "OPENSSL" ] = "no"; |
|
1486 |
dictionary[ "STL" ] = "no"; |
|
1487 |
dictionary[ "EXCEPTIONS" ] = "no"; |
|
1488 |
dictionary[ "RTTI" ] = "no"; |
|
1489 |
dictionary[ "ARCHITECTURE" ] = "windowsce"; |
|
1490 |
dictionary[ "3DNOW" ] = "no"; |
|
1491 |
dictionary[ "SSE" ] = "no"; |
|
1492 |
dictionary[ "SSE2" ] = "no"; |
|
1493 |
dictionary[ "MMX" ] = "no"; |
|
1494 |
dictionary[ "IWMMXT" ] = "no"; |
|
1495 |
dictionary[ "CE_CRT" ] = "yes"; |
|
1496 |
dictionary[ "WEBKIT" ] = "no"; |
|
1497 |
dictionary[ "PHONON" ] = "yes"; |
|
1498 |
dictionary[ "DIRECTSHOW" ] = "no"; |
|
1499 |
// We only apply MMX/IWMMXT for mkspecs we know they work |
|
1500 |
if (dictionary[ "XQMAKESPEC" ].startsWith("wincewm")) { |
|
1501 |
dictionary[ "MMX" ] = "yes"; |
|
1502 |
dictionary[ "IWMMXT" ] = "yes"; |
|
1503 |
dictionary[ "DIRECTSHOW" ] = "yes"; |
|
1504 |
} |
|
1505 |
dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; |
|
1506 |
dictionary[ "QT_INSTALL_PREFIX" ] = ""; |
|
1507 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1508 |
} else if (dictionary[ "XQMAKESPEC" ].startsWith("symbian")) { |
0 | 1509 |
dictionary[ "ACCESSIBILITY" ] = "no"; |
1510 |
dictionary[ "STYLE_WINDOWSXP" ] = "no"; |
|
1511 |
dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; |
|
1512 |
dictionary[ "STYLE_PLASTIQUE" ] = "no"; |
|
1513 |
dictionary[ "STYLE_CLEANLOOKS" ] = "no"; |
|
1514 |
dictionary[ "STYLE_WINDOWSCE" ] = "no"; |
|
1515 |
dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; |
|
1516 |
dictionary[ "STYLE_MOTIF" ] = "no"; |
|
1517 |
dictionary[ "STYLE_CDE" ] = "no"; |
|
1518 |
dictionary[ "STYLE_S60" ] = "yes"; |
|
1519 |
dictionary[ "FREETYPE" ] = "no"; |
|
1520 |
dictionary[ "QT3SUPPORT" ] = "no"; |
|
1521 |
dictionary[ "OPENGL" ] = "no"; |
|
1522 |
dictionary[ "OPENSSL" ] = "yes"; |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1523 |
// We accidently enabled IPv6 for Qt Symbian in 4.6.x. However the underlying OpenC does not fully support IPV6. |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1524 |
// Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1525 |
// symbian socket engine. |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1526 |
dictionary[ "IPV6" ] = "no"; |
0 | 1527 |
dictionary[ "STL" ] = "yes"; |
1528 |
dictionary[ "EXCEPTIONS" ] = "yes"; |
|
1529 |
dictionary[ "RTTI" ] = "yes"; |
|
1530 |
dictionary[ "ARCHITECTURE" ] = "symbian"; |
|
1531 |
dictionary[ "3DNOW" ] = "no"; |
|
1532 |
dictionary[ "SSE" ] = "no"; |
|
1533 |
dictionary[ "SSE2" ] = "no"; |
|
1534 |
dictionary[ "MMX" ] = "no"; |
|
1535 |
dictionary[ "IWMMXT" ] = "no"; |
|
1536 |
dictionary[ "CE_CRT" ] = "no"; |
|
1537 |
dictionary[ "DIRECT3D" ] = "no"; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1538 |
dictionary[ "WEBKIT" ] = "yes"; |
0 | 1539 |
dictionary[ "ASSISTANT_WEBKIT" ] = "no"; |
1540 |
dictionary[ "PHONON" ] = "yes"; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1541 |
dictionary[ "XMLPATTERNS" ] = "yes"; |
0 | 1542 |
dictionary[ "QT_GLIB" ] = "no"; |
1543 |
dictionary[ "S60" ] = "yes"; |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
1544 |
dictionary[ "SYMBIAN_DEFFILES" ] = "yes"; |
0 | 1545 |
// iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested) |
1546 |
// iconv_open seems to return -1 always, so something is probably missing from the platform. |
|
1547 |
dictionary[ "QT_ICONV" ] = "no"; |
|
1548 |
dictionary[ "SCRIPTTOOLS" ] = "no"; |
|
1549 |
dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; |
|
1550 |
dictionary[ "QT_INSTALL_PREFIX" ] = ""; |
|
1551 |
dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1552 |
dictionary[ "QT_INSTALL_IMPORTS" ] = "\\resource\\qt\\imports"; |
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
1553 |
dictionary[ "QT_INSTALL_TRANSLATIONS" ] = "\\resource\\qt\\translations"; |
0 | 1554 |
dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; |
1555 |
dictionary[ "SQL_SQLITE" ] = "yes"; |
|
1556 |
dictionary[ "SQL_SQLITE_LIB" ] = "system"; |
|
1557 |
||
1558 |
// Disable building docs and translations for now |
|
1559 |
disabledBuildParts << "docs" << "translations"; |
|
1560 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1561 |
} else if (dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong. |
0 | 1562 |
//TODO |
1563 |
dictionary[ "STYLE_WINDOWSXP" ] = "no"; |
|
1564 |
dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; |
|
1565 |
dictionary[ "KBD_DRIVERS" ] = "tty"; |
|
1566 |
dictionary[ "GFX_DRIVERS" ] = "linuxfb vnc"; |
|
1567 |
dictionary[ "MOUSE_DRIVERS" ] = "pc linuxtp"; |
|
1568 |
dictionary[ "QT3SUPPORT" ] = "no"; |
|
1569 |
dictionary[ "OPENGL" ] = "no"; |
|
1570 |
dictionary[ "EXCEPTIONS" ] = "no"; |
|
1571 |
dictionary[ "DBUS"] = "no"; |
|
1572 |
dictionary[ "QT_QWS_DEPTH" ] = "4 8 16 24 32"; |
|
1573 |
dictionary[ "QT_SXE" ] = "no"; |
|
1574 |
dictionary[ "QT_INOTIFY" ] = "no"; |
|
1575 |
dictionary[ "QT_LPR" ] = "no"; |
|
1576 |
dictionary[ "QT_CUPS" ] = "no"; |
|
1577 |
dictionary[ "QT_GLIB" ] = "no"; |
|
1578 |
dictionary[ "QT_ICONV" ] = "no"; |
|
1579 |
||
1580 |
dictionary["DECORATIONS"] = "default windows styled"; |
|
1581 |
} |
|
1582 |
} |
|
1583 |
||
1584 |
QString Configure::locateFileInPaths(const QString &fileName, const QStringList &paths) |
|
1585 |
{ |
|
1586 |
QDir d; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1587 |
for (QStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it) { |
0 | 1588 |
// Remove any leading or trailing ", this is commonly used in the environment |
1589 |
// variables |
|
1590 |
QString path = (*it); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1591 |
if (path.startsWith("\"")) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1592 |
path = path.right(path.length() - 1); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1593 |
if (path.endsWith("\"")) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1594 |
path = path.left(path.length() - 1); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1595 |
if (d.exists(path + QDir::separator() + fileName)) { |
0 | 1596 |
return (path); |
1597 |
} |
|
1598 |
} |
|
1599 |
return QString(); |
|
1600 |
} |
|
1601 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1602 |
QString Configure::locateFile(const QString &fileName) |
0 | 1603 |
{ |
1604 |
QString file = fileName.toLower(); |
|
1605 |
QStringList paths; |
|
1606 |
#if defined(Q_OS_WIN32) |
|
1607 |
QRegExp splitReg("[;,]"); |
|
1608 |
#else |
|
1609 |
QRegExp splitReg("[:]"); |
|
1610 |
#endif |
|
1611 |
if (file.endsWith(".h")) |
|
1612 |
paths = QString::fromLocal8Bit(getenv("INCLUDE")).split(splitReg, QString::SkipEmptyParts); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1613 |
else if (file.endsWith(".lib")) |
0 | 1614 |
paths = QString::fromLocal8Bit(getenv("LIB")).split(splitReg, QString::SkipEmptyParts); |
1615 |
else |
|
1616 |
paths = QString::fromLocal8Bit(getenv("PATH")).split(splitReg, QString::SkipEmptyParts); |
|
1617 |
return locateFileInPaths(file, paths); |
|
1618 |
} |
|
1619 |
||
1620 |
// Output helper functions ---------------------------------[ Stop ]- |
|
1621 |
||
1622 |
||
1623 |
bool Configure::displayHelp() |
|
1624 |
{ |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1625 |
if (dictionary[ "HELP" ] == "yes") { |
0 | 1626 |
desc("Usage: configure [-buildkey <key>]\n" |
1627 |
// desc("Usage: configure [-prefix dir] [-bindir <dir>] [-libdir <dir>]\n" |
|
1628 |
// "[-docdir <dir>] [-headerdir <dir>] [-plugindir <dir>]\n" |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1629 |
// "[-importdir <dir>] [-datadir <dir>] [-translationdir <dir>]\n" |
0 | 1630 |
// "[-examplesdir <dir>] [-demosdir <dir>][-buildkey <key>]\n" |
1631 |
"[-release] [-debug] [-debug-and-release] [-shared] [-static]\n" |
|
1632 |
"[-no-fast] [-fast] [-no-exceptions] [-exceptions]\n" |
|
1633 |
"[-no-accessibility] [-accessibility] [-no-rtti] [-rtti]\n" |
|
1634 |
"[-no-stl] [-stl] [-no-sql-<driver>] [-qt-sql-<driver>]\n" |
|
1635 |
"[-plugin-sql-<driver>] [-system-sqlite] [-arch <arch>]\n" |
|
1636 |
"[-D <define>] [-I <includepath>] [-L <librarypath>]\n" |
|
1637 |
"[-help] [-no-dsp] [-dsp] [-no-vcproj] [-vcproj]\n" |
|
1638 |
"[-no-qmake] [-qmake] [-dont-process] [-process]\n" |
|
1639 |
"[-no-style-<style>] [-qt-style-<style>] [-redo]\n" |
|
1640 |
"[-saveconfig <config>] [-loadconfig <config>]\n" |
|
1641 |
"[-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libpng]\n" |
|
1642 |
"[-qt-libpng] [-system-libpng] [-no-libtiff] [-qt-libtiff]\n" |
|
1643 |
"[-system-libtiff] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg]\n" |
|
1644 |
"[-no-libmng] [-qt-libmng] [-system-libmng] [-no-qt3support] [-mmx]\n" |
|
1645 |
"[-no-mmx] [-3dnow] [-no-3dnow] [-sse] [-no-sse] [-sse2] [-no-sse2]\n" |
|
1646 |
"[-no-iwmmxt] [-iwmmxt] [-openssl] [-openssl-linked]\n" |
|
1647 |
"[-no-openssl] [-no-dbus] [-dbus] [-dbus-linked] [-platform <spec>]\n" |
|
1648 |
"[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n" |
|
1649 |
"[-phonon] [-no-phonon-backend] [-phonon-backend]\n" |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1650 |
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n" |
0 | 1651 |
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n" |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1652 |
"[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7); |
0 | 1653 |
|
1654 |
desc("Installation options:\n\n"); |
|
1655 |
||
1656 |
#if !defined(EVAL) |
|
1657 |
/* |
|
1658 |
desc(" These are optional, but you may specify install directories.\n\n", 0, 1); |
|
1659 |
||
1660 |
desc( "-prefix dir", "This will install everything relative to dir\n(default $QT_INSTALL_PREFIX)\n"); |
|
1661 |
||
1662 |
desc(" You may use these to separate different parts of the install:\n\n", 0, 1); |
|
1663 |
||
1664 |
desc( "-bindir <dir>", "Executables will be installed to dir\n(default PREFIX/bin)"); |
|
1665 |
desc( "-libdir <dir>", "Libraries will be installed to dir\n(default PREFIX/lib)"); |
|
1666 |
desc( "-docdir <dir>", "Documentation will be installed to dir\n(default PREFIX/doc)"); |
|
1667 |
desc( "-headerdir <dir>", "Headers will be installed to dir\n(default PREFIX/include)"); |
|
1668 |
desc( "-plugindir <dir>", "Plugins will be installed to dir\n(default PREFIX/plugins)"); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1669 |
desc( "-importdir <dir>", "Imports for QML will be installed to dir\n(default PREFIX/imports)"); |
0 | 1670 |
desc( "-datadir <dir>", "Data used by Qt programs will be installed to dir\n(default PREFIX)"); |
1671 |
desc( "-translationdir <dir>","Translations of Qt programs will be installed to dir\n(default PREFIX/translations)\n"); |
|
1672 |
desc( "-examplesdir <dir>", "Examples will be installed to dir\n(default PREFIX/examples)"); |
|
1673 |
desc( "-demosdir <dir>", "Demos will be installed to dir\n(default PREFIX/demos)"); |
|
1674 |
*/ |
|
1675 |
desc(" You may use these options to turn on strict plugin loading:\n\n", 0, 1); |
|
1676 |
||
1677 |
desc( "-buildkey <key>", "Build the Qt library and plugins using the specified <key>. " |
|
1678 |
"When the library loads plugins, it will only load those that have a matching <key>.\n"); |
|
1679 |
||
1680 |
desc("Configure options:\n\n"); |
|
1681 |
||
1682 |
desc(" The defaults (*) are usually acceptable. A plus (+) denotes a default value" |
|
1683 |
" that needs to be evaluated. If the evaluation succeeds, the feature is" |
|
1684 |
" included. Here is a short explanation of each option:\n\n", 0, 1); |
|
1685 |
||
1686 |
desc("BUILD", "release","-release", "Compile and link Qt with debugging turned off."); |
|
1687 |
desc("BUILD", "debug", "-debug", "Compile and link Qt with debugging turned on."); |
|
1688 |
desc("BUILDALL", "yes", "-debug-and-release", "Compile and link two Qt libraries, with and without debugging turned on.\n"); |
|
1689 |
||
1690 |
desc("OPENSOURCE", "opensource", "-opensource", "Compile and link the Open-Source Edition of Qt."); |
|
1691 |
desc("COMMERCIAL", "commercial", "-commercial", "Compile and link the Commercial Edition of Qt.\n"); |
|
1692 |
||
1693 |
desc("BUILDDEV", "yes", "-developer-build", "Compile and link Qt with Qt developer options (including auto-tests exporting)\n"); |
|
1694 |
||
1695 |
desc("SHARED", "yes", "-shared", "Create and use shared Qt libraries."); |
|
1696 |
desc("SHARED", "no", "-static", "Create and use static Qt libraries.\n"); |
|
1697 |
||
1698 |
desc("LTCG", "yes", "-ltcg", "Use Link Time Code Generation. (Release builds only)"); |
|
1699 |
desc("LTCG", "no", "-no-ltcg", "Do not use Link Time Code Generation.\n"); |
|
1700 |
||
1701 |
desc("FAST", "no", "-no-fast", "Configure Qt normally by generating Makefiles for all project files."); |
|
1702 |
desc("FAST", "yes", "-fast", "Configure Qt quickly by generating Makefiles only for library and " |
|
1703 |
"subdirectory targets. All other Makefiles are created as wrappers " |
|
1704 |
"which will in turn run qmake\n"); |
|
1705 |
||
1706 |
desc("EXCEPTIONS", "no", "-no-exceptions", "Disable exceptions on platforms that support it."); |
|
1707 |
desc("EXCEPTIONS", "yes","-exceptions", "Enable exceptions on platforms that support it.\n"); |
|
1708 |
||
1709 |
desc("ACCESSIBILITY", "no", "-no-accessibility", "Do not compile Windows Active Accessibility support."); |
|
1710 |
desc("ACCESSIBILITY", "yes", "-accessibility", "Compile Windows Active Accessibility support.\n"); |
|
1711 |
||
1712 |
desc("STL", "no", "-no-stl", "Do not compile STL support."); |
|
1713 |
desc("STL", "yes", "-stl", "Compile STL support.\n"); |
|
1714 |
||
1715 |
desc( "-no-sql-<driver>", "Disable SQL <driver> entirely, by default none are turned on."); |
|
1716 |
desc( "-qt-sql-<driver>", "Enable a SQL <driver> in the Qt Library."); |
|
1717 |
desc( "-plugin-sql-<driver>", "Enable SQL <driver> as a plugin to be linked to at run time.\n" |
|
1718 |
"Available values for <driver>:"); |
|
1719 |
desc("SQL_MYSQL", "auto", "", " mysql", ' '); |
|
1720 |
desc("SQL_PSQL", "auto", "", " psql", ' '); |
|
1721 |
desc("SQL_OCI", "auto", "", " oci", ' '); |
|
1722 |
desc("SQL_ODBC", "auto", "", " odbc", ' '); |
|
1723 |
desc("SQL_TDS", "auto", "", " tds", ' '); |
|
1724 |
desc("SQL_DB2", "auto", "", " db2", ' '); |
|
1725 |
desc("SQL_SQLITE", "auto", "", " sqlite", ' '); |
|
1726 |
desc("SQL_SQLITE2", "auto", "", " sqlite2", ' '); |
|
1727 |
desc("SQL_IBASE", "auto", "", " ibase", ' '); |
|
1728 |
desc( "", "(drivers marked with a '+' have been detected as available on this system)\n", false, ' '); |
|
1729 |
||
1730 |
desc( "-system-sqlite", "Use sqlite from the operating system.\n"); |
|
1731 |
||
1732 |
desc("QT3SUPPORT", "no","-no-qt3support", "Disables the Qt 3 support functionality.\n"); |
|
1733 |
desc("OPENGL", "no","-no-opengl", "Disables OpenGL functionality\n"); |
|
1734 |
||
1735 |
desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality\n"); |
|
1736 |
desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality"); |
|
1737 |
desc( "", "Requires EGL support, typically supplied by an OpenGL", false, ' '); |
|
1738 |
desc( "", "or other graphics implementation\n", false, ' '); |
|
1739 |
||
1740 |
#endif |
|
1741 |
desc( "-platform <spec>", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n"); |
|
1742 |
desc( "-xplatform <spec>", "The operating system and compiler you are cross compiling to.\n"); |
|
1743 |
desc( "", "See the README file for a list of supported operating systems and compilers.\n", false, ' '); |
|
1744 |
||
1745 |
#if !defined(EVAL) |
|
1746 |
desc( "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}"); |
|
1747 |
desc( "-qtlibinfix <infix>", "Renames all Qt* libs to Qt*<infix>\n"); |
|
1748 |
desc( "-D <define>", "Add an explicit define to the preprocessor."); |
|
1749 |
desc( "-I <includepath>", "Add an explicit include path."); |
|
1750 |
desc( "-L <librarypath>", "Add an explicit library path."); |
|
1751 |
desc( "-l <libraryname>", "Add an explicit library name, residing in a librarypath.\n"); |
|
1752 |
#endif |
|
1753 |
desc( "-graphicssystem <sys>", "Specify which graphicssystem should be used.\n" |
|
1754 |
"Available values for <sys>:"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1755 |
desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' '); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1756 |
desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' '); |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1757 |
desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!\n", ' '); |
0 | 1758 |
|
1759 |
desc( "-help, -h, -?", "Display this information.\n"); |
|
1760 |
||
1761 |
#if !defined(EVAL) |
|
1762 |
// 3rd party stuff options go below here -------------------------------------------------------------------------------- |
|
1763 |
desc("Third Party Libraries:\n\n"); |
|
1764 |
||
1765 |
desc("ZLIB", "qt", "-qt-zlib", "Use the zlib bundled with Qt."); |
|
1766 |
desc("ZLIB", "system", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n"); |
|
1767 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1768 |
desc("GIF", "no", "-no-gif", "Do not compile GIF reading support."); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1769 |
desc("GIF", "auto", "-qt-gif", "Compile GIF reading support.\nSee also src/gui/image/qgifhandler_p.h\n"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1770 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1771 |
desc("LIBPNG", "no", "-no-libpng", "Do not compile PNG support."); |
0 | 1772 |
desc("LIBPNG", "qt", "-qt-libpng", "Use the libpng bundled with Qt."); |
1773 |
desc("LIBPNG", "system","-system-libpng", "Use libpng from the operating system.\nSee http://www.libpng.org/pub/png\n"); |
|
1774 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1775 |
desc("LIBMNG", "no", "-no-libmng", "Do not compile MNG support."); |
0 | 1776 |
desc("LIBMNG", "qt", "-qt-libmng", "Use the libmng bundled with Qt."); |
1777 |
desc("LIBMNG", "system","-system-libmng", "Use libmng from the operating system.\nSee See http://www.libmng.com\n"); |
|
1778 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1779 |
desc("LIBTIFF", "no", "-no-libtiff", "Do not compile TIFF support."); |
0 | 1780 |
desc("LIBTIFF", "qt", "-qt-libtiff", "Use the libtiff bundled with Qt."); |
1781 |
desc("LIBTIFF", "system","-system-libtiff", "Use libtiff from the operating system.\nSee http://www.libtiff.org\n"); |
|
1782 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1783 |
desc("LIBJPEG", "no", "-no-libjpeg", "Do not compile JPEG support."); |
0 | 1784 |
desc("LIBJPEG", "qt", "-qt-libjpeg", "Use the libjpeg bundled with Qt."); |
1785 |
desc("LIBJPEG", "system","-system-libjpeg", "Use libjpeg from the operating system.\nSee http://www.ijg.org\n"); |
|
1786 |
||
1787 |
#endif |
|
1788 |
// Qt\Windows only options go below here -------------------------------------------------------------------------------- |
|
1789 |
desc("Qt for Windows only:\n\n"); |
|
1790 |
||
1791 |
desc("DSPFILES", "no", "-no-dsp", "Do not generate VC++ .dsp files."); |
|
1792 |
desc("DSPFILES", "yes", "-dsp", "Generate VC++ .dsp files, only if spec \"win32-msvc\".\n"); |
|
1793 |
||
1794 |
desc("VCPROJFILES", "no", "-no-vcproj", "Do not generate VC++ .vcproj files."); |
|
1795 |
desc("VCPROJFILES", "yes", "-vcproj", "Generate VC++ .vcproj files, only if platform \"win32-msvc.net\".\n"); |
|
1796 |
||
1797 |
desc("INCREDIBUILD_XGE", "no", "-no-incredibuild-xge", "Do not add IncrediBuild XGE distribution commands to custom build steps."); |
|
1798 |
desc("INCREDIBUILD_XGE", "yes", "-incredibuild-xge", "Add IncrediBuild XGE distribution commands to custom build steps. This will distribute MOC and UIC steps, and other custom buildsteps which are added to the INCREDIBUILD_XGE variable.\n(The IncrediBuild distribution commands are only added to Visual Studio projects)\n"); |
|
1799 |
||
1800 |
desc("PLUGIN_MANIFESTS", "no", "-no-plugin-manifests", "Do not embed manifests in plugins."); |
|
1801 |
desc("PLUGIN_MANIFESTS", "yes", "-plugin-manifests", "Embed manifests in plugins.\n"); |
|
1802 |
||
1803 |
#if !defined(EVAL) |
|
1804 |
desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake."); |
|
1805 |
desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n"); |
|
1806 |
||
1807 |
desc("NOPROCESS", "yes", "-dont-process", "Do not generate Makefiles/Project files. This will override -no-fast if specified."); |
|
1808 |
desc("NOPROCESS", "no", "-process", "Generate Makefiles/Project files.\n"); |
|
1809 |
||
1810 |
desc("RTTI", "no", "-no-rtti", "Do not compile runtime type information."); |
|
1811 |
desc("RTTI", "yes", "-rtti", "Compile runtime type information.\n"); |
|
1812 |
desc("MMX", "no", "-no-mmx", "Do not compile with use of MMX instructions"); |
|
1813 |
desc("MMX", "yes", "-mmx", "Compile with use of MMX instructions"); |
|
1814 |
desc("3DNOW", "no", "-no-3dnow", "Do not compile with use of 3DNOW instructions"); |
|
1815 |
desc("3DNOW", "yes", "-3dnow", "Compile with use of 3DNOW instructions"); |
|
1816 |
desc("SSE", "no", "-no-sse", "Do not compile with use of SSE instructions"); |
|
1817 |
desc("SSE", "yes", "-sse", "Compile with use of SSE instructions"); |
|
1818 |
desc("SSE2", "no", "-no-sse2", "Do not compile with use of SSE2 instructions"); |
|
1819 |
desc("SSE2", "yes", "-sse2", "Compile with use of SSE2 instructions"); |
|
1820 |
desc("OPENSSL", "no", "-no-openssl", "Do not compile in OpenSSL support"); |
|
1821 |
desc("OPENSSL", "yes", "-openssl", "Compile in run-time OpenSSL support"); |
|
1822 |
desc("OPENSSL", "linked","-openssl-linked", "Compile in linked OpenSSL support"); |
|
1823 |
desc("DBUS", "no", "-no-dbus", "Do not compile in D-Bus support"); |
|
1824 |
desc("DBUS", "yes", "-dbus", "Compile in D-Bus support and load libdbus-1 dynamically"); |
|
1825 |
desc("DBUS", "linked", "-dbus-linked", "Compile in D-Bus support and link to libdbus-1"); |
|
1826 |
desc("PHONON", "no", "-no-phonon", "Do not compile in the Phonon module"); |
|
1827 |
desc("PHONON", "yes", "-phonon", "Compile the Phonon module (Phonon is built if a decent C++ compiler is used.)"); |
|
1828 |
desc("PHONON_BACKEND","no", "-no-phonon-backend","Do not compile the platform-specific Phonon backend-plugin"); |
|
1829 |
desc("PHONON_BACKEND","yes","-phonon-backend", "Compile in the platform-specific Phonon backend-plugin"); |
|
1830 |
desc("MULTIMEDIA", "no", "-no-multimedia", "Do not compile the multimedia module"); |
|
1831 |
desc("MULTIMEDIA", "yes","-multimedia", "Compile in multimedia module"); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1832 |
desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into QtMultimedia"); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1833 |
desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia"); |
0 | 1834 |
desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module"); |
1835 |
desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)"); |
|
1836 |
desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module."); |
|
1837 |
desc("SCRIPT", "yes", "-script", "Build the QtScript module."); |
|
1838 |
desc("SCRIPTTOOLS", "no", "-no-scripttools", "Do not build the QtScriptTools module."); |
|
1839 |
desc("SCRIPTTOOLS", "yes", "-scripttools", "Build the QtScriptTools module."); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1840 |
desc("DECLARATIVE", "no", "-no-declarative", "Do not build the declarative module"); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1841 |
desc("DECLARATIVE", "yes", "-declarative", "Build the declarative module"); |
0 | 1842 |
|
1843 |
desc( "-arch <arch>", "Specify an architecture.\n" |
|
1844 |
"Available values for <arch>:"); |
|
1845 |
desc("ARCHITECTURE","windows", "", " windows", ' '); |
|
1846 |
desc("ARCHITECTURE","windowsce", "", " windowsce", ' '); |
|
1847 |
desc("ARCHITECTURE","symbian", "", " symbian", ' '); |
|
1848 |
desc("ARCHITECTURE","boundschecker", "", " boundschecker", ' '); |
|
1849 |
desc("ARCHITECTURE","generic", "", " generic\n", ' '); |
|
1850 |
||
1851 |
desc( "-no-style-<style>", "Disable <style> entirely."); |
|
1852 |
desc( "-qt-style-<style>", "Enable <style> in the Qt Library.\nAvailable styles: "); |
|
1853 |
||
1854 |
desc("STYLE_WINDOWS", "yes", "", " windows", ' '); |
|
1855 |
desc("STYLE_WINDOWSXP", "auto", "", " windowsxp", ' '); |
|
1856 |
desc("STYLE_WINDOWSVISTA", "auto", "", " windowsvista", ' '); |
|
1857 |
desc("STYLE_PLASTIQUE", "yes", "", " plastique", ' '); |
|
1858 |
desc("STYLE_CLEANLOOKS", "yes", "", " cleanlooks", ' '); |
|
1859 |
desc("STYLE_MOTIF", "yes", "", " motif", ' '); |
|
1860 |
desc("STYLE_CDE", "yes", "", " cde", ' '); |
|
1861 |
desc("STYLE_WINDOWSCE", "yes", "", " windowsce", ' '); |
|
1862 |
desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile", ' '); |
|
1863 |
desc("STYLE_S60" , "yes", "", " s60\n", ' '); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1864 |
desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7."); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
1865 |
desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7."); |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1866 |
desc("MSVC_MP", "no", "-no-mp", "Do not use multiple processors for compiling with MSVC"); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
1867 |
desc("MSVC_MP", "yes", "-mp", "Use multiple processors for compiling with MSVC (-MP)"); |
0 | 1868 |
|
1869 |
/* We do not support -qconfig on Windows yet |
|
1870 |
||
1871 |
desc( "-qconfig <local>", "Use src/tools/qconfig-local.h rather than the default.\nPossible values for local:"); |
|
1872 |
for (int i=0; i<allConfigs.size(); ++i) |
|
1873 |
desc( "", qPrintable(QString(" %1").arg(allConfigs.at(i))), false, ' '); |
|
1874 |
printf("\n"); |
|
1875 |
*/ |
|
1876 |
#endif |
|
1877 |
desc( "-loadconfig <config>", "Run configure with the parameters from file configure_<config>.cache."); |
|
1878 |
desc( "-saveconfig <config>", "Run configure and save the parameters in file configure_<config>.cache."); |
|
1879 |
desc( "-redo", "Run configure with the same parameters as last time.\n"); |
|
1880 |
||
1881 |
// Qt\Windows CE only options go below here ----------------------------------------------------------------------------- |
|
1882 |
desc("Qt for Windows CE only:\n\n"); |
|
1883 |
desc("IWMMXT", "no", "-no-iwmmxt", "Do not compile with use of IWMMXT instructions"); |
|
1884 |
desc("IWMMXT", "yes", "-iwmmxt", "Do compile with use of IWMMXT instructions (Qt for Windows CE on Arm only)"); |
|
1885 |
desc("CE_CRT", "no", "-no-crt" , "Do not add the C runtime to default deployment rules"); |
|
1886 |
desc("CE_CRT", "yes", "-qt-crt", "Qt identifies C runtime during project generation"); |
|
1887 |
desc( "-crt <path>", "Specify path to C runtime used for project generation."); |
|
1888 |
desc("CETEST", "no", "-no-cetest", "Do not compile Windows CE remote test application"); |
|
1889 |
desc("CETEST", "yes", "-cetest", "Compile Windows CE remote test application"); |
|
1890 |
desc( "-signature <file>", "Use file for signing the target project"); |
|
1891 |
desc("OPENGL_ES_CM", "no", "-opengl-es-cm", "Enable support for OpenGL ES Common"); |
|
1892 |
desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0"); |
|
1893 |
desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE"); |
|
1894 |
||
1895 |
// Qt\Symbian only options go below here ----------------------------------------------------------------------------- |
|
1896 |
desc("Qt for Symbian OS only:\n\n"); |
|
1897 |
desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support."); |
|
1898 |
desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt."); |
|
1899 |
desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2"); |
|
1900 |
desc("S60", "no", "-no-s60", "Do not compile in S60 support."); |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
1901 |
desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework"); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
1902 |
desc("SYMBIAN_DEFFILES", "no", "-no-usedeffiles", "Disable the usage of DEF files."); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
1903 |
desc("SYMBIAN_DEFFILES", "yes", "-usedeffiles", "Enable the usage of DEF files.\n"); |
0 | 1904 |
return true; |
1905 |
} |
|
1906 |
return false; |
|
1907 |
} |
|
1908 |
||
1909 |
QString Configure::findFileInPaths(const QString &fileName, const QString &paths) |
|
1910 |
{ |
|
1911 |
#if defined(Q_OS_WIN32) |
|
1912 |
QRegExp splitReg("[;,]"); |
|
1913 |
#else |
|
1914 |
QRegExp splitReg("[:]"); |
|
1915 |
#endif |
|
1916 |
QStringList pathList = paths.split(splitReg, QString::SkipEmptyParts); |
|
1917 |
QDir d; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1918 |
for (QStringList::ConstIterator it = pathList.begin(); it != pathList.end(); ++it) { |
0 | 1919 |
// Remove any leading or trailing ", this is commonly used in the environment |
1920 |
// variables |
|
1921 |
QString path = (*it); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1922 |
if (path.startsWith('\"')) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1923 |
path = path.right(path.length() - 1); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1924 |
if (path.endsWith('\"')) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1925 |
path = path.left(path.length() - 1); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1926 |
if (d.exists(path + QDir::separator() + fileName)) |
0 | 1927 |
return path; |
1928 |
} |
|
1929 |
return QString(); |
|
1930 |
} |
|
1931 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1932 |
bool Configure::findFile(const QString &fileName) |
0 | 1933 |
{ |
1934 |
const QString file = fileName.toLower(); |
|
1935 |
const QString pathEnvVar = QString::fromLocal8Bit(getenv("PATH")); |
|
1936 |
const QString mingwPath = dictionary["QMAKESPEC"].endsWith("-g++") ? |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1937 |
findFileInPaths("g++.exe", pathEnvVar) : QString(); |
0 | 1938 |
|
1939 |
QString paths; |
|
1940 |
if (file.endsWith(".h")) { |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1941 |
if (!mingwPath.isNull()) { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1942 |
if (!findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1943 |
return true; |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1944 |
//now let's try the additional compiler path |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1945 |
QDir mingwLibDir = mingwPath + QLatin1String("/../lib/gcc/mingw32"); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1946 |
foreach(const QFileInfo &version, mingwLibDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1947 |
if (!findFileInPaths(file, version.absoluteFilePath() + QLatin1String("/include")).isNull()) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1948 |
return true; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1949 |
} |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
1950 |
} |
0 | 1951 |
paths = QString::fromLocal8Bit(getenv("INCLUDE")); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1952 |
} else if (file.endsWith(".lib") || file.endsWith(".a")) { |
0 | 1953 |
if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../lib")).isNull()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1954 |
return true; |
0 | 1955 |
paths = QString::fromLocal8Bit(getenv("LIB")); |
1956 |
} else { |
|
1957 |
paths = pathEnvVar; |
|
1958 |
} |
|
1959 |
return !findFileInPaths(file, paths).isNull(); |
|
1960 |
} |
|
1961 |
||
1962 |
/*! |
|
1963 |
Default value for options marked as "auto" if the test passes. |
|
1964 |
(Used both by the autoDetection() below, and the desc() function |
|
1965 |
to mark (+) the default option of autodetecting options. |
|
1966 |
*/ |
|
1967 |
QString Configure::defaultTo(const QString &option) |
|
1968 |
{ |
|
1969 |
// We prefer using the system version of the 3rd party libs |
|
1970 |
if (option == "ZLIB" |
|
1971 |
|| option == "LIBJPEG" |
|
1972 |
|| option == "LIBPNG" |
|
1973 |
|| option == "LIBMNG" |
|
1974 |
|| option == "LIBTIFF") |
|
1975 |
return "system"; |
|
1976 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1977 |
// PNG is always built-in, never a plugin |
0 | 1978 |
if (option == "PNG") |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1979 |
return "yes"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1980 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1981 |
// These database drivers and image formats can be built-in or plugins. |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1982 |
// Prefer plugins when Qt is shared. |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1983 |
if (dictionary[ "SHARED" ] == "yes") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1984 |
if (option == "SQL_MYSQL" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1985 |
|| option == "SQL_MYSQL" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1986 |
|| option == "SQL_ODBC" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1987 |
|| option == "SQL_OCI" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1988 |
|| option == "SQL_PSQL" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1989 |
|| option == "SQL_TDS" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1990 |
|| option == "SQL_DB2" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1991 |
|| option == "SQL_SQLITE" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1992 |
|| option == "SQL_SQLITE2" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1993 |
|| option == "SQL_IBASE" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1994 |
|| option == "JPEG" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1995 |
|| option == "MNG" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1996 |
|| option == "TIFF" |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1997 |
|| option == "GIF") |
0 | 1998 |
return "plugin"; |
1999 |
} |
|
2000 |
||
2001 |
// By default we do not want to compile OCI driver when compiling with |
|
2002 |
// MinGW, due to lack of such support from Oracle. It prob. wont work. |
|
2003 |
// (Customer may force the use though) |
|
2004 |
if (dictionary["QMAKESPEC"].endsWith("-g++") |
|
2005 |
&& option == "SQL_OCI") |
|
2006 |
return "no"; |
|
2007 |
||
2008 |
if (option == "SYNCQT" |
|
2009 |
&& (!QFile::exists(sourcePath + "/bin/syncqt") || |
|
2010 |
!QFile::exists(sourcePath + "/bin/syncqt.bat"))) |
|
2011 |
return "no"; |
|
2012 |
||
2013 |
return "yes"; |
|
2014 |
} |
|
2015 |
||
2016 |
/*! |
|
2017 |
Checks the system for the availability of a feature. |
|
2018 |
Returns true if the feature is available, else false. |
|
2019 |
*/ |
|
2020 |
bool Configure::checkAvailability(const QString &part) |
|
2021 |
{ |
|
2022 |
bool available = false; |
|
2023 |
if (part == "STYLE_WINDOWSXP") |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2024 |
available = findFile("uxtheme.h"); |
0 | 2025 |
|
2026 |
else if (part == "ZLIB") |
|
2027 |
available = findFile("zlib.h"); |
|
2028 |
||
2029 |
else if (part == "LIBJPEG") |
|
2030 |
available = findFile("jpeglib.h"); |
|
2031 |
else if (part == "LIBPNG") |
|
2032 |
available = findFile("png.h"); |
|
2033 |
else if (part == "LIBMNG") |
|
2034 |
available = findFile("libmng.h"); |
|
2035 |
else if (part == "LIBTIFF") |
|
2036 |
available = findFile("tiffio.h"); |
|
2037 |
else if (part == "SQL_MYSQL") |
|
2038 |
available = findFile("mysql.h") && findFile("libmySQL.lib"); |
|
2039 |
else if (part == "SQL_ODBC") |
|
2040 |
available = findFile("sql.h") && findFile("sqlext.h") && findFile("odbc32.lib"); |
|
2041 |
else if (part == "SQL_OCI") |
|
2042 |
available = findFile("oci.h") && findFile("oci.lib"); |
|
2043 |
else if (part == "SQL_PSQL") |
|
2044 |
available = findFile("libpq-fe.h") && findFile("libpq.lib") && findFile("ws2_32.lib") && findFile("advapi32.lib"); |
|
2045 |
else if (part == "SQL_TDS") |
|
2046 |
available = findFile("sybfront.h") && findFile("sybdb.h") && findFile("ntwdblib.lib"); |
|
2047 |
else if (part == "SQL_DB2") |
|
2048 |
available = findFile("sqlcli.h") && findFile("sqlcli1.h") && findFile("db2cli.lib"); |
|
2049 |
else if (part == "SQL_SQLITE") |
|
2050 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) |
|
2051 |
available = false; // In Symbian we only support system sqlite option |
|
2052 |
else |
|
2053 |
available = true; // Built in, we have a fork |
|
2054 |
else if (part == "SQL_SQLITE_LIB") { |
|
2055 |
if (dictionary[ "SQL_SQLITE_LIB" ] == "system") { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2056 |
// Symbian has multiple .lib/.dll files we need to find |
0 | 2057 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2058 |
available = true; // There is sqlite_symbian plugin which exports the necessary stuff |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2059 |
dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2060 |
} else { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2061 |
available = findFile("sqlite3.h") && findFile("sqlite3.lib"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2062 |
if (available) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2063 |
dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2064 |
} |
0 | 2065 |
} else |
2066 |
available = true; |
|
2067 |
} else if (part == "SQL_SQLITE2") |
|
2068 |
available = findFile("sqlite.h") && findFile("sqlite.lib"); |
|
2069 |
else if (part == "SQL_IBASE") |
|
2070 |
available = findFile("ibase.h") && (findFile("gds32_ms.lib") || findFile("gds32.lib")); |
|
2071 |
else if (part == "IWMMXT") |
|
2072 |
available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); |
|
2073 |
else if (part == "OPENGL_ES_CM") |
|
2074 |
available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); |
|
2075 |
else if (part == "OPENGL_ES_2") |
|
2076 |
available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); |
|
2077 |
else if (part == "DIRECTSHOW") |
|
2078 |
available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); |
|
2079 |
else if (part == "SSE2") |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2080 |
available = (dictionary.value("QMAKESPEC") != "win32-msvc"); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2081 |
else if (part == "3DNOW") |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2082 |
available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-icc") && findFile("mm3dnow.h"); |
0 | 2083 |
else if (part == "MMX" || part == "SSE") |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2084 |
available = (dictionary.value("QMAKESPEC") != "win32-msvc"); |
0 | 2085 |
else if (part == "OPENSSL") |
2086 |
available = findFile("openssl\\ssl.h"); |
|
2087 |
else if (part == "DBUS") |
|
2088 |
available = findFile("dbus\\dbus.h"); |
|
2089 |
else if (part == "CETEST") { |
|
2090 |
QString rapiHeader = locateFile("rapi.h"); |
|
2091 |
QString rapiLib = locateFile("rapi.lib"); |
|
2092 |
available = (dictionary[ "ARCHITECTURE" ] == "windowsce") && !rapiHeader.isEmpty() && !rapiLib.isEmpty(); |
|
2093 |
if (available) { |
|
2094 |
dictionary[ "QT_CE_RAPI_INC" ] += QLatin1String("\"") + rapiHeader + QLatin1String("\""); |
|
2095 |
dictionary[ "QT_CE_RAPI_LIB" ] += QLatin1String("\"") + rapiLib + QLatin1String("\""); |
|
2096 |
} |
|
2097 |
else if (dictionary[ "CETEST_REQUESTED" ] == "yes") { |
|
2098 |
cout << "cetest could not be enabled: rapi.h and rapi.lib could not be found." << endl; |
|
2099 |
cout << "Make sure the environment is set up for compiling with ActiveSync." << endl; |
|
2100 |
dictionary[ "DONE" ] = "error"; |
|
2101 |
} |
|
2102 |
} |
|
2103 |
else if (part == "INCREDIBUILD_XGE") |
|
2104 |
available = findFile("BuildConsole.exe") && findFile("xgConsole.exe"); |
|
2105 |
else if (part == "XMLPATTERNS") |
|
2106 |
{ |
|
2107 |
/* MSVC 6.0 and MSVC 2002/7.0 has too poor C++ support for QtXmlPatterns. */ |
|
2108 |
return dictionary.value("QMAKESPEC") != "win32-msvc" |
|
2109 |
&& dictionary.value("QMAKESPEC") != "win32-msvc.net" // Leave for now, since we can't be sure if they are using 2002 or 2003 with this spec |
|
2110 |
&& dictionary.value("QMAKESPEC") != "win32-msvc2002" |
|
2111 |
&& dictionary.value("EXCEPTIONS") == "yes"; |
|
2112 |
} else if (part == "PHONON") { |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2113 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2114 |
available = true; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2115 |
} else { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2116 |
available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h") |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2117 |
&& (findFile("strmiids.lib") || findFile("libstrmiids.a")) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2118 |
&& (findFile("dmoguids.lib") || findFile("libdmoguids.a")) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2119 |
&& (findFile("msdmo.lib") || findFile("libmsdmo.a")) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2120 |
&& findFile("d3d9.h"); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2121 |
|
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2122 |
if (!available) { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2123 |
cout << "All the required DirectShow/Direct3D files couldn't be found." << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2124 |
<< "Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed." << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2125 |
<< "If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2126 |
if (!findFile("vmr9.h")) cout << "vmr9.h not found" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2127 |
if (!findFile("dshow.h")) cout << "dshow.h not found" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2128 |
if (!findFile("strmiids.lib")) cout << "strmiids.lib not found" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2129 |
if (!findFile("dmoguids.lib")) cout << "dmoguids.lib not found" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2130 |
if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2131 |
if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2132 |
} |
0 | 2133 |
} |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2134 |
} else if (part == "WMSDK") { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2135 |
available = findFile("wmsdk.h"); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2136 |
} else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS" || part == "DECLARATIVE") { |
0 | 2137 |
available = true; |
2138 |
} else if (part == "WEBKIT") { |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2139 |
available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-msvc2010") || (dictionary.value("QMAKESPEC") == "win32-g++"); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2140 |
if (dictionary[ "SHARED" ] == "no") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2141 |
cout << endl << "WARNING: Using static linking will disable the WebKit module." << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2142 |
<< endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2143 |
available = false; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2144 |
} |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2145 |
} else if (part == "AUDIO_BACKEND") { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2146 |
available = true; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2147 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2148 |
QString epocRoot = Environment::symbianEpocRoot(); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2149 |
const QDir epocRootDir(epocRoot); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2150 |
if (epocRootDir.exists()) { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2151 |
QStringList paths; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2152 |
paths << "epoc32/release/armv5/lib/mmfdevsound.dso" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2153 |
<< "epoc32/release/armv5/lib/mmfdevsound.lib" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2154 |
<< "epoc32/release/winscw/udeb/mmfdevsound.dll" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2155 |
<< "epoc32/release/winscw/udeb/mmfdevsound.lib" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2156 |
<< "epoc32/include/mmf/server/sounddevice.h"; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2157 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2158 |
QStringList::iterator i = paths.begin(); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2159 |
while (i != paths.end()) { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2160 |
const QString &path = epocRoot + *i; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2161 |
if (QFile::exists(path)) |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2162 |
i = paths.erase(i); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2163 |
else |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2164 |
++i; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2165 |
} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2166 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2167 |
available = (paths.size() == 0); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2168 |
if (!available) { |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2169 |
if (epocRoot.isEmpty()) |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2170 |
epocRoot = "<empty string>"; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2171 |
cout << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2172 |
<< "The QtMultimedia audio backend will not be built because required" << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2173 |
<< "support for CMMFDevSound was not found in the SDK." << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2174 |
<< "The SDK which was examined was located at the following path:" << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2175 |
<< " " << epocRoot << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2176 |
<< "The following required files were missing from the SDK:" << endl; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2177 |
QString path; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2178 |
foreach (path, paths) |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2179 |
cout << " " << path << endl; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2180 |
cout << endl; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2181 |
} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2182 |
} else { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2183 |
cout << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2184 |
<< "The SDK root was determined to be '" << epocRoot << "'." << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2185 |
<< "This directory was not found, so the SDK could not be checked for" << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2186 |
<< "CMMFDevSound support. The QtMultimedia audio backend will therefore" << endl |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2187 |
<< "not be built." << endl << endl; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2188 |
available = false; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2189 |
} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2190 |
} |
0 | 2191 |
} |
2192 |
||
2193 |
return available; |
|
2194 |
} |
|
2195 |
||
2196 |
/* |
|
2197 |
Autodetect options marked as "auto". |
|
2198 |
*/ |
|
2199 |
void Configure::autoDetection() |
|
2200 |
{ |
|
2201 |
// Style detection |
|
2202 |
if (dictionary["STYLE_WINDOWSXP"] == "auto") |
|
2203 |
dictionary["STYLE_WINDOWSXP"] = checkAvailability("STYLE_WINDOWSXP") ? defaultTo("STYLE_WINDOWSXP") : "no"; |
|
2204 |
if (dictionary["STYLE_WINDOWSVISTA"] == "auto") // Vista style has the same requirements as XP style |
|
2205 |
dictionary["STYLE_WINDOWSVISTA"] = checkAvailability("STYLE_WINDOWSXP") ? defaultTo("STYLE_WINDOWSVISTA") : "no"; |
|
2206 |
||
2207 |
// Compression detection |
|
2208 |
if (dictionary["ZLIB"] == "auto") |
|
2209 |
dictionary["ZLIB"] = checkAvailability("ZLIB") ? defaultTo("ZLIB") : "qt"; |
|
2210 |
||
2211 |
// Image format detection |
|
2212 |
if (dictionary["GIF"] == "auto") |
|
2213 |
dictionary["GIF"] = defaultTo("GIF"); |
|
2214 |
if (dictionary["JPEG"] == "auto") |
|
2215 |
dictionary["JPEG"] = defaultTo("JPEG"); |
|
2216 |
if (dictionary["PNG"] == "auto") |
|
2217 |
dictionary["PNG"] = defaultTo("PNG"); |
|
2218 |
if (dictionary["MNG"] == "auto") |
|
2219 |
dictionary["MNG"] = defaultTo("MNG"); |
|
2220 |
if (dictionary["TIFF"] == "auto") |
|
2221 |
dictionary["TIFF"] = dictionary["ZLIB"] == "no" ? "no" : defaultTo("TIFF"); |
|
2222 |
if (dictionary["LIBJPEG"] == "auto") |
|
2223 |
dictionary["LIBJPEG"] = checkAvailability("LIBJPEG") ? defaultTo("LIBJPEG") : "qt"; |
|
2224 |
if (dictionary["LIBPNG"] == "auto") |
|
2225 |
dictionary["LIBPNG"] = checkAvailability("LIBPNG") ? defaultTo("LIBPNG") : "qt"; |
|
2226 |
if (dictionary["LIBMNG"] == "auto") |
|
2227 |
dictionary["LIBMNG"] = checkAvailability("LIBMNG") ? defaultTo("LIBMNG") : "qt"; |
|
2228 |
if (dictionary["LIBTIFF"] == "auto") |
|
2229 |
dictionary["LIBTIFF"] = checkAvailability("LIBTIFF") ? defaultTo("LIBTIFF") : "qt"; |
|
2230 |
||
2231 |
// SQL detection (not on by default) |
|
2232 |
if (dictionary["SQL_MYSQL"] == "auto") |
|
2233 |
dictionary["SQL_MYSQL"] = checkAvailability("SQL_MYSQL") ? defaultTo("SQL_MYSQL") : "no"; |
|
2234 |
if (dictionary["SQL_ODBC"] == "auto") |
|
2235 |
dictionary["SQL_ODBC"] = checkAvailability("SQL_ODBC") ? defaultTo("SQL_ODBC") : "no"; |
|
2236 |
if (dictionary["SQL_OCI"] == "auto") |
|
2237 |
dictionary["SQL_OCI"] = checkAvailability("SQL_OCI") ? defaultTo("SQL_OCI") : "no"; |
|
2238 |
if (dictionary["SQL_PSQL"] == "auto") |
|
2239 |
dictionary["SQL_PSQL"] = checkAvailability("SQL_PSQL") ? defaultTo("SQL_PSQL") : "no"; |
|
2240 |
if (dictionary["SQL_TDS"] == "auto") |
|
2241 |
dictionary["SQL_TDS"] = checkAvailability("SQL_TDS") ? defaultTo("SQL_TDS") : "no"; |
|
2242 |
if (dictionary["SQL_DB2"] == "auto") |
|
2243 |
dictionary["SQL_DB2"] = checkAvailability("SQL_DB2") ? defaultTo("SQL_DB2") : "no"; |
|
2244 |
if (dictionary["SQL_SQLITE"] == "auto") |
|
2245 |
dictionary["SQL_SQLITE"] = checkAvailability("SQL_SQLITE") ? defaultTo("SQL_SQLITE") : "no"; |
|
2246 |
if (dictionary["SQL_SQLITE_LIB"] == "system") |
|
2247 |
if (!checkAvailability("SQL_SQLITE_LIB")) |
|
2248 |
dictionary["SQL_SQLITE_LIB"] = "no"; |
|
2249 |
if (dictionary["SQL_SQLITE2"] == "auto") |
|
2250 |
dictionary["SQL_SQLITE2"] = checkAvailability("SQL_SQLITE2") ? defaultTo("SQL_SQLITE2") : "no"; |
|
2251 |
if (dictionary["SQL_IBASE"] == "auto") |
|
2252 |
dictionary["SQL_IBASE"] = checkAvailability("SQL_IBASE") ? defaultTo("SQL_IBASE") : "no"; |
|
2253 |
if (dictionary["MMX"] == "auto") |
|
2254 |
dictionary["MMX"] = checkAvailability("MMX") ? "yes" : "no"; |
|
2255 |
if (dictionary["3DNOW"] == "auto") |
|
2256 |
dictionary["3DNOW"] = checkAvailability("3DNOW") ? "yes" : "no"; |
|
2257 |
if (dictionary["SSE"] == "auto") |
|
2258 |
dictionary["SSE"] = checkAvailability("SSE") ? "yes" : "no"; |
|
2259 |
if (dictionary["SSE2"] == "auto") |
|
2260 |
dictionary["SSE2"] = checkAvailability("SSE2") ? "yes" : "no"; |
|
2261 |
if (dictionary["IWMMXT"] == "auto") |
|
2262 |
dictionary["IWMMXT"] = checkAvailability("IWMMXT") ? "yes" : "no"; |
|
2263 |
if (dictionary["OPENSSL"] == "auto") |
|
2264 |
dictionary["OPENSSL"] = checkAvailability("OPENSSL") ? "yes" : "no"; |
|
2265 |
if (dictionary["DBUS"] == "auto") |
|
2266 |
dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no"; |
|
2267 |
if (dictionary["SCRIPT"] == "auto") |
|
2268 |
dictionary["SCRIPT"] = checkAvailability("SCRIPT") ? "yes" : "no"; |
|
2269 |
if (dictionary["SCRIPTTOOLS"] == "auto") |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2270 |
dictionary["SCRIPTTOOLS"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; |
0 | 2271 |
if (dictionary["XMLPATTERNS"] == "auto") |
2272 |
dictionary["XMLPATTERNS"] = checkAvailability("XMLPATTERNS") ? "yes" : "no"; |
|
2273 |
if (dictionary["PHONON"] == "auto") |
|
2274 |
dictionary["PHONON"] = checkAvailability("PHONON") ? "yes" : "no"; |
|
2275 |
if (dictionary["WEBKIT"] == "auto") |
|
2276 |
dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no"; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2277 |
if (dictionary["DECLARATIVE"] == "auto") |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2278 |
dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2279 |
if (dictionary["AUDIO_BACKEND"] == "auto") |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2280 |
dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2281 |
if (dictionary["WMSDK"] == "auto") |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2282 |
dictionary["WMSDK"] = checkAvailability("WMSDK") ? "yes" : "no"; |
0 | 2283 |
|
2284 |
// Qt/WinCE remote test application |
|
2285 |
if (dictionary["CETEST"] == "auto") |
|
2286 |
dictionary["CETEST"] = checkAvailability("CETEST") ? "yes" : "no"; |
|
2287 |
||
2288 |
// Detection of IncrediBuild buildconsole |
|
2289 |
if (dictionary["INCREDIBUILD_XGE"] == "auto") |
|
2290 |
dictionary["INCREDIBUILD_XGE"] = checkAvailability("INCREDIBUILD_XGE") ? "yes" : "no"; |
|
2291 |
||
2292 |
// Mark all unknown "auto" to the default value.. |
|
2293 |
for (QMap<QString,QString>::iterator i = dictionary.begin(); i != dictionary.end(); ++i) { |
|
2294 |
if (i.value() == "auto") |
|
2295 |
i.value() = defaultTo(i.key()); |
|
2296 |
} |
|
2297 |
} |
|
2298 |
||
2299 |
bool Configure::verifyConfiguration() |
|
2300 |
{ |
|
2301 |
if (dictionary["SQL_SQLITE_LIB"] == "no" && dictionary["SQL_SQLITE"] != "no") { |
|
2302 |
cout << "WARNING: Configure could not detect the presence of a system SQLite3 lib." << endl |
|
2303 |
<< "Configure will therefore continue with the SQLite3 lib bundled with Qt." << endl |
|
2304 |
<< "(Press any key to continue..)"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2305 |
if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) |
0 | 2306 |
exit(0); // Exit cleanly for Ctrl+C |
2307 |
||
2308 |
dictionary["SQL_SQLITE_LIB"] = "qt"; // Set to Qt's bundled lib an continue |
|
2309 |
} |
|
2310 |
if (dictionary["QMAKESPEC"].endsWith("-g++") |
|
2311 |
&& dictionary["SQL_OCI"] != "no") { |
|
2312 |
cout << "WARNING: Qt does not support compiling the Oracle database driver with" << endl |
|
2313 |
<< "MinGW, due to lack of such support from Oracle. Consider disabling the" << endl |
|
2314 |
<< "Oracle driver, as the current build will most likely fail." << endl; |
|
2315 |
cout << "(Press any key to continue..)"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2316 |
if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) |
0 | 2317 |
exit(0); // Exit cleanly for Ctrl+C |
2318 |
} |
|
2319 |
if (dictionary["QMAKESPEC"].endsWith("win32-msvc.net")) { |
|
2320 |
cout << "WARNING: The makespec win32-msvc.net is deprecated. Consider using" << endl |
|
2321 |
<< "win32-msvc2002 or win32-msvc2003 instead." << endl; |
|
2322 |
cout << "(Press any key to continue..)"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2323 |
if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) |
0 | 2324 |
exit(0); // Exit cleanly for Ctrl+C |
2325 |
} |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2326 |
if (0 != dictionary["ARM_FPU_TYPE"].size()) { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2327 |
QStringList l= QStringList() |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2328 |
<< "softvfp" |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2329 |
<< "softvfp+vfpv2" |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2330 |
<< "vfpv2"; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2331 |
if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2332 |
cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2333 |
} |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2334 |
if (dictionary["DECLARATIVE"] == "yes" && dictionary["SCRIPT"] == "no") { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2335 |
cout << "WARNING: To be able to compile QtDeclarative we need to also compile the" << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2336 |
<< "QtScript module. If you continue, we will turn on the QtScript module." << endl |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2337 |
<< "(Press any key to continue..)"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2338 |
if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2339 |
exit(0); // Exit cleanly for Ctrl+C |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2340 |
|
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2341 |
dictionary["SCRIPT"] = "yes"; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2342 |
} |
0 | 2343 |
|
2344 |
return true; |
|
2345 |
} |
|
2346 |
||
2347 |
/* |
|
2348 |
Things that affect the Qt API/ABI: |
|
2349 |
Options: |
|
2350 |
minimal-config small-config medium-config large-config full-config |
|
2351 |
||
2352 |
Options: |
|
2353 |
debug release |
|
2354 |
stl |
|
2355 |
||
2356 |
Things that do not affect the Qt API/ABI: |
|
2357 |
system-jpeg no-jpeg jpeg |
|
2358 |
system-mng no-mng mng |
|
2359 |
system-png no-png png |
|
2360 |
system-zlib no-zlib zlib |
|
2361 |
system-tiff no-tiff tiff |
|
2362 |
no-gif gif |
|
2363 |
dll staticlib |
|
2364 |
||
2365 |
nocrosscompiler |
|
2366 |
GNUmake |
|
2367 |
largefile |
|
2368 |
nis |
|
2369 |
nas |
|
2370 |
tablet |
|
2371 |
ipv6 |
|
2372 |
||
2373 |
X11 : x11sm xinerama xcursor xfixes xrandr xrender fontconfig xkb |
|
2374 |
Embedded: embedded freetype |
|
2375 |
*/ |
|
2376 |
void Configure::generateBuildKey() |
|
2377 |
{ |
|
2378 |
QString spec = dictionary["QMAKESPEC"]; |
|
2379 |
||
2380 |
QString compiler = "msvc"; // ICC is compatible |
|
2381 |
if (spec.endsWith("-g++")) |
|
2382 |
compiler = "mingw"; |
|
2383 |
else if (spec.endsWith("-borland")) |
|
2384 |
compiler = "borland"; |
|
2385 |
||
2386 |
// Build options which changes the Qt API/ABI |
|
2387 |
QStringList build_options; |
|
2388 |
if (!dictionary["QCONFIG"].isEmpty()) |
|
2389 |
build_options += dictionary["QCONFIG"] + "-config "; |
|
2390 |
build_options.sort(); |
|
2391 |
||
2392 |
// Sorted defines that start with QT_NO_ |
|
2393 |
QStringList build_defines = qmakeDefines.filter(QRegExp("^QT_NO_")); |
|
2394 |
build_defines.sort(); |
|
2395 |
||
2396 |
// Build up the QT_BUILD_KEY ifdef |
|
2397 |
QString buildKey = "QT_BUILD_KEY \""; |
|
2398 |
if (!dictionary["USER_BUILD_KEY"].isEmpty()) |
|
2399 |
buildKey += dictionary["USER_BUILD_KEY"] + " "; |
|
2400 |
||
2401 |
QString build32Key = buildKey + "Windows " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" "); |
|
2402 |
QString build64Key = buildKey + "Windows x64 " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" "); |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2403 |
QString buildSymbianKey = buildKey + "Symbian " + build_options.join(" ") + " " + build_defines.join(" "); |
0 | 2404 |
build32Key = build32Key.simplified(); |
2405 |
build64Key = build64Key.simplified(); |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2406 |
buildSymbianKey = buildSymbianKey.simplified(); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2407 |
build32Key.prepend("# define "); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2408 |
build64Key.prepend("# define "); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2409 |
buildSymbianKey.prepend("# define "); |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2410 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2411 |
QString buildkey = "#if defined(__SYMBIAN32__)\n" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2412 |
+ buildSymbianKey + "\"\n" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2413 |
"#else\n" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2414 |
// Debug builds |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2415 |
"# if (!QT_NO_DEBUG)\n" |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2416 |
"# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" |
0 | 2417 |
+ build64Key.arg("debug") + "\"\n" |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2418 |
"# else\n" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2419 |
+ build32Key.arg("debug") + "\"\n" |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2420 |
"# endif\n" |
0 | 2421 |
"# else\n" |
2422 |
// Release builds |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2423 |
"# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" |
0 | 2424 |
+ build64Key.arg("release") + "\"\n" |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2425 |
"# else\n" |
0 | 2426 |
+ build32Key.arg("release") + "\"\n" |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2427 |
"# endif\n" |
0 | 2428 |
"# endif\n" |
2429 |
"#endif\n"; |
|
2430 |
||
2431 |
dictionary["BUILD_KEY"] = buildkey; |
|
2432 |
} |
|
2433 |
||
2434 |
void Configure::generateOutputVars() |
|
2435 |
{ |
|
2436 |
// Generate variables for output |
|
2437 |
// Build key ---------------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2438 |
if (dictionary.contains("BUILD_KEY")) { |
0 | 2439 |
qmakeVars += dictionary.value("BUILD_KEY"); |
2440 |
} |
|
2441 |
||
2442 |
QString build = dictionary[ "BUILD" ]; |
|
2443 |
bool buildAll = (dictionary[ "BUILDALL" ] == "yes"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2444 |
if (build == "debug") { |
0 | 2445 |
if (buildAll) |
2446 |
qtConfig += "release"; |
|
2447 |
qtConfig += "debug"; |
|
2448 |
} else if (build == "release") { |
|
2449 |
if (buildAll) |
|
2450 |
qtConfig += "debug"; |
|
2451 |
qtConfig += "release"; |
|
2452 |
} |
|
2453 |
||
2454 |
// Compression -------------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2455 |
if (dictionary[ "ZLIB" ] == "qt") |
0 | 2456 |
qtConfig += "zlib"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2457 |
else if (dictionary[ "ZLIB" ] == "system") |
0 | 2458 |
qtConfig += "system-zlib"; |
2459 |
||
2460 |
// Image formates ----------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2461 |
if (dictionary[ "GIF" ] == "no") |
0 | 2462 |
qtConfig += "no-gif"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2463 |
else if (dictionary[ "GIF" ] == "yes") |
0 | 2464 |
qtConfig += "gif"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2465 |
else if (dictionary[ "GIF" ] == "plugin") |
0 | 2466 |
qmakeFormatPlugins += "gif"; |
2467 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2468 |
if (dictionary[ "TIFF" ] == "no") |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2469 |
qtConfig += "no-tiff"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2470 |
else if (dictionary[ "TIFF" ] == "yes") |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2471 |
qtConfig += "tiff"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2472 |
else if (dictionary[ "TIFF" ] == "plugin") |
0 | 2473 |
qmakeFormatPlugins += "tiff"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2474 |
if (dictionary[ "LIBTIFF" ] == "system") |
0 | 2475 |
qtConfig += "system-tiff"; |
2476 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2477 |
if (dictionary[ "JPEG" ] == "no") |
0 | 2478 |
qtConfig += "no-jpeg"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2479 |
else if (dictionary[ "JPEG" ] == "yes") |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2480 |
qtConfig += "jpeg"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2481 |
else if (dictionary[ "JPEG" ] == "plugin") |
0 | 2482 |
qmakeFormatPlugins += "jpeg"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2483 |
if (dictionary[ "LIBJPEG" ] == "system") |
0 | 2484 |
qtConfig += "system-jpeg"; |
2485 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2486 |
if (dictionary[ "PNG" ] == "no") |
0 | 2487 |
qtConfig += "no-png"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2488 |
else if (dictionary[ "PNG" ] == "yes") |
0 | 2489 |
qtConfig += "png"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2490 |
if (dictionary[ "LIBPNG" ] == "system") |
0 | 2491 |
qtConfig += "system-png"; |
2492 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2493 |
if (dictionary[ "MNG" ] == "no") |
0 | 2494 |
qtConfig += "no-mng"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2495 |
else if (dictionary[ "MNG" ] == "yes") |
0 | 2496 |
qtConfig += "mng"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2497 |
if (dictionary[ "LIBMNG" ] == "system") |
0 | 2498 |
qtConfig += "system-mng"; |
2499 |
||
2500 |
// Text rendering -------------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2501 |
if (dictionary[ "FREETYPE" ] == "yes") |
0 | 2502 |
qtConfig += "freetype"; |
2503 |
||
2504 |
// Styles ------------------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2505 |
if (dictionary[ "STYLE_WINDOWS" ] == "yes") |
0 | 2506 |
qmakeStyles += "windows"; |
2507 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2508 |
if (dictionary[ "STYLE_PLASTIQUE" ] == "yes") |
0 | 2509 |
qmakeStyles += "plastique"; |
2510 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2511 |
if (dictionary[ "STYLE_CLEANLOOKS" ] == "yes") |
0 | 2512 |
qmakeStyles += "cleanlooks"; |
2513 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2514 |
if (dictionary[ "STYLE_WINDOWSXP" ] == "yes") |
0 | 2515 |
qmakeStyles += "windowsxp"; |
2516 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2517 |
if (dictionary[ "STYLE_WINDOWSVISTA" ] == "yes") |
0 | 2518 |
qmakeStyles += "windowsvista"; |
2519 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2520 |
if (dictionary[ "STYLE_MOTIF" ] == "yes") |
0 | 2521 |
qmakeStyles += "motif"; |
2522 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2523 |
if (dictionary[ "STYLE_SGI" ] == "yes") |
0 | 2524 |
qmakeStyles += "sgi"; |
2525 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2526 |
if (dictionary[ "STYLE_WINDOWSCE" ] == "yes") |
0 | 2527 |
qmakeStyles += "windowsce"; |
2528 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2529 |
if (dictionary[ "STYLE_WINDOWSMOBILE" ] == "yes") |
0 | 2530 |
qmakeStyles += "windowsmobile"; |
2531 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2532 |
if (dictionary[ "STYLE_CDE" ] == "yes") |
0 | 2533 |
qmakeStyles += "cde"; |
2534 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2535 |
if (dictionary[ "STYLE_S60" ] == "yes") |
0 | 2536 |
qmakeStyles += "s60"; |
2537 |
||
2538 |
// Databases ---------------------------------------------------- |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2539 |
if (dictionary[ "SQL_MYSQL" ] == "yes") |
0 | 2540 |
qmakeSql += "mysql"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2541 |
else if (dictionary[ "SQL_MYSQL" ] == "plugin") |
0 | 2542 |
qmakeSqlPlugins += "mysql"; |
2543 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2544 |
if (dictionary[ "SQL_ODBC" ] == "yes") |
0 | 2545 |
qmakeSql += "odbc"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2546 |
else if (dictionary[ "SQL_ODBC" ] == "plugin") |
0 | 2547 |
qmakeSqlPlugins += "odbc"; |
2548 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2549 |
if (dictionary[ "SQL_OCI" ] == "yes") |
0 | 2550 |
qmakeSql += "oci"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2551 |
else if (dictionary[ "SQL_OCI" ] == "plugin") |
0 | 2552 |
qmakeSqlPlugins += "oci"; |
2553 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2554 |
if (dictionary[ "SQL_PSQL" ] == "yes") |
0 | 2555 |
qmakeSql += "psql"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2556 |
else if (dictionary[ "SQL_PSQL" ] == "plugin") |
0 | 2557 |
qmakeSqlPlugins += "psql"; |
2558 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2559 |
if (dictionary[ "SQL_TDS" ] == "yes") |
0 | 2560 |
qmakeSql += "tds"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2561 |
else if (dictionary[ "SQL_TDS" ] == "plugin") |
0 | 2562 |
qmakeSqlPlugins += "tds"; |
2563 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2564 |
if (dictionary[ "SQL_DB2" ] == "yes") |
0 | 2565 |
qmakeSql += "db2"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2566 |
else if (dictionary[ "SQL_DB2" ] == "plugin") |
0 | 2567 |
qmakeSqlPlugins += "db2"; |
2568 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2569 |
if (dictionary[ "SQL_SQLITE" ] == "yes") |
0 | 2570 |
qmakeSql += "sqlite"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2571 |
else if (dictionary[ "SQL_SQLITE" ] == "plugin") |
0 | 2572 |
qmakeSqlPlugins += "sqlite"; |
2573 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2574 |
if (dictionary[ "SQL_SQLITE_LIB" ] == "system") |
0 | 2575 |
qmakeConfig += "system-sqlite"; |
2576 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2577 |
if (dictionary[ "SQL_SQLITE2" ] == "yes") |
0 | 2578 |
qmakeSql += "sqlite2"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2579 |
else if (dictionary[ "SQL_SQLITE2" ] == "plugin") |
0 | 2580 |
qmakeSqlPlugins += "sqlite2"; |
2581 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2582 |
if (dictionary[ "SQL_IBASE" ] == "yes") |
0 | 2583 |
qmakeSql += "ibase"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2584 |
else if (dictionary[ "SQL_IBASE" ] == "plugin") |
0 | 2585 |
qmakeSqlPlugins += "ibase"; |
2586 |
||
2587 |
// Other options ------------------------------------------------ |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2588 |
if (dictionary[ "BUILDALL" ] == "yes") { |
0 | 2589 |
qmakeConfig += "build_all"; |
2590 |
} |
|
2591 |
qmakeConfig += dictionary[ "BUILD" ]; |
|
2592 |
dictionary[ "QMAKE_OUTDIR" ] = dictionary[ "BUILD" ]; |
|
2593 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2594 |
if (dictionary[ "SHARED" ] == "yes") { |
0 | 2595 |
QString version = dictionary[ "VERSION" ]; |
2596 |
if (!version.isEmpty()) { |
|
2597 |
qmakeVars += "QMAKE_QT_VERSION_OVERRIDE = " + version.left(version.indexOf(".")); |
|
2598 |
version.remove(QLatin1Char('.')); |
|
2599 |
} |
|
2600 |
dictionary[ "QMAKE_OUTDIR" ] += "_shared"; |
|
2601 |
} else { |
|
2602 |
dictionary[ "QMAKE_OUTDIR" ] += "_static"; |
|
2603 |
} |
|
2604 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2605 |
if (dictionary[ "ACCESSIBILITY" ] == "yes") |
0 | 2606 |
qtConfig += "accessibility"; |
2607 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2608 |
if (!qmakeLibs.isEmpty()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2609 |
qmakeVars += "LIBS += " + escapeSeparators(qmakeLibs.join(" ")); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2610 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2611 |
if (!dictionary["QT_LFLAGS_SQLITE"].isEmpty()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2612 |
qmakeVars += "QT_LFLAGS_SQLITE += " + escapeSeparators(dictionary["QT_LFLAGS_SQLITE"]); |
0 | 2613 |
|
2614 |
if (dictionary[ "QT3SUPPORT" ] == "yes") |
|
2615 |
qtConfig += "qt3support"; |
|
2616 |
||
2617 |
if (dictionary[ "OPENGL" ] == "yes") |
|
2618 |
qtConfig += "opengl"; |
|
2619 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2620 |
if (dictionary["OPENGL_ES_CM"] == "yes") { |
0 | 2621 |
qtConfig += "opengles1"; |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2622 |
qtConfig += "egl"; |
0 | 2623 |
} |
2624 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2625 |
if (dictionary["OPENGL_ES_2"] == "yes") { |
0 | 2626 |
qtConfig += "opengles2"; |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2627 |
qtConfig += "egl"; |
0 | 2628 |
} |
2629 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2630 |
if (dictionary["OPENVG"] == "yes") { |
0 | 2631 |
qtConfig += "openvg"; |
2632 |
qtConfig += "egl"; |
|
2633 |
} |
|
2634 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2635 |
if (dictionary["S60"] == "yes") { |
0 | 2636 |
qtConfig += "s60"; |
2637 |
} |
|
2638 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2639 |
if (dictionary["DIRECTSHOW"] == "yes") |
0 | 2640 |
qtConfig += "directshow"; |
2641 |
||
2642 |
if (dictionary[ "OPENSSL" ] == "yes") |
|
2643 |
qtConfig += "openssl"; |
|
2644 |
else if (dictionary[ "OPENSSL" ] == "linked") |
|
2645 |
qtConfig += "openssl-linked"; |
|
2646 |
||
2647 |
if (dictionary[ "DBUS" ] == "yes") |
|
2648 |
qtConfig += "dbus"; |
|
2649 |
else if (dictionary[ "DBUS" ] == "linked") |
|
2650 |
qtConfig += "dbus dbus-linked"; |
|
2651 |
||
2652 |
if (dictionary["IPV6"] == "yes") |
|
2653 |
qtConfig += "ipv6"; |
|
2654 |
else if (dictionary["IPV6"] == "no") |
|
2655 |
qtConfig += "no-ipv6"; |
|
2656 |
||
2657 |
if (dictionary[ "CETEST" ] == "yes") |
|
2658 |
qtConfig += "cetest"; |
|
2659 |
||
2660 |
if (dictionary[ "SCRIPT" ] == "yes") |
|
2661 |
qtConfig += "script"; |
|
2662 |
||
2663 |
if (dictionary[ "SCRIPTTOOLS" ] == "yes") { |
|
2664 |
if (dictionary[ "SCRIPT" ] == "no") { |
|
2665 |
cout << "QtScriptTools was requested, but it can't be built due to QtScript being " |
|
2666 |
"disabled." << endl; |
|
2667 |
dictionary[ "DONE" ] = "error"; |
|
2668 |
} |
|
2669 |
qtConfig += "scripttools"; |
|
2670 |
} |
|
2671 |
||
2672 |
if (dictionary[ "XMLPATTERNS" ] == "yes") |
|
2673 |
qtConfig += "xmlpatterns"; |
|
2674 |
||
2675 |
if (dictionary["PHONON"] == "yes") { |
|
2676 |
qtConfig += "phonon"; |
|
2677 |
if (dictionary["PHONON_BACKEND"] == "yes") |
|
2678 |
qtConfig += "phonon-backend"; |
|
2679 |
} |
|
2680 |
||
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2681 |
if (dictionary["MULTIMEDIA"] == "yes") { |
0 | 2682 |
qtConfig += "multimedia"; |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2683 |
if (dictionary["AUDIO_BACKEND"] == "yes") |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2684 |
qtConfig += "audio-backend"; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2685 |
} |
0 | 2686 |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2687 |
if (dictionary["WEBKIT"] == "yes") { |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2688 |
// This include takes care of adding "webkit" to QT_CONFIG. |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2689 |
QString src = sourcePath + "/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri"; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2690 |
QString dst = buildPath + "/mkspecs/modules/qt_webkit_version.pri"; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2691 |
QFile::remove(dst); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2692 |
QFile::copy(src, dst); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2693 |
} |
0 | 2694 |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2695 |
if (dictionary["DECLARATIVE"] == "yes") { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2696 |
if (dictionary[ "SCRIPT" ] == "no") { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2697 |
cout << "QtDeclarative was requested, but it can't be built due to QtScript being " |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2698 |
"disabled." << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2699 |
dictionary[ "DONE" ] = "error"; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2700 |
} |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2701 |
qtConfig += "declarative"; |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2702 |
} |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2703 |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2704 |
if (dictionary[ "NATIVE_GESTURES" ] == "yes") |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2705 |
qtConfig += "native-gestures"; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2706 |
|
0 | 2707 |
// We currently have no switch for QtSvg, so add it unconditionally. |
2708 |
qtConfig += "svg"; |
|
2709 |
||
2710 |
// Add config levels -------------------------------------------- |
|
2711 |
QStringList possible_configs = QStringList() |
|
2712 |
<< "minimal" |
|
2713 |
<< "small" |
|
2714 |
<< "medium" |
|
2715 |
<< "large" |
|
2716 |
<< "full"; |
|
2717 |
||
2718 |
QString set_config = dictionary["QCONFIG"]; |
|
2719 |
if (possible_configs.contains(set_config)) { |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2720 |
foreach (const QString &cfg, possible_configs) { |
0 | 2721 |
qtConfig += (cfg + "-config"); |
2722 |
if (cfg == set_config) |
|
2723 |
break; |
|
2724 |
} |
|
2725 |
} |
|
2726 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2727 |
if (dictionary.contains("XQMAKESPEC") && (dictionary["QMAKESPEC"] != dictionary["XQMAKESPEC"])) |
0 | 2728 |
qmakeConfig += "cross_compile"; |
2729 |
||
2730 |
// Directories and settings for .qmake.cache -------------------- |
|
2731 |
||
2732 |
// if QT_INSTALL_* have not been specified on commandline, define them now from QT_INSTALL_PREFIX |
|
2733 |
// if prefix is empty (WINCE), make all of them empty, if they aren't set |
|
2734 |
bool qipempty = false; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2735 |
if (dictionary[ "QT_INSTALL_PREFIX" ].isEmpty()) |
0 | 2736 |
qipempty = true; |
2737 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2738 |
if (!dictionary[ "QT_INSTALL_DOCS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2739 |
dictionary[ "QT_INSTALL_DOCS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/doc"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2740 |
if (!dictionary[ "QT_INSTALL_HEADERS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2741 |
dictionary[ "QT_INSTALL_HEADERS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/include"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2742 |
if (!dictionary[ "QT_INSTALL_LIBS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2743 |
dictionary[ "QT_INSTALL_LIBS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/lib"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2744 |
if (!dictionary[ "QT_INSTALL_BINS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2745 |
dictionary[ "QT_INSTALL_BINS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/bin"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2746 |
if (!dictionary[ "QT_INSTALL_PLUGINS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2747 |
dictionary[ "QT_INSTALL_PLUGINS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/plugins"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2748 |
if (!dictionary[ "QT_INSTALL_IMPORTS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2749 |
dictionary[ "QT_INSTALL_IMPORTS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/imports"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2750 |
if (!dictionary[ "QT_INSTALL_DATA" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2751 |
dictionary[ "QT_INSTALL_DATA" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ]); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2752 |
if (!dictionary[ "QT_INSTALL_TRANSLATIONS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2753 |
dictionary[ "QT_INSTALL_TRANSLATIONS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/translations"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2754 |
if (!dictionary[ "QT_INSTALL_EXAMPLES" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2755 |
dictionary[ "QT_INSTALL_EXAMPLES" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/examples"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2756 |
if (!dictionary[ "QT_INSTALL_DEMOS" ].size()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2757 |
dictionary[ "QT_INSTALL_DEMOS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/demos"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2758 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2759 |
if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux")) |
0 | 2760 |
dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ]; |
2761 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2762 |
qmakeVars += QString("OBJECTS_DIR = ") + fixSeparators("tmp/obj/" + dictionary[ "QMAKE_OUTDIR" ], true); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2763 |
qmakeVars += QString("MOC_DIR = ") + fixSeparators("tmp/moc/" + dictionary[ "QMAKE_OUTDIR" ], true); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2764 |
qmakeVars += QString("RCC_DIR = ") + fixSeparators("tmp/rcc/" + dictionary["QMAKE_OUTDIR"], true); |
0 | 2765 |
|
2766 |
if (!qmakeDefines.isEmpty()) |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2767 |
qmakeVars += QString("DEFINES += ") + qmakeDefines.join(" "); |
0 | 2768 |
if (!qmakeIncludes.isEmpty()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2769 |
qmakeVars += QString("INCLUDEPATH += ") + escapeSeparators(qmakeIncludes.join(" ")); |
0 | 2770 |
if (!opensslLibs.isEmpty()) |
2771 |
qmakeVars += opensslLibs; |
|
2772 |
else if (dictionary[ "OPENSSL" ] == "linked") { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2773 |
if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("symbian")) |
0 | 2774 |
qmakeVars += QString("OPENSSL_LIBS = -llibssl -llibcrypto"); |
2775 |
else |
|
2776 |
qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); |
|
2777 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2778 |
if (!psqlLibs.isEmpty()) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2779 |
qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1); |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2780 |
|
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2781 |
{ |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2782 |
QStringList lflagsTDS; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2783 |
if (!sybase.isEmpty()) |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2784 |
lflagsTDS += QString("-L") + fixSeparators(sybase.section("=", 1) + "/lib"); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2785 |
if (!sybaseLibs.isEmpty()) |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2786 |
lflagsTDS += sybaseLibs.section("=", 1); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2787 |
if (!lflagsTDS.isEmpty()) |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2788 |
qmakeVars += QString("QT_LFLAGS_TDS=") + lflagsTDS.join(" "); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2789 |
} |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2790 |
|
0 | 2791 |
if (!qmakeSql.isEmpty()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2792 |
qmakeVars += QString("sql-drivers += ") + qmakeSql.join(" "); |
0 | 2793 |
if (!qmakeSqlPlugins.isEmpty()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2794 |
qmakeVars += QString("sql-plugins += ") + qmakeSqlPlugins.join(" "); |
0 | 2795 |
if (!qmakeStyles.isEmpty()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2796 |
qmakeVars += QString("styles += ") + qmakeStyles.join(" "); |
0 | 2797 |
if (!qmakeStylePlugins.isEmpty()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2798 |
qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(" "); |
0 | 2799 |
if (!qmakeFormatPlugins.isEmpty()) |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2800 |
qmakeVars += QString("imageformat-plugins += ") + qmakeFormatPlugins.join(" "); |
0 | 2801 |
|
2802 |
if (dictionary["QMAKESPEC"].endsWith("-g++")) { |
|
2803 |
QString includepath = qgetenv("INCLUDE"); |
|
2804 |
bool hasSh = Environment::detectExecutable("sh.exe"); |
|
2805 |
QChar separator = (!includepath.contains(":\\") && hasSh ? QChar(':') : QChar(';')); |
|
2806 |
qmakeVars += QString("TMPPATH = $$quote($$(INCLUDE))"); |
|
2807 |
qmakeVars += QString("QMAKE_INCDIR_POST += $$split(TMPPATH,\"%1\")").arg(separator); |
|
2808 |
qmakeVars += QString("TMPPATH = $$quote($$(LIB))"); |
|
2809 |
qmakeVars += QString("QMAKE_LIBDIR_POST += $$split(TMPPATH,\"%1\")").arg(separator); |
|
2810 |
} |
|
2811 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2812 |
if (!dictionary[ "QMAKESPEC" ].length()) { |
0 | 2813 |
cout << "Configure could not detect your compiler. QMAKESPEC must either" << endl |
2814 |
<< "be defined as an environment variable, or specified as an" << endl |
|
2815 |
<< "argument with -platform" << endl; |
|
2816 |
dictionary[ "HELP" ] = "yes"; |
|
2817 |
||
2818 |
QStringList winPlatforms; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2819 |
QDir mkspecsDir(sourcePath + "/mkspecs"); |
0 | 2820 |
const QFileInfoList &specsList = mkspecsDir.entryInfoList(); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2821 |
for (int i = 0; i < specsList.size(); ++i) { |
0 | 2822 |
const QFileInfo &fi = specsList.at(i); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2823 |
if (fi.fileName().left(5) == "win32") { |
0 | 2824 |
winPlatforms += fi.fileName(); |
2825 |
} |
|
2826 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2827 |
cout << "Available platforms are: " << qPrintable(winPlatforms.join(", ")) << endl; |
0 | 2828 |
dictionary[ "DONE" ] = "error"; |
2829 |
} |
|
2830 |
} |
|
2831 |
||
2832 |
#if !defined(EVAL) |
|
2833 |
void Configure::generateCachefile() |
|
2834 |
{ |
|
2835 |
// Generate .qmake.cache |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2836 |
QFile cacheFile(buildPath + "/.qmake.cache"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2837 |
if (cacheFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file. |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2838 |
QTextStream cacheStream(&cacheFile); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2839 |
for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) { |
0 | 2840 |
cacheStream << (*var) << endl; |
2841 |
} |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2842 |
cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build" << endl; |
0 | 2843 |
|
2844 |
QStringList buildParts; |
|
2845 |
buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations"; |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2846 |
foreach (const QString &item, disabledBuildParts) { |
0 | 2847 |
buildParts.removeAll(item); |
2848 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2849 |
cacheStream << "QT_BUILD_PARTS = " << buildParts.join(" ") << endl; |
0 | 2850 |
|
2851 |
QString targetSpec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ]; |
|
2852 |
QString mkspec_path = fixSeparators(sourcePath + "/mkspecs/" + targetSpec); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2853 |
if (QFile::exists(mkspec_path)) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2854 |
cacheStream << "QMAKESPEC = " << escapeSeparators(mkspec_path) << endl; |
0 | 2855 |
else |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2856 |
cacheStream << "QMAKESPEC = " << fixSeparators(targetSpec, true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2857 |
cacheStream << "ARCH = " << dictionary[ "ARCHITECTURE" ] << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2858 |
cacheStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2859 |
cacheStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl; |
0 | 2860 |
|
2861 |
if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE") |
|
2862 |
cacheStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl; |
|
2863 |
||
2864 |
//so that we can build without an install first (which would be impossible) |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2865 |
cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe", true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2866 |
cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe", true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2867 |
cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe", true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2868 |
cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe", true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2869 |
cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe", true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2870 |
cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include", true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2871 |
cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib", true) << endl; |
0 | 2872 |
if (dictionary["CETEST"] == "yes") { |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2873 |
cacheStream << "QT_CE_RAPI_INC = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ], true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2874 |
cacheStream << "QT_CE_RAPI_LIB = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ], true) << endl; |
0 | 2875 |
} |
2876 |
||
2877 |
// embedded |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2878 |
if (!dictionary["KBD_DRIVERS"].isEmpty()) |
0 | 2879 |
cacheStream << "kbd-drivers += "<< dictionary["KBD_DRIVERS"]<<endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2880 |
if (!dictionary["GFX_DRIVERS"].isEmpty()) |
0 | 2881 |
cacheStream << "gfx-drivers += "<< dictionary["GFX_DRIVERS"]<<endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2882 |
if (!dictionary["MOUSE_DRIVERS"].isEmpty()) |
0 | 2883 |
cacheStream << "mouse-drivers += "<< dictionary["MOUSE_DRIVERS"]<<endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2884 |
if (!dictionary["DECORATIONS"].isEmpty()) |
0 | 2885 |
cacheStream << "decorations += "<<dictionary["DECORATIONS"]<<endl; |
2886 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2887 |
if (!dictionary["QMAKE_RPATHDIR"].isEmpty()) |
0 | 2888 |
cacheStream << "QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"]; |
2889 |
||
2890 |
cacheStream.flush(); |
|
2891 |
cacheFile.close(); |
|
2892 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2893 |
QFile configFile(dictionary[ "QT_BUILD_TREE" ] + "/mkspecs/qconfig.pri"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2894 |
if (configFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file. |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2895 |
QTextStream configStream(&configFile); |
0 | 2896 |
configStream << "CONFIG+= "; |
2897 |
configStream << dictionary[ "BUILD" ]; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2898 |
if (dictionary[ "SHARED" ] == "yes") |
0 | 2899 |
configStream << " shared"; |
2900 |
else |
|
2901 |
configStream << " static"; |
|
2902 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2903 |
if (dictionary[ "LTCG" ] == "yes") |
0 | 2904 |
configStream << " ltcg"; |
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2905 |
if (dictionary[ "MSVC_MP" ] == "yes") |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
2906 |
configStream << " msvc_mp"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2907 |
if (dictionary[ "STL" ] == "yes") |
0 | 2908 |
configStream << " stl"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2909 |
if (dictionary[ "EXCEPTIONS" ] == "yes") |
0 | 2910 |
configStream << " exceptions"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2911 |
if (dictionary[ "EXCEPTIONS" ] == "no") |
0 | 2912 |
configStream << " exceptions_off"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2913 |
if (dictionary[ "RTTI" ] == "yes") |
0 | 2914 |
configStream << " rtti"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2915 |
if (dictionary[ "MMX" ] == "yes") |
0 | 2916 |
configStream << " mmx"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2917 |
if (dictionary[ "3DNOW" ] == "yes") |
0 | 2918 |
configStream << " 3dnow"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2919 |
if (dictionary[ "SSE" ] == "yes") |
0 | 2920 |
configStream << " sse"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2921 |
if (dictionary[ "SSE2" ] == "yes") |
0 | 2922 |
configStream << " sse2"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2923 |
if (dictionary[ "IWMMXT" ] == "yes") |
0 | 2924 |
configStream << " iwmmxt"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2925 |
if (dictionary["INCREDIBUILD_XGE"] == "yes") |
0 | 2926 |
configStream << " incredibuild_xge"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2927 |
if (dictionary["PLUGIN_MANIFESTS"] == "no") |
0 | 2928 |
configStream << " no_plugin_manifest"; |
2929 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2930 |
if (dictionary.contains("SYMBIAN_DEFFILES")) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2931 |
if (dictionary["SYMBIAN_DEFFILES"] == "yes") { |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2932 |
configStream << " def_files"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2933 |
} else if (dictionary["SYMBIAN_DEFFILES"] == "no") { |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2934 |
configStream << " def_files_disabled"; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2935 |
} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2936 |
} |
0 | 2937 |
configStream << endl; |
2938 |
configStream << "QT_ARCH = " << dictionary[ "ARCHITECTURE" ] << endl; |
|
2939 |
if (dictionary["QT_EDITION"].contains("OPENSOURCE")) |
|
2940 |
configStream << "QT_EDITION = " << QLatin1String("OpenSource") << endl; |
|
2941 |
else |
|
2942 |
configStream << "QT_EDITION = " << dictionary["EDITION"] << endl; |
|
2943 |
configStream << "QT_CONFIG += " << qtConfig.join(" ") << endl; |
|
2944 |
||
2945 |
configStream << "#versioning " << endl |
|
2946 |
<< "QT_VERSION = " << dictionary["VERSION"] << endl |
|
2947 |
<< "QT_MAJOR_VERSION = " << dictionary["VERSION_MAJOR"] << endl |
|
2948 |
<< "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl |
|
2949 |
<< "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl; |
|
2950 |
||
2951 |
configStream << "#Qt for Windows CE c-runtime deployment" << endl |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2952 |
<< "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ], true) << endl; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2953 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2954 |
if (dictionary["CE_SIGNATURE"] != QLatin1String("no")) |
0 | 2955 |
configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl; |
2956 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2957 |
if (!dictionary["QMAKE_RPATHDIR"].isEmpty()) |
0 | 2958 |
configStream << "QMAKE_RPATHDIR += " << dictionary["QMAKE_RPATHDIR"] << endl; |
2959 |
||
2960 |
if (!dictionary["QT_LIBINFIX"].isEmpty()) |
|
2961 |
configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl; |
|
2962 |
||
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2963 |
configStream << "#Qt for Symbian FPU settings" << endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2964 |
if (!dictionary["ARM_FPU_TYPE"].isEmpty()) { |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
2965 |
configStream<<"MMP_RULES += \"ARMFPU "<< dictionary["ARM_FPU_TYPE"]<< "\""; |
0 | 2966 |
} |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2967 |
if (!dictionary["QT_NAMESPACE"].isEmpty()) { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2968 |
configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
2969 |
} |
0 | 2970 |
|
2971 |
configStream.flush(); |
|
2972 |
configFile.close(); |
|
2973 |
} |
|
2974 |
} |
|
2975 |
#endif |
|
2976 |
||
2977 |
QString Configure::addDefine(QString def) |
|
2978 |
{ |
|
2979 |
QString result, defNeg, defD = def; |
|
2980 |
||
2981 |
defD.replace(QRegExp("=.*"), ""); |
|
2982 |
def.replace(QRegExp("="), " "); |
|
2983 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2984 |
if (def.startsWith("QT_NO_")) { |
0 | 2985 |
defNeg = defD; |
2986 |
defNeg.replace("QT_NO_", "QT_"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
2987 |
} else if (def.startsWith("QT_")) { |
0 | 2988 |
defNeg = defD; |
2989 |
defNeg.replace("QT_", "QT_NO_"); |
|
2990 |
} |
|
2991 |
||
2992 |
if (defNeg.isEmpty()) { |
|
2993 |
result = "#ifndef $DEFD\n" |
|
2994 |
"# define $DEF\n" |
|
2995 |
"#endif\n\n"; |
|
2996 |
} else { |
|
2997 |
result = "#if defined($DEFD) && defined($DEFNEG)\n" |
|
2998 |
"# undef $DEFD\n" |
|
2999 |
"#elif !defined($DEFD)\n" |
|
3000 |
"# define $DEF\n" |
|
3001 |
"#endif\n\n"; |
|
3002 |
} |
|
3003 |
result.replace("$DEFNEG", defNeg); |
|
3004 |
result.replace("$DEFD", defD); |
|
3005 |
result.replace("$DEF", def); |
|
3006 |
return result; |
|
3007 |
} |
|
3008 |
||
3009 |
#if !defined(EVAL) |
|
3010 |
void Configure::generateConfigfiles() |
|
3011 |
{ |
|
3012 |
QDir(buildPath).mkpath("src/corelib/global"); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3013 |
QString outName(buildPath + "/src/corelib/global/qconfig.h"); |
0 | 3014 |
QTemporaryFile tmpFile; |
3015 |
QTextStream tmpStream; |
|
3016 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3017 |
if (tmpFile.open()) { |
0 | 3018 |
tmpStream.setDevice(&tmpFile); |
3019 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3020 |
if (dictionary[ "QCONFIG" ] == "full") { |
0 | 3021 |
tmpStream << "/* Everything */" << endl; |
3022 |
} else { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3023 |
QString configName("qconfig-" + dictionary[ "QCONFIG" ] + ".h"); |
0 | 3024 |
tmpStream << "/* Copied from " << configName << "*/" << endl; |
3025 |
tmpStream << "#ifndef QT_BOOTSTRAPPED" << endl; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3026 |
QFile inFile(sourcePath + "/src/corelib/global/" + configName); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3027 |
if (inFile.open(QFile::ReadOnly)) { |
0 | 3028 |
QByteArray buffer = inFile.readAll(); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3029 |
tmpFile.write(buffer.constData(), buffer.size()); |
0 | 3030 |
inFile.close(); |
3031 |
} |
|
3032 |
tmpStream << "#endif // QT_BOOTSTRAPPED" << endl; |
|
3033 |
} |
|
3034 |
tmpStream << endl; |
|
3035 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3036 |
if (dictionary[ "SHARED" ] == "yes") { |
0 | 3037 |
tmpStream << "#ifndef QT_DLL" << endl; |
3038 |
tmpStream << "#define QT_DLL" << endl; |
|
3039 |
tmpStream << "#endif" << endl; |
|
3040 |
} |
|
3041 |
tmpStream << endl; |
|
3042 |
tmpStream << "/* License information */" << endl; |
|
3043 |
tmpStream << "#define QT_PRODUCT_LICENSEE \"" << licenseInfo[ "LICENSEE" ] << "\"" << endl; |
|
3044 |
tmpStream << "#define QT_PRODUCT_LICENSE \"" << dictionary[ "EDITION" ] << "\"" << endl; |
|
3045 |
tmpStream << endl; |
|
3046 |
tmpStream << "// Qt Edition" << endl; |
|
3047 |
tmpStream << "#ifndef QT_EDITION" << endl; |
|
3048 |
tmpStream << "# define QT_EDITION " << dictionary["QT_EDITION"] << endl; |
|
3049 |
tmpStream << "#endif" << endl; |
|
3050 |
tmpStream << endl; |
|
3051 |
tmpStream << dictionary["BUILD_KEY"]; |
|
3052 |
tmpStream << endl; |
|
3053 |
if (dictionary["BUILDDEV"] == "yes") { |
|
3054 |
dictionary["QMAKE_INTERNAL"] = "yes"; |
|
3055 |
tmpStream << "/* Used for example to export symbols for the certain autotests*/" << endl; |
|
3056 |
tmpStream << "#define QT_BUILD_INTERNAL" << endl; |
|
3057 |
tmpStream << endl; |
|
3058 |
} |
|
3059 |
tmpStream << "/* Machine byte-order */" << endl; |
|
3060 |
tmpStream << "#define Q_BIG_ENDIAN 4321" << endl; |
|
3061 |
tmpStream << "#define Q_LITTLE_ENDIAN 1234" << endl; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3062 |
if (QSysInfo::ByteOrder == QSysInfo::BigEndian) |
0 | 3063 |
tmpStream << "#define Q_BYTE_ORDER Q_BIG_ENDIAN" << endl; |
3064 |
else |
|
3065 |
tmpStream << "#define Q_BYTE_ORDER Q_LITTLE_ENDIAN" << endl; |
|
3066 |
||
3067 |
tmpStream << endl << "// Compile time features" << endl; |
|
3068 |
tmpStream << "#define QT_ARCH_" << dictionary["ARCHITECTURE"].toUpper() << endl; |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3069 |
if (dictionary["GRAPHICS_SYSTEM"] == "runtime" && dictionary["RUNTIME_SYSTEM"] != "runtime") |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3070 |
tmpStream << "#define QT_DEFAULT_RUNTIME_SYSTEM \"" << dictionary["RUNTIME_SYSTEM"] << "\"" << endl; |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3071 |
|
0 | 3072 |
QStringList qconfigList; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3073 |
if (dictionary["STL"] == "no") qconfigList += "QT_NO_STL"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3074 |
if (dictionary["STYLE_WINDOWS"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWS"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3075 |
if (dictionary["STYLE_PLASTIQUE"] != "yes") qconfigList += "QT_NO_STYLE_PLASTIQUE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3076 |
if (dictionary["STYLE_CLEANLOOKS"] != "yes") qconfigList += "QT_NO_STYLE_CLEANLOOKS"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3077 |
if (dictionary["STYLE_WINDOWSXP"] != "yes" && dictionary["STYLE_WINDOWSVISTA"] != "yes") |
0 | 3078 |
qconfigList += "QT_NO_STYLE_WINDOWSXP"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3079 |
if (dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3080 |
if (dictionary["STYLE_MOTIF"] != "yes") qconfigList += "QT_NO_STYLE_MOTIF"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3081 |
if (dictionary["STYLE_CDE"] != "yes") qconfigList += "QT_NO_STYLE_CDE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3082 |
if (dictionary["STYLE_S60"] != "yes") qconfigList += "QT_NO_STYLE_S60"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3083 |
if (dictionary["STYLE_WINDOWSCE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSCE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3084 |
if (dictionary["STYLE_WINDOWSMOBILE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSMOBILE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3085 |
if (dictionary["STYLE_GTK"] != "yes") qconfigList += "QT_NO_STYLE_GTK"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3086 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3087 |
if (dictionary["GIF"] == "yes") qconfigList += "QT_BUILTIN_GIF_READER=1"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3088 |
if (dictionary["PNG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_PNG"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3089 |
if (dictionary["MNG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_MNG"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3090 |
if (dictionary["JPEG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_JPEG"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3091 |
if (dictionary["TIFF"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_TIFF"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3092 |
if (dictionary["ZLIB"] == "no") { |
0 | 3093 |
qconfigList += "QT_NO_ZLIB"; |
3094 |
qconfigList += "QT_NO_COMPRESS"; |
|
3095 |
} |
|
3096 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3097 |
if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3098 |
if (dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3099 |
if (dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3100 |
if (dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3101 |
if (dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3102 |
if (dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3103 |
if (dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3104 |
if (dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3105 |
if (dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3106 |
if (dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3107 |
if (dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3108 |
if (dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3109 |
if (dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3110 |
if (dictionary["SCRIPT"] == "no") qconfigList += "QT_NO_SCRIPT"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3111 |
if (dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3112 |
if (dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3113 |
if (dictionary["S60"] == "no") qconfigList += "QT_NO_S60"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3114 |
if (dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3115 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3116 |
if (dictionary["OPENGL_ES_CM"] == "no" && |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3117 |
dictionary["OPENGL_ES_2"] == "no" && |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3118 |
dictionary["OPENVG"] == "no") qconfigList += "QT_NO_EGL"; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3119 |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3120 |
if (dictionary["OPENGL_ES_CM"] == "yes" || |
0 | 3121 |
dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES"; |
3122 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3123 |
if (dictionary["OPENGL_ES_CM"] == "yes") qconfigList += "QT_OPENGL_ES_1"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3124 |
if (dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES_2"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3125 |
if (dictionary["SQL_MYSQL"] == "yes") qconfigList += "QT_SQL_MYSQL"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3126 |
if (dictionary["SQL_ODBC"] == "yes") qconfigList += "QT_SQL_ODBC"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3127 |
if (dictionary["SQL_OCI"] == "yes") qconfigList += "QT_SQL_OCI"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3128 |
if (dictionary["SQL_PSQL"] == "yes") qconfigList += "QT_SQL_PSQL"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3129 |
if (dictionary["SQL_TDS"] == "yes") qconfigList += "QT_SQL_TDS"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3130 |
if (dictionary["SQL_DB2"] == "yes") qconfigList += "QT_SQL_DB2"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3131 |
if (dictionary["SQL_SQLITE"] == "yes") qconfigList += "QT_SQL_SQLITE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3132 |
if (dictionary["SQL_SQLITE2"] == "yes") qconfigList += "QT_SQL_SQLITE2"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3133 |
if (dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3134 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3135 |
if (dictionary["GRAPHICS_SYSTEM"] == "openvg") qconfigList += "QT_GRAPHICSSYSTEM_OPENVG"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3136 |
if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3137 |
if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER"; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3138 |
if (dictionary["GRAPHICS_SYSTEM"] == "runtime") qconfigList += "QT_GRAPHICSSYSTEM_RUNTIME"; |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3139 |
|
0 | 3140 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3141 |
// These features are not ported to Symbian (yet) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3142 |
qconfigList += "QT_NO_CONCURRENT"; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3143 |
qconfigList += "QT_NO_QFUTURE"; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3144 |
qconfigList += "QT_NO_CRASHHANDLER"; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3145 |
qconfigList += "QT_NO_PRINTER"; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3146 |
qconfigList += "QT_NO_SYSTEMTRAYICON"; |
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
3147 |
if (dictionary.contains("QT_LIBINFIX")) |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
3148 |
tmpStream << QString("#define QT_LIBINFIX \"%1\"").arg(dictionary["QT_LIBINFIX"]) << endl; |
0 | 3149 |
} |
3150 |
||
3151 |
qconfigList.sort(); |
|
3152 |
for (int i = 0; i < qconfigList.count(); ++i) |
|
3153 |
tmpStream << addDefine(qconfigList.at(i)); |
|
3154 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3155 |
if (dictionary["EMBEDDED"] == "yes") |
0 | 3156 |
{ |
3157 |
// Check for keyboard, mouse, gfx. |
|
3158 |
QStringList kbdDrivers = dictionary["KBD_DRIVERS"].split(" ");; |
|
3159 |
QStringList allKbdDrivers; |
|
3160 |
allKbdDrivers<<"tty"<<"usb"<<"sl5000"<<"yopy"<<"vr41xx"<<"qvfb"<<"um"; |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3161 |
foreach (const QString &kbd, allKbdDrivers) { |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3162 |
if (!kbdDrivers.contains(kbd)) |
0 | 3163 |
tmpStream<<"#define QT_NO_QWS_KBD_"<<kbd.toUpper()<<endl; |
3164 |
} |
|
3165 |
||
3166 |
QStringList mouseDrivers = dictionary["MOUSE_DRIVERS"].split(" "); |
|
3167 |
QStringList allMouseDrivers; |
|
3168 |
allMouseDrivers << "pc"<<"bus"<<"linuxtp"<<"yopy"<<"vr41xx"<<"tslib"<<"qvfb"; |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3169 |
foreach (const QString &mouse, allMouseDrivers) { |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3170 |
if (!mouseDrivers.contains(mouse)) |
0 | 3171 |
tmpStream<<"#define QT_NO_QWS_MOUSE_"<<mouse.toUpper()<<endl; |
3172 |
} |
|
3173 |
||
3174 |
QStringList gfxDrivers = dictionary["GFX_DRIVERS"].split(" "); |
|
3175 |
QStringList allGfxDrivers; |
|
3176 |
allGfxDrivers<<"linuxfb"<<"transformed"<<"qvfb"<<"vnc"<<"multiscreen"<<"ahi"; |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3177 |
foreach (const QString &gfx, allGfxDrivers) { |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3178 |
if (!gfxDrivers.contains(gfx)) |
0 | 3179 |
tmpStream<<"#define QT_NO_QWS_"<<gfx.toUpper()<<endl; |
3180 |
} |
|
3181 |
||
3182 |
tmpStream<<"#define Q_WS_QWS"<<endl; |
|
3183 |
||
3184 |
QStringList depths = dictionary[ "QT_QWS_DEPTH" ].split(" "); |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3185 |
foreach (const QString &depth, depths) |
0 | 3186 |
tmpStream<<"#define QT_QWS_DEPTH_"+depth<<endl; |
3187 |
} |
|
3188 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3189 |
if (dictionary[ "QT_CUPS" ] == "no") |
0 | 3190 |
tmpStream<<"#define QT_NO_CUPS"<<endl; |
3191 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3192 |
if (dictionary[ "QT_ICONV" ] == "no") |
0 | 3193 |
tmpStream<<"#define QT_NO_ICONV"<<endl; |
3194 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3195 |
if (dictionary[ "QT_GLIB" ] == "no") |
0 | 3196 |
tmpStream<<"#define QT_NO_GLIB"<<endl; |
3197 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3198 |
if (dictionary[ "QT_LPR" ] == "no") |
0 | 3199 |
tmpStream<<"#define QT_NO_LPR"<<endl; |
3200 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3201 |
if (dictionary[ "QT_INOTIFY" ] == "no") |
0 | 3202 |
tmpStream<<"#define QT_NO_INOTIFY"<<endl; |
3203 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3204 |
if (dictionary[ "QT_SXE" ] == "no") |
0 | 3205 |
tmpStream<<"#define QT_NO_SXE"<<endl; |
3206 |
||
3207 |
tmpStream.flush(); |
|
3208 |
tmpFile.flush(); |
|
3209 |
||
3210 |
// Replace old qconfig.h with new one |
|
3211 |
::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); |
|
3212 |
QFile::remove(outName); |
|
3213 |
tmpFile.copy(outName); |
|
3214 |
tmpFile.close(); |
|
3215 |
} |
|
3216 |
||
3217 |
// Copy configured mkspec to default directory, but remove the old one first, if there is any |
|
3218 |
QString defSpec = buildPath + "/mkspecs/default"; |
|
3219 |
QFileInfo defSpecInfo(defSpec); |
|
3220 |
if (defSpecInfo.exists()) { |
|
3221 |
if (!Environment::rmdir(defSpec)) { |
|
3222 |
cout << "Couldn't update default mkspec! Are files in " << qPrintable(defSpec) << " read-only?" << endl; |
|
3223 |
dictionary["DONE"] = "error"; |
|
3224 |
return; |
|
3225 |
} |
|
3226 |
} |
|
3227 |
||
3228 |
QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"]; |
|
3229 |
QString pltSpec = sourcePath + "/mkspecs/" + spec; |
|
3230 |
if (!Environment::cpdir(pltSpec, defSpec)) { |
|
3231 |
cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl; |
|
3232 |
dictionary["DONE"] = "error"; |
|
3233 |
return; |
|
3234 |
} |
|
3235 |
||
3236 |
outName = defSpec + "/qmake.conf"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3237 |
::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); |
0 | 3238 |
QFile qmakeConfFile(outName); |
3239 |
if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) { |
|
3240 |
QTextStream qmakeConfStream; |
|
3241 |
qmakeConfStream.setDevice(&qmakeConfFile); |
|
3242 |
qmakeConfStream << endl << "QMAKESPEC_ORIGINAL=" << pltSpec << endl; |
|
3243 |
qmakeConfStream.flush(); |
|
3244 |
qmakeConfFile.close(); |
|
3245 |
} |
|
3246 |
||
3247 |
// Generate the new qconfig.cpp file |
|
3248 |
QDir(buildPath).mkpath("src/corelib/global"); |
|
3249 |
outName = buildPath + "/src/corelib/global/qconfig.cpp"; |
|
3250 |
||
3251 |
QTemporaryFile tmpFile2; |
|
3252 |
if (tmpFile2.open()) { |
|
3253 |
tmpStream.setDevice(&tmpFile2); |
|
3254 |
tmpStream << "/* Licensed */" << endl |
|
3255 |
<< "static const char qt_configure_licensee_str [512 + 12] = \"qt_lcnsuser=" << licenseInfo["LICENSEE"] << "\";" << endl |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3256 |
<< "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3257 |
<< endl |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3258 |
<< "/* Build date */" << endl |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3259 |
<< "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3260 |
<< endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3261 |
if (!dictionary[ "QT_HOST_PREFIX" ].isNull()) |
0 | 3262 |
tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3263 |
tmpStream << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary["QT_INSTALL_PREFIX"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3264 |
<< "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << escapeSeparators(dictionary["QT_INSTALL_DOCS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3265 |
<< "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << escapeSeparators(dictionary["QT_INSTALL_HEADERS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3266 |
<< "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << escapeSeparators(dictionary["QT_INSTALL_LIBS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3267 |
<< "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << escapeSeparators(dictionary["QT_INSTALL_BINS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3268 |
<< "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << escapeSeparators(dictionary["QT_INSTALL_PLUGINS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3269 |
<< "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << escapeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3270 |
<< "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << escapeSeparators(dictionary["QT_INSTALL_DATA"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3271 |
<< "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3272 |
<< "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3273 |
<< "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << escapeSeparators(dictionary["QT_INSTALL_DEMOS"]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3274 |
//<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl |
0 | 3275 |
; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3276 |
if (!dictionary[ "QT_HOST_PREFIX" ].isNull()) { |
0 | 3277 |
tmpStream << "#else" << endl |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3278 |
<< "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary[ "QT_HOST_PREFIX" ]) << "\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3279 |
<< "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3280 |
<< "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3281 |
<< "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3282 |
<< "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3283 |
<< "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3284 |
<< "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3285 |
<< "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ], true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3286 |
<< "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3287 |
<< "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example", true) <<"\";" << endl |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3288 |
<< "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos", true) <<"\";" << endl |
0 | 3289 |
<< "#endif //QT_BOOTSTRAPPED" << endl; |
3290 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3291 |
tmpStream << "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl |
0 | 3292 |
<< "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;" << endl |
3293 |
<< "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;" << endl |
|
3294 |
<< "#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;" << endl |
|
3295 |
<< "#define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;" << endl |
|
3296 |
<< "#define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;" << endl |
|
3297 |
<< "#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;" << endl |
|
3298 |
<< "#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;" << endl |
|
3299 |
<< "#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;" << endl |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3300 |
<< "#define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;" << endl |
0 | 3301 |
<< "#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;" << endl |
3302 |
<< "#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;" << endl |
|
3303 |
<< "#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;" << endl |
|
3304 |
<< "#define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;" << endl |
|
3305 |
//<< "#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;" << endl |
|
3306 |
<< endl; |
|
3307 |
||
3308 |
tmpStream.flush(); |
|
3309 |
tmpFile2.flush(); |
|
3310 |
||
3311 |
// Replace old qconfig.cpp with new one |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3312 |
::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3313 |
QFile::remove(outName); |
0 | 3314 |
tmpFile2.copy(outName); |
3315 |
tmpFile2.close(); |
|
3316 |
} |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3317 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3318 |
QTemporaryFile tmpFile3; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3319 |
if (tmpFile3.open()) { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3320 |
tmpStream.setDevice(&tmpFile3); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3321 |
tmpStream << "/* Evaluation license key */" << endl |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3322 |
<< "static const char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3323 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3324 |
tmpStream.flush(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3325 |
tmpFile3.flush(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3326 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3327 |
outName = buildPath + "/src/corelib/global/qconfig_eval.cpp"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3328 |
::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3329 |
QFile::remove(outName); |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3330 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3331 |
if (dictionary["EDITION"] == "Evaluation" || qmakeDefines.contains("QT_EVAL")) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3332 |
tmpFile3.copy(outName); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3333 |
tmpFile3.close(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3334 |
} |
0 | 3335 |
} |
3336 |
#endif |
|
3337 |
||
3338 |
#if !defined(EVAL) |
|
3339 |
void Configure::displayConfig() |
|
3340 |
{ |
|
3341 |
// Give some feedback |
|
3342 |
cout << "Environment:" << endl; |
|
3343 |
QString env = QString::fromLocal8Bit(getenv("INCLUDE")).replace(QRegExp("[;,]"), "\r\n "); |
|
3344 |
if (env.isEmpty()) |
|
3345 |
env = "Unset"; |
|
3346 |
cout << " INCLUDE=\r\n " << env << endl; |
|
3347 |
env = QString::fromLocal8Bit(getenv("LIB")).replace(QRegExp("[;,]"), "\r\n "); |
|
3348 |
if (env.isEmpty()) |
|
3349 |
env = "Unset"; |
|
3350 |
cout << " LIB=\r\n " << env << endl; |
|
3351 |
env = QString::fromLocal8Bit(getenv("PATH")).replace(QRegExp("[;,]"), "\r\n "); |
|
3352 |
if (env.isEmpty()) |
|
3353 |
env = "Unset"; |
|
3354 |
cout << " PATH=\r\n " << env << endl; |
|
3355 |
||
3356 |
if (dictionary["EDITION"] == "OpenSource") { |
|
3357 |
cout << "You are licensed to use this software under the terms of the GNU GPL version 3."; |
|
3358 |
cout << "You are licensed to use this software under the terms of the Lesser GNU LGPL version 2.1." << endl; |
|
3359 |
cout << "See " << dictionary["LICENSE FILE"] << "3" << endl << endl |
|
3360 |
<< " or " << dictionary["LICENSE FILE"] << "L" << endl << endl; |
|
3361 |
} else { |
|
3362 |
QString l1 = licenseInfo[ "LICENSEE" ]; |
|
3363 |
QString l2 = licenseInfo[ "LICENSEID" ]; |
|
3364 |
QString l3 = dictionary["EDITION"] + ' ' + "Edition"; |
|
3365 |
QString l4 = licenseInfo[ "EXPIRYDATE" ]; |
|
3366 |
cout << "Licensee...................." << (l1.isNull() ? "" : l1) << endl; |
|
3367 |
cout << "License ID.................." << (l2.isNull() ? "" : l2) << endl; |
|
3368 |
cout << "Product license............." << (l3.isNull() ? "" : l3) << endl; |
|
3369 |
cout << "Expiry Date................." << (l4.isNull() ? "" : l4) << endl << endl; |
|
3370 |
} |
|
3371 |
||
3372 |
cout << "Configuration:" << endl; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3373 |
cout << " " << qmakeConfig.join("\r\n ") << endl; |
0 | 3374 |
cout << "Qt Configuration:" << endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3375 |
cout << " " << qtConfig.join("\r\n ") << endl; |
0 | 3376 |
cout << endl; |
3377 |
||
3378 |
if (dictionary.contains("XQMAKESPEC")) |
|
3379 |
cout << "QMAKESPEC..................." << dictionary[ "XQMAKESPEC" ] << " (" << dictionary["QMAKESPEC_FROM"] << ")" << endl; |
|
3380 |
else |
|
3381 |
cout << "QMAKESPEC..................." << dictionary[ "QMAKESPEC" ] << " (" << dictionary["QMAKESPEC_FROM"] << ")" << endl; |
|
3382 |
cout << "Architecture................" << dictionary[ "ARCHITECTURE" ] << endl; |
|
3383 |
cout << "Maketool...................." << dictionary[ "MAKE" ] << endl; |
|
3384 |
cout << "Debug symbols..............." << (dictionary[ "BUILD" ] == "debug" ? "yes" : "no") << endl; |
|
3385 |
cout << "Link Time Code Generation..." << dictionary[ "LTCG" ] << endl; |
|
3386 |
cout << "Accessibility support......." << dictionary[ "ACCESSIBILITY" ] << endl; |
|
3387 |
cout << "STL support................." << dictionary[ "STL" ] << endl; |
|
3388 |
cout << "Exception support..........." << dictionary[ "EXCEPTIONS" ] << endl; |
|
3389 |
cout << "RTTI support................" << dictionary[ "RTTI" ] << endl; |
|
3390 |
cout << "MMX support................." << dictionary[ "MMX" ] << endl; |
|
3391 |
cout << "3DNOW support..............." << dictionary[ "3DNOW" ] << endl; |
|
3392 |
cout << "SSE support................." << dictionary[ "SSE" ] << endl; |
|
3393 |
cout << "SSE2 support................" << dictionary[ "SSE2" ] << endl; |
|
3394 |
cout << "IWMMXT support.............." << dictionary[ "IWMMXT" ] << endl; |
|
3395 |
cout << "OpenGL support.............." << dictionary[ "OPENGL" ] << endl; |
|
3396 |
cout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl; |
|
3397 |
cout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl; |
|
3398 |
cout << "QtDBus support.............." << dictionary[ "DBUS" ] << endl; |
|
3399 |
cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl; |
|
3400 |
cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl; |
|
3401 |
cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl; |
|
3402 |
cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3403 |
cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; |
0 | 3404 |
cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; |
3405 |
cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; |
|
3406 |
cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl; |
|
3407 |
cout << "Qt3 compatibility..........." << dictionary[ "QT3SUPPORT" ] << endl << endl; |
|
3408 |
||
3409 |
cout << "Third Party Libraries:" << endl; |
|
3410 |
cout << " ZLIB support............" << dictionary[ "ZLIB" ] << endl; |
|
3411 |
cout << " GIF support............." << dictionary[ "GIF" ] << endl; |
|
3412 |
cout << " TIFF support............" << dictionary[ "TIFF" ] << endl; |
|
3413 |
cout << " JPEG support............" << dictionary[ "JPEG" ] << endl; |
|
3414 |
cout << " PNG support............." << dictionary[ "PNG" ] << endl; |
|
3415 |
cout << " MNG support............." << dictionary[ "MNG" ] << endl; |
|
3416 |
cout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl; |
|
3417 |
||
3418 |
cout << "Styles:" << endl; |
|
3419 |
cout << " Windows................." << dictionary[ "STYLE_WINDOWS" ] << endl; |
|
3420 |
cout << " Windows XP.............." << dictionary[ "STYLE_WINDOWSXP" ] << endl; |
|
3421 |
cout << " Windows Vista..........." << dictionary[ "STYLE_WINDOWSVISTA" ] << endl; |
|
3422 |
cout << " Plastique..............." << dictionary[ "STYLE_PLASTIQUE" ] << endl; |
|
3423 |
cout << " Cleanlooks.............." << dictionary[ "STYLE_CLEANLOOKS" ] << endl; |
|
3424 |
cout << " Motif..................." << dictionary[ "STYLE_MOTIF" ] << endl; |
|
3425 |
cout << " CDE....................." << dictionary[ "STYLE_CDE" ] << endl; |
|
3426 |
cout << " Windows CE.............." << dictionary[ "STYLE_WINDOWSCE" ] << endl; |
|
3427 |
cout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl; |
|
3428 |
cout << " S60....................." << dictionary[ "STYLE_S60" ] << endl << endl; |
|
3429 |
||
3430 |
cout << "Sql Drivers:" << endl; |
|
3431 |
cout << " ODBC...................." << dictionary[ "SQL_ODBC" ] << endl; |
|
3432 |
cout << " MySQL..................." << dictionary[ "SQL_MYSQL" ] << endl; |
|
3433 |
cout << " OCI....................." << dictionary[ "SQL_OCI" ] << endl; |
|
3434 |
cout << " PostgreSQL.............." << dictionary[ "SQL_PSQL" ] << endl; |
|
3435 |
cout << " TDS....................." << dictionary[ "SQL_TDS" ] << endl; |
|
3436 |
cout << " DB2....................." << dictionary[ "SQL_DB2" ] << endl; |
|
3437 |
cout << " SQLite.................." << dictionary[ "SQL_SQLITE" ] << " (" << dictionary[ "SQL_SQLITE_LIB" ] << ")" << endl; |
|
3438 |
cout << " SQLite2................." << dictionary[ "SQL_SQLITE2" ] << endl; |
|
3439 |
cout << " InterBase..............." << dictionary[ "SQL_IBASE" ] << endl << endl; |
|
3440 |
||
3441 |
cout << "Sources are in.............." << dictionary[ "QT_SOURCE_TREE" ] << endl; |
|
3442 |
cout << "Build is done in............" << dictionary[ "QT_BUILD_TREE" ] << endl; |
|
3443 |
cout << "Install prefix.............." << dictionary[ "QT_INSTALL_PREFIX" ] << endl; |
|
3444 |
cout << "Headers installed to........" << dictionary[ "QT_INSTALL_HEADERS" ] << endl; |
|
3445 |
cout << "Libraries installed to......" << dictionary[ "QT_INSTALL_LIBS" ] << endl; |
|
3446 |
cout << "Plugins installed to........" << dictionary[ "QT_INSTALL_PLUGINS" ] << endl; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3447 |
cout << "Imports installed to........" << dictionary[ "QT_INSTALL_IMPORTS" ] << endl; |
0 | 3448 |
cout << "Binaries installed to......." << dictionary[ "QT_INSTALL_BINS" ] << endl; |
3449 |
cout << "Docs installed to..........." << dictionary[ "QT_INSTALL_DOCS" ] << endl; |
|
3450 |
cout << "Data installed to..........." << dictionary[ "QT_INSTALL_DATA" ] << endl; |
|
3451 |
cout << "Translations installed to..." << dictionary[ "QT_INSTALL_TRANSLATIONS" ] << endl; |
|
3452 |
cout << "Examples installed to......." << dictionary[ "QT_INSTALL_EXAMPLES" ] << endl; |
|
3453 |
cout << "Demos installed to.........." << dictionary[ "QT_INSTALL_DEMOS" ] << endl << endl; |
|
3454 |
||
3455 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("wince"))) { |
|
3456 |
cout << "Using c runtime detection..." << dictionary[ "CE_CRT" ] << endl; |
|
3457 |
cout << "Cetest support.............." << dictionary[ "CETEST" ] << endl; |
|
3458 |
cout << "Signature..................." << dictionary[ "CE_SIGNATURE"] << endl << endl; |
|
3459 |
} |
|
3460 |
||
3461 |
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("symbian"))) { |
|
3462 |
cout << "Support for S60............." << dictionary[ "S60" ] << endl; |
|
3463 |
} |
|
3464 |
||
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3465 |
if (dictionary.contains("SYMBIAN_DEFFILES")) { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3466 |
cout << "Symbian DEF files enabled..." << dictionary[ "SYMBIAN_DEFFILES" ] << endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3467 |
if (dictionary["SYMBIAN_DEFFILES"] == "no") { |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3468 |
cout << "WARNING: Disabling DEF files will mean that Qt is NOT binary compatible with previous versions." << endl; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3469 |
cout << " This feature is only intended for use during development, NEVER for release builds." << endl; |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3470 |
} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3471 |
} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3472 |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3473 |
if (dictionary["ASSISTANT_WEBKIT"] == "yes") |
0 | 3474 |
cout << "Using WebKit as html rendering engine in Qt Assistant." << endl; |
3475 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3476 |
if (checkAvailability("INCREDIBUILD_XGE")) |
0 | 3477 |
cout << "Using IncrediBuild XGE......" << dictionary["INCREDIBUILD_XGE"] << endl; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3478 |
if (!qmakeDefines.isEmpty()) { |
0 | 3479 |
cout << "Defines....................."; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3480 |
for (QStringList::Iterator defs = qmakeDefines.begin(); defs != qmakeDefines.end(); ++defs) |
0 | 3481 |
cout << (*defs) << " "; |
3482 |
cout << endl; |
|
3483 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3484 |
if (!qmakeIncludes.isEmpty()) { |
0 | 3485 |
cout << "Include paths..............."; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3486 |
for (QStringList::Iterator incs = qmakeIncludes.begin(); incs != qmakeIncludes.end(); ++incs) |
0 | 3487 |
cout << (*incs) << " "; |
3488 |
cout << endl; |
|
3489 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3490 |
if (!qmakeLibs.isEmpty()) { |
0 | 3491 |
cout << "Additional libraries........"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3492 |
for (QStringList::Iterator libs = qmakeLibs.begin(); libs != qmakeLibs.end(); ++libs) |
0 | 3493 |
cout << (*libs) << " "; |
3494 |
cout << endl; |
|
3495 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3496 |
if (dictionary[ "QMAKE_INTERNAL" ] == "yes") { |
0 | 3497 |
cout << "Using internal configuration." << endl; |
3498 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3499 |
if (dictionary[ "SHARED" ] == "no") { |
0 | 3500 |
cout << "WARNING: Using static linking will disable the use of plugins." << endl; |
3501 |
cout << " Make sure you compile ALL needed modules into the library." << endl; |
|
3502 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3503 |
if (dictionary[ "OPENSSL" ] == "linked" && opensslLibs.isEmpty()) { |
0 | 3504 |
cout << "NOTE: When linking against OpenSSL, you can override the default" << endl; |
3505 |
cout << "library names through OPENSSL_LIBS." << endl; |
|
3506 |
cout << "For example:" << endl; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3507 |
cout << " configure -openssl-linked OPENSSL_LIBS=\"-lssleay32 -llibeay32\"" << endl; |
0 | 3508 |
} |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3509 |
if (dictionary[ "ZLIB_FORCED" ] == "yes") { |
0 | 3510 |
QString which_zlib = "supplied"; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3511 |
if (dictionary[ "ZLIB" ] == "system") |
0 | 3512 |
which_zlib = "system"; |
3513 |
||
3514 |
cout << "NOTE: The -no-zlib option was supplied but is no longer supported." << endl |
|
3515 |
<< endl |
|
3516 |
<< "Qt now requires zlib support in all builds, so the -no-zlib" << endl |
|
3517 |
<< "option was ignored. Qt will be built using the " << which_zlib |
|
3518 |
<< "zlib" << endl; |
|
3519 |
} |
|
3520 |
} |
|
3521 |
#endif |
|
3522 |
||
3523 |
#if !defined(EVAL) |
|
3524 |
void Configure::generateHeaders() |
|
3525 |
{ |
|
3526 |
if (dictionary["SYNCQT"] == "yes" |
|
3527 |
&& findFile("perl.exe")) { |
|
3528 |
cout << "Running syncqt..." << endl; |
|
3529 |
QStringList args; |
|
3530 |
args += buildPath + "/bin/syncqt.bat"; |
|
3531 |
QStringList env; |
|
3532 |
env += QString("QTDIR=" + sourcePath); |
|
3533 |
env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH")); |
|
3534 |
Environment::execute(args, env, QStringList()); |
|
3535 |
} |
|
3536 |
} |
|
3537 |
||
3538 |
void Configure::buildQmake() |
|
3539 |
{ |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3540 |
if (dictionary[ "BUILD_QMAKE" ] == "yes") { |
0 | 3541 |
QStringList args; |
3542 |
||
3543 |
// Build qmake |
|
3544 |
QString pwd = QDir::currentPath(); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3545 |
QDir::setCurrent(buildPath + "/qmake"); |
0 | 3546 |
|
3547 |
QString makefile = "Makefile"; |
|
3548 |
{ |
|
3549 |
QFile out(makefile); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3550 |
if (out.open(QFile::WriteOnly | QFile::Text)) { |
0 | 3551 |
QTextStream stream(&out); |
3552 |
stream << "#AutoGenerated by configure.exe" << endl |
|
3553 |
<< "BUILD_PATH = " << QDir::convertSeparators(buildPath) << endl |
|
3554 |
<< "SOURCE_PATH = " << QDir::convertSeparators(sourcePath) << endl; |
|
3555 |
stream << "QMAKESPEC = " << dictionary["QMAKESPEC"] << endl; |
|
3556 |
||
3557 |
if (dictionary["EDITION"] == "OpenSource" || |
|
3558 |
dictionary["QT_EDITION"].contains("OPENSOURCE")) |
|
3559 |
stream << "QMAKE_OPENSOURCE_EDITION = yes" << endl; |
|
3560 |
stream << "\n\n"; |
|
3561 |
||
3562 |
QFile in(sourcePath + "/qmake/" + dictionary["QMAKEMAKEFILE"]); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3563 |
if (in.open(QFile::ReadOnly | QFile::Text)) { |
0 | 3564 |
QString d = in.readAll(); |
3565 |
//### need replaces (like configure.sh)? --Sam |
|
3566 |
stream << d << endl; |
|
3567 |
} |
|
3568 |
stream.flush(); |
|
3569 |
out.close(); |
|
3570 |
} |
|
3571 |
} |
|
3572 |
||
3573 |
args += dictionary[ "MAKE" ]; |
|
3574 |
args += "-f"; |
|
3575 |
args += makefile; |
|
3576 |
||
3577 |
cout << "Creating qmake..." << endl; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3578 |
int exitCode = Environment::execute(args, QStringList(), QStringList()); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3579 |
if (exitCode) { |
0 | 3580 |
args.clear(); |
3581 |
args += dictionary[ "MAKE" ]; |
|
3582 |
args += "-f"; |
|
3583 |
args += makefile; |
|
3584 |
args += "clean"; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3585 |
exitCode = Environment::execute(args, QStringList(), QStringList()); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3586 |
if (exitCode) { |
0 | 3587 |
cout << "Cleaning qmake failed, return code " << exitCode << endl << endl; |
3588 |
dictionary[ "DONE" ] = "error"; |
|
3589 |
} else { |
|
3590 |
args.clear(); |
|
3591 |
args += dictionary[ "MAKE" ]; |
|
3592 |
args += "-f"; |
|
3593 |
args += makefile; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3594 |
exitCode = Environment::execute(args, QStringList(), QStringList()); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3595 |
if (exitCode) { |
0 | 3596 |
cout << "Building qmake failed, return code " << exitCode << endl << endl; |
3597 |
dictionary[ "DONE" ] = "error"; |
|
3598 |
} |
|
3599 |
} |
|
3600 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3601 |
QDir::setCurrent(pwd); |
0 | 3602 |
} |
3603 |
} |
|
3604 |
#endif |
|
3605 |
||
3606 |
void Configure::buildHostTools() |
|
3607 |
{ |
|
3608 |
if (dictionary[ "NOPROCESS" ] == "yes") |
|
3609 |
dictionary[ "DONE" ] = "yes"; |
|
3610 |
||
3611 |
if (!dictionary.contains("XQMAKESPEC")) |
|
3612 |
return; |
|
3613 |
||
3614 |
QString pwd = QDir::currentPath(); |
|
3615 |
QStringList hostToolsDirs; |
|
3616 |
hostToolsDirs |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3617 |
<< "src/tools" |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3618 |
<< "tools/linguist/lrelease"; |
0 | 3619 |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3620 |
if (dictionary["XQMAKESPEC"].startsWith("wince")) |
0 | 3621 |
hostToolsDirs << "tools/checksdk"; |
3622 |
||
3623 |
if (dictionary[ "CETEST" ] == "yes") |
|
3624 |
hostToolsDirs << "tools/qtestlib/wince/cetest"; |
|
3625 |
||
3626 |
for (int i = 0; i < hostToolsDirs.count(); ++i) { |
|
3627 |
cout << "Creating " << hostToolsDirs.at(i) << " ..." << endl; |
|
3628 |
QString toolBuildPath = buildPath + "/" + hostToolsDirs.at(i); |
|
3629 |
QString toolSourcePath = sourcePath + "/" + hostToolsDirs.at(i); |
|
3630 |
||
3631 |
// generate Makefile |
|
3632 |
QStringList args; |
|
3633 |
args << QDir::toNativeSeparators(buildPath + "/bin/qmake"); |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3634 |
// override .qmake.cache because we are not cross-building these. |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3635 |
// we need a full path so that a build with -prefix will still find it. |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3636 |
args << "-spec" << QDir::toNativeSeparators(buildPath + "/mkspecs/" + dictionary["QMAKESPEC"]); |
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3637 |
args << "-r"; |
0 | 3638 |
args << "-o" << QDir::toNativeSeparators(toolBuildPath + "/Makefile"); |
3639 |
||
3640 |
QDir().mkpath(toolBuildPath); |
|
3641 |
QDir::setCurrent(toolSourcePath); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3642 |
int exitCode = Environment::execute(args, QStringList(), QStringList()); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3643 |
if (exitCode) { |
0 | 3644 |
cout << "qmake failed, return code " << exitCode << endl << endl; |
3645 |
dictionary["DONE"] = "error"; |
|
3646 |
break; |
|
3647 |
} |
|
3648 |
||
3649 |
// build app |
|
3650 |
args.clear(); |
|
3651 |
args += dictionary["MAKE"]; |
|
3652 |
QDir::setCurrent(toolBuildPath); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3653 |
exitCode = Environment::execute(args, QStringList(), QStringList()); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3654 |
if (exitCode) { |
0 | 3655 |
args.clear(); |
3656 |
args += dictionary["MAKE"]; |
|
3657 |
args += "clean"; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3658 |
exitCode = Environment::execute(args, QStringList(), QStringList()); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3659 |
if (exitCode) { |
0 | 3660 |
cout << "Cleaning " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl; |
3661 |
dictionary["DONE"] = "error"; |
|
3662 |
break; |
|
3663 |
} else { |
|
3664 |
args.clear(); |
|
3665 |
args += dictionary["MAKE"]; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3666 |
exitCode = Environment::execute(args, QStringList(), QStringList()); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
3667 |
if (exitCode) { |
0 | 3668 |
cout << "Building " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl; |
3669 |
dictionary["DONE"] = "error"; |
|
3670 |
break; |
|
3671 |
} |
|
3672 |
} |
|
3673 |
} |
|
3674 |
} |
|
3675 |
QDir::setCurrent(pwd); |
|
3676 |
} |
|
3677 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3678 |
void Configure::findProjects(const QString& dirName) |
0 | 3679 |
{ |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3680 |
if (dictionary[ "NOPROCESS" ] == "no") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3681 |
QDir dir(dirName); |
0 | 3682 |
QString entryName; |
3683 |
int makeListNumber; |
|
3684 |
ProjectType qmakeTemplate; |
|
3685 |
const QFileInfoList &list = dir.entryInfoList(QStringList(QLatin1String("*.pro")), |
|
3686 |
QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3687 |
for (int i = 0; i < list.size(); ++i) { |
0 | 3688 |
const QFileInfo &fi = list.at(i); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3689 |
if (fi.fileName() != "qmake.pro") { |
0 | 3690 |
entryName = dirName + "/" + fi.fileName(); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3691 |
if (fi.isDir()) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3692 |
findProjects(entryName); |
0 | 3693 |
} else { |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3694 |
qmakeTemplate = projectType(fi.absoluteFilePath()); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3695 |
switch (qmakeTemplate) { |
0 | 3696 |
case Lib: |
3697 |
case Subdirs: |
|
3698 |
makeListNumber = 1; |
|
3699 |
break; |
|
3700 |
default: |
|
3701 |
makeListNumber = 2; |
|
3702 |
break; |
|
3703 |
} |
|
3704 |
makeList[makeListNumber].append(new MakeItem(sourceDir.relativeFilePath(fi.absolutePath()), |
|
3705 |
fi.fileName(), |
|
3706 |
"Makefile", |
|
3707 |
qmakeTemplate)); |
|
3708 |
} |
|
3709 |
} |
|
3710 |
||
3711 |
} |
|
3712 |
} |
|
3713 |
} |
|
3714 |
||
3715 |
void Configure::appendMakeItem(int inList, const QString &item) |
|
3716 |
{ |
|
3717 |
QString dir; |
|
3718 |
if (item != "src") |
|
3719 |
dir = "/" + item; |
|
3720 |
dir.prepend("/src"); |
|
3721 |
makeList[inList].append(new MakeItem(sourcePath + dir, |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3722 |
item + ".pro", buildPath + dir + "/Makefile", Lib)); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3723 |
if (dictionary[ "DSPFILES" ] == "yes") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3724 |
makeList[inList].append(new MakeItem(sourcePath + dir, |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3725 |
item + ".pro", buildPath + dir + "/" + item + ".dsp", Lib)); |
0 | 3726 |
} |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3727 |
if (dictionary[ "VCPFILES" ] == "yes") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3728 |
makeList[inList].append(new MakeItem(sourcePath + dir, |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3729 |
item + ".pro", buildPath + dir + "/" + item + ".vcp", Lib)); |
0 | 3730 |
} |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3731 |
if (dictionary[ "VCPROJFILES" ] == "yes") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3732 |
makeList[inList].append(new MakeItem(sourcePath + dir, |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3733 |
item + ".pro", buildPath + dir + "/" + item + ".vcproj", Lib)); |
0 | 3734 |
} |
3735 |
} |
|
3736 |
||
3737 |
void Configure::generateMakefiles() |
|
3738 |
{ |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3739 |
if (dictionary[ "NOPROCESS" ] == "no") { |
0 | 3740 |
#if !defined(EVAL) |
3741 |
cout << "Creating makefiles in src..." << endl; |
|
3742 |
#endif |
|
3743 |
||
3744 |
QString spec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ]; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3745 |
if (spec != "win32-msvc") |
0 | 3746 |
dictionary[ "DSPFILES" ] = "no"; |
3747 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3748 |
if (spec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince"))) |
0 | 3749 |
dictionary[ "VCPROJFILES" ] = "no"; |
3750 |
||
3751 |
int i = 0; |
|
3752 |
QString pwd = QDir::currentPath(); |
|
3753 |
if (dictionary["FAST"] != "yes") { |
|
3754 |
QString dirName; |
|
3755 |
bool generate = true; |
|
3756 |
bool doDsp = (dictionary["DSPFILES"] == "yes" || dictionary["VCPFILES"] == "yes" |
|
3757 |
|| dictionary["VCPROJFILES"] == "yes"); |
|
3758 |
while (generate) { |
|
3759 |
QString pwd = QDir::currentPath(); |
|
3760 |
QString dirPath = fixSeparators(buildPath + dirName); |
|
3761 |
QStringList args; |
|
3762 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3763 |
args << fixSeparators(buildPath + "/bin/qmake"); |
0 | 3764 |
|
3765 |
if (doDsp) { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3766 |
if (dictionary[ "DEPENDENCIES" ] == "no") |
0 | 3767 |
args << "-nodepend"; |
3768 |
args << "-tp" << "vc"; |
|
3769 |
doDsp = false; // DSP files will be done |
|
3770 |
printf("Generating Visual Studio project files...\n"); |
|
3771 |
} else { |
|
3772 |
printf("Generating Makefiles...\n"); |
|
3773 |
generate = false; // Now Makefiles will be done |
|
3774 |
} |
|
37
758a864f9613
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
3775 |
// don't pass -spec - .qmake.cache has it already |
0 | 3776 |
args << "-r"; |
3777 |
args << (sourcePath + "/projects.pro"); |
|
3778 |
args << "-o"; |
|
3779 |
args << buildPath; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3780 |
if (!dictionary[ "QMAKEADDITIONALARGS" ].isEmpty()) |
0 | 3781 |
args << dictionary[ "QMAKEADDITIONALARGS" ]; |
3782 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3783 |
QDir::setCurrent(fixSeparators(dirPath)); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3784 |
if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { |
0 | 3785 |
cout << "Qmake failed, return code " << exitCode << endl << endl; |
3786 |
dictionary[ "DONE" ] = "error"; |
|
3787 |
} |
|
3788 |
} |
|
3789 |
} else { |
|
3790 |
findProjects(sourcePath); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3791 |
for (i=0; i<3; i++) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3792 |
for (int j=0; j<makeList[i].size(); ++j) { |
0 | 3793 |
MakeItem *it=makeList[i][j]; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3794 |
QString dirPath = fixSeparators(it->directory + "/"); |
0 | 3795 |
QString projectName = it->proFile; |
3796 |
QString makefileName = buildPath + "/" + dirPath + it->target; |
|
3797 |
||
3798 |
// For shadowbuilds, we need to create the path first |
|
3799 |
QDir buildPathDir(buildPath); |
|
3800 |
if (sourcePath != buildPath && !buildPathDir.exists(dirPath)) |
|
3801 |
buildPathDir.mkpath(dirPath); |
|
3802 |
||
3803 |
QStringList args; |
|
3804 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3805 |
args << fixSeparators(buildPath + "/bin/qmake"); |
0 | 3806 |
args << sourcePath + "/" + dirPath + projectName; |
3807 |
args << dictionary[ "QMAKE_ALL_ARGS" ]; |
|
3808 |
||
3809 |
cout << "For " << qPrintable(dirPath + projectName) << endl; |
|
3810 |
args << "-o"; |
|
3811 |
args << it->target; |
|
3812 |
args << "-spec"; |
|
3813 |
args << spec; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3814 |
if (!dictionary[ "QMAKEADDITIONALARGS" ].isEmpty()) |
0 | 3815 |
args << dictionary[ "QMAKEADDITIONALARGS" ]; |
3816 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3817 |
QDir::setCurrent(fixSeparators(dirPath)); |
0 | 3818 |
|
3819 |
QFile file(makefileName); |
|
3820 |
if (!file.open(QFile::WriteOnly)) { |
|
3821 |
printf("failed on dirPath=%s, makefile=%s\n", |
|
3822 |
qPrintable(dirPath), qPrintable(makefileName)); |
|
3823 |
continue; |
|
3824 |
} |
|
3825 |
QTextStream txt(&file); |
|
3826 |
txt << "all:\n"; |
|
3827 |
txt << "\t" << args.join(" ") << "\n"; |
|
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
3828 |
txt << "\t\"$(MAKE)\" -$(MAKEFLAGS) -f " << it->target << "\n"; |
0 | 3829 |
txt << "first: all\n"; |
3830 |
txt << "qmake:\n"; |
|
3831 |
txt << "\t" << args.join(" ") << "\n"; |
|
3832 |
} |
|
3833 |
} |
|
3834 |
} |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3835 |
QDir::setCurrent(pwd); |
0 | 3836 |
} else { |
3837 |
cout << "Processing of project files have been disabled." << endl; |
|
3838 |
cout << "Only use this option if you really know what you're doing." << endl << endl; |
|
3839 |
return; |
|
3840 |
} |
|
3841 |
} |
|
3842 |
||
3843 |
void Configure::showSummary() |
|
3844 |
{ |
|
3845 |
QString make = dictionary[ "MAKE" ]; |
|
3846 |
if (!dictionary.contains("XQMAKESPEC")) { |
|
3847 |
cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl; |
|
3848 |
cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3849 |
} else if (dictionary.value("QMAKESPEC").startsWith("wince")) { |
0 | 3850 |
// we are cross compiling for Windows CE |
3851 |
cout << endl << endl << "Qt is now configured for building. To start the build run:" << endl |
|
3852 |
<< "\tsetcepaths " << dictionary.value("XQMAKESPEC") << endl |
|
3853 |
<< "\t" << qPrintable(make) << endl |
|
3854 |
<< "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; |
|
3855 |
} else { // Compiling for Symbian OS |
|
3856 |
cout << endl << endl << "Qt is now configured for building. To start the build run:" << qPrintable(dictionary["QTBUILDINSTRUCTION"]) << "." << endl |
|
3857 |
<< "To reconfigure, run '" << qPrintable(dictionary["CONFCLEANINSTRUCTION"]) << "' and configure." << endl; |
|
3858 |
} |
|
3859 |
} |
|
3860 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3861 |
Configure::ProjectType Configure::projectType(const QString& proFileName) |
0 | 3862 |
{ |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3863 |
QFile proFile(proFileName); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3864 |
if (proFile.open(QFile::ReadOnly)) { |
0 | 3865 |
QString buffer = proFile.readLine(1024); |
3866 |
while (!buffer.isEmpty()) { |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3867 |
QStringList segments = buffer.split(QRegExp("\\s")); |
0 | 3868 |
QStringList::Iterator it = segments.begin(); |
3869 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3870 |
if (segments.size() >= 3) { |
0 | 3871 |
QString keyword = (*it++); |
3872 |
QString operation = (*it++); |
|
3873 |
QString value = (*it++); |
|
3874 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3875 |
if (keyword == "TEMPLATE") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3876 |
if (value == "lib") |
0 | 3877 |
return Lib; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3878 |
else if (value == "subdirs") |
0 | 3879 |
return Subdirs; |
3880 |
} |
|
3881 |
} |
|
3882 |
// read next line |
|
3883 |
buffer = proFile.readLine(1024); |
|
3884 |
} |
|
3885 |
proFile.close(); |
|
3886 |
} |
|
3887 |
// Default to app handling |
|
3888 |
return App; |
|
3889 |
} |
|
3890 |
||
3891 |
#if !defined(EVAL) |
|
3892 |
||
3893 |
bool Configure::showLicense(QString orgLicenseFile) |
|
3894 |
{ |
|
3895 |
if (dictionary["LICENSE_CONFIRMED"] == "yes") { |
|
3896 |
cout << "You have already accepted the terms of the license." << endl << endl; |
|
3897 |
return true; |
|
3898 |
} |
|
3899 |
||
3900 |
bool haveGpl3 = false; |
|
3901 |
QString licenseFile = orgLicenseFile; |
|
3902 |
QString theLicense; |
|
3903 |
if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") { |
|
3904 |
haveGpl3 = QFile::exists(orgLicenseFile + "/LICENSE.GPL3"); |
|
3905 |
theLicense = "GNU Lesser General Public License (LGPL) version 2.1"; |
|
3906 |
if (haveGpl3) |
|
3907 |
theLicense += "\nor the GNU General Public License (GPL) version 3"; |
|
3908 |
} else { |
|
3909 |
// the first line of the license file tells us which license it is |
|
3910 |
QFile file(licenseFile); |
|
3911 |
if (!file.open(QFile::ReadOnly)) { |
|
3912 |
cout << "Failed to load LICENSE file" << endl; |
|
3913 |
return false; |
|
3914 |
} |
|
3915 |
theLicense = file.readLine().trimmed(); |
|
3916 |
} |
|
3917 |
||
3918 |
forever { |
|
3919 |
char accept = '?'; |
|
3920 |
cout << "You are licensed to use this software under the terms of" << endl |
|
3921 |
<< "the " << theLicense << "." << endl |
|
3922 |
<< endl; |
|
3923 |
if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") { |
|
3924 |
if (haveGpl3) |
|
3925 |
cout << "Type '3' to view the GNU General Public License version 3 (GPLv3)." << endl; |
|
3926 |
cout << "Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1)." << endl; |
|
3927 |
} else { |
|
3928 |
cout << "Type '?' to view the " << theLicense << "." << endl; |
|
3929 |
} |
|
3930 |
cout << "Type 'y' to accept this license offer." << endl |
|
3931 |
<< "Type 'n' to decline this license offer." << endl |
|
3932 |
<< endl |
|
3933 |
<< "Do you accept the terms of the license?" << endl; |
|
3934 |
cin >> accept; |
|
3935 |
accept = tolower(accept); |
|
3936 |
||
3937 |
if (accept == 'y') { |
|
3938 |
return true; |
|
3939 |
} else if (accept == 'n') { |
|
3940 |
return false; |
|
3941 |
} else { |
|
3942 |
if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") { |
|
3943 |
if (accept == '3') |
|
3944 |
licenseFile = orgLicenseFile + "/LICENSE.GPL3"; |
|
3945 |
else |
|
3946 |
licenseFile = orgLicenseFile + "/LICENSE.LGPL"; |
|
3947 |
} |
|
3948 |
// Get console line height, to fill the screen properly |
|
3949 |
int i = 0, screenHeight = 25; // default |
|
3950 |
CONSOLE_SCREEN_BUFFER_INFO consoleInfo; |
|
3951 |
HANDLE stdOut = GetStdHandle(STD_OUTPUT_HANDLE); |
|
3952 |
if (GetConsoleScreenBufferInfo(stdOut, &consoleInfo)) |
|
3953 |
screenHeight = consoleInfo.srWindow.Bottom |
|
3954 |
- consoleInfo.srWindow.Top |
|
3955 |
- 1; // Some overlap for context |
|
3956 |
||
3957 |
// Prompt the license content to the user |
|
3958 |
QFile file(licenseFile); |
|
3959 |
if (!file.open(QFile::ReadOnly)) { |
|
3960 |
cout << "Failed to load LICENSE file" << licenseFile << endl; |
|
3961 |
return false; |
|
3962 |
} |
|
3963 |
QStringList licenseContent = QString(file.readAll()).split('\n'); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3964 |
while (i < licenseContent.size()) { |
0 | 3965 |
cout << licenseContent.at(i) << endl; |
3966 |
if (++i % screenHeight == 0) { |
|
3967 |
cout << "(Press any key for more..)"; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
3968 |
if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) |
0 | 3969 |
exit(0); // Exit cleanly for Ctrl+C |
3970 |
cout << "\r"; // Overwrite text above |
|
3971 |
} |
|
3972 |
} |
|
3973 |
} |
|
3974 |
} |
|
3975 |
} |
|
3976 |
||
3977 |
void Configure::readLicense() |
|
3978 |
{ |
|
3979 |
if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") && |
|
3980 |
(dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) |
|
3981 |
dictionary["PLATFORM NAME"] = "Qt for Windows CE"; |
|
3982 |
else if (dictionary.value("XQMAKESPEC").startsWith("symbian")) |
|
3983 |
dictionary["PLATFORM NAME"] = "Qt for Symbian"; |
|
3984 |
else |
|
3985 |
dictionary["PLATFORM NAME"] = "Qt for Windows"; |
|
3986 |
dictionary["LICENSE FILE"] = sourcePath; |
|
3987 |
||
3988 |
bool openSource = false; |
|
3989 |
bool hasOpenSource = QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL"); |
|
3990 |
if (dictionary["BUILDNOKIA"] == "yes" || dictionary["BUILDTYPE"] == "commercial") { |
|
3991 |
openSource = false; |
|
3992 |
} else if (dictionary["BUILDTYPE"] == "opensource") { |
|
3993 |
openSource = true; |
|
3994 |
} else if (hasOpenSource) { // No Open Source? Just display the commercial license right away |
|
3995 |
forever { |
|
3996 |
char accept = '?'; |
|
3997 |
cout << "Which edition of Qt do you want to use ?" << endl; |
|
3998 |
cout << "Type 'c' if you want to use the Commercial Edition." << endl; |
|
3999 |
cout << "Type 'o' if you want to use the Open Source Edition." << endl; |
|
4000 |
cin >> accept; |
|
4001 |
accept = tolower(accept); |
|
4002 |
||
4003 |
if (accept == 'c') { |
|
4004 |
openSource = false; |
|
4005 |
break; |
|
4006 |
} else if (accept == 'o') { |
|
4007 |
openSource = true; |
|
4008 |
break; |
|
4009 |
} |
|
4010 |
} |
|
4011 |
} |
|
4012 |
if (hasOpenSource && openSource) { |
|
4013 |
cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl; |
|
4014 |
licenseInfo["LICENSEE"] = "Open Source"; |
|
4015 |
dictionary["EDITION"] = "OpenSource"; |
|
4016 |
dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE"; |
|
4017 |
cout << endl; |
|
4018 |
if (!showLicense(dictionary["LICENSE FILE"])) { |
|
4019 |
cout << "Configuration aborted since license was not accepted"; |
|
4020 |
dictionary["DONE"] = "error"; |
|
4021 |
return; |
|
4022 |
} |
|
4023 |
} else if (openSource) { |
|
4024 |
cout << endl << "Cannot find the GPL license files! Please download the Open Source version of the library." << endl; |
|
4025 |
dictionary["DONE"] = "error"; |
|
4026 |
} |
|
4027 |
#ifdef COMMERCIAL_VERSION |
|
4028 |
else { |
|
4029 |
Tools::checkLicense(dictionary, licenseInfo, firstLicensePath()); |
|
4030 |
if (dictionary["DONE"] != "error" && dictionary["BUILDNOKIA"] != "yes") { |
|
4031 |
// give the user some feedback, and prompt for license acceptance |
|
4032 |
cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " " << dictionary["EDITION"] << " Edition."<< endl << endl; |
|
4033 |
if (!showLicense(dictionary["LICENSE FILE"])) { |
|
4034 |
cout << "Configuration aborted since license was not accepted"; |
|
4035 |
dictionary["DONE"] = "error"; |
|
4036 |
return; |
|
4037 |
} |
|
4038 |
} |
|
4039 |
} |
|
4040 |
#else // !COMMERCIAL_VERSION |
|
4041 |
else { |
|
4042 |
cout << endl << "Cannot build commercial edition from the open source version of the library." << endl; |
|
4043 |
dictionary["DONE"] = "error"; |
|
4044 |
} |
|
4045 |
#endif |
|
4046 |
} |
|
4047 |
||
4048 |
void Configure::reloadCmdLine() |
|
4049 |
{ |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4050 |
if (dictionary[ "REDO" ] == "yes") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4051 |
QFile inFile(buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4052 |
if (inFile.open(QFile::ReadOnly)) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4053 |
QTextStream inStream(&inFile); |
0 | 4054 |
QString buffer; |
4055 |
inStream >> buffer; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4056 |
while (buffer.length()) { |
0 | 4057 |
configCmdLine += buffer; |
4058 |
inStream >> buffer; |
|
4059 |
} |
|
4060 |
inFile.close(); |
|
4061 |
} |
|
4062 |
} |
|
4063 |
} |
|
4064 |
||
4065 |
void Configure::saveCmdLine() |
|
4066 |
{ |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4067 |
if (dictionary[ "REDO" ] != "yes") { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4068 |
QFile outFile(buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache"); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4069 |
if (outFile.open(QFile::WriteOnly | QFile::Text)) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4070 |
QTextStream outStream(&outFile); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4071 |
for (QStringList::Iterator it = configCmdLine.begin(); it != configCmdLine.end(); ++it) { |
0 | 4072 |
outStream << (*it) << " " << endl; |
4073 |
} |
|
4074 |
outStream.flush(); |
|
4075 |
outFile.close(); |
|
4076 |
} |
|
4077 |
} |
|
4078 |
} |
|
4079 |
#endif // !EVAL |
|
4080 |
||
4081 |
bool Configure::isDone() |
|
4082 |
{ |
|
4083 |
return !dictionary["DONE"].isEmpty(); |
|
4084 |
} |
|
4085 |
||
4086 |
bool Configure::isOk() |
|
4087 |
{ |
|
4088 |
return (dictionary[ "DONE" ] != "error"); |
|
4089 |
} |
|
4090 |
||
4091 |
bool |
|
4092 |
Configure::filesDiffer(const QString &fn1, const QString &fn2) |
|
4093 |
{ |
|
4094 |
QFile file1(fn1), file2(fn2); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4095 |
if (!file1.open(QFile::ReadOnly) || !file2.open(QFile::ReadOnly)) |
0 | 4096 |
return true; |
4097 |
const int chunk = 2048; |
|
4098 |
int used1 = 0, used2 = 0; |
|
4099 |
char b1[chunk], b2[chunk]; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4100 |
while (!file1.atEnd() && !file2.atEnd()) { |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4101 |
if (!used1) |
0 | 4102 |
used1 = file1.read(b1, chunk); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4103 |
if (!used2) |
0 | 4104 |
used2 = file2.read(b2, chunk); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4105 |
if (used1 > 0 && used2 > 0) { |
0 | 4106 |
const int cmp = qMin(used1, used2); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4107 |
if (memcmp(b1, b2, cmp)) |
0 | 4108 |
return true; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4109 |
if ((used1 -= cmp)) |
0 | 4110 |
memcpy(b1, b1+cmp, used1); |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
4111 |
if ((used2 -= cmp)) |
0 | 4112 |
memcpy(b2, b2+cmp, used2); |
4113 |
} |
|
4114 |
} |
|
4115 |
return !file1.atEnd() || !file2.atEnd(); |
|
4116 |
} |
|
4117 |
||
4118 |
QT_END_NAMESPACE |