diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-08-20 14:58:02 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-08-20 14:58:02 (GMT) |
commit | fdda7f1dd01215e36116aa4e3428aae9f23dd711 (patch) | |
tree | 68afea11c9bb7fb5554e9a83f9c0cd85d2d2de31 /qmake/generators | |
parent | d4c0be3b5758b37ef9da6fcbce4c5a6d84f3a52b (diff) | |
parent | efea248b4b725ca429793874eb168ad4b43c7994 (diff) | |
download | Qt-fdda7f1dd01215e36116aa4e3428aae9f23dd711.zip Qt-fdda7f1dd01215e36116aa4e3428aae9f23dd711.tar.gz Qt-fdda7f1dd01215e36116aa4e3428aae9f23dd711.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/makefile.cpp | 44 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 5 | ||||
-rw-r--r-- | qmake/generators/metamakefile.cpp | 3 | ||||
-rw-r--r-- | qmake/generators/symbian/epocroot.h | 51 | ||||
-rw-r--r-- | qmake/generators/symbian/initprojectdeploy_symbian.cpp | 135 | ||||
-rw-r--r-- | qmake/generators/symbian/initprojectdeploy_symbian.h | 7 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.h | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_abld.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_abld.h | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_sbsv2.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_sbsv2.h | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_dsp.cpp | 15 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 23 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 23 |
15 files changed, 223 insertions, 111 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 7241678..5d9178e 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1705,9 +1705,9 @@ MakefileGenerator::writeExtraTargets(QTextStream &t) t << "\n\t" << cmd; t << endl << endl; - project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(targ); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(targ)) << deps.split(" ", QString::SkipEmptyParts); - project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(targ)) << cmd; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(targ); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(targ)) << deps.split(" ", QString::SkipEmptyParts); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(targ)) << cmd; } } @@ -1855,17 +1855,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input), tmp_out); dep_cmd = fixEnvVariables(dep_cmd); -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if (procPipe.init(dep_cmd.toLatin1().constData(), "r")) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if(!read_in) - break; - indeps += QByteArray(buff, read_in); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1875,7 +1864,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) indeps += QByteArray(buff, read_in); } QT_PCLOSE(proc); -#endif if(!indeps.isEmpty()) { QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' '); for(int i = 0; i < dep_cmd_deps.count(); ++i) { @@ -1926,17 +1914,17 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } t << escapeDependencyPath(tmp_out) << ":"; - project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(tmp_out); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(tmp_out); // compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies if(project->values((*it) + ".CONFIG").indexOf("explicit_dependencies") != -1) { t << " " << valList(escapeDependencyPaths(fileFixify(tmp_dep, Option::output_dir, Option::output_dir))); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << tmp_dep; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << tmp_dep; } else { t << " " << valList(escapeDependencyPaths(inputs)) << " " << valList(escapeDependencyPaths(deps)); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << inputs << deps; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << inputs << deps; } t << "\n\t" << cmd << endl << endl; - project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(tmp_out)) << cmd; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(tmp_out)) << cmd; continue; } for(QStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { @@ -1965,17 +1953,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input), out); dep_cmd = fixEnvVariables(dep_cmd); -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if (procPipe.init(dep_cmd.toLatin1().constData(), "r")) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if(!read_in) - break; - indeps += QByteArray(buff, read_in); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1985,7 +1962,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) indeps += QByteArray(buff, read_in); } QT_PCLOSE(proc); -#endif if(!indeps.isEmpty()) { QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' '); for(int i = 0; i < dep_cmd_deps.count(); ++i) { @@ -2060,9 +2036,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } t << escapeDependencyPath(out) << ": " << valList(escapeDependencyPaths(deps)) << "\n\t" << cmd << endl << endl; - project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(out); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(out)) << deps; - project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(out)) << cmd; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(out); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(out)) << deps; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(out)) << cmd; } } t << "compiler_clean: " << clean_targets << endl << endl; diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 1f72d3e..2f33969 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -53,12 +53,8 @@ QT_BEGIN_NAMESPACE #ifdef Q_OS_WIN32 -#if defined(Q_CC_MWERKS) -#include "qpopen.h" -#else #define QT_POPEN _popen #define QT_PCLOSE _pclose -#endif #else #define QT_POPEN popen #define QT_PCLOSE pclose @@ -88,7 +84,6 @@ class MakefileGenerator : protected QMakeSourceFileInfo QString build_args(const QString &outdir=QString()); void checkMultipleDefinition(const QString &, const QString &); -protected: //internal caches mutable QHash<QString, QMakeLocalFileName> depHeuristicsCache; mutable QHash<QString, QStringList> dependsCache; diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 94e6f2d..229035a 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -60,8 +60,8 @@ MetaMakefileGenerator::~MetaMakefileGenerator() class BuildsMetaMakefileGenerator : public MetaMakefileGenerator { - bool init_flag; private: + bool init_flag; struct Build { QString name, build; MakefileGenerator *makefile; @@ -264,7 +264,6 @@ MakefileGenerator class SubdirsMetaMakefileGenerator : public MetaMakefileGenerator { protected: - bool init_flag; struct Subdir { Subdir() : makefile(0), indent(0) { } diff --git a/qmake/generators/symbian/epocroot.h b/qmake/generators/symbian/epocroot.h new file mode 100644 index 0000000..02884b1 --- /dev/null +++ b/qmake/generators/symbian/epocroot.h @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake application of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, 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. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef EPOCROOT_H +#define EPOCROOT_H + +#include <qstring.h> + +// Implementation of epocRoot method is in initprojectdeploy_symbian.cpp +// Defined in separate header for inclusion clarity +extern QString epocRoot(); + +#endif // EPOCROOT_H diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index 392eca2..e903fc1 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -42,6 +42,8 @@ #include "initprojectdeploy_symbian.h" #include <QDirIterator> #include <project.h> +#include <qxmlstream.h> +#include <qsettings.h> #include <qdebug.h> #define PLUGIN_STUB_DIR "qmakepluginstubs" @@ -51,6 +53,99 @@ #define SUFFIX_EXE "exe" #define SUFFIX_QTPLUGIN "qtplugin" +static void fixEpocRootStr(QString& path) +{ + path.replace("\\", "/"); + + if (path.size() > 1 && path[1] == QChar(':')) { + path = path.mid(2); + } + + if (!path.size() || path[path.size()-1] != QChar('/')) { + path += QChar('/'); + } +} + +#define SYMBIAN_SDKS_KEY "HKEY_LOCAL_MACHINE\\Software\\Symbian\\EPOC SDKs" + +static QString epocRootStr; + +QString epocRoot() +{ + if (!epocRootStr.isEmpty()) { + return epocRootStr; + } + + // First, check the env variable + epocRootStr = qgetenv("EPOCROOT"); + + if (epocRootStr.isEmpty()) { + // No EPOCROOT set, check the default device + // First check EPOCDEVICE env variable + QString defaultDevice = qgetenv("EPOCDEVICE"); + + // Check the windows registry via QSettings for devices.xml path + QSettings settings(SYMBIAN_SDKS_KEY, QSettings::NativeFormat); + QString devicesXmlPath = settings.value("CommonPath").toString(); + + if (!devicesXmlPath.isEmpty()) { + // Parse xml for correct device + devicesXmlPath += "/devices.xml"; + QFile devicesFile(devicesXmlPath); + if (devicesFile.open(QIODevice::ReadOnly)) { + QXmlStreamReader xml(&devicesFile); + while (!xml.atEnd()) { + xml.readNext(); + if (xml.isStartElement() && xml.name() == "devices") { + if (xml.attributes().value("version") == "1.0") { + // Look for correct device + while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) { + xml.readNext(); + if (xml.isStartElement() && xml.name() == "device") { + if ((defaultDevice.isEmpty() && xml.attributes().value("default") == "yes") || + (!defaultDevice.isEmpty() && (xml.attributes().value("id").toString() + QString(":") + xml.attributes().value("name").toString()) == defaultDevice)) { + // Found the correct device + while (!(xml.isEndElement() && xml.name() == "device") && !xml.atEnd()) { + xml.readNext(); + if (xml.isStartElement() && xml.name() == "epocroot") { + epocRootStr = xml.readElementText(); + fixEpocRootStr(epocRootStr); + return epocRootStr; + } + } + xml.raiseError("No epocroot element found"); + } + } + } + } else { + xml.raiseError("Invalid 'devices' element version"); + } + } + } + if (xml.hasError()) { + fprintf(stderr, "ERROR: \"%s\" when parsing devices.xml\n", qPrintable(xml.errorString())); + } + } else { + fprintf(stderr, "Could not open devices.xml (%s)\n", qPrintable(devicesXmlPath)); + } + } else { + fprintf(stderr, "Could not retrieve " SYMBIAN_SDKS_KEY " setting\n"); + } + + fprintf(stderr, "Failed to determine epoc root.\n"); + if (!defaultDevice.isEmpty()) + fprintf(stderr, "The device indicated by EPOCDEVICE environment variable (%s) could not be found.\n", qPrintable(defaultDevice)); + fprintf(stderr, "Either set EPOCROOT or EPOCDEVICE environment variable to a valid value, or provide a default Symbian device.\n"); + + // No valid device found; set epocroot to "/" + epocRootStr = QLatin1String("/"); + } + + fixEpocRootStr(epocRootStr); + return epocRootStr; +} + + static bool isPlugin(const QFileInfo& info, const QString& devicePath) { // Libraries are plugins if deployment path is something else than @@ -103,6 +198,44 @@ static void createPluginStub(const QFileInfo& info, Option::fixPathToLocalOS(devicePath + "\\" + stubInfo.fileName()))); } +QString generate_uid(const QString& target) +{ + static QMap<QString, QString> targetToUid; + + QString tmp = targetToUid[target]; + + if (!tmp.isEmpty()) { + return tmp; + } + + unsigned long hash = 5381; + int c; + + for (int i = 0; i < target.size(); ++i) { + c = target.at(i).toAscii(); + hash ^= c + ((c - i) << i % 20) + ((c + i) << (i + 5) % 20) + ((c - 2 * i) << (i + 10) % 20) + ((c + 2 * i) << (i + 15) % 20); + } + + tmp.setNum(hash, 16); + for (int i = tmp.size(); i < 8; ++i) + tmp.prepend("0"); + + targetToUid[target] = tmp; + + return tmp; +} + +// UIDs starting with 0xE are test UIDs in symbian +QString generate_test_uid(const QString& target) +{ + QString tmp = generate_uid(target); + tmp.replace(0, 1, "E"); + tmp.prepend("0x"); + + return tmp; +} + + void initProjectDeploySymbian(QMakeProject* project, DeploymentList &deploymentList, const QString &testPath, diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h index a104985..029a897 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.h +++ b/qmake/generators/symbian/initprojectdeploy_symbian.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -50,6 +50,8 @@ #include <qfile.h> #include <stdlib.h> +#include "epocroot.h" + struct CopyItem { CopyItem(const QString& f, const QString& t) : from(f) , to(t) { } @@ -58,6 +60,9 @@ struct CopyItem }; typedef QList<CopyItem> DeploymentList; +extern QString generate_uid(const QString& target); +extern QString generate_test_uid(const QString& target); + extern void initProjectDeploySymbian(QMakeProject* project, DeploymentList &deploymentList, const QString &testPath, diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index b3fa0f2..c20ecf3 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -479,6 +479,7 @@ void SymbianMakefileGenerator::init() project->values("QMAKESPEC").append(qgetenv("QMAKESPEC")); project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); + project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE")); // bld.inf project->values("MAKEFILE") += BLD_INF_FILENAME; @@ -486,7 +487,7 @@ void SymbianMakefileGenerator::init() // .mmp initMmpVariables(); - // Check TARGET.UID2 and TARGET.UID3 presence + // Check TARGET.UID3 presence if (0 != project->values("TARGET.UID3").size()) { uid3 = project->first("TARGET.UID3"); } else { @@ -878,7 +879,7 @@ void SymbianMakefileGenerator::writeMmpFileIncludePart(QTextStream& t) void SymbianMakefileGenerator::writeMmpFileLibraryPart(QTextStream& t) { QStringList &libs = project->values("LIBS"); - libs << project->values("QMAKE_LIBS"); + libs << project->values("QMAKE_LIBS") << project->values("QMAKE_LIBS_PRIVATE"); removeDuplicatedStrings(libs); @@ -1686,4 +1687,5 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t) t << "distclean: clean dodistclean" << endl; t << endl; -}
\ No newline at end of file +} + diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h index e4b23e2..22dc4c9 100644 --- a/qmake/generators/symbian/symmake.h +++ b/qmake/generators/symbian/symmake.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index d88b34b..271d210 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h index 0b2989f..7709d5d 100644 --- a/qmake/generators/symbian/symmake_abld.h +++ b/qmake/generators/symbian/symmake_abld.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index f3b90c6..2471a2b 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -291,12 +291,12 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t QStringList extraTargets; extraTargets << project->values("QMAKE_EXTRA_TARGETS") << project->values("QMAKE_EXTRA_COMPILERS"); foreach(QString item, extraTargets) { - foreach(QString targetItem, project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + item)) { + foreach(QString targetItem, project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + item)) { // Make sure targetpath is absolute QString absoluteTarget = fileInfo(targetItem).absoluteFilePath(); if (allPreDeps.contains(absoluteTarget)) { - QStringList deps = project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + item + targetItem); - QString commandItem = project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + item + targetItem).join(" "); + QStringList deps = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + item + targetItem); + QString commandItem = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + item + targetItem).join(" "); // Make sure all deps paths are absolute @@ -365,7 +365,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t if (icons.size()) { QString icon = icons.first(); if (icons.size() > 1) - fprintf(stderr, "Warning: Only first icon specified in ICON variable is used: '%s'.", icon); + fprintf(stderr, "Warning: Only first icon specified in ICON variable is used: '%s'.", qPrintable(icon)); t << "START EXTENSION s60/mifconv" << endl; diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h index 7806d53..7f78834 100644 --- a/qmake/generators/symbian/symmake_sbsv2.h +++ b/qmake/generators/symbian/symmake_sbsv2.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp index 35966b7..ebe7f81 100644 --- a/qmake/generators/win32/msvc_dsp.cpp +++ b/qmake/generators/win32/msvc_dsp.cpp @@ -1123,20 +1123,6 @@ QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file fileOut); dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false); if(config->canExecute(dep_cmd)) { -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if ( !read_in ) - break; - indeps += QByteArray(buff, read_in); - } - if(!indeps.isEmpty()) - step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1149,7 +1135,6 @@ QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file if(!indeps.isEmpty()) step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); } -#endif } } diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 4dda30c..c192259 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -484,7 +484,7 @@ bool VCCLCompilerTool::parseOption(const char* option) QString opt(option); if (opt.contains('a') && !opt.contains('s') && !opt.contains('c')) ExceptionHandling = ehSEH; - else if (!opt.contains('a') && opt.contains("s-") && opt.contains("c-")) + else if (!opt.contains('a') && opt.contains("s-") && opt.contains("c-")) ExceptionHandling = ehNone; else if (!opt.contains('a') && opt.contains('s') && opt.contains('c')) ExceptionHandling = ehNoSEH; @@ -2215,26 +2215,6 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) Option::fixPathToLocalOS(inFile, true, false), out); if(Project->canExecute(dep_cmd)) { -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if ( !read_in ) - break; - indeps += QByteArray(buff, read_in); - } - if(!indeps.isEmpty()) { - QStringList extradeps = indeps.split(QLatin1Char('\n')); - for (int i = 0; i < extradeps.count(); ++i) { - QString dd = extradeps.at(i).simplified(); - if (!dd.isEmpty()) - deps += Project->fileFixify(dd); - } - } - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -2253,7 +2233,6 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) } } } -#endif } } for (int i = 0; i < deps.count(); ++i) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 7d32dab..c311b31 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -623,7 +623,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) } // Add all unknown libs to the deps - QStringList where("QMAKE_LIBS"); + QStringList where = QStringList() << "QMAKE_LIBS" << "QMAKE_LIBS_PRIVATE"; if(!tmp_proj.isEmpty("QMAKE_INTERNAL_PRL_LIBS")) where = tmp_proj.variables()["QMAKE_INTERNAL_PRL_LIBS"]; for(QStringList::iterator wit = where.begin(); @@ -1261,8 +1261,8 @@ void VcprojGenerator::initDeploymentTool() searchPath = info.absoluteFilePath(); } else { nameFilter = source.split('\\').last(); - if (source.contains('*')) { - source = source.split('*').first(); + if (source.contains('*')) { + source = source.split('*').first(); info = QFileInfo(source); } searchPath = info.absolutePath(); @@ -1424,20 +1424,6 @@ void VcprojGenerator::initResourceFiles() dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false); if(canExecute(dep_cmd)) { -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if ( !read_in ) - break; - indeps += QByteArray(buff, read_in); - } - if(!indeps.isEmpty()) - deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1450,7 +1436,6 @@ void VcprojGenerator::initResourceFiles() if(!indeps.isEmpty()) deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); } -#endif } } vcProject.ResourceFiles.addFiles(deps); @@ -1571,6 +1556,7 @@ void VcprojGenerator::initOld() } project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); + project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE")); // Get filename w/o extension ----------------------------------- QString msvcproj_project = ""; @@ -1614,6 +1600,7 @@ void VcprojGenerator::initOld() // $$QMAKE.. -> $$MSVCPROJ.. ------------------------------------- project->values("MSVCPROJ_LIBS") += project->values("QMAKE_LIBS"); + project->values("MSVCPROJ_LIBS") += project->values("QMAKE_LIBS_PRIVATE"); project->values("MSVCPROJ_LFLAGS") += project->values("QMAKE_LFLAGS"); if(!project->values("QMAKE_LIBDIR").isEmpty()) { QStringList strl = project->values("QMAKE_LIBDIR"); |