summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-12-18 10:32:06 (GMT)
committeraxis <qt-info@nokia.com>2009-12-18 10:32:06 (GMT)
commit2fb8ea9aa787d59ac16250eade0adfea08f1ca9d (patch)
treec274575bb148c9755a901094fc94d4553a84653c /qmake
parentab8508380d6e5875ed871196eb09642380ac1aef (diff)
parentbf819a04b0c60c64912f72b613c1546d8be7dc50 (diff)
downloadQt-2fb8ea9aa787d59ac16250eade0adfea08f1ca9d.zip
Qt-2fb8ea9aa787d59ac16250eade0adfea08f1ca9d.tar.gz
Qt-2fb8ea9aa787d59ac16250eade0adfea08f1ca9d.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts: configure src/gui/text/qfontdatabase_s60.cpp
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/symmake.cpp184
-rw-r--r--qmake/generators/symbian/symmake.h14
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp41
-rw-r--r--qmake/generators/symbian/symmake_abld.h3
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp54
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.h3
-rw-r--r--qmake/generators/unix/unixmake.cpp2
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp4
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h3
9 files changed, 190 insertions, 118 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 8ec4b3f..8379ed9 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -77,6 +77,15 @@
#define MMP_LINKEROPTION_CW "LINKEROPTION CW"
#define MMP_LINKEROPTION_ARMCC "LINKEROPTION ARMCC"
#define MMP_LINKEROPTION_GCCE "LINKEROPTION GCCE"
+#define MMP_CAPABILITY "CAPABILITY"
+#define MMP_EPOCALLOWDLLDATA "EPOCALLOWDLLDATA"
+#define MMP_EPOCHEAPSIZE "EPOCHEAPSIZE"
+#define MMP_EPOCSTACKSIZE "EPOCSTACKSIZE"
+#define MMP_UID "UID"
+#define MMP_VENDORID "VENDORID"
+#define MMP_VERSION "VERSION"
+#define MMP_START_RESOURCE "START RESOURCE"
+#define MMP_END_RESOURCE "END"
#define SIS_TARGET "sis"
#define OK_SIS_TARGET "ok_sis"
@@ -155,7 +164,7 @@ void SymbianMakefileGenerator::writeHeader(QTextStream &t)
{
t << "// ============================================================================" << endl;
t << "// * Makefile for building: " << escapeFilePath(var("TARGET")) << endl;
- t << "// * Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
+ t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "// * This file is generated by qmake and should not be modified by the" << endl;
t << "// * user." << endl;
@@ -209,7 +218,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
generatePkgFile(iconFile);
}
- writeBldInfContent(t, generatePkg);
+ writeBldInfContent(t, generatePkg, iconFile);
// Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile,
// but all required data is not yet available.
@@ -378,14 +387,11 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
.arg(installPathRegResource)
.arg(fixedTarget + "_reg.rsc") << endl;
- QString myIconFile = iconFile;
- myIconFile = myIconFile.replace("\\\\", "\\");
-
if (!iconFile.isEmpty()) {
t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"")
.arg(epocRoot())
- .arg(QString(myIconFile).replace('\\','/'))
- .arg(myIconFile) << endl << endl;
+ .arg(iconFile)
+ .arg(QDir::toNativeSeparators(iconFile)) << endl << endl;
}
}
}
@@ -447,7 +453,7 @@ void SymbianMakefileGenerator::writeCustomDefFile()
QTextStream t(&ft);
t << "; ==============================================================================" << endl;
- t << "; Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
+ t << "; Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "; This file is generated by qmake and should not be modified by the" << endl;
t << "; user." << endl;
@@ -610,19 +616,10 @@ void SymbianMakefileGenerator::initMmpVariables()
incpaths << project->values("UI_HEADERS_DIR");
incpaths << project->values("UI_DIR");
- QString epocPath("epoc32");
for (int j = 0; j < incpaths.size(); ++j) {
QString includepath = canonizePath(incpaths.at(j));
appendIfnotExist(sysincspaths, includepath);
- // As a workaround for Symbian toolchain insistence to treat include
- // statements as relative to source file rather than the file they appear in,
- // we generate extra temporary include directories to make
- // relative include paths used in various headers to work properly.
- // Note that this is not a fix-all solution; it's just a stop-gap measure
- // to make Qt itself build until toolchain can support relative includes in
- // a way that Qt expects.
- if (!includepath.contains(epocPath)) // No temp dirs for epoc includes
- appendIfnotExist(sysincspaths, includepath + QString("/" QT_EXTRA_INCLUDE_DIR));
+ appendAbldTempDirs(sysincspaths, includepath);
}
// Remove duplicate include path entries
@@ -658,30 +655,76 @@ void SymbianMakefileGenerator::initMmpVariables()
// Check MMP_RULES for singleton keywords that are overridden
QStringList overridableMmpKeywords;
+ QStringList restrictableMmpKeywords;
+ QStringList restrictedMmpKeywords;
+ bool inResourceBlock = false;
+
overridableMmpKeywords << QLatin1String(MMP_TARGETTYPE);
+ restrictableMmpKeywords << QLatin1String(MMP_TARGET) << QLatin1String(MMP_SECUREID)
+ << QLatin1String(MMP_OPTION_CW) << QLatin1String(MMP_OPTION_ARMCC)
+ << QLatin1String(MMP_OPTION_GCCE) << QLatin1String(MMP_LINKEROPTION_CW)
+ << QLatin1String(MMP_LINKEROPTION_ARMCC) << QLatin1String(MMP_LINKEROPTION_GCCE)
+ << QLatin1String(MMP_CAPABILITY) << QLatin1String(MMP_EPOCALLOWDLLDATA)
+ << QLatin1String(MMP_EPOCHEAPSIZE) << QLatin1String(MMP_EPOCSTACKSIZE)
+ << QLatin1String(MMP_UID) << QLatin1String(MMP_VENDORID)
+ << QLatin1String(MMP_VERSION);
foreach (QString item, project->values("MMP_RULES")) {
if (project->values(item).isEmpty()) {
- checkOverridability(overridableMmpKeywords, item);
+ handleMmpRulesOverrides(item, inResourceBlock, restrictedMmpKeywords,
+ restrictableMmpKeywords, overridableMmpKeywords);
} else {
foreach (QString itemRow, project->values(item)) {
- checkOverridability(overridableMmpKeywords, itemRow);
+ handleMmpRulesOverrides(itemRow, inResourceBlock, restrictedMmpKeywords,
+ restrictableMmpKeywords, overridableMmpKeywords);
}
}
}
+
+ if (restrictedMmpKeywords.size()) {
+ fprintf(stderr, "Warning: Restricted statements detected in MMP_RULES:\n"
+ " (%s)\n"
+ " Use corresponding qmake variable(s) instead.\n",
+ qPrintable(restrictedMmpKeywords.join(", ")));
+ }
}
-void SymbianMakefileGenerator::checkOverridability(QStringList &overridableKeywords, QString &checkString)
+void SymbianMakefileGenerator::handleMmpRulesOverrides(QString &checkString,
+ bool &inResourceBlock,
+ QStringList &restrictedMmpKeywords,
+ const QStringList &restrictableMmpKeywords,
+ const QStringList &overridableMmpKeywords)
{
- // Check if checkString contains overridable keyword and
- // add the keyword to overridden keywords list if so.
QString simplifiedString = checkString.simplified();
- foreach (QString item, overridableKeywords) {
- if (simplifiedString.startsWith(item))
- appendIfnotExist(overriddenMmpKeywords, item);
+
+ if (!inResourceBlock && simplifiedString.startsWith(MMP_START_RESOURCE, Qt::CaseInsensitive))
+ inResourceBlock = true;
+ else if (inResourceBlock && simplifiedString.startsWith(MMP_END_RESOURCE, Qt::CaseInsensitive))
+ inResourceBlock = false;
+
+ // Allow restricted and overridable items in RESOURCE blocks as those do not actually
+ // override anything.
+ if (!inResourceBlock) {
+ appendKeywordIfMatchFound(overriddenMmpKeywords, overridableMmpKeywords, simplifiedString);
+ appendKeywordIfMatchFound(restrictedMmpKeywords, restrictableMmpKeywords, simplifiedString);
+ }
+}
+
+void SymbianMakefileGenerator::appendKeywordIfMatchFound(QStringList &list,
+ const QStringList &keywordList,
+ QString &checkString)
+{
+ // Check if checkString starts with any supplied keyword and
+ // add the found keyword to list if it does.
+ foreach (QString item, keywordList) {
+ if (checkString.startsWith(QString(item).append(" "), Qt::CaseInsensitive)
+ || checkString.compare(item, Qt::CaseInsensitive) == 0) {
+ appendIfnotExist(list, item);
+ }
}
}
+
bool SymbianMakefileGenerator::removeDuplicatedStrings(QStringList &stringList)
{
QStringList tmpStringList;
@@ -702,7 +745,7 @@ bool SymbianMakefileGenerator::removeDuplicatedStrings(QStringList &stringList)
void SymbianMakefileGenerator::writeMmpFileHeader(QTextStream &t)
{
t << "// ==============================================================================" << endl;
- t << "// Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
+ t << "// Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "// This file is generated by qmake and should not be modified by the" << endl;
t << "// user." << endl;
@@ -787,7 +830,7 @@ void SymbianMakefileGenerator::writeMmpFileMacrosPart(QTextStream& t)
void SymbianMakefileGenerator::addMacro(QTextStream& t, const QString& value)
{
- t << "MACRO" << "\t\t" << value << endl;
+ t << "MACRO\t\t" << value << endl;
}
@@ -796,28 +839,28 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
bool skipTargetType = overriddenMmpKeywords.contains(MMP_TARGETTYPE);
if (targetType == TypeExe) {
- t << MMP_TARGET << "\t\t" << fixedTarget << ".exe" << endl;
+ t << MMP_TARGET "\t\t" << fixedTarget << ".exe" << endl;
if (!skipTargetType) {
if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
- t << MMP_TARGETTYPE << "\t\t" << "STDEXE" << endl;
+ t << MMP_TARGETTYPE "\t\tSTDEXE" << endl;
else
- t << MMP_TARGETTYPE << "\t\t" << "EXE" << endl;
+ t << MMP_TARGETTYPE "\t\tEXE" << endl;
}
} else if (targetType == TypeDll || targetType == TypePlugin) {
- t << MMP_TARGET << "\t\t" << fixedTarget << ".dll" << endl;
+ t << MMP_TARGET "\t\t" << fixedTarget << ".dll" << endl;
if (!skipTargetType) {
if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
- t << MMP_TARGETTYPE << "\t\t" << "STDDLL" << endl;
+ t << MMP_TARGETTYPE "\t\tSTDDLL" << endl;
else
- t << MMP_TARGETTYPE << "\t\t" << "DLL" << endl;
+ t << MMP_TARGETTYPE "\t\tDLL" << endl;
}
} else if (targetType == TypeLib) {
- t << MMP_TARGET << "\t\t" << fixedTarget << ".lib" << endl;
+ t << MMP_TARGET "\t\t" << fixedTarget << ".lib" << endl;
if (!skipTargetType) {
if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
- t << MMP_TARGETTYPE << "\t\t" << "STDLIB" << endl;
+ t << MMP_TARGETTYPE "\t\tSTDLIB" << endl;
else
- t << MMP_TARGETTYPE << "\t\t" << "LIB" << endl;
+ t << MMP_TARGETTYPE "\t\tLIB" << endl;
}
} else {
fprintf(stderr, "Error: Unexpected targettype (%d) in SymbianMakefileGenerator::writeMmpFileTargetPart\n", targetType);
@@ -825,30 +868,30 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
t << endl;
- t << "UID" << "\t\t" << uid2 << " " << uid3 << endl;
+ t << MMP_UID "\t\t" << uid2 << " " << uid3 << endl;
if (0 != project->values("TARGET.SID").size()) {
- t << MMP_SECUREID << "\t\t" << project->values("TARGET.SID").join(" ") << endl;
+ t << MMP_SECUREID "\t\t" << project->values("TARGET.SID").join(" ") << endl;
} else {
if (0 == uid3.size())
- t << MMP_SECUREID << "\t\t" << "0" << endl;
+ t << MMP_SECUREID "\t\t0" << endl;
else
- t << MMP_SECUREID << "\t\t" << uid3 << endl;
+ t << MMP_SECUREID "\t\t" << uid3 << endl;
}
// default value used from mkspecs is 0
if (0 != project->values("TARGET.VID").size()) {
- t << "VENDORID" << "\t\t" << project->values("TARGET.VID").join(" ") << endl;
+ t << MMP_VENDORID "\t\t" << project->values("TARGET.VID").join(" ") << endl;
}
t << endl;
if (0 != project->first("TARGET.EPOCSTACKSIZE").size())
- t << "EPOCSTACKSIZE" << "\t\t" << project->first("TARGET.EPOCSTACKSIZE") << endl;
+ t << MMP_EPOCSTACKSIZE "\t\t" << project->first("TARGET.EPOCSTACKSIZE") << endl;
if (0 != project->values("TARGET.EPOCHEAPSIZE").size())
- t << "EPOCHEAPSIZE" << "\t\t" << project->values("TARGET.EPOCHEAPSIZE").join(" ") << endl;
+ t << MMP_EPOCHEAPSIZE "\t\t" << project->values("TARGET.EPOCHEAPSIZE").join(" ") << endl;
if (0 != project->values("TARGET.EPOCALLOWDLLDATA").size())
- t << "EPOCALLOWDLLDATA" << endl;
+ t << MMP_EPOCALLOWDLLDATA << endl;
if (targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
// Use custom def file for Qt plugins
@@ -877,20 +920,20 @@ void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringL
t << lang << " "; // no endl
}
t << endl;
- t << "START RESOURCE\t\t" << locTarget << endl;
+ t << MMP_START_RESOURCE "\t\t" << locTarget << endl;
t << "HEADER" << endl;
t << "TARGETPATH\t\t\t" RESOURCE_DIRECTORY_MMP << endl;
- t << "END" << endl << endl;
+ t << MMP_END_RESOURCE << endl << endl;
QString regTarget = fixedTarget;
regTarget.append("_reg.rss");
t << "SOURCEPATH\t\t\t." << endl;
- t << "START RESOURCE\t\t" << regTarget << endl;
+ t << MMP_START_RESOURCE "\t\t" << regTarget << endl;
if (isForSymbianSbsv2())
t << "DEPENDS " << fixedTarget << ".rsg" << endl;
t << "TARGETPATH\t\t" REGISTRATION_RESOURCE_DIRECTORY_HW << endl;
- t << "END" << endl << endl;
+ t << MMP_END_RESOURCE << endl << endl;
}
}
@@ -902,7 +945,7 @@ void SymbianMakefileGenerator::writeMmpFileSystemIncludePart(QTextStream& t)
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
QString handledPath = values.at(i);
- t << "SYSTEMINCLUDE" << "\t\t" << fixPathForMmp(handledPath, current) << endl;
+ t << "SYSTEMINCLUDE\t\t" << fixPathForMmp(handledPath, current) << endl;
}
}
@@ -958,14 +1001,14 @@ void SymbianMakefileGenerator::writeMmpFileCapabilityPart(QTextStream& t)
{
if (0 != project->first("TARGET.CAPABILITY").size()) {
QStringList &capabilities = project->values("TARGET.CAPABILITY");
- t << "CAPABILITY" << "\t\t";
+ t << MMP_CAPABILITY "\t\t";
for (int i = 0; i < capabilities.size(); ++i) {
QString cap = capabilities.at(i);
t << cap << " ";
}
} else {
- t << "CAPABILITY" << "\t\t" << "None";
+ t << MMP_CAPABILITY "\t\tNone";
}
t << endl << endl;
}
@@ -1060,21 +1103,21 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
if (!gccelink.isEmpty() && gccelink[gccelink.size()-1] == ' ')
gccelink.chop(1);
- if (!cw.isEmpty() && !overriddenMmpKeywords.contains(MMP_OPTION_CW))
+ if (!cw.isEmpty())
t << MMP_OPTION_CW " " << cw << endl;
- if (!armcc.isEmpty() && !overriddenMmpKeywords.contains(MMP_OPTION_ARMCC))
+ if (!armcc.isEmpty())
t << MMP_OPTION_ARMCC " " << armcc << endl;
- if (!gcce.isEmpty() && !overriddenMmpKeywords.contains(MMP_OPTION_GCCE))
+ if (!gcce.isEmpty())
t << MMP_OPTION_GCCE " " << gcce << endl;
- if (!cwlink.isEmpty() && !overriddenMmpKeywords.contains(MMP_LINKEROPTION_CW))
+ if (!cwlink.isEmpty())
t << MMP_LINKEROPTION_CW " " << cwlink << endl;
- if (!armlink.isEmpty() && !overriddenMmpKeywords.contains(MMP_LINKEROPTION_ARMCC))
+ if (!armlink.isEmpty())
t << MMP_LINKEROPTION_ARMCC " " << armlink << endl;
- if (!gccelink.isEmpty() && !overriddenMmpKeywords.contains(MMP_LINKEROPTION_GCCE))
+ if (!gccelink.isEmpty())
t << MMP_LINKEROPTION_GCCE " " << gccelink << endl;
- t << endl;
+ t << endl;
}
void SymbianMakefileGenerator::writeMmpFileBinaryVersionPart(QTextStream& t)
@@ -1110,7 +1153,7 @@ void SymbianMakefileGenerator::writeMmpFileBinaryVersionPart(QTextStream& t)
mmpVersion = "10.0"; // Default binary version for symbian is 10.0
}
- t << "VERSION " << mmpVersion << endl;
+ t << MMP_VERSION " " << mmpVersion << endl;
}
void SymbianMakefileGenerator::writeMmpFileRulesPart(QTextStream& t)
@@ -1129,7 +1172,7 @@ void SymbianMakefileGenerator::writeMmpFileRulesPart(QTextStream& t)
}
}
-void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension)
+void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile)
{
// Read user defined bld inf rules
@@ -1251,7 +1294,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
// Generate extension rules
- writeBldInfExtensionRulesPart(t);
+ writeBldInfExtensionRulesPart(t, iconFile);
userItems = userBldInfRules.value(BLD_INF_TAG_EXTENSIONS);
foreach(QString item, userItems)
@@ -1277,7 +1320,7 @@ void SymbianMakefileGenerator::writeRegRssFile(QStringList &userItems)
generatedFiles << ft.fileName();
QTextStream t(&ft);
t << "// ============================================================================" << endl;
- t << "// * Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
+ t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "// * This file is generated by qmake and should not be modified by the" << endl;
t << "// * user." << endl;
@@ -1286,8 +1329,7 @@ void SymbianMakefileGenerator::writeRegRssFile(QStringList &userItems)
t << "#include <" << fixedTarget << ".rsg>" << endl;
t << "#include <appinfo.rh>" << endl;
t << endl;
- //t << "#include <data_caging_paths.hrh>" << "\n" << endl;
- t << "UID2 " << "KUidAppRegistrationResourceFile" << endl;
+ t << "UID2 KUidAppRegistrationResourceFile" << endl;
t << "UID3 " << uid3 << endl << endl;
t << "RESOURCE APP_REGISTRATION_INFO" << endl;
t << "\t{" << endl;
@@ -1312,7 +1354,7 @@ void SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &ico
generatedFiles << ft.fileName();
QTextStream t(&ft);
t << "// ============================================================================" << endl;
- t << "// * Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
+ t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "// * This file is generated by qmake and should not be modified by the" << endl;
t << "// * user." << endl;
@@ -1329,14 +1371,17 @@ void SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &ico
t << "\t\t{" << endl;
t << "\t\tcaption = STRING_r_caption;" << endl;
- if (numberOfIcons.isEmpty() || iconFile.isEmpty()) {
+ QString rssIconFile = iconFile;
+ rssIconFile = rssIconFile.replace("/", "\\\\");
+
+ if (numberOfIcons.isEmpty() || rssIconFile.isEmpty()) {
// There can be maximum one item in this tag, validated when parsed
t << "\t\tnumber_of_icons = 0;" << endl;
t << "\t\ticon_file = \"\";" << endl;
} else {
// There can be maximum one item in this tag, validated when parsed
t << "\t\tnumber_of_icons = " << numberOfIcons << ";" << endl;
- t << "\t\ticon_file = \"" << iconFile << "\";" << endl;
+ t << "\t\ticon_file = \"" << rssIconFile << "\";" << endl;
}
t << "\t\t};" << endl;
t << "\t}" << endl;
@@ -1355,7 +1400,7 @@ void SymbianMakefileGenerator::writeLocFile(QStringList &symbianLangCodes)
generatedFiles << ft.fileName();
QTextStream t(&ft);
t << "// ============================================================================" << endl;
- t << "// * Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: ";
+ t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "// * This file is generated by qmake and should not be modified by the" << endl;
t << "// * user." << endl;
@@ -1706,6 +1751,7 @@ void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t,
void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
{
+ // When modifying this method check also application_icon.prf
str.replace(QString("/"), QString("_"));
str.replace(QString("\\"), QString("_"));
str.replace(QString("-"), QString("_"));
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 36f6e05..1a20e64 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -96,10 +96,17 @@ protected:
QString generateUID3();
void initMmpVariables();
- void checkOverridability(QStringList &overridableKeywords, QString &checkString);
+ void handleMmpRulesOverrides(QString &checkString,
+ bool &inResourceBlock,
+ QStringList &restrictedMmpKeywords,
+ const QStringList &restrictableMmpKeywords,
+ const QStringList &overridableMmpKeywords);
+ void appendKeywordIfMatchFound(QStringList &list,
+ const QStringList &keywordList,
+ QString &checkString);
void writeHeader(QTextStream &t);
- void writeBldInfContent(QTextStream& t, bool addDeploymentExtension);
+ void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile);
static bool removeDuplicatedStrings(QStringList& stringList);
@@ -143,10 +150,11 @@ protected:
void generateDistcleanTargets(QTextStream& t);
// Subclass implements
- virtual void writeBldInfExtensionRulesPart(QTextStream& t) = 0;
+ virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) = 0;
virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) = 0;
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly) = 0;
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile) = 0;
+ virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath) = 0;
public:
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 4d1673b..f2baf46 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -88,15 +88,15 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
t << "# ==============================================================================" << "\n" << endl;
t << endl << endl;
-
+
t << "MAKE = make" << endl;
t << endl;
-
+
t << "VISUAL_CFG = RELEASE" << endl;
- t << "ifeq \"$(CFG)\" \"UDEB\"" << endl;
- t << "VISUAL_CFG = DEBUG" << endl;
- t << "endif" << endl;
- t << endl;
+ t << "ifeq \"$(CFG)\" \"UDEB\"" << endl;
+ t << "VISUAL_CFG = DEBUG" << endl;
+ t << "endif" << endl;
+ t << endl;
t << DO_NOTHING_TARGET " :" << endl;
t << "\t" << "@rem " DO_NOTHING_TARGET << endl << endl;
@@ -113,8 +113,8 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
cleanDepsWinscw.append(WINSCW_DEPLOYMENT_CLEAN_TARGET);
finalDeps.append(DO_NOTHING_TARGET);
finalDepsWinscw.append(WINSCW_DEPLOYMENT_TARGET);
- wrapperTargets << WINSCW_DEPLOYMENT_TARGET
- << WINSCW_DEPLOYMENT_CLEAN_TARGET
+ wrapperTargets << WINSCW_DEPLOYMENT_TARGET
+ << WINSCW_DEPLOYMENT_CLEAN_TARGET
<< STORE_BUILD_TARGET;
} else {
buildDeps.append(CREATE_TEMPS_TARGET " " PRE_TARGETDEPS_TARGET " " STORE_BUILD_TARGET);
@@ -153,9 +153,9 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
QString makefile(Option::fixPathToTargetOS(fileInfo(wrapperFileName).canonicalFilePath()));
foreach(QString target, wrapperTargets) {
t << target << " : " << makefile << endl;
- t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " QT_SIS_TARGET=$(VISUAL_CFG)-$(PLATFORM)" << endl << endl;
- }
-
+ t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " QT_SIS_TARGET=$(VISUAL_CFG)-$(PLATFORM)" << endl << endl;
+ }
+
t << endl;
} // if(ft.open(QIODevice::WriteOnly))
}
@@ -375,14 +375,15 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// Create execution target
if (debugPlatforms.contains("winscw") && targetType == TypeExe) {
t << "run:" << endl;
- t << "\t-call " << epocRoot() << "epoc32\\release\\winscw\\udeb\\" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl;
+ t << "\t-call " << epocRoot() << "epoc32\\release\\winscw\\udeb\\" << fixedTarget << ".exe" << endl << endl;
}
}
-void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t)
+void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile)
{
// We don't use extensions for anything in abld
Q_UNUSED(t);
+ Q_UNUSED(iconTargetFile);
}
bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
@@ -450,3 +451,17 @@ void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool ad
t << "gnumakefile " << gnuMakefileName << endl;
}
}
+
+void SymbianAbldMakefileGenerator::appendAbldTempDirs(QStringList& sysincspaths, QString includepath)
+{
+ // As a workaround for Symbian toolchain insistence to treat include
+ // statements as relative to source file rather than the file they appear in,
+ // we generate extra temporary include directories to make
+ // relative include paths used in various headers to work properly.
+ // Note that this is not a fix-all solution; it's just a stop-gap measure
+ // to make Qt itself build until toolchain can support relative includes in
+ // a way that Qt expects.
+ QString epocPath("epoc32");
+ if (!includepath.contains(epocPath)) // No temp dirs for epoc includes
+ appendIfnotExist(sysincspaths, includepath + QString("/" QT_EXTRA_INCLUDE_DIR));
+}
diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h
index f844096..56d31e1 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -51,10 +51,11 @@ class SymbianAbldMakefileGenerator : public SymbianMakefileGenerator
protected:
// Inherited from parent
- virtual void writeBldInfExtensionRulesPart(QTextStream& t);
+ virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile);
virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension);
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly);
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
+ virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath);
void writeStoreBuildTarget(QTextStream &t);
bool writeDeploymentTargets(QTextStream &t);
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index cad2736..ad22cfd 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -182,15 +182,22 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
}
t << endl;
+ QString winscw("winscw");
// For more specific builds, targets are in this form: build-platform, e.g. release-armv5
foreach(QString item, debugPlatforms) {
t << "debug-" << item << ": " << BLD_INF_FILENAME << endl;
- t << "\t$(SBS) -c " << item << "_udeb" << testClause << endl;
+ if(QString::compare(item, winscw) == 0)
+ t << "\t$(SBS) -c " << item << "_udeb.mwccinc" << testClause << endl;
+ else
+ t << "\t$(SBS) -c " << item << "_udeb" << testClause << endl;
}
foreach(QString item, releasePlatforms) {
t << "release-" << item << ": " << BLD_INF_FILENAME << endl;
- t << "\t$(SBS) -c " << item << "_urel" << testClause << endl;
+ if(QString::compare(item, winscw) == 0)
+ t << "\t$(SBS) -c " << item << "_urel.mwccinc" << testClause << endl;
+ else
+ t << "\t$(SBS) -c " << item << "_urel" << testClause << endl;
}
t << endl;
@@ -227,11 +234,11 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
// create execution target
if (debugPlatforms.contains("winscw") && targetType == TypeExe) {
t << "run:" << endl;
- t << "\t-call " << epocRoot() << "epoc32/release/winscw/udeb/" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl;
+ t << "\t-call " << epocRoot() << "epoc32/release/winscw/udeb/" << fixedTarget << ".exe" << endl << endl;
}
}
-void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t)
+void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile)
{
// Makes sure we have needed FLMs in place.
exportFlm();
@@ -369,38 +376,22 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
t << "START EXTENSION s60/mifconv" << endl;
QFileInfo iconInfo = fileInfo(icon);
- QString iconPath = iconInfo.path();
+
+ QFileInfo bldinf(project->values("MAKEFILE").first());
+ QString iconPath = bldinf.dir().relativeFilePath(iconInfo.path());
+
QString iconFile = iconInfo.baseName();
+ QFileInfo iconTargetInfo = fileInfo(iconTargetFile);
+ QString iconTarget = iconTargetInfo.fileName();
+
t << "OPTION SOURCES -c32 " << iconFile << endl;
t << "OPTION SOURCEDIR " << iconPath << endl;
- t << "OPTION TARGETFILE " << uid3 << ".mif" << endl;
+ t << "OPTION TARGETFILE " << iconTarget << endl;
t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up
t << "END" << endl;
}
- // Generate temp dirs
- QString tempDirs;
- for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
- QStringList values = it.value();
- for (int i = 0; i < values.size(); ++i) {
- QString value = values.at(i);
- if (value.endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
- value = fileInfo(value).absoluteFilePath();
- tempDirs.append(value);
- tempDirs.append(" ");
- }
- }
- }
-
- if (tempDirs.size())
- tempDirs.chop(1); // Remove final space
-
- t << "START EXTENSION qt/qmake_generate_temp_dirs" << endl;
- t << "OPTION DIRS " << tempDirs << endl;
- t << "END" << endl;
- t << endl;
-
t << "START EXTENSION qt/qmake_store_build" << endl;
t << "END" << endl;
t << endl;
@@ -414,3 +405,10 @@ void SymbianSbsv2MakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool a
Q_UNUSED(t);
Q_UNUSED(addDeploymentExtension);
}
+
+void SymbianSbsv2MakefileGenerator::appendAbldTempDirs(QStringList& sysincspaths, QString includepath)
+{
+ //Do nothing
+ Q_UNUSED(sysincspaths);
+ Q_UNUSED(includepath);
+}
diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h
index 1cbddb3..3394908 100644
--- a/qmake/generators/symbian/symmake_sbsv2.h
+++ b/qmake/generators/symbian/symmake_sbsv2.h
@@ -51,10 +51,11 @@ class SymbianSbsv2MakefileGenerator : public SymbianMakefileGenerator
protected:
// Inherited from parent
- virtual void writeBldInfExtensionRulesPart(QTextStream& t);
+ virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile);
virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension);
virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly);
virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile);
+ virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath);
public:
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 7c8e173..e6134f8 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -92,7 +92,7 @@ UnixMakefileGenerator::init()
if(project->isEmpty("QMAKE_LIBTOOL"))
project->values("QMAKE_LIBTOOL").append("libtool --silent");
if(project->isEmpty("QMAKE_SYMBOLIC_LINK"))
- project->values("QMAKE_SYMBOLIC_LINK").append("ln -sf");
+ project->values("QMAKE_SYMBOLIC_LINK").append("ln -f -s");
/* this should probably not be here, but I'm using it to wrap the .t files */
if(project->first("TEMPLATE") == "app")
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 7dc456e..593a075 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1394,8 +1394,10 @@ bool VCLinkerTool::parseOption(const char* option)
case 0x0005bb6: // X86
TargetMachine = machineX86;
break;
- // so we put the others in AdditionalOptions...
case 0x0005b94: // X64
+ TargetMachine = machineX64;
+ break;
+ // so we put the others in AdditionalOptions...
case 0x0046063: // AM33
case 0x000466d: // ARM
case 0x0004795: // CEE
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index d178d30..f7fdf3a 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -298,7 +298,8 @@ enum linkProgressOption {
};
enum machineTypeOption {
machineNotSet,
- machineX86
+ machineX86,
+ machineX64 = 17
};
enum midlCharOption {
midlCharUnsigned,