From 9857da723dc9e7795b84de106d8bfb6ef9456090 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Fri, 23 May 2014 11:02:08 +0200 Subject: [PATCH] Remove the need for the dot in OS X/iOS bundle prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- qmake/generators/unix/unixmake2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index d1e363626d8..cc375f5c46a 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -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"