diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/Makefile.mingw | 1 | ||||
-rw-r--r-- | tools/configure/Makefile.win32 | 2 | ||||
-rw-r--r-- | tools/configure/configure_pch.h | 14 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 432 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 19 | ||||
-rw-r--r-- | tools/configure/environment.cpp | 69 | ||||
-rw-r--r-- | tools/configure/environment.h | 26 | ||||
-rw-r--r-- | tools/configure/main.cpp | 14 | ||||
-rw-r--r-- | tools/configure/tools.cpp | 14 | ||||
-rw-r--r-- | tools/configure/tools.h | 14 | ||||
-rw-r--r-- | tools/shared/windows/registry.cpp | 14 | ||||
-rw-r--r-- | tools/shared/windows/registry_p.h | 14 |
12 files changed, 360 insertions, 273 deletions
diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw index 736c14731e..40c2112132 100644 --- a/tools/configure/Makefile.mingw +++ b/tools/configure/Makefile.mingw @@ -4,7 +4,6 @@ CONFSRC = $(TOOLSRC)/configure RAW_PCH = configure_pch.h PCH = $(RAW_PCH).gch/c++ -CXX = g++ DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DCOMMERCIAL_VERSION INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++" CXXFLAGS_BARE = -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH) diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index 3fe04eef66..b74b0bc82d 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -5,7 +5,7 @@ CONFSRC = $(TOOLSRC)\configure PCH = configure_pch.pch DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DCOMMERCIAL_VERSION INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008" -CXXFLAGS_BARE = -nologo -Zm200 -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) +CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) LINK = link LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest" diff --git a/tools/configure/configure_pch.h b/tools/configure/configure_pch.h index 8813eb485b..0d3da1ad7c 100644 --- a/tools/configure/configure_pch.h +++ b/tools/configure/configure_pch.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 6e9d4aa80b..4c8adfaf30 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2015 The Qt Company Ltd. ** Copyright (C) 2013 Intel Corporation -** Contact: http://www.qt-project.org/legal +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -11,9 +11,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -24,8 +24,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -38,7 +38,6 @@ # include "tools.h" #endif -#include <qdatetime.h> #include <qdir.h> #include <qdiriterator.h> #include <qtemporaryfile.h> @@ -64,7 +63,8 @@ enum Platforms { WINDOWS_RT, QNX, BLACKBERRY, - ANDROID + ANDROID, + OTHER }; std::ostream &operator<<(std::ostream &s, const QString &val) { @@ -268,6 +268,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "OPENVG" ] = "no"; dictionary[ "SSL" ] = "auto"; dictionary[ "OPENSSL" ] = "auto"; + dictionary[ "LIBPROXY" ] = "auto"; dictionary[ "DBUS" ] = "auto"; dictionary[ "STYLE_WINDOWS" ] = "yes"; @@ -858,6 +859,10 @@ void Configure::parseCmdLine() dictionary[ "OPENSSL" ] = "yes"; } else if (configCmdLine.at(i) == "-openssl-linked") { dictionary[ "OPENSSL" ] = "linked"; + } else if (configCmdLine.at(i) == "-no-libproxy") { + dictionary[ "LIBPROXY"] = "no"; + } else if (configCmdLine.at(i) == "-libproxy") { + dictionary[ "LIBPROXY" ] = "yes"; } else if (configCmdLine.at(i) == "-no-qdbus") { dictionary[ "DBUS" ] = "no"; } else if (configCmdLine.at(i) == "-qdbus") { @@ -1379,7 +1384,8 @@ void Configure::parseCmdLine() dictionary[ "QMAKESPEC" ].endsWith("-msvc2008") || dictionary[ "QMAKESPEC" ].endsWith("-msvc2010") || dictionary[ "QMAKESPEC" ].endsWith("-msvc2012") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2013")) { + dictionary[ "QMAKESPEC" ].endsWith("-msvc2013") || + dictionary[ "QMAKESPEC" ].endsWith("-msvc2015")) { if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake"; dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; } else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { @@ -1677,6 +1683,7 @@ void Configure::applySpecSpecifics() dictionary[ "QT_EVDEV" ] = "no"; dictionary[ "QT_MTDEV" ] = "no"; dictionary[ "FONT_CONFIG" ] = "auto"; + dictionary[ "ANGLE" ] = "no"; dictionary["DECORATIONS"] = "default windows styled"; } else if ((platform() == QNX) || (platform() == BLACKBERRY)) { @@ -1716,14 +1723,18 @@ bool Configure::displayHelp() desc("These are optional, but you may specify install directories.\n\n", 0, 1); - desc( "-prefix <dir>", "This will install everything relative to <dir> (default $QT_INSTALL_PREFIX)\n"); + desc( "-prefix <dir>", "The deployment directory, as seen on the target device.\n" + "(default %CD%)\n"); - desc( "-extprefix <dir>", "When -sysroot is used, install everything to <dir>, rather than into SYSROOT/PREFIX.\n"); + desc( "-extprefix <dir>", "The installation directory, as seen on the host machine.\n" + "(default SYSROOT/PREFIX)\n"); - desc( "-hostprefix [dir]", "Tools and libraries needed when developing applications are installed in [dir]. " - "If [dir] is not given, the current build directory will be used. (default EXTPREFIX)\n"); + desc( "-hostprefix [dir]", "The installation directory for build tools running on the\n" + "host machine. If [dir] is not given, the current build\n" + "directory will be used. (default EXTPREFIX)\n"); - desc("You may use these to separate different parts of the install:\n\n"); + desc("You may use these to change the layout of the install. Note that all directories\n" + "except -sysconfdir should be located under -prefix/-hostprefix:\n\n"); desc( "-bindir <dir>", "User executables will be installed to <dir>\n(default PREFIX/bin)"); desc( "-libdir <dir>", "Libraries will be installed to <dir>\n(default PREFIX/lib)"); @@ -1967,6 +1978,8 @@ bool Configure::displayHelp() desc("OPENSSL", "no", "-no-openssl", "Do not compile support for OpenSSL."); desc("OPENSSL", "yes", "-openssl", "Enable run-time OpenSSL support."); desc("OPENSSL", "linked","-openssl-linked", "Enable linked OpenSSL support.\n"); + desc("LIBPROXY", "no", "-no-libproxy", "Do not compile in libproxy support."); + desc("LIBPROXY", "yes", "-libproxy", "Compile in libproxy support (for cross compilation targets).\n"); desc("DBUS", "no", "-no-dbus", "Do not compile in D-Bus support."); desc("DBUS", "yes", "-dbus", "Compile in D-Bus support and load libdbus-1\ndynamically."); desc("DBUS", "linked", "-dbus-linked", "Compile in D-Bus support and link to libdbus-1.\n"); @@ -1977,7 +1990,7 @@ bool Configure::displayHelp() desc("QML_DEBUG", "no", "-no-qml-debug", "Do not build the in-process QML debugging support."); desc("QML_DEBUG", "yes", "-qml-debug", "Build the in-process QML debugging support.\n"); desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering."); - desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering (experimental, requires DirectWrite availability on target systems, e.g. Windows Vista with Platform Update, Windows 7, etc.)\n"); + desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering (requires DirectWrite availability on target systems, e.g. Windows Vista with Platform Update, Windows 7, etc.)\n"); desc("DIRECT2D", "no", "-no-direct2d", "Do not build the Direct2D platform plugin."); desc("DIRECT2D", "yes", "-direct2d", "Build the Direct2D platform plugin (experimental,\n" @@ -2101,12 +2114,12 @@ bool Configure::checkAngleAvailability(QString *errorMessage /* = 0 */) const // it is also present in MinGW. const QString directXSdk = Environment::detectDirectXSdk(); const Compiler compiler = Environment::compilerFromQMakeSpec(dictionary[QStringLiteral("QMAKESPEC")]); - if (compiler >= CC_NET2003 && compiler <= CC_NET2008) { + if (compiler >= CC_MSVC2005 && compiler <= CC_MSVC2008) { if (errorMessage) *errorMessage = QStringLiteral("ANGLE is no longer supported for this compiler."); return false; } - if (compiler < CC_NET2012 && directXSdk.isEmpty()) { + if (compiler < CC_MSVC2012 && directXSdk.isEmpty()) { if (errorMessage) *errorMessage = QStringLiteral("There is no Direct X SDK installed or the environment variable \"DXSDK_DIR\" is not set."); return false; @@ -2228,6 +2241,8 @@ bool Configure::checkAvailability(const QString &part) available = tryCompileProject("common/avx2"); else if (part == "OPENSSL") available = findFile("openssl\\ssl.h"); + else if (part == "LIBPROXY") + available = dictionary.contains("XQMAKESPEC") && tryCompileProject("common/libproxy"); else if (part == "DBUS") available = findFile("dbus\\dbus.h"); else if (part == "CETEST") { @@ -2399,6 +2414,8 @@ void Configure::autoDetection() } if (dictionary["OPENSSL"] == "auto") dictionary["OPENSSL"] = checkAvailability("OPENSSL") ? "yes" : "no"; + if (dictionary["LIBPROXY"] == "auto") + dictionary["LIBPROXY"] = checkAvailability("LIBPROXY") ? "yes" : "no"; if (dictionary["DBUS"] == "auto") dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no"; if (dictionary["QML_DEBUG"] == "auto") @@ -2835,6 +2852,9 @@ void Configure::generateOutputVars() else if (dictionary[ "OPENSSL" ] == "linked") qtConfig += "openssl-linked"; + if (dictionary[ "LIBPROXY" ] == "yes") + qtConfig += "libproxy"; + if (dictionary[ "DBUS" ] == "yes") qtConfig += "dbus"; else if (dictionary[ "DBUS" ] == "linked") @@ -3140,7 +3160,7 @@ void Configure::detectArch() // run qmake QString command = QString("%1 -spec %2 %3") - .arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"), + .arg(QDir::toNativeSeparators(QDir(newpwd).relativeFilePath(buildPath + "/bin/qmake.exe")), QDir::toNativeSeparators(qmakespec), QDir::toNativeSeparators(sourcePath + "/config.tests/arch/arch" + (data.isHost ? "_host" : "") + ".pro")); @@ -3161,7 +3181,7 @@ void Configure::detectArch() // compile command = dictionary[ "MAKE" ]; - if (command.contains("nmake")) + if (command.contains("nmake") || command.contains("jom")) command += " /NOLOGO"; command += " -s"; Environment::execute(command); @@ -3248,7 +3268,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext // run qmake QString command = QString("%1 %2 %3 2>&1") - .arg(QDir::toNativeSeparators(buildPath + "/bin/qmake.exe"), + .arg(QDir::toNativeSeparators(QDir(newpwd).relativeFilePath(buildPath + "/bin/qmake.exe")), QDir::toNativeSeparators(sourcePath + "/config.tests/" + projectPath), extraOptions); @@ -3266,7 +3286,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext if (code == 0) { // compile command = dictionary[ "MAKE" ]; - if (command.contains("nmake")) + if (command.contains("nmake") || command.contains("jom")) command += " /NOLOGO"; command += " -s 2>&1"; output = Environment::execute(command, &code); @@ -3311,13 +3331,9 @@ void Configure::generateQDevicePri() deviceStream << entry << "\n"; } if (dictionary.contains("ANDROID_SDK_ROOT") && dictionary.contains("ANDROID_NDK_ROOT")) { - QString android_platform(dictionary.contains("ANDROID_PLATFORM") - ? dictionary["ANDROID_PLATFORM"] - : QString("android-9")); deviceStream << "android_install {" << endl; deviceStream << " DEFAULT_ANDROID_SDK_ROOT = " << formatPath(dictionary["ANDROID_SDK_ROOT"]) << endl; deviceStream << " DEFAULT_ANDROID_NDK_ROOT = " << formatPath(dictionary["ANDROID_NDK_ROOT"]) << endl; - deviceStream << " DEFAULT_ANDROID_PLATFORM = " << android_platform << endl; if (QSysInfo::WordSize == 64) deviceStream << " DEFAULT_ANDROID_NDK_HOST = windows-x86_64" << endl; else @@ -3327,7 +3343,16 @@ void Configure::generateQDevicePri() : QString("armeabi-v7a")); QString android_tc_vers(dictionary.contains("ANDROID_NDK_TOOLCHAIN_VERSION") ? dictionary["ANDROID_NDK_TOOLCHAIN_VERSION"] - : QString("4.8")); + : QString("4.9")); + + bool targetIs64Bit = android_arch == QString("arm64-v8a") + || android_arch == QString("x86_64") + || android_arch == QString("mips64"); + QString android_platform(dictionary.contains("ANDROID_PLATFORM") + ? dictionary["ANDROID_PLATFORM"] + : (targetIs64Bit ? QString("android-21") : QString("android-9"))); + + deviceStream << " DEFAULT_ANDROID_PLATFORM = " << android_platform << endl; deviceStream << " DEFAULT_ANDROID_TARGET_ARCH = " << android_arch << endl; deviceStream << " DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION = " << android_tc_vers << endl; deviceStream << "}" << endl; @@ -3547,7 +3572,7 @@ void Configure::generateConfigfiles() if (dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; if (dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; if (dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS"; - if (dictionary["QML_DEBUG"] == "no") qconfigList += "QT_QML_NO_DEBUGGER"; + if (dictionary["QML_DEBUG"] == "no") qconfigList += "QT_NO_QML_DEBUGGER"; if (dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE"; if (dictionary["HARFBUZZ"] == "no") qconfigList += "QT_NO_HARFBUZZ"; if (dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES"; @@ -3684,6 +3709,7 @@ void Configure::displayConfig() sout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl; sout << "SSL support................." << dictionary[ "SSL" ] << endl; sout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl; + sout << "libproxy support............" << dictionary[ "LIBPROXY" ] << endl; sout << "Qt D-Bus support............" << dictionary[ "DBUS" ] << endl; sout << "Qt Widgets module support..." << dictionary[ "WIDGETS" ] << endl; sout << "Qt GUI module support......." << dictionary[ "GUI" ] << endl; @@ -3823,6 +3849,11 @@ void Configure::displayConfig() << "will be the same unless you are cross-compiling)." << endl << endl; } + if (!dictionary["PREFIX_COMPLAINTS"].isEmpty()) { + sout << endl + << dictionary["PREFIX_COMPLAINTS"] << endl + << endl; + } // display config.summary sout.seekg(0, ios::beg); @@ -3858,105 +3889,175 @@ void Configure::generateHeaders() } } -static QString stripPrefix(const QString &str, const QString &pfx) +void Configure::addConfStr(int group, const QString &val) { - return str.startsWith(pfx) ? str.mid(pfx.length()) : str; -} - -void Configure::substPrefix(QString *path) -{ - QString spfx = dictionary["QT_SYSROOT_PREFIX"]; - if (path->startsWith(spfx)) - path->replace(0, spfx.size(), dictionary["QT_EXT_PREFIX"]); + confStrOffsets[group] += ' ' + QString::number(confStringOff) + ','; + confStrings[group] += " \"" + val + "\\0\"\n"; + confStringOff += val.length() + 1; } void Configure::generateQConfigCpp() { - // if QT_INSTALL_* have not been specified on commandline, define them now from QT_INSTALL_PREFIX - // if prefix is empty (WINCE), make all of them empty, if they aren't set + QString hostSpec = dictionary["QMAKESPEC"]; + QString targSpec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : hostSpec; + + dictionary["CFG_SYSROOT"] = QDir::cleanPath(dictionary["CFG_SYSROOT"]); + bool qipempty = false; if (dictionary["QT_INSTALL_PREFIX"].isEmpty()) qipempty = true; - - if (!dictionary["QT_INSTALL_HEADERS"].size()) - dictionary["QT_INSTALL_HEADERS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/include"; - if (!dictionary["QT_INSTALL_LIBS"].size()) - dictionary["QT_INSTALL_LIBS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/lib"; - if (!dictionary["QT_INSTALL_ARCHDATA"].size()) - dictionary["QT_INSTALL_ARCHDATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"]; - if (!dictionary["QT_INSTALL_LIBEXECS"].size()) { - if (dictionary["QT_INSTALL_ARCHDATA"] == dictionary["QT_INSTALL_PREFIX"]) - dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/bin"; - else - dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec"; - } - if (!dictionary["QT_INSTALL_BINS"].size()) - dictionary["QT_INSTALL_BINS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/bin"; - if (!dictionary["QT_INSTALL_PLUGINS"].size()) - dictionary["QT_INSTALL_PLUGINS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/plugins"; - if (!dictionary["QT_INSTALL_IMPORTS"].size()) - dictionary["QT_INSTALL_IMPORTS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/imports"; - if (!dictionary["QT_INSTALL_QML"].size()) - dictionary["QT_INSTALL_QML"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/qml"; - if (!dictionary["QT_INSTALL_DATA"].size()) - dictionary["QT_INSTALL_DATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"]; - if (!dictionary["QT_INSTALL_DOCS"].size()) - dictionary["QT_INSTALL_DOCS"] = qipempty ? "" : dictionary["QT_INSTALL_DATA"] + "/doc"; - if (!dictionary["QT_INSTALL_TRANSLATIONS"].size()) - dictionary["QT_INSTALL_TRANSLATIONS"] = qipempty ? "" : dictionary["QT_INSTALL_DATA"] + "/translations"; - if (!dictionary["QT_INSTALL_EXAMPLES"].size()) - dictionary["QT_INSTALL_EXAMPLES"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/examples"; - if (!dictionary["QT_INSTALL_TESTS"].size()) - dictionary["QT_INSTALL_TESTS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/tests"; - - QChar sysrootifyPrefix = QLatin1Char('y'); - dictionary["QT_SYSROOT_PREFIX"] = dictionary["QT_INSTALL_PREFIX"]; - dictionary["QT_SYSROOT_HEADERS"] = dictionary["QT_INSTALL_HEADERS"]; - dictionary["QT_SYSROOT_LIBS"] = dictionary["QT_INSTALL_LIBS"]; - dictionary["QT_SYSROOT_ARCHDATA"] = dictionary["QT_INSTALL_ARCHDATA"]; - dictionary["QT_SYSROOT_LIBEXECS"] = dictionary["QT_INSTALL_LIBEXECS"]; - dictionary["QT_SYSROOT_BINS"] = dictionary["QT_INSTALL_BINS"]; - dictionary["QT_SYSROOT_PLUGINS"] = dictionary["QT_INSTALL_PLUGINS"]; - dictionary["QT_SYSROOT_IMPORTS"] = dictionary["QT_INSTALL_IMPORTS"]; - dictionary["QT_SYSROOT_QML"] = dictionary["QT_INSTALL_QML"]; - dictionary["QT_SYSROOT_DATA"] = dictionary["QT_INSTALL_DATA"]; - dictionary["QT_SYSROOT_DOCS"] = dictionary["QT_INSTALL_DOCS"]; - dictionary["QT_SYSROOT_TRANSLATIONS"] = dictionary["QT_INSTALL_TRANSLATIONS"]; - dictionary["QT_SYSROOT_EXAMPLES"] = dictionary["QT_INSTALL_EXAMPLES"]; - dictionary["QT_SYSROOT_TESTS"] = dictionary["QT_INSTALL_TESTS"]; - if (dictionary["QT_EXT_PREFIX"].size()) { - sysrootifyPrefix = QLatin1Char('n'); - dictionary["QT_INSTALL_PREFIX"] = dictionary["QT_EXT_PREFIX"]; - substPrefix(&dictionary["QT_INSTALL_HEADERS"]); - substPrefix(&dictionary["QT_INSTALL_LIBS"]); - substPrefix(&dictionary["QT_INSTALL_ARCHDATA"]); - substPrefix(&dictionary["QT_INSTALL_LIBEXECS"]); - substPrefix(&dictionary["QT_INSTALL_BINS"]); - substPrefix(&dictionary["QT_INSTALL_PLUGINS"]); - substPrefix(&dictionary["QT_INSTALL_IMPORTS"]); - substPrefix(&dictionary["QT_INSTALL_QML"]); - substPrefix(&dictionary["QT_INSTALL_DATA"]); - substPrefix(&dictionary["QT_INSTALL_DOCS"]); - substPrefix(&dictionary["QT_INSTALL_TRANSLATIONS"]); - substPrefix(&dictionary["QT_INSTALL_EXAMPLES"]); - substPrefix(&dictionary["QT_INSTALL_TESTS"]); - } - - bool haveHpx = false; - if (dictionary["QT_HOST_PREFIX"].isEmpty()) - dictionary["QT_HOST_PREFIX"] = dictionary["QT_INSTALL_PREFIX"]; else + dictionary["QT_INSTALL_PREFIX"] = QDir::cleanPath(dictionary["QT_INSTALL_PREFIX"]); + + bool sysrootifyPrefix; + if (dictionary["QT_EXT_PREFIX"].isEmpty()) { + dictionary["QT_EXT_PREFIX"] = dictionary["QT_INSTALL_PREFIX"]; + sysrootifyPrefix = !dictionary["CFG_SYSROOT"].isEmpty(); + } else { + dictionary["QT_EXT_PREFIX"] = QDir::cleanPath(dictionary["QT_EXT_PREFIX"]); + sysrootifyPrefix = false; + } + + bool haveHpx; + if (dictionary["QT_HOST_PREFIX"].isEmpty()) { + dictionary["QT_HOST_PREFIX"] = (sysrootifyPrefix ? dictionary["CFG_SYSROOT"] : QString()) + + dictionary["QT_INSTALL_PREFIX"]; + haveHpx = false; + } else { + dictionary["QT_HOST_PREFIX"] = QDir::cleanPath(dictionary["QT_HOST_PREFIX"]); haveHpx = true; - if (dictionary["QT_HOST_BINS"].isEmpty()) - dictionary["QT_HOST_BINS"] = haveHpx ? dictionary["QT_HOST_PREFIX"] + "/bin" : dictionary["QT_INSTALL_BINS"]; - if (dictionary["QT_HOST_LIBS"].isEmpty()) - dictionary["QT_HOST_LIBS"] = haveHpx ? dictionary["QT_HOST_PREFIX"] + "/lib" : dictionary["QT_INSTALL_LIBS"]; - if (dictionary["QT_HOST_DATA"].isEmpty()) - dictionary["QT_HOST_DATA"] = haveHpx ? dictionary["QT_HOST_PREFIX"] : dictionary["QT_INSTALL_ARCHDATA"]; + } - QString specPfx = dictionary["QT_HOST_DATA"] + "/mkspecs/"; - QString hostSpec = stripPrefix(dictionary["QMAKESPEC"], specPfx); - QString targSpec = dictionary.contains("XQMAKESPEC") ? stripPrefix(dictionary["XQMAKESPEC"], specPfx) : hostSpec; + static const struct { + const char *basevar, *baseoption, *var, *option; + } varmod[] = { + { "INSTALL_", "-prefix", "DOCS", "-docdir" }, + { "INSTALL_", "-prefix", "HEADERS", "-headerdir" }, + { "INSTALL_", "-prefix", "LIBS", "-libdir" }, + { "INSTALL_", "-prefix", "LIBEXECS", "-libexecdir" }, + { "INSTALL_", "-prefix", "BINS", "-bindir" }, + { "INSTALL_", "-prefix", "PLUGINS", "-plugindir" }, + { "INSTALL_", "-prefix", "IMPORTS", "-importdir" }, + { "INSTALL_", "-prefix", "QML", "-qmldir" }, + { "INSTALL_", "-prefix", "ARCHDATA", "-archdatadir" }, + { "INSTALL_", "-prefix", "DATA", "-datadir" }, + { "INSTALL_", "-prefix", "TRANSLATIONS", "-translationdir" }, + { "INSTALL_", "-prefix", "EXAMPLES", "-examplesdir" }, + { "INSTALL_", "-prefix", "TESTS", "-testsdir" }, + { "INSTALL_", "-prefix", "SETTINGS", "-sysconfdir" }, + { "HOST_", "-hostprefix", "BINS", "-hostbindir" }, + { "HOST_", "-hostprefix", "LIBS", "-hostlibdir" }, + { "HOST_", "-hostprefix", "DATA", "-hostdatadir" }, + }; + + bool prefixReminder = false; + for (uint i = 0; i < sizeof(varmod) / sizeof(varmod[0]); i++) { + QString path = QDir::cleanPath( + dictionary[QLatin1String("QT_") + varmod[i].basevar + varmod[i].var]); + if (path.isEmpty()) + continue; + QString base = dictionary[QLatin1String("QT_") + varmod[i].basevar + "PREFIX"]; + if (!path.startsWith(base)) { + if (i != 13) { + dictionary["PREFIX_COMPLAINTS"] += QLatin1String("\n NOTICE: ") + + varmod[i].option + " is not a subdirectory of " + varmod[i].baseoption + "."; + if (i < 13 ? qipempty : !haveHpx) + prefixReminder = true; + } + } else { + path.remove(0, base.size()); + if (path.startsWith('/')) + path.remove(0, 1); + } + dictionary[QLatin1String("QT_REL_") + varmod[i].basevar + varmod[i].var] + = path.isEmpty() ? "." : path; + } + if (prefixReminder) { + dictionary["PREFIX_COMPLAINTS"] + += "\n Maybe you forgot to specify -prefix/-hostprefix?"; + } + + if (!qipempty) { + // If QT_INSTALL_* have not been specified on the command line, + // default them here, unless prefix is empty (WinCE). + + if (dictionary["QT_REL_INSTALL_HEADERS"].isEmpty()) + dictionary["QT_REL_INSTALL_HEADERS"] = "include"; + + if (dictionary["QT_REL_INSTALL_LIBS"].isEmpty()) + dictionary["QT_REL_INSTALL_LIBS"] = "lib"; + + if (dictionary["QT_REL_INSTALL_BINS"].isEmpty()) + dictionary["QT_REL_INSTALL_BINS"] = "bin"; + + if (dictionary["QT_REL_INSTALL_ARCHDATA"].isEmpty()) + dictionary["QT_REL_INSTALL_ARCHDATA"] = "."; + if (dictionary["QT_REL_INSTALL_ARCHDATA"] != ".") + dictionary["QT_REL_INSTALL_ARCHDATA_PREFIX"] = dictionary["QT_REL_INSTALL_ARCHDATA"] + '/'; + + if (dictionary["QT_REL_INSTALL_LIBEXECS"].isEmpty()) { + if (targSpec.startsWith("win")) + dictionary["QT_REL_INSTALL_LIBEXECS"] = dictionary["QT_REL_INSTALL_ARCHDATA_PREFIX"] + "bin"; + else + dictionary["QT_REL_INSTALL_LIBEXECS"] = dictionary["QT_REL_INSTALL_ARCHDATA_PREFIX"] + "libexec"; + } + + if (dictionary["QT_REL_INSTALL_PLUGINS"].isEmpty()) + dictionary["QT_REL_INSTALL_PLUGINS"] = dictionary["QT_REL_INSTALL_ARCHDATA_PREFIX"] + "plugins"; + + if (dictionary["QT_REL_INSTALL_IMPORTS"].isEmpty()) + dictionary["QT_REL_INSTALL_IMPORTS"] = dictionary["QT_REL_INSTALL_ARCHDATA_PREFIX"] + "imports"; + + if (dictionary["QT_REL_INSTALL_QML"].isEmpty()) + dictionary["QT_REL_INSTALL_QML"] = dictionary["QT_REL_INSTALL_ARCHDATA_PREFIX"] + "qml"; + + if (dictionary["QT_REL_INSTALL_DATA"].isEmpty()) + dictionary["QT_REL_INSTALL_DATA"] = "."; + if (dictionary["QT_REL_INSTALL_DATA"] != ".") + dictionary["QT_REL_INSTALL_DATA_PREFIX"] = dictionary["QT_REL_INSTALL_DATA"] + '/'; + + if (dictionary["QT_REL_INSTALL_DOCS"].isEmpty()) + dictionary["QT_REL_INSTALL_DOCS"] = dictionary["QT_REL_INSTALL_DATA_PREFIX"] + "doc"; + + if (dictionary["QT_REL_INSTALL_TRANSLATIONS"].isEmpty()) + dictionary["QT_REL_INSTALL_TRANSLATIONS"] = dictionary["QT_REL_INSTALL_DATA_PREFIX"] + "translations"; + + if (dictionary["QT_REL_INSTALL_EXAMPLES"].isEmpty()) + dictionary["QT_REL_INSTALL_EXAMPLES"] = "examples"; + + if (dictionary["QT_REL_INSTALL_TESTS"].isEmpty()) + dictionary["QT_REL_INSTALL_TESTS"] = "tests"; + } + + if (dictionary["QT_REL_HOST_BINS"].isEmpty()) + dictionary["QT_REL_HOST_BINS"] = haveHpx ? "bin" : dictionary["QT_REL_INSTALL_BINS"]; + + if (dictionary["QT_REL_HOST_LIBS"].isEmpty()) + dictionary["QT_REL_HOST_LIBS"] = haveHpx ? "lib" : dictionary["QT_REL_INSTALL_LIBS"]; + + if (dictionary["QT_REL_HOST_DATA"].isEmpty()) + dictionary["QT_REL_HOST_DATA"] = haveHpx ? "." : dictionary["QT_REL_INSTALL_ARCHDATA"]; + + confStringOff = 0; + addConfStr(0, dictionary["QT_REL_INSTALL_DOCS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_HEADERS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_LIBS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_LIBEXECS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_BINS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_PLUGINS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_IMPORTS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_QML"]); + addConfStr(0, dictionary["QT_REL_INSTALL_ARCHDATA"]); + addConfStr(0, dictionary["QT_REL_INSTALL_DATA"]); + addConfStr(0, dictionary["QT_REL_INSTALL_TRANSLATIONS"]); + addConfStr(0, dictionary["QT_REL_INSTALL_EXAMPLES"]); + addConfStr(0, dictionary["QT_REL_INSTALL_TESTS"]); + addConfStr(1, dictionary["CFG_SYSROOT"]); + addConfStr(1, dictionary["QT_REL_HOST_BINS"]); + addConfStr(1, dictionary["QT_REL_HOST_LIBS"]); + addConfStr(1, dictionary["QT_REL_HOST_DATA"]); + addConfStr(1, targSpec); + addConfStr(1, hostSpec); // Generate the new qconfig.cpp file { @@ -3966,62 +4067,42 @@ void Configure::generateQConfigCpp() << "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl << endl << "/* Build date */" << endl - << "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl + << "static const char qt_configure_installation [11 + 12] = \"qt_instdate=2012-12-20\";" << endl << endl - << "static const char qt_configure_prefix_path_strs[][12 + 512] = {" << endl - << "#ifndef QT_BUILD_QMAKE" << endl - << " \"qt_prfxpath=" << formatPath(dictionary["QT_SYSROOT_PREFIX"]) << "\"," << endl - << " \"qt_docspath=" << formatPath(dictionary["QT_SYSROOT_DOCS"]) << "\"," << endl - << " \"qt_hdrspath=" << formatPath(dictionary["QT_SYSROOT_HEADERS"]) << "\"," << endl - << " \"qt_libspath=" << formatPath(dictionary["QT_SYSROOT_LIBS"]) << "\"," << endl - << " \"qt_lbexpath=" << formatPath(dictionary["QT_SYSROOT_LIBEXECS"]) << "\"," << endl - << " \"qt_binspath=" << formatPath(dictionary["QT_SYSROOT_BINS"]) << "\"," << endl - << " \"qt_plugpath=" << formatPath(dictionary["QT_SYSROOT_PLUGINS"]) << "\"," << endl - << " \"qt_impspath=" << formatPath(dictionary["QT_SYSROOT_IMPORTS"]) << "\"," << endl - << " \"qt_qml2path=" << formatPath(dictionary["QT_SYSROOT_QML"]) << "\"," << endl - << " \"qt_adatpath=" << formatPath(dictionary["QT_SYSROOT_ARCHDATA"]) << "\"," << endl - << " \"qt_datapath=" << formatPath(dictionary["QT_SYSROOT_DATA"]) << "\"," << endl - << " \"qt_trnspath=" << formatPath(dictionary["QT_SYSROOT_TRANSLATIONS"]) << "\"," << endl - << " \"qt_xmplpath=" << formatPath(dictionary["QT_SYSROOT_EXAMPLES"]) << "\"," << endl - << " \"qt_tstspath=" << formatPath(dictionary["QT_SYSROOT_TESTS"]) << "\"," << endl - << "#else" << endl - << " \"qt_prfxpath=" << formatPath(dictionary["QT_INSTALL_PREFIX"]) << "\"," << endl - << " \"qt_docspath=" << formatPath(dictionary["QT_INSTALL_DOCS"]) << "\"," << endl - << " \"qt_hdrspath=" << formatPath(dictionary["QT_INSTALL_HEADERS"]) << "\"," << endl - << " \"qt_libspath=" << formatPath(dictionary["QT_INSTALL_LIBS"]) << "\"," << endl - << " \"qt_lbexpath=" << formatPath(dictionary["QT_INSTALL_LIBEXECS"]) << "\"," << endl - << " \"qt_binspath=" << formatPath(dictionary["QT_INSTALL_BINS"]) << "\"," << endl - << " \"qt_plugpath=" << formatPath(dictionary["QT_INSTALL_PLUGINS"]) << "\"," << endl - << " \"qt_impspath=" << formatPath(dictionary["QT_INSTALL_IMPORTS"]) << "\"," << endl - << " \"qt_qml2path=" << formatPath(dictionary["QT_INSTALL_QML"]) << "\"," << endl - << " \"qt_adatpath=" << formatPath(dictionary["QT_INSTALL_ARCHDATA"]) << "\"," << endl - << " \"qt_datapath=" << formatPath(dictionary["QT_INSTALL_DATA"]) << "\"," << endl - << " \"qt_trnspath=" << formatPath(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\"," << endl - << " \"qt_xmplpath=" << formatPath(dictionary["QT_INSTALL_EXAMPLES"]) << "\"," << endl - << " \"qt_tstspath=" << formatPath(dictionary["QT_INSTALL_TESTS"]) << "\"," << endl - << " \"qt_ssrtpath=" << formatPath(dictionary["CFG_SYSROOT"]) << "\"," << endl - << " \"qt_hpfxpath=" << formatPath(dictionary["QT_HOST_PREFIX"]) << "\"," << endl - << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl - << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl - << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl - << " \"qt_targspec=" << targSpec << "\"," << endl - << " \"qt_hostspec=" << hostSpec << "\"," << endl + << "/* Installation Info */" << endl + << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << dictionary["QT_INSTALL_PREFIX"] << "\";" << endl + << "#ifdef QT_BUILD_QMAKE" << endl + << "static const char qt_configure_ext_prefix_path_str [512 + 12] = \"qt_epfxpath=" << dictionary["QT_EXT_PREFIX"] << "\";" << endl + << "static const char qt_configure_host_prefix_path_str [512 + 12] = \"qt_hpfxpath=" << dictionary["QT_HOST_PREFIX"] << "\";" << endl << "#endif" << endl - << "};" << endl; - + << endl + << "static const short qt_configure_str_offsets[] = {\n" + << " " << confStrOffsets[0] << endl + << "#ifdef QT_BUILD_QMAKE\n" + << " " << confStrOffsets[1] << endl + << "#endif\n" + << "};\n" + << "static const char qt_configure_strs[] =\n" + << confStrings[0] << "#ifdef QT_BUILD_QMAKE\n" + << confStrings[1] << "#endif\n" + << ";\n" + << endl; if ((platform() != WINDOWS) && (platform() != WINDOWS_CE) && (platform() != WINDOWS_RT)) - tmpStream << "static const char qt_configure_settings_path_str [256 + 12] = \"qt_stngpath=" << formatPath(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl; + tmpStream << "#define QT_CONFIGURE_SETTINGS_PATH \"" << QDir::cleanPath(dictionary["QT_INSTALL_SETTINGS"]) << "\"" << endl; tmpStream << endl << "#ifdef QT_BUILD_QMAKE\n" - << "static const char qt_sysrootify_prefix[] = \"qt_ssrtfpfx=" << sysrootifyPrefix << "\";\n" + << "# define QT_CONFIGURE_SYSROOTIFY_PREFIX " << (sysrootifyPrefix ? "true" : "false") << endl << "#endif\n\n" << "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl - << "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;" << endl - << "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;" << endl; - - if ((platform() != WINDOWS) && (platform() != WINDOWS_CE) && (platform() != WINDOWS_RT)) - tmpStream << "#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;" << endl; + << "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12" << endl + << "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12" << endl + << endl + << "#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12\n" + << "#ifdef QT_BUILD_QMAKE\n" + << "# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12\n" + << "# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12\n" + << "#endif\n"; if (!tmpStream.flush()) dictionary[ "DONE" ] = "error"; @@ -4052,10 +4133,10 @@ void Configure::buildQmake() if (out.open(QFile::WriteOnly | QFile::Text)) { QTextStream stream(&out); stream << "#AutoGenerated by configure.exe" << endl - << "BUILD_PATH = " << QDir::toNativeSeparators(buildPath) << endl + << "BUILD_PATH = .." << endl << "SOURCE_PATH = " << QDir::toNativeSeparators(sourcePath) << endl << "INC_PATH = " << QDir::toNativeSeparators( - (QFile::exists(sourcePath + "/.git") ? buildPath : sourcePath) + (QFile::exists(sourcePath + "/.git") ? ".." : sourcePath) + "/include") << endl; stream << "QT_VERSION = " << dictionary["VERSION"] << endl; if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { @@ -4368,7 +4449,7 @@ void Configure::readLicense() else { cout << endl << "Error: This is the Open Source version of Qt." << endl << "If you want to use Enterprise features of Qt," - << endl << "use the contact form at http://qt.digia.com/contact-us" + << endl << "information use the contact form at http://www.qt.io/contact-us" << endl << "to purchase a license." << endl << endl; dictionary["DONE"] = "error"; } @@ -4381,12 +4462,8 @@ void Configure::reloadCmdLine() QFile inFile(buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache"); if (inFile.open(QFile::ReadOnly)) { QTextStream inStream(&inFile); - QString buffer; - inStream >> buffer; - while (buffer.length()) { - configCmdLine += buffer; - inStream >> buffer; - } + while (!inStream.atEnd()) + configCmdLine += inStream.readLine().trimmed(); inFile.close(); } } @@ -4399,7 +4476,7 @@ void Configure::saveCmdLine() if (outFile.open(QFile::WriteOnly | QFile::Text)) { QTextStream outStream(&outFile); for (QStringList::Iterator it = configCmdLine.begin(); it != configCmdLine.end(); ++it) { - outStream << (*it) << " " << endl; + outStream << (*it) << endl; } outStream.flush(); outFile.close(); @@ -4433,6 +4510,8 @@ QString Configure::platformName() const return QStringLiteral("Qt for Blackberry"); case ANDROID: return QStringLiteral("Qt for Android"); + case OTHER: + return QStringLiteral("Qt for ???"); } } @@ -4451,6 +4530,8 @@ QString Configure::qpaPlatformName() const return QStringLiteral("blackberry"); case ANDROID: return QStringLiteral("android"); + case OTHER: + return QStringLiteral("xcb"); } } @@ -4474,6 +4555,9 @@ int Configure::platform() const if (xQMakeSpec.contains("android")) return ANDROID; + if (!xQMakeSpec.isEmpty()) + return OTHER; + return WINDOWS; } diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index d2f26cfc15..78fd956eda 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -143,8 +143,11 @@ private: int descIndent; int outputWidth; - void substPrefix(QString *path); + QString confStrOffsets[2]; + QString confStrings[2]; + int confStringOff; + void addConfStr(int group, const QString &val); QString formatPath(const QString &path); QString formatPaths(const QStringList &paths); diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 1ef8c10775..c08595e36b 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -68,18 +68,19 @@ struct CompilerInfo{ {CC_BORLAND, "Borland C++", 0, "bcc32.exe"}, {CC_MINGW, "MinGW (Minimalist GNU for Windows)", 0, "g++.exe"}, {CC_INTEL, "Intel(R) C++ Compiler for 32-bit applications", 0, "icl.exe"}, // xilink.exe, xilink5.exe, xilink6.exe, xilib.exe - {CC_NET2003, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2003 (7.1)", "Software\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir", "cl.exe"}, // link.exe, lib.exe - {CC_NET2003, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2003 (7.1)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir", "cl.exe"}, // link.exe, lib.exe - {CC_NET2005, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2005 (8.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\8.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2005, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2005 (8.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\8.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2008, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2008 (9.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\9.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2008, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2008 (9.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\9.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2010, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2010 (10.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\10.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2010, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2010 (10.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\10.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2012, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2012 (11.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\11.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2012, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2012 (11.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\11.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2013, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2013 (12.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe - {CC_NET2013, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2013 (12.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2005, "Microsoft (R) Visual Studio 2005 C/C++ Compiler (8.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\8.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2005, "Microsoft (R) Visual Studio 2005 C/C++ Compiler (8.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\8.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2008, "Microsoft (R) Visual Studio 2008 C/C++ Compiler (9.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\9.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2008, "Microsoft (R) Visual Studio 2008 C/C++ Compiler (9.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\9.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2010, "Microsoft (R) Visual Studio 2010 C/C++ Compiler (10.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\10.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2010, "Microsoft (R) Visual Studio 2010 C/C++ Compiler (10.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\10.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2012, "Microsoft (R) Visual Studio 2012 C/C++ Compiler (11.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\11.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2012, "Microsoft (R) Visual Studio 2012 C/C++ Compiler (11.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\11.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2013, "Microsoft (R) Visual Studio 2013 C/C++ Compiler (12.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2013, "Microsoft (R) Visual Studio 2013 C/C++ Compiler (12.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe + // Microsoft skipped version 13 + {CC_MSVC2015, "Microsoft (R) Visual Studio 2015 C/C++ Compiler (14.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VS7\\14.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2015, "Microsoft (R) Visual Studio 2015 C/C++ Compiler (14.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\14.0", "cl.exe"}, // link.exe, lib.exe {CC_UNKNOWN, "Unknown", 0, 0}, }; @@ -105,24 +106,24 @@ QString Environment::detectQMakeSpec() { QString spec; switch (detectCompiler()) { - case CC_NET2013: + case CC_MSVC2015: + spec = "win32-msvc2015"; + break; + case CC_MSVC2013: spec = "win32-msvc2013"; break; - case CC_NET2012: + case CC_MSVC2012: spec = "win32-msvc2012"; break; - case CC_NET2010: + case CC_MSVC2010: spec = "win32-msvc2010"; break; - case CC_NET2008: + case CC_MSVC2008: spec = "win32-msvc2008"; break; - case CC_NET2005: + case CC_MSVC2005: spec = "win32-msvc2005"; break; - case CC_NET2003: - spec = "win32-msvc2003"; - break; case CC_INTEL: spec = "win32-icc"; break; @@ -141,18 +142,18 @@ QString Environment::detectQMakeSpec() Compiler Environment::compilerFromQMakeSpec(const QString &qmakeSpec) { + if (qmakeSpec == QLatin1String("win32-msvc2015")) + return CC_MSVC2015; if (qmakeSpec == QLatin1String("win32-msvc2013")) - return CC_NET2013; + return CC_MSVC2013; if (qmakeSpec == QLatin1String("win32-msvc2012")) - return CC_NET2012; + return CC_MSVC2012; if (qmakeSpec == QLatin1String("win32-msvc2010")) - return CC_NET2010; + return CC_MSVC2010; if (qmakeSpec == QLatin1String("win32-msvc2008")) - return CC_NET2008; + return CC_MSVC2008; if (qmakeSpec == QLatin1String("win32-msvc2005")) - return CC_NET2005; - if (qmakeSpec == QLatin1String("win32-msvc2003")) - return CC_NET2003; + return CC_MSVC2005; if (qmakeSpec == QLatin1String("win32-icc")) return CC_INTEL; if (qmakeSpec == QLatin1String("win32-g++")) diff --git a/tools/configure/environment.h b/tools/configure/environment.h index 1a4fbb2fcc..669c356f34 100644 --- a/tools/configure/environment.h +++ b/tools/configure/environment.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -41,12 +41,12 @@ enum Compiler { CC_BORLAND = 0x01, CC_MINGW = 0x02, CC_INTEL = 0x03, - CC_NET2003 = 0x71, - CC_NET2005 = 0x80, - CC_NET2008 = 0x90, - CC_NET2010 = 0xA0, - CC_NET2012 = 0xB0, - CC_NET2013 = 0xC0 + CC_MSVC2005 = 0x80, + CC_MSVC2008 = 0x90, + CC_MSVC2010 = 0xA0, + CC_MSVC2012 = 0xB0, + CC_MSVC2013 = 0xC0, + CC_MSVC2015 = 0xD0 }; struct CompilerInfo; diff --git a/tools/configure/main.cpp b/tools/configure/main.cpp index 5dcd152d5d..2b41658b40 100644 --- a/tools/configure/main.cpp +++ b/tools/configure/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp index ba7dd7209e..83d969ce16 100644 --- a/tools/configure/tools.cpp +++ b/tools/configure/tools.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tools/configure/tools.h b/tools/configure/tools.h index 1a287151df..04e41bdedd 100644 --- a/tools/configure/tools.h +++ b/tools/configure/tools.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp index 948ae8e051..c989ae279b 100644 --- a/tools/shared/windows/registry.cpp +++ b/tools/shared/windows/registry.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ diff --git a/tools/shared/windows/registry_p.h b/tools/shared/windows/registry_p.h index 52a98874b1..e13f9e6f46 100644 --- a/tools/shared/windows/registry_p.h +++ b/tools/shared/windows/registry_p.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ |