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>
This commit is contained in:
parent
9cd9dfb0b1
commit
bd8c18cca5
@ -739,7 +739,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
info_plist.toLatin1().constData());
|
info_plist.toLatin1().constData());
|
||||||
break;
|
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;
|
bundledFiles << info_plist_out;
|
||||||
alldeps << info_plist_out;
|
alldeps << info_plist_out;
|
||||||
QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
|
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") ?
|
commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
|
||||||
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
|
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
|
||||||
if (project->first("TEMPLATE") == "app") {
|
if (isApp) {
|
||||||
QString icon = fileFixify(var("ICON"));
|
QString icon = fileFixify(var("ICON"));
|
||||||
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
|
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
|
||||||
if (bundlePrefix.isEmpty())
|
if (bundlePrefix.isEmpty())
|
||||||
@ -788,6 +792,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
<< "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl;
|
<< "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
symlinks[bundle_dir + "Resources"] = "Versions/Current/Resources";
|
||||||
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
|
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
|
||||||
<< "@sed ";
|
<< "@sed ";
|
||||||
foreach (const ProString &arg, commonSedArgs)
|
foreach (const ProString &arg, commonSedArgs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user