Changeset 769 for trunk/tools/configure


Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/configure/configure.pro

    r561 r769  
    44CONFIG   += console flat
    55CONFIG   -= 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_DEPRECATE
    7 
     6DEFINES  = 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
     7DEFINES  += QT_BOOTSTRAPPED
    88
    99win32 : LIBS += -lole32 -ladvapi32
     
    2828           $$QT_BUILD_TREE/include \
    2929           $$QT_BUILD_TREE/include/QtCore \
     30           $$QT_BUILD_TREE/tools/shared
    3031
    3132HEADERS  = configureapp.h environment.h tools.h\
     
    5960           $$QT_SOURCE_TREE/src/corelib/tools/qstringlist.h \
    6061           $$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
    6267
    6368
     
    103108           $$QT_SOURCE_TREE/src/corelib/tools/qrect.cpp \
    104109           $$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
    106115
    107116win32:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp
  • trunk/tools/configure/configureapp.cpp

    r651 r769  
    248248    dictionary[ "PHONON_BACKEND" ]  = "yes";
    249249    dictionary[ "MULTIMEDIA" ]      = "yes";
    250     dictionary[ "AUDIO_BACKEND" ]   = "yes";
     250    dictionary[ "AUDIO_BACKEND" ]   = "auto";
    251251    dictionary[ "DIRECTSHOW" ]      = "no";
    252252    dictionary[ "WEBKIT" ]          = "auto";
     
    318318    dictionary[ "DBUS" ]            = "auto";
    319319    dictionary[ "S60" ]             = "yes";
    320     dictionary[ "SYMBIAN_DEFFILES" ] = "yes";
    321320
    322321    dictionary[ "STYLE_WINDOWS" ]   = "yes";
     
    971970                break;
    972971            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            }
    973976        } else if( configCmdLine.at(i) == "-D" ) {
    974977            ++i;
     
    14781481        dictionary[ "QT_GLIB" ]             = "no";
    14791482        dictionary[ "S60" ]                 = "yes";
     1483        dictionary[ "SYMBIAN_DEFFILES" ]    = "yes";
    14801484        // iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested)
    14811485        // iconv_open seems to return -1 always, so something is probably missing from the platform.
     
    14851489        dictionary[ "QT_INSTALL_PREFIX" ]   = "";
    14861490        dictionary[ "QT_INSTALL_PLUGINS" ]  = "\\resource\\qt\\plugins";
     1491        dictionary[ "QT_INSTALL_TRANSLATIONS" ]  = "\\resource\\qt\\translations";
    14871492        dictionary[ "ARM_FPU_TYPE" ]        = "softvfp";
    14881493        dictionary[ "SQL_SQLITE" ]          = "yes";
     
    20662071    } else if (part == "DECLARATIVE") {
    20672072        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        }
    20682119    }
    20692120
     
    21542205    if (dictionary["DECLARATIVE"] == "auto")
    21552206        dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no";
     2207    if (dictionary["AUDIO_BACKEND"] == "auto")
     2208        dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no";
    21562209
    21572210    // Qt/WinCE remote test application
     
    22662319    QString build32Key = buildKey + "Windows " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" ");
    22672320    QString build64Key = buildKey + "Windows x64 " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" ");
     2321    QString buildSymbianKey = buildKey + "Symbian " + build_options.join(" ") + " " + build_defines.join(" ");
    22682322    build32Key = build32Key.simplified();
    22692323    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"
    22762335                       + build64Key.arg("debug") + "\"\n"
     2336                       "#  else\n"
     2337                       + build32Key.arg("debug") + "\"\n"
     2338                       "#  endif\n"
    22772339                       "# else\n"
    2278                        + build32Key.arg("debug") + "\"\n"
    2279                        "# endif\n"
    2280                        "#else\n"
    22812340                       // Release builds
    2282                        "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
     2341                       "#  if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
    22832342                       + build64Key.arg("release") + "\"\n"
    2284                        "# else\n"
     2343                       "#  else\n"
    22852344                       + build32Key.arg("release") + "\"\n"
     2345                       "#  endif\n"
    22862346                       "# endif\n"
    22872347                       "#endif\n";
     
    29683028            qconfigList += "QT_NO_PRINTER";
    29693029            qconfigList += "QT_NO_SYSTEMTRAYICON";
     3030            if (dictionary.contains("QT_LIBINFIX"))
     3031                tmpStream << QString("#define QT_LIBINFIX \"%1\"").arg(dictionary["QT_LIBINFIX"]) << endl;
    29703032        }
    29713033
     
    36463708                    txt << "all:\n";
    36473709                    txt << "\t" << args.join(" ") << "\n";
    3648                     txt << "\t" << dictionary[ "MAKE" ] << " -f " << it->target << "\n";
     3710                    txt << "\t\"$(MAKE)\" -$(MAKEFLAGS) -f " << it->target << "\n";
    36493711                    txt << "first: all\n";
    36503712                    txt << "qmake:\n";
  • trunk/tools/configure/environment.cpp

    r651 r769  
    6161#endif
    6262
     63#include <symbian/epocroot.h> // from tools/shared
     64#include <windows/registry.h> // from tools/shared
    6365
    6466QT_BEGIN_NAMESPACE
     
    9597        ++i;
    9698    return &(compiler_info[i]);
    97 }
    98 
    99 /*!
    100     Returns the path part of a registry key.
    101     Ei.
    102         For a key
    103             "Software\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir"
    104         it returns
    105             "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 key
    119             "Software\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir"
    120         it returns
    121             "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, a
    138     QString() is returned.
    139 */
    140 QString Environment::readRegistryKey(HKEY parentHandle, const QString &rSubkey)
    141 {
    142 #ifndef Q_OS_WIN32
    143     return QString();
    144 #else
    145     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 value
    154     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 value
    163     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 #endif
    21799}
    218100
     
    580462}
    581463
     464QString Environment::symbianEpocRoot()
     465{
     466    // Call function defined in tools/shared/symbian/epocroot.h
     467    return ::epocRoot();
     468}
     469
    582470QT_END_NAMESPACE
  • trunk/tools/configure/environment.h

    r651 r769  
    7272    static bool rmdir(const QString &name);
    7373
     74    static QString symbianEpocRoot();
     75
    7476private:
    7577    static Compiler detectedCompiler;
    7678
    7779    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);
    8180};
    8281
  • trunk/tools/configure/tools.cpp

    r651 r769  
    147147            dictionary["EDITION"] = "Evaluation";
    148148            dictionary["QT_EDITION"] = "QT_EDITION_EVALUATION";
     149            licenseType = "Evaluation";
    149150        }
    150151    }
     
    213214
    214215    // Override for evaluation licenses
    215     if (dictionary["Edition"] == "Evaluation")
     216    if (dictionary["EDITION"] == "Evaluation")
    216217        dictionary["LICENSE_EXTENSION"] = "-EVALUATION";
    217218
Note: See TracChangeset for help on using the changeset viewer.