From 4acff670c522501417aa5159a8aea42b1ae962bb Mon Sep 17 00:00:00 2001 From: Wouter Huysentruit Date: Mon, 22 Jul 2013 13:45:30 +0200 Subject: Configure: add -no-wmf-backend option This option is required to build qtmultimedia without Windows Media Foundation backend. In this case, a full DirectShow backend will be build instead. Change-Id: Ib29ba81ca6cbb00b609cc97fab7da29e61d31d6d Reviewed-by: Oswald Buddenhagen Reviewed-by: Yoann Lopes --- tools/configure/configureapp.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a6376bbb7d..de91a1558d 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -192,6 +192,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "CETEST" ] = "auto"; dictionary[ "CE_SIGNATURE" ] = "no"; dictionary[ "AUDIO_BACKEND" ] = "auto"; + dictionary[ "WMF_BACKEND" ] = "auto"; dictionary[ "WMSDK" ] = "auto"; dictionary[ "V8SNAPSHOT" ] = "auto"; dictionary[ "QML_DEBUG" ] = "yes"; @@ -855,6 +856,10 @@ void Configure::parseCmdLine() dictionary[ "AUDIO_BACKEND" ] = "yes"; } else if (configCmdLine.at(i) == "-no-audio-backend") { dictionary[ "AUDIO_BACKEND" ] = "no"; + } else if (configCmdLine.at(i) == "-wmf-backend") { + dictionary[ "WMF_BACKEND" ] = "yes"; + } else if (configCmdLine.at(i) == "-no-wmf-backend") { + dictionary[ "WMF_BACKEND" ] = "no"; } else if (configCmdLine.at(i) == "-no-qml-debug") { dictionary[ "QML_DEBUG" ] = "no"; } else if (configCmdLine.at(i) == "-qml-debug") { @@ -1869,6 +1874,8 @@ bool Configure::displayHelp() desc("DBUS", "linked", "-dbus-linked", "Compile in D-Bus support and link to libdbus-1.\n"); desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into\nQt Multimedia."); desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into Qt Multimedia.\n"); + desc("WMF_BACKEND", "no","-no-wmf-backend", "Do not compile in the windows media foundation backend\ninto Qt Multimedia."); + desc("WMF_BACKEND", "yes","-wmf-backend", "Compile in the windows media foundation backend into Qt Multimedia.\n"); desc("QML_DEBUG", "no", "-no-qml-debug", "Do not build the in-process QML debugging support."); desc("QML_DEBUG", "yes", "-qml-debug", "Build the in-process QML debugging support.\n"); desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering."); @@ -2145,6 +2152,8 @@ bool Configure::checkAvailability(const QString &part) available = true; } else if (part == "AUDIO_BACKEND") { available = true; + } else if (part == "WMF_BACKEND") { + available = findFile("mfapi.h") && findFile("mf.lib"); } else if (part == "DIRECTWRITE") { available = findFile("dwrite.h") && findFile("d2d1.h") && findFile("dwrite.lib"); } else if (part == "ICONV") { @@ -2264,6 +2273,8 @@ void Configure::autoDetection() dictionary["QML_DEBUG"] = dictionary["QML"] == "yes" ? "yes" : "no"; if (dictionary["AUDIO_BACKEND"] == "auto") dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; + if (dictionary["WMF_BACKEND"] == "auto") + dictionary["WMF_BACKEND"] = checkAvailability("WMF_BACKEND") ? "yes" : "no"; if (dictionary["WMSDK"] == "auto") dictionary["WMSDK"] = checkAvailability("WMSDK") ? "yes" : "no"; @@ -2629,6 +2640,9 @@ void Configure::generateOutputVars() if (dictionary["AUDIO_BACKEND"] == "yes") qtConfig += "audio-backend"; + if (dictionary["WMF_BACKEND"] == "yes") + qtConfig += "wmf-backend"; + if (dictionary["DIRECTWRITE"] == "yes") qtConfig += "directwrite"; -- cgit v1.2.3 From ae95f289975636ba6cacc147f6723615b6d36cfa Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 24 Jul 2013 13:38:22 +0200 Subject: bye-bye .qmake.cache well, not really - qt_parts.prf will still create one, but it will be empty. apart from being cleaner, this now finally makes it possible to load an unconfigured qt source tree into qtcreator without random parts of the tree being missing from the project explorer. Change-Id: Ida7ee77ecb450af05bfa66106caf2067b02f1a7f Reviewed-by: Thiago Macieira Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index de91a1558d..7a14043d75 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2812,17 +2812,6 @@ void Configure::generateOutputVars() void Configure::generateCachefile() { - // Generate .qmake.cache - { - FileWriter cacheStream(buildPath + "/.qmake.cache"); - - cacheStream << "QT_SOURCE_TREE = " << formatPath(dictionary["QT_SOURCE_TREE"]) << endl; - cacheStream << "QT_BUILD_TREE = " << formatPath(dictionary["QT_BUILD_TREE"]) << endl; - - if (!cacheStream.flush()) - dictionary[ "DONE" ] = "error"; - } - // Generate qmodule.pri { FileWriter moduleStream(dictionary[ "QT_BUILD_TREE" ] + "/mkspecs/qmodule.pri"); -- cgit v1.2.3 From 0aad3fc742a7aa15c21fe75e2b1b001f1f73468c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 24 Jul 2013 13:48:36 +0200 Subject: purge QT_{SOURCE,BUILD}_TREE from dictionary both variables are available class-wide anyway. Change-Id: I97c13de9ead44638e9310b62f02d8cd1c910df94 Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 7a14043d75..c7477abe99 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -157,8 +157,6 @@ Configure::Configure(int& argc, char** argv) defaultBuildParts << QStringLiteral("libs") << QStringLiteral("tools") << QStringLiteral("examples"); allBuildParts = defaultBuildParts; allBuildParts << QStringLiteral("tests"); - dictionary[ "QT_SOURCE_TREE" ] = sourcePath; - dictionary[ "QT_BUILD_TREE" ] = buildPath; dictionary[ "QT_INSTALL_PREFIX" ] = installPath; dictionary[ "QMAKESPEC" ] = getenv("QMAKESPEC"); @@ -1141,7 +1139,7 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-hostprefix") { ++i; if (i == argCount || configCmdLine.at(i).startsWith('-')) - dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_BUILD_TREE" ]; + dictionary[ "QT_HOST_PREFIX" ] = buildPath; else dictionary[ "QT_HOST_PREFIX" ] = configCmdLine.at(i); } @@ -2814,7 +2812,7 @@ void Configure::generateCachefile() { // Generate qmodule.pri { - FileWriter moduleStream(dictionary[ "QT_BUILD_TREE" ] + "/mkspecs/qmodule.pri"); + FileWriter moduleStream(buildPath + "/mkspecs/qmodule.pri"); moduleStream << "QT_BUILD_PARTS += " << buildParts.join(' ') << endl; if (!skipModules.isEmpty()) @@ -3074,7 +3072,7 @@ void Configure::generateQConfigPri() { // Generate qconfig.pri { - FileWriter configStream(dictionary[ "QT_BUILD_TREE" ] + "/mkspecs/qconfig.pri"); + FileWriter configStream(buildPath + "/mkspecs/qconfig.pri"); configStream << "CONFIG+= "; configStream << dictionary[ "BUILD" ]; @@ -3357,7 +3355,7 @@ void Configure::generateConfigfiles() } { - FileWriter tmpStream(dictionary["QT_BUILD_TREE"] + "/mkspecs/qdevice.pri"); + FileWriter tmpStream(buildPath + "/mkspecs/qdevice.pri"); QString android_platform(dictionary.contains("ANDROID_PLATFORM") ? dictionary["ANDROID_PLATFORM"] @@ -3501,8 +3499,8 @@ void Configure::displayConfig() sout << " SQLite2................." << dictionary[ "SQL_SQLITE2" ] << endl; sout << " InterBase..............." << dictionary[ "SQL_IBASE" ] << endl << endl; - sout << "Sources are in.............." << QDir::toNativeSeparators(dictionary["QT_SOURCE_TREE"]) << endl; - sout << "Build is done in............" << QDir::toNativeSeparators(dictionary["QT_BUILD_TREE"]) << endl; + sout << "Sources are in.............." << QDir::toNativeSeparators(sourcePath) << endl; + sout << "Build is done in............" << QDir::toNativeSeparators(buildPath) << endl; sout << "Install prefix.............." << QDir::toNativeSeparators(dictionary["QT_INSTALL_PREFIX"]) << endl; sout << "Headers installed to........" << QDir::toNativeSeparators(dictionary["QT_INSTALL_HEADERS"]) << endl; sout << "Libraries installed to......" << QDir::toNativeSeparators(dictionary["QT_INSTALL_LIBS"]) << endl; -- cgit v1.2.3