]> git.saurik.com Git - wxWidgets.git/commitdiff
Make Xcode identifier consecutive when there is a collision.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 15 Sep 2010 11:29:07 +0000 (11:29 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 15 Sep 2010 11:29:07 +0000 (11:29 +0000)
Making them consecutive groups source files that are repeated next to each other in the project file like Xcode does, instead of creating a complete new random identifier which resulted in creating a distance between the source files after they were sorted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/osx/fix_xcode_ids.py

index 0bbfad9ba45985a433e5b6ac3fa280da732a2d4f..7e3a22413fd24a5f812c75c901a98a305b9143c8 100755 (executable)
@@ -56,12 +56,11 @@ def toUuid(name):
 for s in dict:
     # s[0] is the original ID, s[1] is the name
     newId = toUuid(s[1])
-    num = 0
     # Some names can appear twice or even more (depending on number of
     # targets), make them unique
     while newId in idDict.values() :
-        num = num + 1
-        newId = toUuid(s[1] + str(num))
+        # [2:-1] to skip prepended 0x and trailing L
+        newId = hex(int(newId, 16) + 1)[2:-1].upper()
  
     assert(not s[0] in idDict)
     idDict[s[0]] = newId