/src/qt/qtbase/tools/configure/configureapp.cpp
C++ | 4512 lines | 3833 code | 465 blank | 214 comment | 2073 complexity | 10eb3a88818ca1a56732242298772915 MD5 | raw file
Possible License(s): LGPL-3.0, CC-BY-SA-4.0, MIT, AGPL-3.0, BSD-3-Clause, LGPL-2.1, CC0-1.0, GPL-2.0, LGPL-2.0, GPL-3.0
Large files files are truncated, but you can click here to view the full file
- /****************************************************************************
- **
- ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
- ** Copyright (C) 2013 Intel Corporation
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the tools applications of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
- #include "configureapp.h"
- #include "environment.h"
- #ifdef COMMERCIAL_VERSION
- # include "tools.h"
- #endif
- #include <qdatetime.h>
- #include <qdir.h>
- #include <qdiriterator.h>
- #include <qtemporaryfile.h>
- #include <qstandardpaths.h>
- #include <qstack.h>
- #include <qdebug.h>
- #include <qfileinfo.h>
- #include <qtextstream.h>
- #include <qregexp.h>
- #include <qhash.h>
- #include <iostream>
- #include <string>
- #include <fstream>
- #include <windows.h>
- #include <conio.h>
- QT_BEGIN_NAMESPACE
- enum Platforms {
- WINDOWS,
- WINDOWS_CE,
- WINDOWS_RT,
- QNX,
- BLACKBERRY,
- ANDROID
- };
- std::ostream &operator<<(std::ostream &s, const QString &val) {
- s << val.toLocal8Bit().data();
- return s;
- }
- using namespace std;
- // Macros to simplify options marking
- #define MARK_OPTION(x,y) ( dictionary[ #x ] == #y ? "*" : " " )
- static inline void promptKeyPress()
- {
- cout << "(Press any key to continue...)";
- if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout)
- exit(0); // Exit cleanly for Ctrl+C
- }
- Configure::Configure(int& argc, char** argv)
- {
- // Default values for indentation
- optionIndent = 4;
- descIndent = 25;
- outputWidth = 0;
- // Get console buffer output width
- CONSOLE_SCREEN_BUFFER_INFO info;
- HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
- if (GetConsoleScreenBufferInfo(hStdout, &info))
- outputWidth = info.dwSize.X - 1;
- outputWidth = qMin(outputWidth, 79); // Anything wider gets unreadable
- if (outputWidth < 35) // Insanely small, just use 79
- outputWidth = 79;
- int i;
- /*
- ** Set up the initial state, the default
- */
- dictionary[ "CONFIGCMD" ] = argv[ 0 ];
- for (i = 1; i < argc; i++)
- configCmdLine += argv[ i ];
- if (configCmdLine.size() >= 2 && configCmdLine.at(0) == "-srcdir") {
- sourcePath = QDir::cleanPath(configCmdLine.at(1));
- sourceDir = QDir(sourcePath);
- configCmdLine.erase(configCmdLine.begin(), configCmdLine.begin() + 2);
- } else {
- // Get the path to the executable
- wchar_t module_name[MAX_PATH];
- GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t));
- QFileInfo sourcePathInfo = QString::fromWCharArray(module_name);
- sourcePath = sourcePathInfo.absolutePath();
- sourceDir = sourcePathInfo.dir();
- }
- buildPath = QDir::currentPath();
- #if 0
- const QString installPath = QString("C:\\Qt\\%1").arg(QT_VERSION_STR);
- #else
- const QString installPath = buildPath;
- #endif
- if (sourceDir != buildDir) { //shadow builds!
- QDir(buildPath).mkpath("bin");
- buildDir.mkpath("mkspecs");
- }
- defaultBuildParts << QStringLiteral("libs") << QStringLiteral("tools") << QStringLiteral("examples");
- allBuildParts = defaultBuildParts;
- allBuildParts << QStringLiteral("tests");
- dictionary[ "QT_INSTALL_PREFIX" ] = installPath;
- dictionary[ "QMAKESPEC" ] = getenv("QMAKESPEC");
- if (dictionary[ "QMAKESPEC" ].size() == 0) {
- dictionary[ "QMAKESPEC" ] = Environment::detectQMakeSpec();
- dictionary[ "QMAKESPEC_FROM" ] = "detected";
- } else {
- dictionary[ "QMAKESPEC_FROM" ] = "env";
- }
- dictionary[ "QCONFIG" ] = "full";
- dictionary[ "EMBEDDED" ] = "no";
- dictionary[ "BUILD_QMAKE" ] = "yes";
- dictionary[ "VCPROJFILES" ] = "yes";
- dictionary[ "QMAKE_INTERNAL" ] = "no";
- dictionary[ "PROCESS" ] = "partial";
- dictionary[ "WIDGETS" ] = "yes";
- dictionary[ "GUI" ] = "yes";
- dictionary[ "RTTI" ] = "yes";
- dictionary[ "STRIP" ] = "yes";
- dictionary[ "SSE2" ] = "auto";
- dictionary[ "SSE3" ] = "auto";
- dictionary[ "SSSE3" ] = "auto";
- dictionary[ "SSE4_1" ] = "auto";
- dictionary[ "SSE4_2" ] = "auto";
- dictionary[ "AVX" ] = "auto";
- dictionary[ "AVX2" ] = "auto";
- dictionary[ "IWMMXT" ] = "auto";
- dictionary[ "SYNCQT" ] = "auto";
- dictionary[ "CE_CRT" ] = "no";
- dictionary[ "CETEST" ] = "auto";
- dictionary[ "CE_SIGNATURE" ] = "no";
- dictionary[ "AUDIO_BACKEND" ] = "auto";
- dictionary[ "WMF_BACKEND" ] = "auto";
- dictionary[ "WMSDK" ] = "auto";
- dictionary[ "QML_DEBUG" ] = "yes";
- dictionary[ "PLUGIN_MANIFESTS" ] = "no";
- dictionary[ "DIRECTWRITE" ] = "no";
- dictionary[ "DIRECT2D" ] = "no";
- dictionary[ "NIS" ] = "no";
- dictionary[ "NEON" ] = "auto";
- dictionary[ "LARGE_FILE" ] = "yes";
- dictionary[ "FONT_CONFIG" ] = "no";
- dictionary[ "POSIX_IPC" ] = "no";
- dictionary[ "QT_GLIB" ] = "no";
- dictionary[ "QT_ICONV" ] = "auto";
- dictionary[ "QT_EVDEV" ] = "auto";
- dictionary[ "QT_MTDEV" ] = "auto";
- dictionary[ "QT_INOTIFY" ] = "auto";
- dictionary[ "QT_EVENTFD" ] = "auto";
- dictionary[ "QT_CUPS" ] = "auto";
- dictionary[ "CFG_GCC_SYSROOT" ] = "yes";
- dictionary[ "SLOG2" ] = "no";
- dictionary[ "QNX_IMF" ] = "no";
- dictionary[ "PPS" ] = "no";
- dictionary[ "LGMON" ] = "no";
- dictionary[ "SYSTEM_PROXIES" ] = "no";
- dictionary[ "WERROR" ] = "auto";
- dictionary[ "QREAL" ] = "double";
- //Only used when cross compiling.
- dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg";
- QString version;
- QFile qglobal_h(sourcePath + "/src/corelib/global/qglobal.h");
- if (qglobal_h.open(QFile::ReadOnly)) {
- QTextStream read(&qglobal_h);
- QRegExp version_regexp("^# *define *QT_VERSION_STR *\"([^\"]*)\"");
- QString line;
- while (!read.atEnd()) {
- line = read.readLine();
- if (version_regexp.exactMatch(line)) {
- version = version_regexp.cap(1).trimmed();
- if (!version.isEmpty())
- break;
- }
- }
- qglobal_h.close();
- }
- if (version.isEmpty())
- version = QString("%1.%2.%3").arg(QT_VERSION>>16).arg(((QT_VERSION>>8)&0xff)).arg(QT_VERSION&0xff);
- dictionary[ "VERSION" ] = version;
- {
- QRegExp version_re("([0-9]*)\\.([0-9]*)\\.([0-9]*)(|-.*)");
- if (version_re.exactMatch(version)) {
- dictionary[ "VERSION_MAJOR" ] = version_re.cap(1);
- dictionary[ "VERSION_MINOR" ] = version_re.cap(2);
- dictionary[ "VERSION_PATCH" ] = version_re.cap(3);
- }
- }
- dictionary[ "REDO" ] = "no";
- dictionary[ "DEPENDENCIES" ] = "no";
- dictionary[ "BUILD" ] = "debug";
- dictionary[ "BUILDALL" ] = "auto"; // Means yes, but not explicitly
- dictionary[ "FORCEDEBUGINFO" ] = "no";
- dictionary[ "BUILDTYPE" ] = "none";
- dictionary[ "BUILDDEV" ] = "no";
- dictionary[ "COMPILE_EXAMPLES" ] = "yes";
- dictionary[ "C++11" ] = "auto";
- dictionary[ "SHARED" ] = "yes";
- dictionary[ "ZLIB" ] = "auto";
- dictionary[ "PCRE" ] = "auto";
- dictionary[ "ICU" ] = "auto";
- dictionary[ "ANGLE" ] = "auto";
- dictionary[ "DYNAMICGL" ] = "auto";
- dictionary[ "GIF" ] = "auto";
- dictionary[ "JPEG" ] = "auto";
- dictionary[ "PNG" ] = "auto";
- dictionary[ "LIBJPEG" ] = "auto";
- dictionary[ "LIBPNG" ] = "auto";
- dictionary[ "FREETYPE" ] = "yes";
- dictionary[ "HARFBUZZ" ] = "no";
- dictionary[ "ACCESSIBILITY" ] = "yes";
- dictionary[ "OPENGL" ] = "yes";
- dictionary[ "OPENGL_ES_2" ] = "yes";
- dictionary[ "OPENVG" ] = "no";
- dictionary[ "OPENSSL" ] = "auto";
- dictionary[ "DBUS" ] = "auto";
- dictionary[ "STYLE_WINDOWS" ] = "yes";
- dictionary[ "STYLE_WINDOWSXP" ] = "auto";
- dictionary[ "STYLE_WINDOWSVISTA" ] = "auto";
- dictionary[ "STYLE_FUSION" ] = "yes";
- dictionary[ "STYLE_WINDOWSCE" ] = "no";
- dictionary[ "STYLE_WINDOWSMOBILE" ] = "no";
- dictionary[ "STYLE_GTK" ] = "no";
- dictionary[ "SQL_MYSQL" ] = "no";
- dictionary[ "SQL_ODBC" ] = "no";
- dictionary[ "SQL_OCI" ] = "no";
- dictionary[ "SQL_PSQL" ] = "no";
- dictionary[ "SQL_TDS" ] = "no";
- dictionary[ "SQL_DB2" ] = "no";
- dictionary[ "SQL_SQLITE" ] = "auto";
- dictionary[ "SQL_SQLITE_LIB" ] = "qt";
- dictionary[ "SQL_SQLITE2" ] = "no";
- dictionary[ "SQL_IBASE" ] = "no";
- QString tmp = dictionary[ "QMAKESPEC" ];
- if (tmp.contains("\\")) {
- tmp = tmp.mid(tmp.lastIndexOf("\\") + 1);
- } else {
- tmp = tmp.mid(tmp.lastIndexOf("/") + 1);
- }
- dictionary[ "QMAKESPEC" ] = tmp;
- dictionary[ "INCREDIBUILD_XGE" ] = "auto";
- dictionary[ "LTCG" ] = "no";
- dictionary[ "NATIVE_GESTURES" ] = "yes";
- dictionary[ "MSVC_MP" ] = "no";
- }
- Configure::~Configure()
- {
- for (int i=0; i<3; ++i) {
- QList<MakeItem*> items = makeList[i];
- for (int j=0; j<items.size(); ++j)
- delete items[j];
- }
- }
- QString Configure::formatPath(const QString &path)
- {
- QString ret = QDir::cleanPath(path);
- // This amount of quoting is deemed sufficient.
- if (ret.contains(QLatin1Char(' '))) {
- ret.prepend(QLatin1Char('"'));
- ret.append(QLatin1Char('"'));
- }
- return ret;
- }
- QString Configure::formatPaths(const QStringList &paths)
- {
- QString ret;
- foreach (const QString &path, paths) {
- if (!ret.isEmpty())
- ret += QLatin1Char(' ');
- ret += formatPath(path);
- }
- return ret;
- }
- // We could use QDir::homePath() + "/.qt-license", but
- // that will only look in the first of $HOME,$USERPROFILE
- // or $HOMEDRIVE$HOMEPATH. So, here we try'em all to be
- // more forgiving for the end user..
- QString Configure::firstLicensePath()
- {
- QStringList allPaths;
- allPaths << "./.qt-license"
- << QString::fromLocal8Bit(getenv("HOME")) + "/.qt-license"
- << QString::fromLocal8Bit(getenv("USERPROFILE")) + "/.qt-license"
- << QString::fromLocal8Bit(getenv("HOMEDRIVE")) + QString::fromLocal8Bit(getenv("HOMEPATH")) + "/.qt-license";
- for (int i = 0; i< allPaths.count(); ++i)
- if (QFile::exists(allPaths.at(i)))
- return allPaths.at(i);
- return QString();
- }
- // #### somehow I get a compiler error about vc++ reaching the nesting limit without
- // undefining the ansi for scoping.
- #ifdef for
- #undef for
- #endif
- void Configure::parseCmdLine()
- {
- if (configCmdLine.size() && configCmdLine.at(0) == "-top-level") {
- dictionary[ "TOPLEVEL" ] = "yes";
- configCmdLine.removeAt(0);
- }
- int argCount = configCmdLine.size();
- int i = 0;
- const QStringList imageFormats = QStringList() << "gif" << "png" << "jpeg";
- if (argCount < 1) // skip rest if no arguments
- ;
- else if (configCmdLine.at(i) == "-redo") {
- dictionary[ "REDO" ] = "yes";
- configCmdLine.clear();
- reloadCmdLine();
- }
- else if (configCmdLine.at(i) == "-loadconfig") {
- ++i;
- if (i != argCount) {
- dictionary[ "REDO" ] = "yes";
- dictionary[ "CUSTOMCONFIG" ] = "_" + configCmdLine.at(i);
- configCmdLine.clear();
- reloadCmdLine();
- } else {
- dictionary[ "DONE" ] = "error";
- }
- i = 0;
- }
- argCount = configCmdLine.size();
- bool isDeviceMkspec = false;
- // Look first for XQMAKESPEC
- for (int j = 0 ; j < argCount; ++j)
- {
- if ((configCmdLine.at(j) == "-xplatform") || (configCmdLine.at(j) == "-device")) {
- isDeviceMkspec = (configCmdLine.at(j) == "-device");
- ++j;
- if (j == argCount)
- break;
- dictionary["XQMAKESPEC"] = configCmdLine.at(j);
- applySpecSpecifics();
- break;
- }
- }
- for (; i<configCmdLine.size(); ++i) {
- bool continueElse[] = {false, false};
- if (configCmdLine.at(i) == "-help"
- || configCmdLine.at(i) == "-h"
- || configCmdLine.at(i) == "-?")
- dictionary[ "HELP" ] = "yes";
- else if (configCmdLine.at(i) == "-qconfig") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QCONFIG" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-qreal") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QREAL" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-release") {
- dictionary[ "BUILD" ] = "release";
- if (dictionary[ "BUILDALL" ] == "auto")
- dictionary[ "BUILDALL" ] = "no";
- } else if (configCmdLine.at(i) == "-debug") {
- dictionary[ "BUILD" ] = "debug";
- if (dictionary[ "BUILDALL" ] == "auto")
- dictionary[ "BUILDALL" ] = "no";
- } else if (configCmdLine.at(i) == "-debug-and-release")
- dictionary[ "BUILDALL" ] = "yes";
- else if (configCmdLine.at(i) == "-force-debug-info")
- dictionary[ "FORCEDEBUGINFO" ] = "yes";
- else if (configCmdLine.at(i) == "-compile-examples") {
- dictionary[ "COMPILE_EXAMPLES" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-compile-examples") {
- dictionary[ "COMPILE_EXAMPLES" ] = "no";
- }
- else if (configCmdLine.at(i) == "-c++11")
- dictionary[ "C++11" ] = "yes";
- else if (configCmdLine.at(i) == "-no-c++11")
- dictionary[ "C++11" ] = "no";
- else if (configCmdLine.at(i) == "-shared")
- dictionary[ "SHARED" ] = "yes";
- else if (configCmdLine.at(i) == "-static")
- dictionary[ "SHARED" ] = "no";
- else if (configCmdLine.at(i) == "-developer-build")
- dictionary[ "BUILDDEV" ] = "yes";
- else if (configCmdLine.at(i) == "-opensource") {
- dictionary[ "BUILDTYPE" ] = "opensource";
- }
- else if (configCmdLine.at(i) == "-commercial") {
- dictionary[ "BUILDTYPE" ] = "commercial";
- }
- else if (configCmdLine.at(i) == "-ltcg") {
- dictionary[ "LTCG" ] = "yes";
- }
- else if (configCmdLine.at(i) == "-no-ltcg") {
- dictionary[ "LTCG" ] = "no";
- }
- else if (configCmdLine.at(i) == "-mp") {
- dictionary[ "MSVC_MP" ] = "yes";
- }
- else if (configCmdLine.at(i) == "-no-mp") {
- dictionary[ "MSVC_MP" ] = "no";
- }
- else if (configCmdLine.at(i) == "-force-asserts") {
- dictionary[ "FORCE_ASSERTS" ] = "yes";
- }
- else if (configCmdLine.at(i) == "-target") {
- ++i;
- if (i == argCount)
- break;
- const QString option = configCmdLine.at(i);
- if (option != "xp") {
- cout << "ERROR: invalid argument for -target option" << endl;
- dictionary["DONE"] = "error";
- return;
- }
- dictionary["TARGET_OS"] = option;
- }
- else if (configCmdLine.at(i) == "-platform") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QMAKESPEC" ] = configCmdLine.at(i);
- dictionary[ "QMAKESPEC_FROM" ] = "commandline";
- } else if (configCmdLine.at(i) == "-arch") {
- ++i;
- if (i == argCount)
- break;
- dictionary["OBSOLETE_ARCH_ARG"] = "yes";
- } else if (configCmdLine.at(i) == "-embedded") {
- dictionary[ "EMBEDDED" ] = "yes";
- } else if (configCmdLine.at(i) == "-xplatform"
- || configCmdLine.at(i) == "-device") {
- ++i;
- // do nothing
- } else if (configCmdLine.at(i) == "-device-option") {
- ++i;
- const QString option = configCmdLine.at(i);
- QString &devOpt = dictionary["DEVICE_OPTION"];
- if (!devOpt.isEmpty())
- devOpt.append("\n").append(option);
- else
- devOpt = option;
- }
- else if (configCmdLine.at(i) == "-no-zlib") {
- // No longer supported since Qt 4.4.0
- // But save the information for later so that we can print a warning
- //
- // If you REALLY really need no zlib support, you can still disable
- // it by doing the following:
- // add "no-zlib" to mkspecs/qconfig.pri
- // #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
- //
- // There's no guarantee that Qt will build under those conditions
- dictionary[ "ZLIB_FORCED" ] = "yes";
- } else if (configCmdLine.at(i) == "-qt-zlib") {
- dictionary[ "ZLIB" ] = "qt";
- } else if (configCmdLine.at(i) == "-system-zlib") {
- dictionary[ "ZLIB" ] = "system";
- }
- else if (configCmdLine.at(i) == "-qt-pcre") {
- dictionary[ "PCRE" ] = "qt";
- } else if (configCmdLine.at(i) == "-system-pcre") {
- dictionary[ "PCRE" ] = "system";
- }
- else if (configCmdLine.at(i) == "-icu") {
- dictionary[ "ICU" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-icu") {
- dictionary[ "ICU" ] = "no";
- }
- else if (configCmdLine.at(i) == "-angle") {
- dictionary[ "ANGLE" ] = "yes";
- dictionary[ "ANGLE_FROM" ] = "commandline";
- } else if (configCmdLine.at(i) == "-angle-d3d11") {
- dictionary[ "ANGLE" ] = "d3d11";
- dictionary[ "ANGLE_FROM" ] = "commandline";
- } else if (configCmdLine.at(i) == "-no-angle") {
- dictionary[ "ANGLE" ] = "no";
- dictionary[ "ANGLE_FROM" ] = "commandline";
- }
- // Image formats --------------------------------------------
- else if (configCmdLine.at(i) == "-no-gif")
- dictionary[ "GIF" ] = "no";
- else if (configCmdLine.at(i) == "-no-libjpeg") {
- dictionary[ "JPEG" ] = "no";
- dictionary[ "LIBJPEG" ] = "no";
- } else if (configCmdLine.at(i) == "-qt-libjpeg") {
- dictionary[ "LIBJPEG" ] = "qt";
- } else if (configCmdLine.at(i) == "-system-libjpeg") {
- dictionary[ "LIBJPEG" ] = "system";
- }
- else if (configCmdLine.at(i) == "-no-libpng") {
- dictionary[ "PNG" ] = "no";
- dictionary[ "LIBPNG" ] = "no";
- } else if (configCmdLine.at(i) == "-qt-libpng") {
- dictionary[ "LIBPNG" ] = "qt";
- } else if (configCmdLine.at(i) == "-system-libpng") {
- dictionary[ "LIBPNG" ] = "system";
- }
- // Text Rendering --------------------------------------------
- else if (configCmdLine.at(i) == "-no-freetype")
- dictionary[ "FREETYPE" ] = "no";
- else if (configCmdLine.at(i) == "-qt-freetype")
- dictionary[ "FREETYPE" ] = "yes";
- else if (configCmdLine.at(i) == "-system-freetype")
- dictionary[ "FREETYPE" ] = "system";
- else if (configCmdLine.at(i) == "-no-harfbuzz")
- dictionary[ "HARFBUZZ" ] = "no";
- else if (configCmdLine.at(i) == "-qt-harfbuzz")
- dictionary[ "HARFBUZZ" ] = "yes";
- else if (configCmdLine.at(i) == "-system-harfbuzz")
- dictionary[ "HARFBUZZ" ] = "system";
- // CE- C runtime --------------------------------------------
- else if (configCmdLine.at(i) == "-crt") {
- ++i;
- if (i == argCount)
- break;
- QDir cDir(configCmdLine.at(i));
- if (!cDir.exists())
- cout << "WARNING: Could not find directory (" << qPrintable(configCmdLine.at(i)) << ")for C runtime deployment" << endl;
- else
- dictionary[ "CE_CRT" ] = QDir::toNativeSeparators(cDir.absolutePath());
- } else if (configCmdLine.at(i) == "-qt-crt") {
- dictionary[ "CE_CRT" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-crt") {
- dictionary[ "CE_CRT" ] = "no";
- }
- // cetest ---------------------------------------------------
- else if (configCmdLine.at(i) == "-no-cetest") {
- dictionary[ "CETEST" ] = "no";
- dictionary[ "CETEST_REQUESTED" ] = "no";
- } else if (configCmdLine.at(i) == "-cetest") {
- // although specified to use it, we stay at "auto" state
- // this is because checkAvailability() adds variables
- // we need for crosscompilation; but remember if we asked
- // for it.
- dictionary[ "CETEST_REQUESTED" ] = "yes";
- }
- // Qt/CE - signing tool -------------------------------------
- else if (configCmdLine.at(i) == "-signature") {
- ++i;
- if (i == argCount)
- break;
- QFileInfo info(configCmdLine.at(i));
- if (!info.exists())
- cout << "WARNING: Could not find signature file (" << qPrintable(configCmdLine.at(i)) << ")" << endl;
- else
- dictionary[ "CE_SIGNATURE" ] = QDir::toNativeSeparators(info.absoluteFilePath());
- }
- // Styles ---------------------------------------------------
- else if (configCmdLine.at(i) == "-qt-style-windows")
- dictionary[ "STYLE_WINDOWS" ] = "yes";
- else if (configCmdLine.at(i) == "-no-style-windows")
- dictionary[ "STYLE_WINDOWS" ] = "no";
- else if (configCmdLine.at(i) == "-qt-style-windowsce")
- dictionary[ "STYLE_WINDOWSCE" ] = "yes";
- else if (configCmdLine.at(i) == "-no-style-windowsce")
- dictionary[ "STYLE_WINDOWSCE" ] = "no";
- else if (configCmdLine.at(i) == "-qt-style-windowsmobile")
- dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes";
- else if (configCmdLine.at(i) == "-no-style-windowsmobile")
- dictionary[ "STYLE_WINDOWSMOBILE" ] = "no";
- else if (configCmdLine.at(i) == "-qt-style-windowsxp")
- dictionary[ "STYLE_WINDOWSXP" ] = "yes";
- else if (configCmdLine.at(i) == "-no-style-windowsxp")
- dictionary[ "STYLE_WINDOWSXP" ] = "no";
- else if (configCmdLine.at(i) == "-qt-style-windowsvista")
- dictionary[ "STYLE_WINDOWSVISTA" ] = "yes";
- else if (configCmdLine.at(i) == "-no-style-windowsvista")
- dictionary[ "STYLE_WINDOWSVISTA" ] = "no";
- else if (configCmdLine.at(i) == "-qt-style-fusion")
- dictionary[ "STYLE_FUSION" ] = "yes";
- else if (configCmdLine.at(i) == "-no-style-fusion")
- dictionary[ "STYLE_FUSION" ] = "no";
- // Work around compiler nesting limitation
- else
- continueElse[1] = true;
- if (!continueElse[1]) {
- }
- // OpenGL Support -------------------------------------------
- else if (configCmdLine.at(i) == "-no-opengl") {
- dictionary[ "OPENGL" ] = "no";
- dictionary[ "OPENGL_ES_2" ] = "no";
- } else if (configCmdLine.at(i) == "-opengl-es-2") {
- dictionary[ "OPENGL" ] = "yes";
- dictionary[ "OPENGL_ES_2" ] = "yes";
- } else if (configCmdLine.at(i) == "-opengl") {
- dictionary[ "OPENGL" ] = "yes";
- i++;
- if (i == argCount)
- break;
- dictionary[ "OPENGL_ES_2" ] = "no";
- if ( configCmdLine.at(i) == "es2" ) {
- dictionary[ "OPENGL_ES_2" ] = "yes";
- } else if ( configCmdLine.at(i) == "desktop" ) {
- // OPENGL=yes suffices
- } else if ( configCmdLine.at(i) == "dynamic" ) {
- dictionary[ "DYNAMICGL" ] = "yes";
- } else {
- cout << "Argument passed to -opengl option is not valid." << endl;
- dictionary[ "DONE" ] = "error";
- break;
- }
- }
- // OpenVG Support -------------------------------------------
- else if (configCmdLine.at(i) == "-openvg") {
- dictionary[ "OPENVG" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-openvg") {
- dictionary[ "OPENVG" ] = "no";
- }
- // Databases ------------------------------------------------
- else if (configCmdLine.at(i) == "-qt-sql-mysql")
- dictionary[ "SQL_MYSQL" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-mysql")
- dictionary[ "SQL_MYSQL" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-mysql")
- dictionary[ "SQL_MYSQL" ] = "no";
- else if (configCmdLine.at(i) == "-qt-sql-odbc")
- dictionary[ "SQL_ODBC" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-odbc")
- dictionary[ "SQL_ODBC" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-odbc")
- dictionary[ "SQL_ODBC" ] = "no";
- else if (configCmdLine.at(i) == "-qt-sql-oci")
- dictionary[ "SQL_OCI" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-oci")
- dictionary[ "SQL_OCI" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-oci")
- dictionary[ "SQL_OCI" ] = "no";
- else if (configCmdLine.at(i) == "-qt-sql-psql")
- dictionary[ "SQL_PSQL" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-psql")
- dictionary[ "SQL_PSQL" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-psql")
- dictionary[ "SQL_PSQL" ] = "no";
- else if (configCmdLine.at(i) == "-qt-sql-tds")
- dictionary[ "SQL_TDS" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-tds")
- dictionary[ "SQL_TDS" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-tds")
- dictionary[ "SQL_TDS" ] = "no";
- else if (configCmdLine.at(i) == "-qt-sql-db2")
- dictionary[ "SQL_DB2" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-db2")
- dictionary[ "SQL_DB2" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-db2")
- dictionary[ "SQL_DB2" ] = "no";
- else if (configCmdLine.at(i) == "-qt-sql-sqlite")
- dictionary[ "SQL_SQLITE" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-sqlite")
- dictionary[ "SQL_SQLITE" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-sqlite")
- dictionary[ "SQL_SQLITE" ] = "no";
- else if (configCmdLine.at(i) == "-system-sqlite")
- dictionary[ "SQL_SQLITE_LIB" ] = "system";
- else if (configCmdLine.at(i) == "-qt-sql-sqlite2")
- dictionary[ "SQL_SQLITE2" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-sqlite2")
- dictionary[ "SQL_SQLITE2" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-sqlite2")
- dictionary[ "SQL_SQLITE2" ] = "no";
- else if (configCmdLine.at(i) == "-qt-sql-ibase")
- dictionary[ "SQL_IBASE" ] = "yes";
- else if (configCmdLine.at(i) == "-plugin-sql-ibase")
- dictionary[ "SQL_IBASE" ] = "plugin";
- else if (configCmdLine.at(i) == "-no-sql-ibase")
- dictionary[ "SQL_IBASE" ] = "no";
- // Image formats --------------------------------------------
- else if (configCmdLine.at(i).startsWith("-qt-imageformat-") &&
- imageFormats.contains(configCmdLine.at(i).section('-', 3)))
- dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "yes";
- else if (configCmdLine.at(i).startsWith("-plugin-imageformat-") &&
- imageFormats.contains(configCmdLine.at(i).section('-', 3)))
- dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "plugin";
- else if (configCmdLine.at(i).startsWith("-no-imageformat-") &&
- imageFormats.contains(configCmdLine.at(i).section('-', 3)))
- dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no";
- // IDE project generation -----------------------------------
- else if (configCmdLine.at(i) == "-no-vcproj")
- dictionary[ "VCPROJFILES" ] = "no";
- else if (configCmdLine.at(i) == "-vcproj")
- dictionary[ "VCPROJFILES" ] = "yes";
- else if (configCmdLine.at(i) == "-no-incredibuild-xge")
- dictionary[ "INCREDIBUILD_XGE" ] = "no";
- else if (configCmdLine.at(i) == "-incredibuild-xge")
- dictionary[ "INCREDIBUILD_XGE" ] = "yes";
- else if (configCmdLine.at(i) == "-native-gestures")
- dictionary[ "NATIVE_GESTURES" ] = "yes";
- else if (configCmdLine.at(i) == "-no-native-gestures")
- dictionary[ "NATIVE_GESTURES" ] = "no";
- // Others ---------------------------------------------------
- else if (configCmdLine.at(i) == "-widgets")
- dictionary[ "WIDGETS" ] = "yes";
- else if (configCmdLine.at(i) == "-no-widgets")
- dictionary[ "WIDGETS" ] = "no";
- else if (configCmdLine.at(i) == "-gui")
- dictionary[ "GUI" ] = "yes";
- else if (configCmdLine.at(i) == "-no-gui")
- dictionary[ "GUI" ] = "no";
- else if (configCmdLine.at(i) == "-rtti")
- dictionary[ "RTTI" ] = "yes";
- else if (configCmdLine.at(i) == "-no-rtti")
- dictionary[ "RTTI" ] = "no";
- else if (configCmdLine.at(i) == "-strip")
- dictionary[ "STRIP" ] = "yes";
- else if (configCmdLine.at(i) == "-no-strip")
- dictionary[ "STRIP" ] = "no";
- else if (configCmdLine.at(i) == "-accessibility")
- dictionary[ "ACCESSIBILITY" ] = "yes";
- else if (configCmdLine.at(i) == "-no-accessibility") {
- dictionary[ "ACCESSIBILITY" ] = "no";
- cout << "Setting accessibility to NO" << endl;
- }
- else if (configCmdLine.at(i) == "-no-sse2")
- dictionary[ "SSE2" ] = "no";
- else if (configCmdLine.at(i) == "-sse2")
- dictionary[ "SSE2" ] = "yes";
- else if (configCmdLine.at(i) == "-no-sse3")
- dictionary[ "SSE3" ] = "no";
- else if (configCmdLine.at(i) == "-sse3")
- dictionary[ "SSE3" ] = "yes";
- else if (configCmdLine.at(i) == "-no-ssse3")
- dictionary[ "SSSE3" ] = "no";
- else if (configCmdLine.at(i) == "-ssse3")
- dictionary[ "SSSE3" ] = "yes";
- else if (configCmdLine.at(i) == "-no-sse4.1")
- dictionary[ "SSE4_1" ] = "no";
- else if (configCmdLine.at(i) == "-sse4.1")
- dictionary[ "SSE4_1" ] = "yes";
- else if (configCmdLine.at(i) == "-no-sse4.2")
- dictionary[ "SSE4_2" ] = "no";
- else if (configCmdLine.at(i) == "-sse4.2")
- dictionary[ "SSE4_2" ] = "yes";
- else if (configCmdLine.at(i) == "-no-avx")
- dictionary[ "AVX" ] = "no";
- else if (configCmdLine.at(i) == "-avx")
- dictionary[ "AVX" ] = "yes";
- else if (configCmdLine.at(i) == "-no-avx2")
- dictionary[ "AVX2" ] = "no";
- else if (configCmdLine.at(i) == "-avx2")
- dictionary[ "AVX2" ] = "yes";
- else if (configCmdLine.at(i) == "-no-iwmmxt")
- dictionary[ "IWMMXT" ] = "no";
- else if (configCmdLine.at(i) == "-iwmmxt")
- dictionary[ "IWMMXT" ] = "yes";
- else if (configCmdLine.at(i) == "-no-openssl") {
- dictionary[ "OPENSSL"] = "no";
- } else if (configCmdLine.at(i) == "-openssl") {
- dictionary[ "OPENSSL" ] = "yes";
- } else if (configCmdLine.at(i) == "-openssl-linked") {
- dictionary[ "OPENSSL" ] = "linked";
- } else if (configCmdLine.at(i) == "-no-qdbus") {
- dictionary[ "DBUS" ] = "no";
- } else if (configCmdLine.at(i) == "-qdbus") {
- dictionary[ "DBUS" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-dbus") {
- dictionary[ "DBUS" ] = "no";
- } else if (configCmdLine.at(i) == "-dbus") {
- dictionary[ "DBUS" ] = "yes";
- } else if (configCmdLine.at(i) == "-dbus-linked") {
- dictionary[ "DBUS" ] = "linked";
- } else if (configCmdLine.at(i) == "-audio-backend") {
- 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") {
- dictionary[ "QML_DEBUG" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-plugin-manifests") {
- dictionary[ "PLUGIN_MANIFESTS" ] = "no";
- } else if (configCmdLine.at(i) == "-plugin-manifests") {
- dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-slog2") {
- dictionary[ "SLOG2" ] = "no";
- } else if (configCmdLine.at(i) == "-slog2") {
- dictionary[ "SLOG2" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-imf") {
- dictionary[ "QNX_IMF" ] = "no";
- } else if (configCmdLine.at(i) == "-imf") {
- dictionary[ "QNX_IMF" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-pps") {
- dictionary[ "PPS" ] = "no";
- } else if (configCmdLine.at(i) == "-pps") {
- dictionary[ "PPS" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-lgmon") {
- dictionary[ "LGMON" ] = "no";
- } else if (configCmdLine.at(i) == "-lgmon") {
- dictionary[ "LGMON" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-system-proxies") {
- dictionary[ "SYSTEM_PROXIES" ] = "no";
- } else if (configCmdLine.at(i) == "-system-proxies") {
- dictionary[ "SYSTEM_PROXIES" ] = "yes";
- } else if (configCmdLine.at(i) == "-warnings-are-errors" ||
- configCmdLine.at(i) == "-Werror") {
- dictionary[ "WERROR" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-warnings-are-errors") {
- dictionary[ "WERROR" ] = "no";
- } else if (configCmdLine.at(i) == "-no-eventfd") {
- dictionary[ "QT_EVENTFD" ] = "no";
- } else if (configCmdLine.at(i) == "-eventfd") {
- dictionary[ "QT_EVENTFD" ] = "yes";
- }
- // Work around compiler nesting limitation
- else
- continueElse[0] = true;
- if (!continueElse[0]) {
- }
- else if (configCmdLine.at(i) == "-internal")
- dictionary[ "QMAKE_INTERNAL" ] = "yes";
- else if (configCmdLine.at(i) == "-no-syncqt")
- dictionary[ "SYNCQT" ] = "no";
- else if (configCmdLine.at(i) == "-no-qmake")
- dictionary[ "BUILD_QMAKE" ] = "no";
- else if (configCmdLine.at(i) == "-qmake")
- dictionary[ "BUILD_QMAKE" ] = "yes";
- else if (configCmdLine.at(i) == "-dont-process")
- dictionary[ "PROCESS" ] = "no";
- else if (configCmdLine.at(i) == "-process")
- dictionary[ "PROCESS" ] = "partial";
- else if (configCmdLine.at(i) == "-fully-process")
- dictionary[ "PROCESS" ] = "full";
- else if (configCmdLine.at(i) == "-no-qmake-deps")
- dictionary[ "DEPENDENCIES" ] = "no";
- else if (configCmdLine.at(i) == "-qmake-deps")
- dictionary[ "DEPENDENCIES" ] = "yes";
- else if (configCmdLine.at(i) == "-qtnamespace") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_NAMESPACE" ] = configCmdLine.at(i);
- } else if (configCmdLine.at(i) == "-qtlibinfix") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i);
- } else if (configCmdLine.at(i) == "-D") {
- ++i;
- if (i == argCount)
- break;
- qmakeDefines += configCmdLine.at(i);
- } else if (configCmdLine.at(i) == "-I") {
- ++i;
- if (i == argCount)
- break;
- qmakeIncludes += configCmdLine.at(i);
- } else if (configCmdLine.at(i) == "-L") {
- ++i;
- if (i == argCount)
- break;
- QFileInfo checkDirectory(configCmdLine.at(i));
- if (!checkDirectory.isDir()) {
- cout << "Argument passed to -L option is not a directory path. Did you mean the -l option?" << endl;
- dictionary[ "DONE" ] = "error";
- break;
- }
- qmakeLibs += QString("-L" + configCmdLine.at(i));
- } else if (configCmdLine.at(i) == "-l") {
- ++i;
- if (i == argCount)
- break;
- qmakeLibs += QString("-l" + configCmdLine.at(i));
- } else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS=")) {
- opensslLibs = configCmdLine.at(i);
- } else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS_DEBUG=")) {
- opensslLibsDebug = configCmdLine.at(i);
- } else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS_RELEASE=")) {
- opensslLibsRelease = configCmdLine.at(i);
- } else if (configCmdLine.at(i).startsWith("OPENSSL_PATH=")) {
- opensslPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1));
- } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) {
- psqlLibs = configCmdLine.at(i);
- } else if (configCmdLine.at(i).startsWith("SYBASE=")) {
- sybase = configCmdLine.at(i);
- } else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) {
- sybaseLibs = configCmdLine.at(i);
- } else if (configCmdLine.at(i).startsWith("DBUS_PATH=")) {
- dbusPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1));
- } else if (configCmdLine.at(i).startsWith("MYSQL_PATH=")) {
- mysqlPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1));
- } else if (configCmdLine.at(i).startsWith("ZLIB_LIBS=")) {
- zlibLibs = QDir::fromNativeSeparators(configCmdLine.at(i));
- }
- else if ((configCmdLine.at(i) == "-override-version") || (configCmdLine.at(i) == "-version-override")){
- ++i;
- if (i == argCount)
- break;
- dictionary[ "VERSION" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-saveconfig") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "CUSTOMCONFIG" ] = "_" + configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-confirm-license") {
- dictionary["LICENSE_CONFIRMED"] = "yes";
- }
- else if (configCmdLine.at(i) == "-make") {
- ++i;
- if (i == argCount)
- break;
- QString part = configCmdLine.at(i);
- if (!allBuildParts.contains(part)) {
- cout << "Unknown part " << part << " passed to -make." << endl;
- dictionary["DONE"] = "error";
- }
- buildParts += part;
- } else if (configCmdLine.at(i) == "-nomake") {
- ++i;
- if (i == argCount)
- break;
- QString part = configCmdLine.at(i);
- if (!allBuildParts.contains(part)) {
- cout << "Unknown part " << part << " passed to -nomake." << endl;
- dictionary["DONE"] = "error";
- }
- nobuildParts += part;
- }
- else if (configCmdLine.at(i) == "-skip") {
- ++i;
- if (i == argCount)
- break;
- QString mod = configCmdLine.at(i);
- if (!mod.startsWith(QStringLiteral("qt")))
- mod.insert(0, QStringLiteral("qt"));
- if (!QFileInfo(sourcePath + "/../" + mod).isDir()) {
- cout << "Attempting to skip non-existent module " << mod << "." << endl;
- dictionary["DONE"] = "error";
- }
- skipModules += mod;
- }
- // Directories ----------------------------------------------
- else if (configCmdLine.at(i) == "-prefix") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_PREFIX" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-bindir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_BINS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-libexecdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_LIBEXECS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-libdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_LIBS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-docdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_DOCS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-headerdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_HEADERS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-plugindir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_PLUGINS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-importdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_IMPORTS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-qmldir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_QML" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-archdatadir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_ARCHDATA" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-datadir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_DATA" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-translationdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_TRANSLATIONS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-examplesdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_EXAMPLES" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-testsdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_INSTALL_TESTS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-sysroot") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "CFG_SYSROOT" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-no-gcc-sysroot") {
- dictionary[ "CFG_GCC_SYSROOT" ] = "no";
- }
- else if (configCmdLine.at(i) == "-hostprefix") {
- ++i;
- if (i == argCount || configCmdLine.at(i).startsWith('-'))
- dictionary[ "QT_HOST_PREFIX" ] = buildPath;
- else
- dictionary[ "QT_HOST_PREFIX" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-hostbindir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_HOST_BINS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-hostlibdir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_HOST_LIBS" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-hostdatadir") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-extprefix") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "QT_EXT_PREFIX" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i) == "-make-tool") {
- ++i;
- if (i == argCount)
- break;
- dictionary[ "MAKE" ] = configCmdLine.at(i);
- }
- else if (configCmdLine.at(i).indexOf(QRegExp("^-(en|dis)able-")) != -1) {
- // Scan to see if any specific modules and drivers are enabled or disabled
- for (QStringList::Iterator module = modules.begin(); module != modules.end(); ++module) {
- if (configCmdLine.at(i) == QString("-enable-") + (*module)) {
- enabledModules += (*module);
- break;
- }
- else if (configCmdLine.at(i) == QString("-disable-") + (*module)) {
- disabledModules += (*module);
- break;
- }
- }
- }
- else if (configCmdLine.at(i) == "-directwrite") {
- dictionary["DIRECTWRITE"] = "yes";
- } else if (configCmdLine.at(i) == "-no-directwrite") {
- dictionary["DIRECTWRITE"] = "no";
- }
- else if (configCmdLine.at(i) == "-direct2d") {
- dictionary["DIRECT2D"] = "yes";
- } else if (configCmdLine.at(i) == "-no-direct2d") {
- dictionary["DIRECT2D"] = "no";
- }
- else if (configCmdLine.at(i) == "-nis") {
- dictionary["NIS"] = "yes";
- } else if (configCmdLine.at(i) == "-no-nis") {
- dictionary["NIS"] = "no";
- }
- else if (configCmdLine.at(i) == "-cups") {
- dictionary["QT_CUPS"] = "yes";
- } else if (configCmdLine.at(i) == "-no-cups") {
- dictionary["QT_CUPS"] = "no";
- }
- else if (configCmdLine.at(i) == "-iconv") {
- dictionary["QT_ICONV"] = "yes";
- } else if (configCmdLine.at(i) == "-no-iconv") {
- dictionary["QT_ICONV"] = "no";
- } else if (configCmdLine.at(i) == "-sun-iconv") {
- dictionary["QT_ICONV"] = "sun";
- } else if (configCmdLine.at(i) == "-gnu-iconv") {
- dictionary["QT_ICONV"] = "gnu";
- }
- else if (configCmdLine.at(i) == "-no-evdev") {
- dictionary[ "QT_EVDEV" ] = "no";
- } else if (configCmdLine.at(i) == "-evdev") {
- dictionary[ "QT_EVDEV" ] = "yes";
- }
- else if (configCmdLine.at(i) == "-no-mtdev") {
- dictionary[ "QT_MTDEV" ] = "no";
- } else if (configCmdLine.at(i) == "-mtdev") {
- dictionary[ "QT_MTDEV" ] = "yes";
- }
- else if (configCmdLine.at(i) == "-inotify") {
- dictionary["QT_INOTIFY"] = "yes";
- } else if (configCmdLine.at(i) == "-no-inotify") {
- dictionary["QT_INOTIFY"] = "no";
- }
- else if (configCmdLine.at(i) == "-neon") {
- dictionary["NEON"] = "yes";
- } else if (configCmdLine.at(i) == "-no-neon") {
- dictionary["NEON"] = "no";
- }
- else if (configCmdLine.at(i) == "-largefile") {
- dictionary["LARGE_FILE"] = "yes";
- }
- else if (configCmdLine.at(i)…
Large files files are truncated, but you can click here to view the full file