(self, path, settings=None)
| 1953 | self._AddBuildFileToDicts(pbxbuildfile, path) |
| 1954 | |
| 1955 | def AddFile(self, path, settings=None): |
| 1956 | (file_group, hierarchical) = self.FileGroup(path) |
| 1957 | file_ref = file_group.AddOrGetFileByPath(path, hierarchical) |
| 1958 | |
| 1959 | if file_ref in self._files_by_xcfilelikeelement and isinstance( |
| 1960 | file_ref, PBXVariantGroup |
| 1961 | ): |
| 1962 | # There's already a PBXBuildFile in this phase corresponding to the |
| 1963 | # PBXVariantGroup. path just provides a new variant that belongs to |
| 1964 | # the group. Add the path to the dict. |
| 1965 | pbxbuildfile = self._files_by_xcfilelikeelement[file_ref] |
| 1966 | self._AddBuildFileToDicts(pbxbuildfile, path) |
| 1967 | else: |
| 1968 | # Add a new PBXBuildFile to get file_ref into the phase. |
| 1969 | if settings is None: |
| 1970 | pbxbuildfile = PBXBuildFile({"fileRef": file_ref}) |
| 1971 | else: |
| 1972 | pbxbuildfile = PBXBuildFile({"fileRef": file_ref, "settings": settings}) |
| 1973 | self.AppendBuildFile(pbxbuildfile, path) |
| 1974 | |
| 1975 | |
| 1976 | class PBXHeadersBuildPhase(XCBuildPhase): |
no test coverage detected