Fixed: XCodeCapp adding duplicate files to Xcode project

Previously, XCC would indiscriminately add files to the Xcode project via the pbxprojModifier.py script. This resulted in duplicate references to a file.

This fix adds a check to see if the file is already included in the project's sourceGroup folder, and will return None if it is.

Fixes #1866
This commit is contained in:
Andrew Hankinson
2013-03-22 09:44:02 -04:00
parent 31c06771f3
commit 5c3adfda29
+3
View File
@@ -22,6 +22,9 @@ def update_general_include(project, projectBaseURL):
def add_file(project, shadowGroup, sourceGroup, shadowHeaderPath, shadowImplementationFilePath, sourcePath, projectBaseURL):
project.add_file(shadowHeaderPath, parent=shadowGroup)
project.add_file(shadowImplementationFilePath, parent=shadowGroup)
if sourcePath in project.get_files_by_os_path(os.path.relpath(sourcePath, projectBaseURL)):
return
project.add_file(sourcePath, parent=sourceGroup)
def remove_file(project, shadowGroup, sourceGroup, shadowHeaderPath, shadowImplementationFilePath, sourcePath, projectBaseURL):