Remove the need for the dot in OS X/iOS bundle prefix

This patch removes the need for the user to put a dot at the end of the
bundle prefix which makes it's use more consistent and intuitive.

The prefix is based on what Xcode calls the "Company Identifier",
basically "com.digia" plus the product name. Changing that to
"com.digia.prefix-" and the product name to "Foo" results in a bundle
identifier of "com.digia.prefix-.Foo" which is in line with Xcode.

Change-Id: I9b62fc4dee1df51b523ce890a8896ea58ea2c62d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
Samuel Gaist 2014-05-23 11:02:08 +02:00 committed by The Qt Project
parent 3e38944118
commit 9857da723d

View File

@ -748,8 +748,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
QString icon = fileFixify(var("ICON"));
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
if (bundlePrefix.isEmpty())
bundlePrefix = "com.yourcompany.";
QString bundleIdentifier = bundlePrefix + var("QMAKE_BUNDLE");
bundlePrefix = "com.yourcompany";
if (bundlePrefix.endsWith("."))
bundlePrefix.chop(1);
QString bundleIdentifier = bundlePrefix + "." + var("QMAKE_BUNDLE");
if (bundleIdentifier.endsWith(".app"))
bundleIdentifier.chop(4);
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"