diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/Makefile.mingw | 1 | ||||
-rw-r--r-- | tools/configure/Makefile.win32 | 2 | ||||
-rw-r--r-- | tools/configure/configure.pro | 1 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 147 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 23 |
5 files changed, 51 insertions, 123 deletions
diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw index db8db54888..736c14731e 100644 --- a/tools/configure/Makefile.mingw +++ b/tools/configure/Makefile.mingw @@ -49,6 +49,7 @@ OBJECTS = \ qfsfileengine_win.o \ qfsfileengine_iterator.o \ qiodevice.o \ + qdebug.o \ qtextstream.o \ qlogging.o \ qtemporaryfile.o \ diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index 98a2181e39..f783ef8ac3 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -47,6 +47,7 @@ OBJECTS = \ qfsfileengine_win.obj \ qfsfileengine_iterator.obj \ qiodevice.obj \ + qdebug.obj \ qtextstream.obj \ qlogging.obj \ qtemporaryfile.obj \ @@ -121,6 +122,7 @@ qfsfileengine.obj: $(CORESRC)\io\qfsfileengine.cpp $(PCH) qfsfileengine_win.obj: $(CORESRC)\io\qfsfileengine_win.cpp $(PCH) qfsfileengine_iterator.obj: $(CORESRC)\io\qfsfileengine_iterator.cpp $(PCH) qiodevice.obj: $(CORESRC)\io\qiodevice.cpp $(PCH) +qdebug.obj: $(CORESRC)\io\qdebug.cpp $(PCH) qtextstream.obj: $(CORESRC)\io\qtextstream.cpp $(PCH) qtemporaryfile.obj: $(CORESRC)\io\qtemporaryfile.cpp $(PCH) qstandardpaths.obj: $(CORESRC)\io\qstandardpaths.cpp $(PCH) diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index b73a93431d..d3237d472b 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -109,6 +109,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qiodevice.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qdebug.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qtextstream.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qtemporaryfile.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qstandardpaths.cpp \ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 90981f6624..f8715ef32e 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -157,9 +157,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "QCONFIG" ] = "full"; dictionary[ "EMBEDDED" ] = "no"; dictionary[ "BUILD_QMAKE" ] = "yes"; - dictionary[ "VCPROJFILES" ] = "yes"; dictionary[ "QMAKE_INTERNAL" ] = "no"; - dictionary[ "PROCESS" ] = "partial"; dictionary[ "WIDGETS" ] = "yes"; dictionary[ "GUI" ] = "yes"; dictionary[ "RTTI" ] = "yes"; @@ -239,7 +237,6 @@ Configure::Configure(int& argc, char** argv) } dictionary[ "REDO" ] = "no"; - dictionary[ "DEPENDENCIES" ] = "no"; dictionary[ "BUILD" ] = "debug"; dictionary[ "BUILDALL" ] = "auto"; // Means yes, but not explicitly @@ -253,13 +250,15 @@ Configure::Configure(int& argc, char** argv) dictionary[ "C++11" ] = "auto"; + dictionary[ "USE_GOLD_LINKER" ] = "no"; + dictionary[ "SHARED" ] = "yes"; dictionary[ "ZLIB" ] = "auto"; dictionary[ "PCRE" ] = "auto"; - dictionary[ "ICU" ] = "auto"; + dictionary[ "ICU" ] = "no"; dictionary[ "ANGLE" ] = "auto"; dictionary[ "DYNAMICGL" ] = "auto"; @@ -314,11 +313,6 @@ Configure::Configure(int& argc, char** argv) Configure::~Configure() { - for (int i=0; i<3; ++i) { - QList<MakeItem*> items = makeList[i]; - for (int j=0; j<items.size(); ++j) - delete items[j]; - } } QString Configure::formatPath(const QString &path) @@ -431,7 +425,15 @@ void Configure::parseCmdLine() ++i; if (i == argCount) break; - dictionary[ "QREAL" ] = configCmdLine.at(i); + QString s = dictionary[ "QREAL" ] = configCmdLine.at(i); + if (s == "float") { + dictionary[ "QREAL_STRING" ] = "\"float\""; + } else { + // escape + s = s.simplified(); + s = '"' + s.toLatin1().toPercentEncoding(QByteArray(), "-._~", '_') + '"'; + dictionary[ "QREAL_STRING" ] = s; + } } else if (configCmdLine.at(i) == "-release") { @@ -461,6 +463,10 @@ void Configure::parseCmdLine() dictionary[ "C++11" ] = "yes"; else if (configCmdLine.at(i) == "-no-c++11") dictionary[ "C++11" ] = "no"; + else if (configCmdLine.at(i) == "-use-gold-linker") + dictionary[ "USE_GOLD_LINKER" ] = "yes"; + else if (configCmdLine.at(i) == "-no-use-gold-linker") + dictionary[ "USE_GOLD_LINKER" ] = "no"; else if (configCmdLine.at(i) == "-shared") dictionary[ "SHARED" ] = "yes"; else if (configCmdLine.at(i) == "-static") @@ -788,12 +794,6 @@ void Configure::parseCmdLine() imageFormats.contains(configCmdLine.at(i).section('-', 3))) dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no"; - // IDE project generation ----------------------------------- - else if (configCmdLine.at(i) == "-no-vcproj") - dictionary[ "VCPROJFILES" ] = "no"; - else if (configCmdLine.at(i) == "-vcproj") - dictionary[ "VCPROJFILES" ] = "yes"; - else if (configCmdLine.at(i) == "-no-incredibuild-xge") dictionary[ "INCREDIBUILD_XGE" ] = "no"; else if (configCmdLine.at(i) == "-incredibuild-xge") @@ -943,19 +943,6 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-qmake") dictionary[ "BUILD_QMAKE" ] = "yes"; - else if (configCmdLine.at(i) == "-dont-process") - dictionary[ "PROCESS" ] = "no"; - else if (configCmdLine.at(i) == "-process") - dictionary[ "PROCESS" ] = "partial"; - else if (configCmdLine.at(i) == "-fully-process") - dictionary[ "PROCESS" ] = "full"; - - else if (configCmdLine.at(i) == "-no-qmake-deps") - dictionary[ "DEPENDENCIES" ] = "no"; - else if (configCmdLine.at(i) == "-qmake-deps") - dictionary[ "DEPENDENCIES" ] = "yes"; - - else if (configCmdLine.at(i) == "-qtnamespace") { ++i; if (i == argCount) @@ -1654,8 +1641,6 @@ void Configure::applySpecSpecifics() dictionary[ "LARGE_FILE" ] = "no"; dictionary[ "ANGLE" ] = "d3d11"; dictionary[ "DYNAMICGL" ] = "no"; - if (dictionary.value("XQMAKESPEC").startsWith("winphone")) - dictionary[ "SQL_SQLITE" ] = "no"; } else if (dictionary.value("XQMAKESPEC").startsWith("wince")) { dictionary[ "STYLE_WINDOWSXP" ] = "no"; dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; @@ -1783,6 +1768,9 @@ bool Configure::displayHelp() desc("C++11", "yes", "-c++11", "Compile Qt with C++11 support enabled."); desc("C++11", "no", "-no-c++11", "Do not compile Qt with C++11 support enabled.\n"); + desc("USE_GOLD_LINKER", "yes", "-use-gold-linker", "Link using the GNU gold linker (gcc only)."); + desc("USE_GOLD_LINKER", "no", "-no-use-gold-linker", "Do not link using the GNU gold linker.\n"); + desc("SHARED", "yes", "-shared", "Create and use shared Qt libraries."); desc("SHARED", "no", "-static", "Create and use static Qt libraries.\n"); @@ -1948,9 +1936,6 @@ bool Configure::displayHelp() // Qt\Windows only options go below here -------------------------------------------------------------------------------- desc("\nQt for Windows only:\n\n"); - desc("VCPROJFILES", "no", "-no-vcproj", "Do not generate VC++ .vcproj files."); - desc("VCPROJFILES", "yes", "-vcproj", "Generate VC++ .vcproj files, only if platform \"win32-msvc.net\".\n"); - desc("INCREDIBUILD_XGE", "no", "-no-incredibuild-xge", "Do not add IncrediBuild XGE distribution commands to custom build steps."); 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"); @@ -1959,10 +1944,6 @@ bool Configure::displayHelp() desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake."); desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n"); - desc("PROCESS", "partial", "-process", "Generate only top-level Makefile."); - desc("PROCESS", "full", "-fully-process", "Generate Makefiles/Project files for the entire Qt\ntree."); - desc("PROCESS", "no", "-dont-process", "Do not generate Makefiles/Project files.\n"); - desc( "-qreal [double|float]", "typedef qreal to the specified type. The default is double.\n" "Note that changing this flag affects binary compatibility.\n"); @@ -2299,7 +2280,7 @@ bool Configure::checkAvailability(const QString &part) available = (platform() == QNX || platform() == BLACKBERRY) && tryCompileProject("unix/lgmon"); } else if (part == "NEON") { - available = (dictionary["QT_ARCH"] == "arm") && tryCompileProject("unix/neon"); + available = dictionary["QT_CPU_FEATURES"].contains("neon"); } else if (part == "FONT_CONFIG") { available = tryCompileProject("unix/fontconfig"); } @@ -2588,8 +2569,9 @@ bool Configure::verifyConfiguration() } if (dictionary["DYNAMICGL"] == "yes") { - if (dictionary["OPENGL_ES_2"] == "yes" || dictionary["ANGLE"] != "no") { - cout << "ERROR: Dynamic OpenGL cannot be used together with native Angle (GLES2) builds." << endl; + // Note that d3d11 is still allowed for ANGLE, hence the check for == "yes". + if (dictionary["OPENGL_ES_2"] == "yes" || dictionary["ANGLE"] == "yes") { + cout << "ERROR: Dynamic OpenGL cannot be used with -angle." << endl; dictionary[ "DONE" ] = "error"; } } @@ -2637,6 +2619,9 @@ void Configure::generateOutputVars() if (dictionary[ "C++11" ] == "yes") qtConfig += "c++11"; + if (dictionary[ "USE_GOLD_LINKER" ] == "yes") + qmakeConfig += "use_gold_linker"; + if (dictionary[ "SHARED" ] == "no") qtConfig += "static"; else @@ -2672,8 +2657,11 @@ void Configure::generateOutputVars() } // Dynamic OpenGL loading --------------------------------------- - if (dictionary[ "DYNAMICGL" ] != "no") + if (dictionary[ "DYNAMICGL" ] != "no") { qtConfig += "dynamicgl"; + if (dictionary[ "ANGLE" ] == "d3d11") + qmakeConfig += "angle_d3d11"; + } // Image formates ----------------------------------------------- if (dictionary[ "GIF" ] == "no") @@ -3499,24 +3487,26 @@ void Configure::generateConfigfiles() tmpStream << endl << "// Compiler sub-arch support" << endl; if (dictionary[ "SSE2" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_SSE2" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_SSE2 1" << endl; if (dictionary[ "SSE3" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_SSE3" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_SSE3 1" << endl; if (dictionary[ "SSSE3" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_SSSE3" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_SSSE3 1" << endl; if (dictionary[ "SSE4_1" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_1" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_1 1" << endl; if (dictionary[ "SSE4_2" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_2" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_SSE4_2 1" << endl; if (dictionary[ "AVX" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_AVX" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_AVX 1" << endl; if (dictionary[ "AVX2" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_AVX2" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_AVX2 1" << endl; if (dictionary[ "IWMMXT" ] == "yes") - tmpStream << "#define QT_COMPILER_SUPPORTS_IWMMXT" << endl; + tmpStream << "#define QT_COMPILER_SUPPORTS_IWMMXT 1" << endl; - if (dictionary["QREAL"] != "double") + if (dictionary["QREAL"] != "double") { tmpStream << "#define QT_COORD_TYPE " << dictionary["QREAL"] << endl; + tmpStream << "#define QT_COORD_TYPE_STRING " << dictionary["QREAL_STRING"] << endl; + } tmpStream << endl << "// Compile time features" << endl; @@ -4175,27 +4165,8 @@ void Configure::buildQmake() } -void Configure::appendMakeItem(int inList, const QString &item) -{ - QString dir; - if (item != "src") - dir = "/" + item; - dir.prepend("/src"); - makeList[inList].append(new MakeItem(sourcePath + dir, - item + ".pro", buildPath + dir + "/Makefile", Lib)); - if (dictionary[ "VCPROJFILES" ] == "yes") { - makeList[inList].append(new MakeItem(sourcePath + dir, - item + ".pro", buildPath + dir + "/" + item + ".vcproj", Lib)); - } -} - void Configure::generateMakefiles() { - if (dictionary[ "PROCESS" ] != "no") { - QString spec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ]; - if (spec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince")) && !spec.startsWith("winphone") && !spec.startsWith("winrt") ) - dictionary[ "VCPROJFILES" ] = "no"; - QString pwd = QDir::currentPath(); { QString sourcePathMangled = sourcePath; @@ -4204,40 +4175,16 @@ void Configure::generateMakefiles() sourcePathMangled = QFileInfo(sourcePath).path(); buildPathMangled = QFileInfo(buildPath).path(); } - bool generate = true; - bool doDsp = (dictionary["VCPROJFILES"] == "yes" - && dictionary["PROCESS"] == "full"); - while (generate) { - QStringList args; - args << buildPath + "/bin/qmake"; - - if (doDsp) { - if (dictionary[ "DEPENDENCIES" ] == "no") - args << "-nodepend"; - args << "-tp" << "vc"; - doDsp = false; // DSP files will be done - printf("Generating Visual Studio project files...\n"); - } else { - printf("Generating Makefiles...\n"); - generate = false; // Now Makefiles will be done - } - if (dictionary[ "PROCESS" ] == "full") - args << "-r"; - args << sourcePathMangled; + QStringList args; + args << buildPath + "/bin/qmake" << sourcePathMangled; - QDir::setCurrent(buildPathMangled); - if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { - cout << "Qmake failed, return code " << exitCode << endl << endl; - dictionary[ "DONE" ] = "error"; - } + QDir::setCurrent(buildPathMangled); + if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { + cout << "Qmake failed, return code " << exitCode << endl << endl; + dictionary[ "DONE" ] = "error"; } } QDir::setCurrent(pwd); - } else { - cout << "Processing of project files have been disabled." << endl; - cout << "Only use this option if you really know what you're doing." << endl << endl; - return; - } } void Configure::showSummary() diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index faa9c1eb14..38b3e37799 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -49,8 +49,6 @@ QT_BEGIN_NAMESPACE -class MakeItem; - class Configure { public: @@ -73,7 +71,6 @@ public: void generateCachefile(); void displayConfig(); void generateMakefiles(); - void appendMakeItem(int inList, const QString &item); void generateConfigfiles(); void detectArch(); void generateQConfigPri(); @@ -129,10 +126,6 @@ private: QStringList qmakeVars; QStringList qmakeDefines; - // makeList[0] for qt and qtmain - // makeList[1] for subdirs and libs - // makeList[2] for the rest - QList<MakeItem*> makeList[3]; QStringList qmakeIncludes; QStringList qmakeLibs; QString opensslLibs; @@ -179,22 +172,6 @@ private: void applySpecSpecifics(); }; -class MakeItem -{ -public: - MakeItem( const QString &d, const QString &p, const QString &t, Configure::ProjectType qt ) - : directory( d ), - proFile( p ), - target( t ), - qmakeTemplate( qt ) - { } - - QString directory; - QString proFile; - QString target; - Configure::ProjectType qmakeTemplate; -}; - class FileWriter : public QTextStream { public: |