Mac: Remove invalid bundle identifier characters
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>
Mon, 10 Aug 2015 09:41:54 +0000 (11:41 +0200)
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>
Tue, 18 Aug 2015 13:34:58 +0000 (13:34 +0000)
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 <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
qmake/generators/unix/unixmake2.cpp

index 8d841dfd82a891268b2c0180ef32a20ffdc34dbe..e4973157cd5b56ab67f0971edaffa225f5e850c2 100644 (file)
@@ -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) {