diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-29 08:45:22 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-29 08:45:22 (GMT) |
commit | de306893b464ed0fa00f98488912fd6269713519 (patch) | |
tree | b1ef87ee3e5afa0722c9da87a45e11ff3f620fdc /qmake/generators | |
parent | 4fb6cae4dd0c6a90008780df606abb8a9e73cb2c (diff) | |
parent | 473da75ed84651c70ae0d10e23f09e1a0e4ae799 (diff) | |
download | Qt-de306893b464ed0fa00f98488912fd6269713519.zip Qt-de306893b464ed0fa00f98488912fd6269713519.tar.gz Qt-de306893b464ed0fa00f98488912fd6269713519.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
mkspecs/common/symbian/symbian.conf
qmake/generators/symbian/symmake.cpp
src/3rdparty/webkit/WebCore/WebCore.pro
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/symbian/symbiancommon.cpp | 45 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.cpp | 10 |
2 files changed, 43 insertions, 12 deletions
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 1de4b65..54b60be 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -180,17 +180,36 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment tw << headerComment.arg(wrapperPkgFilename).arg(dateStr); // Construct QStringList from pkg_prerules since we need search it before printed to file + // Note: Though there can't be more than one language or header line, use stringlists + // in case user wants comments to go with the rules. QStringList rawPkgPreRules; + QStringList languageRules; + QStringList headerRules; foreach(QString deploymentItem, project->values("DEPLOYMENT")) { foreach(QString pkgrulesItem, project->values(deploymentItem + ".pkg_prerules")) { QStringList pkgrulesValue = project->values(pkgrulesItem); // If there is no stringlist defined for a rule, use rule name directly // This is convenience for defining single line mmp statements if (pkgrulesValue.isEmpty()) { - rawPkgPreRules << pkgrulesItem; + if (pkgrulesItem.startsWith("&")) + languageRules << pkgrulesItem; + else if (pkgrulesItem.startsWith("#")) + headerRules << pkgrulesItem; + else + rawPkgPreRules << pkgrulesItem; } else { - foreach(QString pkgrule, pkgrulesValue) { - rawPkgPreRules << pkgrule; + if (containsStartWithItem('&', pkgrulesValue)) { + foreach(QString pkgrule, pkgrulesValue) { + languageRules << pkgrule; + } + } else if (containsStartWithItem('#', pkgrulesValue)) { + foreach(QString pkgrule, pkgrulesValue) { + headerRules << pkgrule; + } + } else { + foreach(QString pkgrule, pkgrulesValue) { + rawPkgPreRules << pkgrule; + } } } } @@ -198,17 +217,17 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment // Apply some defaults if specific data does not exist in PKG pre-rules - if (!containsStartWithItem('&', rawPkgPreRules)) { + if (languageRules.isEmpty()) { // language, (*** hardcoded to english atm, should be parsed from TRANSLATIONS) - QString languageCode = "; Language\n&EN\n\n"; - t << languageCode; - tw << languageCode; - } else { + languageRules << "; Language\n&EN\n\n"; + } else if (headerRules.isEmpty()) { // In case user defines langs, he must take care also about SIS header - if (!containsStartWithItem('#', rawPkgPreRules)) - fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n"); + fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n"); } + t << languageRules.join("\n") << endl; + tw << languageRules.join("\n") << endl; + // name of application, UID and version QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ','); QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n"; @@ -222,9 +241,11 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment } else { tw << installerSisHeader << endl; } - if (!containsStartWithItem('#', rawPkgPreRules)) { + + if (headerRules.isEmpty()) t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion); - } + else + t << headerRules.join("\n") << endl; // Localized vendor name QString vendorName; diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index af85a2a..0fcd26d 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -873,6 +873,16 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t) t << MMP_OPTION_CW " " << cw << endl; if (!armcc.isEmpty()) t << MMP_OPTION_ARMCC " " << armcc << endl; + + foreach(QString armccVersion, project->values("VERSION_FLAGS.ARMCC")) { + QStringList currentValues = project->values("QMAKE_CXXFLAGS." + armccVersion); + if (currentValues.size()) { + t << "#if defined(" << armccVersion << ")" << endl; + t << MMP_OPTION_ARMCC " " << currentValues.join(" ") << endl; + t << "#endif" << endl; + } + } + if (!gcce.isEmpty()) t << MMP_OPTION_GCCE " " << gcce << endl; |