Changeset 769 for trunk/tools/configure
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/tools/configure/configure.pro
r561 r769 4 4 CONFIG += console flat 5 5 CONFIG -= moc qt 6 DEFINES = UNICODE QT_NODLL QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMPONENT QT_NO_STL QT_NO_COMPRESS QT_ BUILD_QMAKE QT_NO_THREAD QT_NO_QOBJECT _CRT_SECURE_NO_DEPRECATE7 6 DEFINES = UNICODE QT_NODLL QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMPONENT QT_NO_STL QT_NO_COMPRESS QT_NO_THREAD QT_NO_QOBJECT _CRT_SECURE_NO_DEPRECATE 7 DEFINES += QT_BOOTSTRAPPED 8 8 9 9 win32 : LIBS += -lole32 -ladvapi32 … … 28 28 $$QT_BUILD_TREE/include \ 29 29 $$QT_BUILD_TREE/include/QtCore \ 30 $$QT_BUILD_TREE/tools/shared 30 31 31 32 HEADERS = configureapp.h environment.h tools.h\ … … 59 60 $$QT_SOURCE_TREE/src/corelib/tools/qstringlist.h \ 60 61 $$QT_SOURCE_TREE/src/corelib/tools/qstringmatcher.h \ 61 $$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h 62 $$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h \ 63 $$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.h \ 64 $$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h \ 65 $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.h \ 66 $$QT_SOURCE_TREE/tools/shared/windows/registry.h 62 67 63 68 … … 103 108 $$QT_SOURCE_TREE/src/corelib/tools/qrect.cpp \ 104 109 $$QT_SOURCE_TREE/src/corelib/kernel/qmetatype.cpp \ 105 $$QT_SOURCE_TREE/src/corelib/global/qmalloc.cpp 110 $$QT_SOURCE_TREE/src/corelib/global/qmalloc.cpp \ 111 $$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.cpp \ 112 $$QT_SOURCE_TREE/src/corelib/xml/qxmlutils.cpp \ 113 $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.cpp \ 114 $$QT_SOURCE_TREE/tools/shared/windows/registry.cpp 106 115 107 116 win32:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp -
trunk/tools/configure/configureapp.cpp
r651 r769 248 248 dictionary[ "PHONON_BACKEND" ] = "yes"; 249 249 dictionary[ "MULTIMEDIA" ] = "yes"; 250 dictionary[ "AUDIO_BACKEND" ] = " yes";250 dictionary[ "AUDIO_BACKEND" ] = "auto"; 251 251 dictionary[ "DIRECTSHOW" ] = "no"; 252 252 dictionary[ "WEBKIT" ] = "auto"; … … 318 318 dictionary[ "DBUS" ] = "auto"; 319 319 dictionary[ "S60" ] = "yes"; 320 dictionary[ "SYMBIAN_DEFFILES" ] = "yes";321 320 322 321 dictionary[ "STYLE_WINDOWS" ] = "yes"; … … 971 970 break; 972 971 dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i); 972 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { 973 dictionary[ "QT_INSTALL_PLUGINS" ] = 974 QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]); 975 } 973 976 } else if( configCmdLine.at(i) == "-D" ) { 974 977 ++i; … … 1478 1481 dictionary[ "QT_GLIB" ] = "no"; 1479 1482 dictionary[ "S60" ] = "yes"; 1483 dictionary[ "SYMBIAN_DEFFILES" ] = "yes"; 1480 1484 // iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested) 1481 1485 // iconv_open seems to return -1 always, so something is probably missing from the platform. … … 1485 1489 dictionary[ "QT_INSTALL_PREFIX" ] = ""; 1486 1490 dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; 1491 dictionary[ "QT_INSTALL_TRANSLATIONS" ] = "\\resource\\qt\\translations"; 1487 1492 dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; 1488 1493 dictionary[ "SQL_SQLITE" ] = "yes"; … … 2066 2071 } else if (part == "DECLARATIVE") { 2067 2072 available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h"); 2073 } else if (part == "AUDIO_BACKEND") { 2074 available = true; 2075 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { 2076 QString epocRoot = Environment::symbianEpocRoot(); 2077 const QDir epocRootDir(epocRoot); 2078 if (epocRootDir.exists()) { 2079 QStringList paths; 2080 paths << "epoc32/release/armv5/lib/mmfdevsound.dso" 2081 << "epoc32/release/armv5/lib/mmfdevsound.lib" 2082 << "epoc32/release/winscw/udeb/mmfdevsound.dll" 2083 << "epoc32/release/winscw/udeb/mmfdevsound.lib" 2084 << "epoc32/include/mmf/server/sounddevice.h"; 2085 2086 QStringList::iterator i = paths.begin(); 2087 while (i != paths.end()) { 2088 const QString &path = epocRoot + *i; 2089 if (QFile::exists(path)) 2090 i = paths.erase(i); 2091 else 2092 ++i; 2093 } 2094 2095 available = (paths.size() == 0); 2096 if (!available) { 2097 if (epocRoot.isNull() || epocRoot == "") 2098 epocRoot = "<empty string>"; 2099 cout << endl 2100 << "The QtMultimedia audio backend will not be built because required" << endl 2101 << "support for CMMFDevSound was not found in the SDK." << endl 2102 << "The SDK which was examined was located at the following path:" << endl 2103 << " " << epocRoot << endl 2104 << "The following required files were missing from the SDK:" << endl; 2105 QString path; 2106 foreach (path, paths) 2107 cout << " " << path << endl; 2108 cout << endl; 2109 } 2110 } else { 2111 cout << endl 2112 << "The SDK root was determined to be '" << epocRoot << "'." << endl 2113 << "This directory was not found, so the SDK could not be checked for" << endl 2114 << "CMMFDevSound support. The QtMultimedia audio backend will therefore" << endl 2115 << "not be built." << endl << endl; 2116 available = false; 2117 } 2118 } 2068 2119 } 2069 2120 … … 2154 2205 if (dictionary["DECLARATIVE"] == "auto") 2155 2206 dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no"; 2207 if (dictionary["AUDIO_BACKEND"] == "auto") 2208 dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; 2156 2209 2157 2210 // Qt/WinCE remote test application … … 2266 2319 QString build32Key = buildKey + "Windows " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" "); 2267 2320 QString build64Key = buildKey + "Windows x64 " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" "); 2321 QString buildSymbianKey = buildKey + "Symbian " + build_options.join(" ") + " " + build_defines.join(" "); 2268 2322 build32Key = build32Key.simplified(); 2269 2323 build64Key = build64Key.simplified(); 2270 build32Key.prepend("# define "); 2271 build64Key.prepend("# define "); 2272 2273 QString buildkey = // Debug builds 2274 "#if (defined(_DEBUG) || defined(DEBUG))\n" 2275 "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" 2324 buildSymbianKey = buildSymbianKey.simplified(); 2325 build32Key.prepend("# define "); 2326 build64Key.prepend("# define "); 2327 buildSymbianKey.prepend("# define "); 2328 2329 QString buildkey = "#if defined(__SYMBIAN32__)\n" 2330 + buildSymbianKey + "\"\n" 2331 "#else\n" 2332 // Debug builds 2333 "# if (defined(_DEBUG) || defined(DEBUG))\n" 2334 "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" 2276 2335 + build64Key.arg("debug") + "\"\n" 2336 "# else\n" 2337 + build32Key.arg("debug") + "\"\n" 2338 "# endif\n" 2277 2339 "# else\n" 2278 + build32Key.arg("debug") + "\"\n"2279 "# endif\n"2280 "#else\n"2281 2340 // Release builds 2282 "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"2341 "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" 2283 2342 + build64Key.arg("release") + "\"\n" 2284 "# else\n"2343 "# else\n" 2285 2344 + build32Key.arg("release") + "\"\n" 2345 "# endif\n" 2286 2346 "# endif\n" 2287 2347 "#endif\n"; … … 2968 3028 qconfigList += "QT_NO_PRINTER"; 2969 3029 qconfigList += "QT_NO_SYSTEMTRAYICON"; 3030 if (dictionary.contains("QT_LIBINFIX")) 3031 tmpStream << QString("#define QT_LIBINFIX \"%1\"").arg(dictionary["QT_LIBINFIX"]) << endl; 2970 3032 } 2971 3033 … … 3646 3708 txt << "all:\n"; 3647 3709 txt << "\t" << args.join(" ") << "\n"; 3648 txt << "\t " << dictionary[ "MAKE" ] << "-f " << it->target << "\n";3710 txt << "\t\"$(MAKE)\" -$(MAKEFLAGS) -f " << it->target << "\n"; 3649 3711 txt << "first: all\n"; 3650 3712 txt << "qmake:\n"; -
trunk/tools/configure/environment.cpp
r651 r769 61 61 #endif 62 62 63 #include <symbian/epocroot.h> // from tools/shared 64 #include <windows/registry.h> // from tools/shared 63 65 64 66 QT_BEGIN_NAMESPACE … … 95 97 ++i; 96 98 return &(compiler_info[i]); 97 }98 99 /*!100 Returns the path part of a registry key.101 Ei.102 For a key103 "Software\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir"104 it returns105 "Software\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\"106 */107 QString Environment::keyPath(const QString &rKey)108 {109 int idx = rKey.lastIndexOf(QLatin1Char('\\'));110 if (idx == -1)111 return QString();112 return rKey.left(idx + 1);113 }114 115 /*!116 Returns the name part of a registry key.117 Ei.118 For a key119 "Software\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir"120 it returns121 "ProductDir"122 */123 QString Environment::keyName(const QString &rKey)124 {125 int idx = rKey.lastIndexOf(QLatin1Char('\\'));126 if (idx == -1)127 return rKey;128 129 QString res(rKey.mid(idx + 1));130 if (res == "Default" || res == ".")131 res = "";132 return res;133 }134 135 /*!136 Returns a registry keys value in string form.137 If the registry key does not exist, or cannot be accessed, a138 QString() is returned.139 */140 QString Environment::readRegistryKey(HKEY parentHandle, const QString &rSubkey)141 {142 #ifndef Q_OS_WIN32143 return QString();144 #else145 QString rSubkeyName = keyName(rSubkey);146 QString rSubkeyPath = keyPath(rSubkey);147 148 HKEY handle = 0;149 LONG res = RegOpenKeyEx(parentHandle, (wchar_t*)rSubkeyPath.utf16(), 0, KEY_READ, &handle);150 if (res != ERROR_SUCCESS)151 return QString();152 153 // get the size and type of the value154 DWORD dataType;155 DWORD dataSize;156 res = RegQueryValueEx(handle, (wchar_t*)rSubkeyName.utf16(), 0, &dataType, 0, &dataSize);157 if (res != ERROR_SUCCESS) {158 RegCloseKey(handle);159 return QString();160 }161 162 // get the value163 QByteArray data(dataSize, 0);164 res = RegQueryValueEx(handle, (wchar_t*)rSubkeyName.utf16(), 0, 0,165 reinterpret_cast<unsigned char*>(data.data()), &dataSize);166 if (res != ERROR_SUCCESS) {167 RegCloseKey(handle);168 return QString();169 }170 171 QString result;172 switch (dataType) {173 case REG_EXPAND_SZ:174 case REG_SZ: {175 result = QString::fromWCharArray(((const wchar_t *)data.constData()));176 break;177 }178 179 case REG_MULTI_SZ: {180 QStringList l;181 int i = 0;182 for (;;) {183 QString s = QString::fromWCharArray((const wchar_t *)data.constData() + i);184 i += s.length() + 1;185 186 if (s.isEmpty())187 break;188 l.append(s);189 }190 result = l.join(", ");191 break;192 }193 194 case REG_NONE:195 case REG_BINARY: {196 result = QString::fromWCharArray((const wchar_t *)data.constData(), data.size() / 2);197 break;198 }199 200 case REG_DWORD_BIG_ENDIAN:201 case REG_DWORD: {202 Q_ASSERT(data.size() == sizeof(int));203 int i;204 memcpy((char*)&i, data.constData(), sizeof(int));205 result = QString::number(i);206 break;207 }208 209 default:210 qWarning("QSettings: unknown data %d type in windows registry", dataType);211 break;212 }213 214 RegCloseKey(handle);215 return result;216 #endif217 99 } 218 100 … … 580 462 } 581 463 464 QString Environment::symbianEpocRoot() 465 { 466 // Call function defined in tools/shared/symbian/epocroot.h 467 return ::epocRoot(); 468 } 469 582 470 QT_END_NAMESPACE -
trunk/tools/configure/environment.h
r651 r769 72 72 static bool rmdir(const QString &name); 73 73 74 static QString symbianEpocRoot(); 75 74 76 private: 75 77 static Compiler detectedCompiler; 76 78 77 79 static CompilerInfo *compilerInfo(Compiler compiler); 78 static QString keyPath(const QString &rKey);79 static QString keyName(const QString &rKey);80 static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey);81 80 }; 82 81 -
trunk/tools/configure/tools.cpp
r651 r769 147 147 dictionary["EDITION"] = "Evaluation"; 148 148 dictionary["QT_EDITION"] = "QT_EDITION_EVALUATION"; 149 licenseType = "Evaluation"; 149 150 } 150 151 } … … 213 214 214 215 // Override for evaluation licenses 215 if (dictionary["E dition"] == "Evaluation")216 if (dictionary["EDITION"] == "Evaluation") 216 217 dictionary["LICENSE_EXTENSION"] = "-EVALUATION"; 217 218
Note:
See TracChangeset
for help on using the changeset viewer.