summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp1
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.h2
-rw-r--r--qmake/generators/symbian/symmake.cpp32
-rw-r--r--qmake/generators/symbian/symmake.h5
-rw-r--r--qmake/project.cpp14
5 files changed, 44 insertions, 10 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 755f73f..f3e3c3a 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -46,7 +46,6 @@
#include <qsettings.h>
#include <qdebug.h>
-#define PLUGIN_STUB_DIR "qmakepluginstubs"
#define SYSBIN_DIR "\\sys\\bin"
#define SUFFIX_DLL "dll"
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h
index 2f43818..e23e6a9 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.h
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.h
@@ -52,6 +52,8 @@
#include "epocroot.h"
+#define PLUGIN_STUB_DIR "qmakepluginstubs"
+
struct CopyItem
{
CopyItem(const QString& f, const QString& t) : from(f) , to(t) { }
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 6e76c9e..20e2d0e 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include "symmake.h"
-#include "initprojectdeploy_symbian.h"
#include <qstring.h>
#include <qhash.h>
@@ -62,6 +61,7 @@
#define BLD_INF_TAG_MMPFILES "prj_mmpfiles"
#define BLD_INF_TAG_TESTMMPFILES "prj_testmmpfiles"
#define BLD_INF_TAG_EXTENSIONS "prj_extensions"
+#define BLD_INF_TAG_EXPORTS "prj_exports"
#define RSS_RULES "RSS_RULES"
#define RSS_RULES_BASE "RSS_RULES."
@@ -202,6 +202,8 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
// Generate pkg files if there are any actual files to deploy
bool generatePkg = false;
+ DeploymentList depList;
+
if (targetType == TypeExe) {
generatePkg = true;
} else {
@@ -214,10 +216,10 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
if (generatePkg) {
- generatePkgFile(iconFile);
+ generatePkgFile(iconFile, depList);
}
- writeBldInfContent(t, generatePkg, iconFile);
+ writeBldInfContent(t, generatePkg, iconFile, depList);
// Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile,
// but all required data is not yet available.
@@ -272,7 +274,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
-void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
+void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList)
{
QString pkgFilename = QString("%1_template.%2")
.arg(fixedTarget)
@@ -396,7 +398,6 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
}
// deploy any additional DEPLOYMENT files
- DeploymentList depList;
QString remoteTestPath;
remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
@@ -1171,7 +1172,7 @@ void SymbianMakefileGenerator::writeMmpFileRulesPart(QTextStream& t)
}
}
-void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile)
+void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile, DeploymentList &depList)
{
// Read user defined bld inf rules
@@ -1300,6 +1301,25 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
t << item << endl;
userBldInfRules.remove(BLD_INF_TAG_EXTENSIONS);
+ t << endl << BLD_INF_TAG_EXPORTS << endl << endl;
+
+ // Generate export rules
+
+ // Export any deployed plugin stubs under /epoc32/data/z to support ROM builds
+ for (int i = 0; i < depList.size(); ++i) {
+ int index = depList.at(i).from.indexOf(PLUGIN_STUB_DIR);
+ if (index != -1) {
+ t << QString("%1 /epoc32/data/z%2")
+ .arg(QString(depList.at(i).from).mid(index).replace('\\','/'))
+ .arg(QString(depList.at(i).to).mid(2).replace('\\','/')) << endl;
+ }
+ }
+
+ userItems = userBldInfRules.value(BLD_INF_TAG_EXPORTS);
+ foreach(QString item, userItems)
+ t << item << endl;
+ userBldInfRules.remove(BLD_INF_TAG_EXPORTS);
+
// Add rest of the user defined content
for (QMap<QString, QStringList>::iterator it = userBldInfRules.begin(); it != userBldInfRules.end(); ++it) {
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 45209d1..77d61da 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -42,6 +42,7 @@
#ifndef SYMMAKEFILE_H
#define SYMMAKEFILE_H
+#include "initprojectdeploy_symbian.h"
#include <makefile.h>
QT_BEGIN_NAMESPACE
@@ -86,7 +87,7 @@ protected:
QString canonizePath(const QString& origPath);
virtual bool writeMakefile(QTextStream &t);
- void generatePkgFile(const QString &iconFile);
+ void generatePkgFile(const QString &iconFile, DeploymentList &depList);
bool containsStartWithItem(const QChar &c, const QStringList& src);
virtual void init();
@@ -106,7 +107,7 @@ protected:
QString &checkString);
void writeHeader(QTextStream &t);
- void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile);
+ void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile, DeploymentList &depList);
static bool removeDuplicatedStrings(QStringList& stringList);
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 2ad6112..c2e033e 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -79,7 +79,7 @@ enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST
E_SPRINTF, E_JOIN, E_SPLIT, E_BASENAME, E_DIRNAME, E_SECTION,
E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND,
E_UPPER, E_LOWER, E_FILES, E_PROMPT, E_RE_ESCAPE, E_REPLACE,
- E_SIZE };
+ E_SIZE, E_GENERATE_UID };
QMap<QString, ExpandFunc> qmake_expandFunctions()
{
static QMap<QString, ExpandFunc> *qmake_expand_functions = 0;
@@ -111,6 +111,7 @@ QMap<QString, ExpandFunc> qmake_expandFunctions()
qmake_expand_functions->insert("prompt", E_PROMPT);
qmake_expand_functions->insert("replace", E_REPLACE);
qmake_expand_functions->insert("size", E_SIZE);
+ qmake_expand_functions->insert("generate_uid", E_GENERATE_UID);
}
return *qmake_expand_functions;
}
@@ -1864,6 +1865,9 @@ QMakeProject::doProjectExpand(QString func, QStringList args,
return doProjectExpand(func, args_list, place);
}
+// defined in symbian generator
+extern QString generate_test_uid(const QString& target);
+
QStringList
QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
QMap<QString, QStringList> &place)
@@ -2301,6 +2305,14 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
ret += QString::number(size);
}
break; }
+ case E_GENERATE_UID:
+ if (args.count() != 1) {
+ fprintf(stderr, "%s:%d: generate_uid(var) requires one argument.\n",
+ parser.file.toLatin1().constData(), parser.line_no);
+ } else {
+ ret += generate_test_uid(args.first());
+ }
+ break;
default: {
fprintf(stderr, "%s:%d: Unknown replace function: %s\n",
parser.file.toLatin1().constData(), parser.line_no,