summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-10-05 14:20:29 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-08 09:51:39 (GMT)
commitf6d645b54dd11ac8d12da12751a88e831e3f3415 (patch)
tree2a408424e562c2b097ff07a8b2006b89d1da8951 /qmake/generators
parent70770a2e4fc7581f56a39f7b8b89dd5782cd29c0 (diff)
downloadQt-f6d645b54dd11ac8d12da12751a88e831e3f3415.zip
Qt-f6d645b54dd11ac8d12da12751a88e831e3f3415.tar.gz
Qt-f6d645b54dd11ac8d12da12751a88e831e3f3415.tar.bz2
Added .flags modifier support for DEPLOYMENT items in Symbian
The .flags modifier can be used to specify pkg flags for files. For example, to make default application run after install: default_bin_deployment.flags += FR RI For example, to show a note at installation time: notedep.sources = install_note.txt notedep.flags = FT TC DEPLOYMENT += notedep See Symbian package file format documentation for exact supported flag values. Cherry picked to 4.7 branch from master branch as part of QTBUG-15068, original commit: 50b2477e6ffd64a0730cc5c0f0a6190b1a6b5861 Task-number: QTBUG-15068 Task-number: QTBUG-13367 Reviewed-by: Janne Anttila
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp20
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.h6
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp20
3 files changed, 37 insertions, 9 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 5963773..22a4a82 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -253,6 +253,8 @@ void initProjectDeploySymbian(QMakeProject* project,
continue;
}
+ QStringList flags = project->values(item + ".flags");
+
foreach(QString source, project->values(item + ".sources")) {
source = Option::fixPathToLocalOS(source);
QString nameFilter;
@@ -284,13 +286,15 @@ void initProjectDeploySymbian(QMakeProject* project,
Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(),
false, true),
fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/")
- + info.fileName())));
+ + info.fileName()),
+ flags));
} else {
deploymentList.append(CopyItem(
Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(),
false, true),
fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/")
- + info.fileName())));
+ + info.fileName()),
+ flags));
}
}
if (isPlugin(info, devicePath)) {
@@ -301,7 +305,8 @@ void initProjectDeploySymbian(QMakeProject* project,
// Generate deployment even if file doesn't exist, as this may be the case
// when generating .pkg files.
deploymentList.append(CopyItem(Option::fixPathToLocalOS(info.absoluteFilePath()),
- fixPathToEpocOS(devicePath + "/" + info.fileName())));
+ fixPathToEpocOS(devicePath + "/" + info.fileName()),
+ flags));
continue;
}
}
@@ -328,12 +333,14 @@ void initProjectDeploySymbian(QMakeProject* project,
deploymentList.append(CopyItem(
Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/")
- + iterator.fileName())));
+ + iterator.fileName()),
+ flags));
} else {
deploymentList.append(CopyItem(
Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/")
- + iterator.fileName())));
+ + iterator.fileName()),
+ flags));
}
}
createPluginStub(info, devicePath + "/" + absoluteItemPath.right(diffSize),
@@ -343,7 +350,8 @@ void initProjectDeploySymbian(QMakeProject* project,
deploymentList.append(CopyItem(
Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
fixPathToEpocOS(devicePath + "/" + absoluteItemPath.right(diffSize)
- + "/" + iterator.fileName())));
+ + "/" + iterator.fileName()),
+ flags));
}
}
}
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h
index 2653d2a..bc17b04 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.h
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.h
@@ -56,9 +56,13 @@
struct CopyItem
{
- CopyItem(const QString& f, const QString& t) : from(f) , to(t) { }
+ CopyItem(const QString& f, const QString& t)
+ : from(f) , to(t) { }
+ CopyItem(const QString& f, const QString& t, const QStringList& l)
+ : from(f) , to(t), flags(l) { }
QString from;
QString to;
+ QStringList flags;
};
typedef QList<CopyItem> DeploymentList;
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index c0a6626..5e8bc4a 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -397,6 +397,15 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
for (int i = 0; i < depList.size(); ++i) {
QString from = depList.at(i).from;
QString to = depList.at(i).to;
+ QString flags;
+ bool showOnlyFile = false;
+ foreach(QString flag, depList.at(i).flags) {
+ if (flag == QLatin1String("FT")
+ || flag == QLatin1String("FILETEXT")) {
+ showOnlyFile = true;
+ }
+ flags.append(QLatin1Char(',')).append(flag);
+ }
if (epocBuild) {
// Deploy anything not already deployed from under epoc32 instead from under
@@ -410,8 +419,15 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
}
}
- t << QString("\"%1\" - \"%2\"").arg(from.replace('\\','/')).arg(to) << endl;
- ts << QString("\"\" - \"%1\"").arg(romPath(to)) << endl;
+ // Files with "FILETEXT"/"FT" flag are meant for showing only at installation time
+ // and therefore do not belong to the stub package and will not install the file into phone.
+ if (showOnlyFile)
+ to.clear();
+ else
+ ts << QString("\"\" - \"%1\"").arg(romPath(to)) << endl;
+
+ t << QString("\"%1\" - \"%2\"%3").arg(from.replace('\\','/')).arg(to).arg(flags) << endl;
+
}
t << endl;
ts << endl;