summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-09-25 20:32:18 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-10-01 10:56:59 +0200
commitbd8c18cca5cd7f4c9901edb5f70752005b3fac9a (patch)
tree461e3ae0af3bf38bc029524f48514b7e60b24265
parent9cd9dfb0b1203c1c00356f5fdd7905888b6f7021 (diff)
fix Info.plist location in framework bundles
According to Apple's documentation [1], framework bundles don't have a 'Contents' folder. Instead, each version folder gets a 'Resources' folder which contains the Info.plist file, and which is also symlinked at the top-level framework folder. [1]: https://developer.apple.com/library/mac/documentation/macosx/conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html Task-number: QTBUG-32895 Change-Id: I5e55cc097b179012add0ceb7c567dace8e282895 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r--qmake/generators/unix/unixmake2.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 27ffb9f40d..8bc5b00fd9 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -739,7 +739,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
info_plist.toLatin1().constData());
break;
}
- QString info_plist_out = escapeFilePath(bundle_dir + "Contents/Info.plist");
+ bool isApp = (project->first("TEMPLATE") == "app");
+ QString info_plist_out = escapeFilePath(
+ bundle_dir + (isApp ? "Contents/Info.plist"
+ : "Versions/" + project->first("QMAKE_FRAMEWORK_VERSION")
+ + "/Resources/Info.plist"));
bundledFiles << info_plist_out;
alldeps << info_plist_out;
QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
@@ -756,7 +760,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
}
commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
- if (project->first("TEMPLATE") == "app") {
+ if (isApp) {
QString icon = fileFixify(var("ICON"));
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
if (bundlePrefix.isEmpty())
@@ -788,6 +792,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl;
}
} else {
+ symlinks[bundle_dir + "Resources"] = "Versions/Current/Resources";
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
<< "@sed ";
foreach (const ProString &arg, commonSedArgs)