summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp96
1 files changed, 59 insertions, 37 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 092e26abfd..f0c6f7832d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -135,23 +135,9 @@ Configure::Configure(int& argc, char** argv)
const QString installPath = buildPath;
#endif
if (sourceDir != buildDir) { //shadow builds!
- cout << "Preparing build tree..." << endl;
QDir(buildPath).mkpath("bin");
- //copy the mkspecs
buildDir.mkpath("mkspecs");
- if (!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){
- cout << "Couldn't copy mkspecs!" << sourcePath << " " << buildPath << endl;
- dictionary["DONE"] = "error";
- return;
- }
-
- buildDir.mkpath("doc");
- if (!Environment::cpdir(sourcePath + "/doc/global", buildPath + "/doc/global")) {
- cout << "Couldn't copy global documentation!" << sourcePath << " " << buildPath << endl;
- dictionary["DONE"] = "error";
- return;
- }
}
defaultBuildParts << QStringLiteral("libs") << QStringLiteral("tools") << QStringLiteral("examples");
@@ -192,7 +178,6 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "AUDIO_BACKEND" ] = "auto";
dictionary[ "WMF_BACKEND" ] = "auto";
dictionary[ "WMSDK" ] = "auto";
- dictionary[ "V8SNAPSHOT" ] = "auto";
dictionary[ "QML_DEBUG" ] = "yes";
dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
dictionary[ "DIRECTWRITE" ] = "no";
@@ -275,6 +260,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "LIBJPEG" ] = "auto";
dictionary[ "LIBPNG" ] = "auto";
dictionary[ "FREETYPE" ] = "yes";
+ dictionary[ "HARFBUZZ" ] = "no";
dictionary[ "ACCESSIBILITY" ] = "yes";
dictionary[ "OPENGL" ] = "yes";
@@ -581,6 +567,13 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-system-freetype")
dictionary[ "FREETYPE" ] = "system";
+ else if (configCmdLine.at(i) == "-no-harfbuzz")
+ dictionary[ "HARFBUZZ" ] = "no";
+ else if (configCmdLine.at(i) == "-qt-harfbuzz")
+ dictionary[ "HARFBUZZ" ] = "yes";
+ else if (configCmdLine.at(i) == "-system-harfbuzz")
+ dictionary[ "HARFBUZZ" ] = "system";
+
// CE- C runtime --------------------------------------------
else if (configCmdLine.at(i) == "-crt") {
++i;
@@ -1817,7 +1810,7 @@ bool Configure::displayHelp()
desc("ZLIB", "system", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n");
desc("PCRE", "qt", "-qt-pcre", "Use the PCRE library bundled with Qt.");
- desc("PCRE", "qt", "-system-pcre", "Use the PCRE library from the operating system.\nSee http://pcre.org/\n");
+ desc("PCRE", "system", "-system-pcre", "Use the PCRE library from the operating system.\nSee http://pcre.org/\n");
desc("ICU", "yes", "-icu", "Use the ICU library.");
desc("ICU", "no", "-no-icu", "Do not use the ICU library.\nSee http://site.icu-project.org/\n");
@@ -1834,7 +1827,15 @@ bool Configure::displayHelp()
desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support.");
desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt.");
- desc("FREETYPE", "yes", "-system-freetype", "Use the libfreetype provided by the system.");
+ desc("FREETYPE", "system","-system-freetype", "Use the libfreetype provided by the system.");
+
+ desc("HARFBUZZ", "no", "-no-harfbuzz", "Do not compile in HarfBuzz-NG support.");
+ desc("HARFBUZZ", "yes", "-qt-harfbuzz", "(experimental) Use HarfBuzz-NG bundled with Qt\n"
+ "to do text shaping. It can still be disabled\n"
+ "by setting QT_HARFBUZZ environment variable to \"old\".");
+ desc("HARFBUZZ", "system","-system-harfbuzz", "(experimental) Use HarfBuzz-NG from the operating system\n"
+ "to do text shaping. It can still be disabled\n"
+ "by setting QT_HARFBUZZ environment variable to \"old\".");
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
desc("SLOG2", "yes", "-slog2", "Compile with slog2 support.");
@@ -2086,6 +2087,9 @@ bool Configure::checkAvailability(const QString &part)
available = checkAngleAvailability();
}
+ else if (part == "HARFBUZZ")
+ available = tryCompileProject("unix/harfbuzz");
+
else if (part == "LIBJPEG")
available = findFile("jpeglib.h");
else if (part == "LIBPNG")
@@ -2163,8 +2167,6 @@ bool Configure::checkAvailability(const QString &part)
&& !QStandardPaths::findExecutable(QStringLiteral("xgConsole.exe")).isEmpty();
} else if (part == "WMSDK") {
available = findFile("wmsdk.h");
- } else if (part == "V8SNAPSHOT") {
- available = true;
} else if (part == "AUDIO_BACKEND") {
available = true;
} else if (part == "WMF_BACKEND") {
@@ -2282,8 +2284,6 @@ void Configure::autoDetection()
dictionary["OPENSSL"] = checkAvailability("OPENSSL") ? "yes" : "no";
if (dictionary["DBUS"] == "auto")
dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no";
- if (dictionary["V8SNAPSHOT"] == "auto")
- dictionary["V8SNAPSHOT"] = (dictionary["V8"] == "yes") && checkAvailability("V8SNAPSHOT") ? "yes" : "no";
if (dictionary["QML_DEBUG"] == "auto")
dictionary["QML_DEBUG"] = dictionary["QML"] == "yes" ? "yes" : "no";
if (dictionary["AUDIO_BACKEND"] == "auto")
@@ -2506,6 +2506,11 @@ void Configure::generateOutputVars()
else if (dictionary[ "FREETYPE" ] == "system")
qtConfig += "system-freetype";
+ if (dictionary[ "HARFBUZZ" ] == "yes")
+ qtConfig += "harfbuzz";
+ else if (dictionary[ "HARFBUZZ" ] == "system")
+ qtConfig += "system-harfbuzz";
+
// Styles -------------------------------------------------------
if (dictionary[ "STYLE_WINDOWS" ] == "yes")
qmakeStyles += "windows";
@@ -2703,10 +2708,6 @@ void Configure::generateOutputVars()
// We currently have no switch for QtConcurrent, so add it unconditionally.
qtConfig += "concurrent";
- // ### Vestige
- if (dictionary[ "V8SNAPSHOT" ] == "yes")
- qtConfig += "v8snapshot";
-
if (dictionary[ "SYSTEM_PROXIES" ] == "yes")
qtConfig += "system-proxies";
@@ -2836,6 +2837,14 @@ void Configure::generateCachefile()
moduleStream << "QT_SKIP_MODULES += " << skipModules.join(' ') << endl;
moduleStream << endl;
+ moduleStream << "host_build {" << endl;
+ moduleStream << " QT_CPU_FEATURES." << dictionary["QT_HOST_ARCH"] <<
+ " = " << dictionary["QT_HOST_CPU_FEATURES"] << endl;
+ moduleStream << "} else {" << endl;
+ moduleStream << " QT_CPU_FEATURES." << dictionary["QT_ARCH"] <<
+ " = " << dictionary["QT_CPU_FEATURES"] << endl;
+ moduleStream << "}" << endl;
+
if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE")
moduleStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl;
@@ -3151,15 +3160,17 @@ void Configure::generateQConfigPri()
configStream << " qpa";
configStream << endl;
- configStream << "QT_ARCH = " << dictionary["QT_ARCH"] << endl;
- configStream << "QT_HOST_ARCH = " << dictionary["QT_HOST_ARCH"] << endl;
- configStream << "QT_CPU_FEATURES = " << dictionary["QT_CPU_FEATURES"] << endl;
- configStream << "QT_HOST_CPU_FEATURES = " << dictionary["QT_HOST_CPU_FEATURES"] << endl;
+ configStream << "host_build {" << endl;
+ configStream << " QT_ARCH = " << dictionary["QT_HOST_ARCH"] << endl;
+ configStream << " QT_TARGET_ARCH = " << dictionary["QT_ARCH"] << endl;
+ configStream << "} else {" << endl;
+ configStream << " QT_ARCH = " << dictionary["QT_ARCH"] << endl;
if (dictionary.contains("XQMAKESPEC") && !dictionary["XQMAKESPEC"].startsWith("wince")) {
// FIXME: add detection
- configStream << "QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl;
- configStream << "QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl;
+ configStream << " QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl;
+ configStream << " QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl;
}
+ configStream << "}" << endl;
if (dictionary["QT_EDITION"].contains("OPENSOURCE"))
configStream << "QT_EDITION = " << QLatin1String("OpenSource") << endl;
else
@@ -3332,6 +3343,7 @@ void Configure::generateConfigfiles()
if (dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS";
if (dictionary["QML_DEBUG"] == "no") qconfigList += "QT_QML_NO_DEBUGGER";
if (dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE";
+ if (dictionary["HARFBUZZ"] == "no") qconfigList += "QT_NO_HARFBUZZ";
if (dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES";
if (dictionary["OPENGL_ES_CM"] == "yes" ||
@@ -3437,7 +3449,8 @@ void Configure::displayConfig()
sout << "Licensee...................." << (l1.isNull() ? "" : l1) << endl;
sout << "License ID.................." << (l2.isNull() ? "" : l2) << endl;
sout << "Product license............." << (l3.isNull() ? "" : l3) << endl;
- sout << "Expiry Date................." << (l4.isNull() ? "" : l4) << endl << endl;
+ sout << "Expiry Date................." << (l4.isNull() ? "" : l4) << endl;
+ sout << endl;
}
sout << "Configuration:" << endl;
@@ -3491,19 +3504,22 @@ void Configure::displayConfig()
sout << "Qt GUI module support......." << dictionary[ "GUI" ] << endl;
sout << "QML debugging..............." << dictionary[ "QML_DEBUG" ] << endl;
sout << "DirectWrite support........." << dictionary[ "DIRECTWRITE" ] << endl;
- sout << "Use system proxies.........." << dictionary[ "SYSTEM_PROXIES" ] << endl << endl;
+ sout << "Use system proxies.........." << dictionary[ "SYSTEM_PROXIES" ] << endl;
+ sout << endl;
sout << "Third Party Libraries:" << endl;
sout << " ZLIB support............" << dictionary[ "ZLIB" ] << endl;
sout << " GIF support............." << dictionary[ "GIF" ] << endl;
sout << " JPEG support............" << dictionary[ "JPEG" ] << endl;
sout << " PNG support............." << dictionary[ "PNG" ] << endl;
- sout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl;
+ sout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl;
+ sout << " HarfBuzz-NG support....." << dictionary[ "HARFBUZZ" ] << endl;
sout << " PCRE support............" << dictionary[ "PCRE" ] << endl;
sout << " ICU support............." << dictionary[ "ICU" ] << endl;
if ((platform() == QNX) || (platform() == BLACKBERRY))
sout << " SLOG2 support..........." << dictionary[ "SLOG2" ] << endl;
sout << " ANGLE..................." << dictionary[ "ANGLE" ] << endl;
+ sout << endl;
sout << "Styles:" << endl;
sout << " Windows................." << dictionary[ "STYLE_WINDOWS" ] << endl;
@@ -3511,7 +3527,8 @@ void Configure::displayConfig()
sout << " Windows Vista..........." << dictionary[ "STYLE_WINDOWSVISTA" ] << endl;
sout << " Fusion.................." << dictionary[ "STYLE_FUSION" ] << endl;
sout << " Windows CE.............." << dictionary[ "STYLE_WINDOWSCE" ] << endl;
- sout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl << endl;
+ sout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl;
+ sout << endl;
sout << "Sql Drivers:" << endl;
sout << " ODBC...................." << dictionary[ "SQL_ODBC" ] << endl;
@@ -3522,7 +3539,8 @@ void Configure::displayConfig()
sout << " DB2....................." << dictionary[ "SQL_DB2" ] << endl;
sout << " SQLite.................." << dictionary[ "SQL_SQLITE" ] << " (" << dictionary[ "SQL_SQLITE_LIB" ] << ")" << endl;
sout << " SQLite2................." << dictionary[ "SQL_SQLITE2" ] << endl;
- sout << " InterBase..............." << dictionary[ "SQL_IBASE" ] << endl << endl;
+ sout << " InterBase..............." << dictionary[ "SQL_IBASE" ] << endl;
+ sout << endl;
sout << "Sources are in.............." << QDir::toNativeSeparators(sourcePath) << endl;
sout << "Build is done in............" << QDir::toNativeSeparators(buildPath) << endl;
@@ -3544,7 +3562,8 @@ void Configure::displayConfig()
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("wince"))) {
sout << "Using c runtime detection..." << dictionary[ "CE_CRT" ] << endl;
sout << "Cetest support.............." << dictionary[ "CETEST" ] << endl;
- sout << "Signature..................." << dictionary[ "CE_SIGNATURE"] << endl << endl;
+ sout << "Signature..................." << dictionary[ "CE_SIGNATURE"] << endl;
+ sout << endl;
}
if (checkAvailability("INCREDIBUILD_XGE"))
@@ -3950,6 +3969,9 @@ void Configure::buildQmake()
QTextStream confStream(&confFile);
confStream << "[EffectivePaths]" << endl
<< "Prefix=.." << endl;
+ if (sourcePath != buildPath)
+ confStream << "[EffectiveSourcePaths]" << endl
+ << "Prefix=" << sourcePath << endl;
confStream.flush();
confFile.close();