From 4738b450d26b6cdaed6f9f11f0dc22b842c124df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 10 Aug 2015 11:41:54 +0200 Subject: [PATCH] Mac: Remove invalid bundle identifier characters Valid characters are (A-Z,a-z,0-9,-,.). It is unlikely that we will see anything more exotic than '_' in bundle/library names, go ahead and replace that character only. Task-number: QTBUG-46824 Change-Id: Ia97b7cd6247f40a970b4919363ffb66fb347186c Reviewed-by: Oswald Buddenhagen Reviewed-by: Timur Pocheptsov --- qmake/generators/unix/unixmake2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 8d841dfd82..e4973157cd 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -840,6 +840,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) bundleIdentifier.chop(4); if (bundleIdentifier.endsWith(".framework")) bundleIdentifier.chop(10); + // replace invalid bundle id characters + bundleIdentifier.replace('_', '-'); commonSedArgs << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" "; if (isApp) {