summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-12-05 15:48:14 +0100
committerChristian Kandeler <christian.kandeler@nokia.com>2011-12-05 16:34:54 +0100
commit0a59f347946a44583dc4f6271bbfa93b481d84dd (patch)
treec6b63d417199640ad56197b5f877330d847f713f
parent0bec54d1809affe75f8eaf21160e88b3ba983396 (diff)
downloadqt-creator-0a59f347946a44583dc4f6271bbfa93b481d84dd.tar.gz
Harmattan: Introduce new condition for auto-generation of manifest file.
In addition to using an empty file as in 2.3, the user can now also put a magic string at the start of the manifest file. This way, we can use this as the default while also documenting it in-place. Task-number: https://projects.maemo.org/bugzilla/show_bug.cgi?id=284797 Change-Id: I375a73a5d2e9d3e0973d97d81e0110e788d0159a Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
-rw-r--r--share/qtcreator/templates/shared/manifest.aegis6
-rw-r--r--src/plugins/madde/maemopackagecreationstep.cpp11
2 files changed, 7 insertions, 10 deletions
diff --git a/share/qtcreator/templates/shared/manifest.aegis b/share/qtcreator/templates/shared/manifest.aegis
index e584f96161..c0d0dd9c4c 100644
--- a/share/qtcreator/templates/shared/manifest.aegis
+++ b/share/qtcreator/templates/shared/manifest.aegis
@@ -1,3 +1,4 @@
+AutoGenerateAegisFile
<!-- Aegis manifest declares the security credentials required by an
application to run correctly. By default, a manifest file will be
created or updated automatically as a part of build.
@@ -9,9 +10,8 @@
To create a manifest file automatically as a part of build (DEFAULT):
- * You may leave this file as-is.
- * Do not list any '<credential name="token" />' entries
- outside of comments.
+ * Make sure this file starts with the string "AutoGenerateAegisFile" (without quotes).
+ * Alternatively, it can also be completely empty.
To provide a manifest yourself:
diff --git a/src/plugins/madde/maemopackagecreationstep.cpp b/src/plugins/madde/maemopackagecreationstep.cpp
index 25e22da4f4..f95a0789e0 100644
--- a/src/plugins/madde/maemopackagecreationstep.cpp
+++ b/src/plugins/madde/maemopackagecreationstep.cpp
@@ -370,14 +370,8 @@ bool MaemoDebianPackageCreationStep::copyDebianFiles(bool inSourceBuild)
foreach (const QString &fileName, files) {
const QString srcFile = templatesDirPath + QLatin1Char('/') + fileName;
QString newFileName = fileName;
- if (newFileName == Qt4HarmattanTarget::aegisManifestFileName()) {
- // If the user has touched the Aegis manifest file, we copy it for use
- // by MADDE. Otherwise the required capabilities will be auto-detected,
- // unless the user explicitly requests that no manifest should be created.
- if (QFileInfo(srcFile).size() == 0)
- continue;
+ if (newFileName == Qt4HarmattanTarget::aegisManifestFileName())
newFileName = maemoTarget()->packageName() + QLatin1String(".aegis");
- }
const QString destFile = debianDirPath + QLatin1Char('/') + newFileName;
if (fileName == QLatin1String("rules")) {
@@ -393,6 +387,9 @@ bool MaemoDebianPackageCreationStep::copyDebianFiles(bool inSourceBuild)
.arg(QDir::toNativeSeparators(srcFile), reader.errorString()));
return false;
}
+
+ if (reader.data().isEmpty() || reader.data().startsWith("AutoGenerateAegisFile"))
+ continue;
if (reader.data().startsWith("NoAegisFile")) {
QFile targetFile(destFile);
if (!targetFile.open(QIODevice::WriteOnly)) {