diff options
author | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2010-03-10 14:26:20 (GMT) |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2010-03-10 14:45:43 (GMT) |
commit | 0c208692504ae3a572baf9fe058d4b9ee9b01e5d (patch) | |
tree | 1be398dd4d0f0e9dc47e41bd633a7ef60f4d0451 /tools/configure | |
parent | e875699fb4c25b23248aff09cb690a287640e67f (diff) | |
download | Qt-0c208692504ae3a572baf9fe058d4b9ee9b01e5d.zip Qt-0c208692504ae3a572baf9fe058d4b9ee9b01e5d.tar.gz Qt-0c208692504ae3a572baf9fe058d4b9ee9b01e5d.tar.bz2 |
Make configure.exe fail for declarative if no script support
If the user tells configure not to compile QtScript, then fail if
the user wants QtDeclarative or QtScriptTools
Reviewed-by: Jørgen Lind
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 6b7740e..44d5f58 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2081,12 +2081,10 @@ bool Configure::checkAvailability(const QString &part) } } else if (part == "WMSDK") { available = findFile("wmsdk.h"); - } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS") { + } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS" || part == "DECLARATIVE") { available = true; } else if (part == "WEBKIT") { available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++"); - } else if (part == "DECLARATIVE") { - available = QFile::exists(sourcePath + "/src/declarative/qml/qdeclarativecomponent.h"); } else if (part == "AUDIO_BACKEND") { available = true; if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { @@ -2212,7 +2210,7 @@ void Configure::autoDetection() if (dictionary["SCRIPT"] == "auto") dictionary["SCRIPT"] = checkAvailability("SCRIPT") ? "yes" : "no"; if (dictionary["SCRIPTTOOLS"] == "auto") - dictionary["SCRIPTTOOLS"] = checkAvailability("SCRIPTTOOLS") ? "yes" : "no"; + dictionary["SCRIPTTOOLS"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; if (dictionary["XMLPATTERNS"] == "auto") dictionary["XMLPATTERNS"] = checkAvailability("XMLPATTERNS") ? "yes" : "no"; if (dictionary["PHONON"] == "auto") @@ -2220,7 +2218,7 @@ void Configure::autoDetection() if (dictionary["WEBKIT"] == "auto") dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no"; if (dictionary["DECLARATIVE"] == "auto") - dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no"; + dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; if (dictionary["AUDIO_BACKEND"] == "auto") dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; if (dictionary["MEDIASERVICE"] == "auto") @@ -2270,15 +2268,23 @@ bool Configure::verifyConfiguration() if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) exit(0); // Exit cleanly for Ctrl+C } - if (0 != dictionary["ARM_FPU_TYPE"].size()) - { - QStringList l= QStringList() - << "softvfp" - << "softvfp+vfpv2" - << "vfpv2"; - if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) - cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; - } + if (0 != dictionary["ARM_FPU_TYPE"].size()) { + QStringList l= QStringList() + << "softvfp" + << "softvfp+vfpv2" + << "vfpv2"; + if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) + cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; + } + if (dictionary["DECLARATIVE"] == "yes" && dictionary["SCRIPT"] != "no") { + cout << "WARNING: To be able to compile QtDeclarative we need to also compile the" << endl + << "QtScript module. If you continue, we will turn on the QtScript module." << endl + << "(Press any key to continue..)"; + if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) + exit(0); // Exit cleanly for Ctrl+C + + dictionary["SCRIPT"] = "yes"; + } return true; } @@ -2627,8 +2633,14 @@ void Configure::generateOutputVars() if (dictionary["WEBKIT"] == "yes") qtConfig += "webkit"; - if (dictionary["DECLARATIVE"] == "yes") + if (dictionary["DECLARATIVE"] == "yes") { + if (dictionary[ "SCRIPT" ] == "no") { + cout << "QtDeclarative was requested, but it can't be built due to QtScript being " + "disabled." << endl; + dictionary[ "DONE" ] = "error"; + } qtConfig += "declarative"; + } if( dictionary[ "NATIVE_GESTURES" ] == "yes" ) qtConfig += "native-gestures"; |