diff options
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/Makefile.mingw | 1 | ||||
-rw-r--r-- | tools/configure/Makefile.win32 | 3 | ||||
-rw-r--r-- | tools/configure/configure.pro | 3 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 70 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 14 | ||||
-rw-r--r-- | tools/configure/environment.cpp | 18 | ||||
-rw-r--r-- | tools/configure/main.cpp | 12 | ||||
-rw-r--r-- | tools/configure/tools.cpp | 4 |
8 files changed, 91 insertions, 34 deletions
diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw index 1994c9a52b..11bfbe562a 100644 --- a/tools/configure/Makefile.mingw +++ b/tools/configure/Makefile.mingw @@ -60,6 +60,7 @@ OBJECTS = \ qmap.o \ qregexp.o \ qstring.o \ + qstring_compat.o \ qstringlist.o \ qvsnprintf.o \ qvariant.o \ diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index 6b922e6693..2ec99d30b0 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -9,7 +9,7 @@ CXXFLAGS_BARE = -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189 $(E CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) LINK = link LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest" -LIBS = ole32.lib advapi32.lib +LIBS = ole32.lib advapi32.lib shell32.lib TARGET = ..\..\configure.exe @@ -58,6 +58,7 @@ OBJECTS = \ qmap.obj \ qregexp.obj \ qstring.obj \ + qstring_compat.obj \ qstringlist.obj \ qvsnprintf.obj \ qvariant.obj \ diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index 2163e37a58..b73a93431d 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -7,7 +7,7 @@ DEFINES = UNICODE QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMP DEFINES += QT_BOOTSTRAPPED QT_BUILD_CONFIGURE win32 : LIBS += -lole32 -ladvapi32 -win32-g++* : LIBS += -luuid +mingw : LIBS += -luuid win32-msvc* { QMAKE_CFLAGS_RELEASE -= -MD @@ -119,6 +119,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qmap.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qregexp.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qstring.cpp \ + $$QT_SOURCE_TREE/src/corelib/tools/qstring_compat.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qstringlist.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qvsnprintf.cpp \ $$QT_SOURCE_TREE/src/corelib/kernel/qvariant.cpp \ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 5ab413a971..e04bd57b7f 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -182,6 +182,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "QML_DEBUG" ] = "yes"; dictionary[ "PLUGIN_MANIFESTS" ] = "no"; dictionary[ "DIRECTWRITE" ] = "no"; + dictionary[ "DIRECT2D" ] = "no"; dictionary[ "NIS" ] = "no"; dictionary[ "NEON" ] = "auto"; dictionary[ "LARGE_FILE" ] = "yes"; @@ -194,6 +195,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "QT_CUPS" ] = "auto"; dictionary[ "CFG_GCC_SYSROOT" ] = "yes"; dictionary[ "SLOG2" ] = "no"; + dictionary[ "QNX_IMF" ] = "no"; dictionary[ "PPS" ] = "no"; dictionary[ "SYSTEM_PROXIES" ] = "no"; dictionary[ "WERROR" ] = "auto"; @@ -880,6 +882,10 @@ void Configure::parseCmdLine() dictionary[ "SLOG2" ] = "no"; } else if (configCmdLine.at(i) == "-slog2") { dictionary[ "SLOG2" ] = "yes"; + } else if (configCmdLine.at(i) == "-no-imf") { + dictionary[ "QNX_IMF" ] = "no"; + } else if (configCmdLine.at(i) == "-imf") { + dictionary[ "QNX_IMF" ] = "yes"; } else if (configCmdLine.at(i) == "-no-pps") { dictionary[ "PPS" ] = "no"; } else if (configCmdLine.at(i) == "-pps") { @@ -1213,6 +1219,12 @@ void Configure::parseCmdLine() dictionary["DIRECTWRITE"] = "no"; } + else if (configCmdLine.at(i) == "-direct2d") { + dictionary["DIRECT2D"] = "yes"; + } else if (configCmdLine.at(i) == "-no-direct2d") { + dictionary["DIRECT2D"] = "no"; + } + else if (configCmdLine.at(i) == "-nis") { dictionary["NIS"] = "yes"; } else if (configCmdLine.at(i) == "-no-nis") { @@ -1595,18 +1607,17 @@ void Configure::applySpecSpecifics() dictionary[ "LIBJPEG" ] = "qt"; dictionary[ "LIBPNG" ] = "qt"; dictionary[ "FREETYPE" ] = "yes"; - dictionary[ "ACCESSIBILITY" ] = "no"; - dictionary[ "OPENGL" ] = "no"; - dictionary[ "OPENGL_ES_2" ] = "no"; + dictionary[ "OPENGL" ] = "yes"; + dictionary[ "OPENGL_ES_2" ] = "yes"; dictionary[ "OPENVG" ] = "no"; - dictionary[ "OPENSSL" ] = "auto"; + dictionary[ "OPENSSL" ] = "no"; dictionary[ "DBUS" ] = "no"; dictionary[ "ZLIB" ] = "qt"; dictionary[ "PCRE" ] = "qt"; dictionary[ "ICU" ] = "qt"; dictionary[ "CE_CRT" ] = "yes"; dictionary[ "LARGE_FILE" ] = "no"; - dictionary[ "ANGLE" ] = "no"; + dictionary[ "ANGLE" ] = "d3d11"; if (dictionary.value("XQMAKESPEC").startsWith("winphone")) dictionary[ "SQL_SQLITE" ] = "no"; } else if (dictionary.value("XQMAKESPEC").startsWith("wince")) { @@ -1653,6 +1664,7 @@ void Configure::applySpecSpecifics() } else if ((platform() == QNX) || (platform() == BLACKBERRY)) { dictionary["STACK_PROTECTOR_STRONG"] = "auto"; dictionary["SLOG2"] = "auto"; + dictionary["QNX_IMF"] = "auto"; dictionary["PPS"] = "auto"; dictionary["QT_XKBCOMMON"] = "no"; dictionary[ "ANGLE" ] = "no"; @@ -1870,7 +1882,8 @@ bool Configure::displayHelp() if ((platform() == QNX) || (platform() == BLACKBERRY)) { desc("SLOG2", "yes", "-slog2", "Compile with slog2 support."); desc("SLOG2", "no", "-no-slog2", "Do not compile with slog2 support."); - + desc("QNX_IMF", "yes", "-imf", "Compile with imf support."); + desc("QNX_IMF", "no", "-no-imf", "Do not compile with imf support."); desc("PPS", "yes", "-pps", "Compile with PPS support."); desc("PPS", "no", "-no-pps", "Do not compile with PPS support."); } @@ -1933,6 +1946,11 @@ bool Configure::displayHelp() desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering."); desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering (experimental, requires DirectWrite availability on target systems, e.g. Windows Vista with Platform Update, Windows 7, etc.)\n"); + desc("DIRECT2D", "no", "-no-direct2d", "Do not build the Direct2D platform plugin."); + desc("DIRECT2D", "yes", "-direct2d", "Build the Direct2D platform plugin (experimental,\n" + "requires Direct2D availability on target systems,\n" + "e.g. Windows 7 with Platform Update, Windows 8, etc.)\n"); + desc( "-no-style-<style>", "Disable <style> entirely."); desc( "-qt-style-<style>", "Enable <style> in the Qt Library.\nAvailable styles: "); @@ -2200,6 +2218,8 @@ bool Configure::checkAvailability(const QString &part) available = findFile("mfapi.h") && findFile("mf.lib"); } else if (part == "DIRECTWRITE") { available = findFile("dwrite.h") && findFile("d2d1.h") && findFile("dwrite.lib"); + } else if (part == "DIRECT2D") { + available = tryCompileProject("qpa/direct2d"); } else if (part == "ICONV") { available = tryCompileProject("unix/iconv") || tryCompileProject("unix/gnu-libiconv"); } else if (part == "INOTIFY") { @@ -2212,6 +2232,8 @@ bool Configure::checkAvailability(const QString &part) available = (platform() == QNX || platform() == BLACKBERRY) && compilerSupportsFlag("qcc -fstack-protector-strong"); } else if (part == "SLOG2") { available = tryCompileProject("unix/slog2"); + } else if (part == "QNX_IMF") { + available = tryCompileProject("unix/qqnx_imf"); } else if (part == "PPS") { available = (platform() == QNX || platform() == BLACKBERRY) && tryCompileProject("unix/pps"); } else if (part == "NEON") { @@ -2359,6 +2381,10 @@ void Configure::autoDetection() dictionary["SLOG2"] = checkAvailability("SLOG2") ? "yes" : "no"; } + if ((platform() == QNX || platform() == BLACKBERRY) && dictionary["QNX_IMF"] == "auto") { + dictionary["QNX_IMF"] = checkAvailability("QNX_IMF") ? "yes" : "no"; + } + if (dictionary["PPS"] == "auto") { dictionary["PPS"] = checkAvailability("PPS") ? "yes" : "no"; } @@ -2429,6 +2455,13 @@ bool Configure::verifyConfiguration() prompt = true; } + if (dictionary["DIRECT2D"] == "yes" && !checkAvailability("DIRECT2D")) { + cout << "WARNING: To be able to build the Direct2D platform plugin you will" << endl + << "need the Microsoft DirectWrite and Microsoft Direct2D development" << endl + << "files such as headers and libraries." << endl; + prompt = true; + } + // -angle given on command line, but Direct X cannot be found. if (dictionary["ANGLE"] != "no") { QString errorMessage; @@ -2718,6 +2751,9 @@ void Configure::generateOutputVars() if (dictionary["DIRECTWRITE"] == "yes") qtConfig += "directwrite"; + if (dictionary["DIRECT2D"] == "yes") + qtConfig += "direct2d"; + if (dictionary[ "NATIVE_GESTURES" ] == "yes") qtConfig += "native-gestures"; @@ -2988,6 +3024,10 @@ void Configure::detectArch() .arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"), QDir::toNativeSeparators(qmakespec), QDir::toNativeSeparators(sourcePath + "/config.tests/arch/arch.pro")); + + if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone")) + command.append(" QMAKE_LFLAGS+=/ENTRY:main"); + int returnValue = 0; Environment::execute(command, &returnValue); if (returnValue != 0) { @@ -3088,6 +3128,13 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext .arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"), QDir::toNativeSeparators(sourcePath + "/config.tests/" + projectPath), extraOptions); + + if (dictionary.contains("XQMAKESPEC")) { + const QString qmakespec = dictionary["XQMAKESPEC"]; + if (qmakespec.startsWith("winrt") || qmakespec.startsWith("winphone")) + command.append(" QMAKE_LFLAGS+=/ENTRY:main"); + } + int code = 0; QString output = Environment::execute(command, &code); //cout << output << endl; @@ -3189,6 +3236,9 @@ void Configure::generateQConfigPri() if (dictionary[ "SLOG2" ] == "yes") configStream << " slog2"; + if (dictionary[ "QNX_IMF" ] == "yes") + configStream << " qqnx_imf"; + if (dictionary[ "PPS" ] == "yes") configStream << " qqnx_pps"; @@ -3339,8 +3389,6 @@ void Configure::generateConfigfiles() tmpStream << "#define QT_COMPILER_SUPPORTS_AVX2" << endl; if (dictionary[ "IWMMXT" ] == "yes") tmpStream << "#define QT_COMPILER_SUPPORTS_IWMMXT" << endl; - if (dictionary[ "NEON" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_NEON" << endl; if (dictionary["QREAL"] != "double") tmpStream << "#define QT_COORD_TYPE " << dictionary["QREAL"] << endl; @@ -3548,6 +3596,11 @@ void Configure::displayConfig() sout << "Use system proxies.........." << dictionary[ "SYSTEM_PROXIES" ] << endl; sout << endl; + sout << "QPA Backends:" << endl; + sout << " GDI....................." << "yes" << endl; + sout << " Direct2D................" << dictionary[ "DIRECT2D" ] << endl; + sout << endl; + sout << "Third Party Libraries:" << endl; sout << " ZLIB support............" << dictionary[ "ZLIB" ] << endl; sout << " GIF support............." << dictionary[ "GIF" ] << endl; @@ -3560,6 +3613,7 @@ void Configure::displayConfig() sout << " ICU support............." << dictionary[ "ICU" ] << endl; if ((platform() == QNX) || (platform() == BLACKBERRY)) { sout << " SLOG2 support..........." << dictionary[ "SLOG2" ] << endl; + sout << " IMF support............." << dictionary[ "QNX_IMF" ] << endl; sout << " PPS support............." << dictionary[ "PPS" ] << endl; } sout << " ANGLE..................." << dictionary[ "ANGLE" ] << endl; diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index bf0f61639f..3e0e691dab 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -88,9 +88,9 @@ public: QString addDefine(QString def); enum ProjectType { - App, - Lib, - Subdirs + App, + Lib, + Subdirs }; ProjectType projectType( const QString& proFileName ); @@ -182,10 +182,10 @@ class MakeItem { public: MakeItem( const QString &d, const QString &p, const QString &t, Configure::ProjectType qt ) - : directory( d ), - proFile( p ), - target( t ), - qmakeTemplate( qt ) + : directory( d ), + proFile( p ), + target( t ), + qmakeTemplate( qt ) { } QString directory; diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 81769aa043..d0b0065d8a 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -467,8 +467,8 @@ bool Environment::cpdir(const QString &srcDir, const QString &destDir) qDebug() << "Attempt to cpdir " << cleanSrcName << "->" << cleanDstName; #endif if(!QFile::exists(cleanDstName) && !QDir().mkpath(cleanDstName)) { - qDebug() << "cpdir: Failure to create " << cleanDstName; - return false; + qDebug() << "cpdir: Failure to create " << cleanDstName; + return false; } bool result = true; @@ -476,23 +476,23 @@ bool Environment::cpdir(const QString &srcDir, const QString &destDir) QFileInfoList allEntries = dir.entryInfoList(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot); for (int i = 0; result && (i < allEntries.count()); ++i) { QFileInfo entry = allEntries.at(i); - bool intermediate = true; + bool intermediate = true; if (entry.isDir()) { intermediate = cpdir(QString("%1/%2").arg(cleanSrcName).arg(entry.fileName()), QString("%1/%2").arg(cleanDstName).arg(entry.fileName())); } else { QString destFile = QString("%1/%2").arg(cleanDstName).arg(entry.fileName()); #ifdef CONFIGURE_DEBUG_CP_DIR - qDebug() << "About to cp (file)" << entry.absoluteFilePath() << "->" << destFile; + qDebug() << "About to cp (file)" << entry.absoluteFilePath() << "->" << destFile; #endif - QFile::remove(destFile); + QFile::remove(destFile); intermediate = QFile::copy(entry.absoluteFilePath(), destFile); SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL); } - if(!intermediate) { - qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir(); - result = false; - } + if (!intermediate) { + qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir(); + result = false; + } } return result; } diff --git a/tools/configure/main.cpp b/tools/configure/main.cpp index 1e6aa3f298..ebbb4b1e54 100644 --- a/tools/configure/main.cpp +++ b/tools/configure/main.cpp @@ -59,7 +59,7 @@ int runConfigure( int argc, char** argv ) if (!app.isOk()) return 3; if( app.displayHelp() ) - return 1; + return 1; // Read license now, and exit if it doesn't pass. // This lets the user see the command-line options of configure @@ -103,19 +103,19 @@ int runConfigure( int argc, char** argv ) app.generateOutputVars(); if( !app.isDone() ) - app.generateCachefile(); + app.generateCachefile(); if( !app.isDone() ) - app.generateConfigfiles(); + app.generateConfigfiles(); if (!app.isDone()) app.generateQConfigPri(); if (!app.isDone()) app.displayConfig(); if( !app.isDone() ) - app.generateMakefiles(); + app.generateMakefiles(); if( !app.isDone() ) - app.showSummary(); + app.showSummary(); if( !app.isOk() ) - return 2; + return 2; return 0; } diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp index ed0f3efb1b..e9174bf102 100644 --- a/tools/configure/tools.cpp +++ b/tools/configure/tools.cpp @@ -157,13 +157,13 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString case PL('X','C'): case PL('X','U'): case PL('X','W'): - case PL('X','M'): // old license key + case PL('X','M'): // old license key dictionary["LICENSE_EXTENSION"] = "-ALLOS"; break; case PL('6', 'M'): case PL('8', 'M'): - case PL('K', 'M'): // old license key + case PL('K', 'M'): // old license key case PL('N', '7'): case PL('N', '9'): case PL('N', 'X'): |