summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp77
1 files changed, 66 insertions, 11 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 77b2f66..8c2a015 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -247,7 +247,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "PHONON" ] = "auto";
dictionary[ "PHONON_BACKEND" ] = "yes";
dictionary[ "MULTIMEDIA" ] = "yes";
- dictionary[ "AUDIO_BACKEND" ] = "yes";
+ dictionary[ "AUDIO_BACKEND" ] = "auto";
dictionary[ "DIRECTSHOW" ] = "no";
dictionary[ "WEBKIT" ] = "auto";
dictionary[ "DECLARATIVE" ] = "auto";
@@ -2068,6 +2068,52 @@ bool Configure::checkAvailability(const QString &part)
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/qmlcomponent.h");
+ } else if (part == "AUDIO_BACKEND") {
+ available = true;
+ if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
+ QString epocRoot = Environment::symbianEpocRoot();
+ const QDir epocRootDir(epocRoot);
+ if (epocRootDir.exists()) {
+ QStringList paths;
+ paths << "epoc32/release/armv5/lib/mmfdevsound.dso"
+ << "epoc32/release/armv5/lib/mmfdevsound.lib"
+ << "epoc32/release/winscw/udeb/mmfdevsound.dll"
+ << "epoc32/release/winscw/udeb/mmfdevsound.lib"
+ << "epoc32/include/mmf/server/sounddevice.h";
+
+ QStringList::iterator i = paths.begin();
+ while (i != paths.end()) {
+ const QString &path = epocRoot + *i;
+ if (QFile::exists(path))
+ i = paths.erase(i);
+ else
+ ++i;
+ }
+
+ available = (paths.size() == 0);
+ if (!available) {
+ if (epocRoot.isNull() || epocRoot == "")
+ epocRoot = "<empty string>";
+ cout << endl
+ << "The QtMultimedia audio backend will not be built because required" << endl
+ << "support for CMMFDevSound was not found in the SDK." << endl
+ << "The SDK which was examined was located at the following path:" << endl
+ << " " << epocRoot << endl
+ << "The following required files were missing from the SDK:" << endl;
+ QString path;
+ foreach (path, paths)
+ cout << " " << path << endl;
+ cout << endl;
+ }
+ } else {
+ cout << endl
+ << "The SDK root was determined to be '" << epocRoot << "'." << endl
+ << "This directory was not found, so the SDK could not be checked for" << endl
+ << "CMMFDevSound support. The QtMultimedia audio backend will therefore" << endl
+ << "not be built." << endl << endl;
+ available = false;
+ }
+ }
}
return available;
@@ -2156,6 +2202,8 @@ void Configure::autoDetection()
dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no";
if (dictionary["DECLARATIVE"] == "auto")
dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no";
+ if (dictionary["AUDIO_BACKEND"] == "auto")
+ dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no";
// Qt/WinCE remote test application
if (dictionary["CETEST"] == "auto")
@@ -2268,24 +2316,31 @@ void Configure::generateBuildKey()
QString build32Key = buildKey + "Windows " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" ");
QString build64Key = buildKey + "Windows x64 " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" ");
+ QString buildSymbianKey = buildKey + "Symbian " + build_options.join(" ") + " " + build_defines.join(" ");
build32Key = build32Key.simplified();
build64Key = build64Key.simplified();
- build32Key.prepend("# define ");
- build64Key.prepend("# define ");
+ buildSymbianKey = buildSymbianKey.simplified();
+ build32Key.prepend("# define ");
+ build64Key.prepend("# define ");
+ buildSymbianKey.prepend("# define ");
- QString buildkey = // Debug builds
- "#if (defined(_DEBUG) || defined(DEBUG))\n"
- "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ QString buildkey = "#if defined(__SYMBIAN32__)\n"
+ + buildSymbianKey + "\"\n"
+ "#else\n"
+ // Debug builds
+ "# if (defined(_DEBUG) || defined(DEBUG))\n"
+ "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ build64Key.arg("debug") + "\"\n"
- "# else\n"
+ "# else\n"
+ build32Key.arg("debug") + "\"\n"
- "# endif\n"
- "#else\n"
+ "# endif\n"
+ "# else\n"
// Release builds
- "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ build64Key.arg("release") + "\"\n"
- "# else\n"
+ "# else\n"
+ build32Key.arg("release") + "\"\n"
+ "# endif\n"
"# endif\n"
"#endif\n";