コード例 #1
0
        void FileRefsRemove(string guid)
        {
            PBXFileReference fileRef = fileRefs[guid];

            fileRefs.RemoveEntry(guid);
            m_ProjectPathToFileRefMap.Remove(m_FileRefGuidToProjectPathMap[guid]);
            m_FileRefGuidToProjectPathMap.Remove(guid);
            foreach (var tree in FileTypeUtils.AllSourceTrees())
            {
                m_RealPathToFileRefMap[tree].Remove(fileRef.path);
            }
            m_GuidToParentGroupMap.Remove(guid);
        }
コード例 #2
0
        public string FindFileGuidByRealPath(string path)
        {
            path = FixSlashesInPath(path);

            foreach (var tree in FileTypeUtils.AllSourceTrees())
            {
                string res = FindFileGuidByRealPath(path, tree);
                if (res != null)
                {
                    return(res);
                }
            }
            return(null);
        }
コード例 #3
0
        void Clear()
        {
            m_Section = new Dictionary <string, SectionBase>
            {
                { "PBXBuildFile", new PBXBuildFileSection("PBXBuildFile") },
                { "PBXFileReference", new PBXFileReferenceSection("PBXFileReference") },
                { "PBXGroup", new PBXGroupSection("PBXGroup") },
                { "PBXContainerItemProxy", new PBXContainerItemProxySection("PBXContainerItemProxy") },
                { "PBXReferenceProxy", new PBXReferenceProxySection("PBXReferenceProxy") },
                { "PBXSourcesBuildPhase", new PBXSourcesBuildPhaseSection("PBXSourcesBuildPhase") },
                { "PBXFrameworksBuildPhase", new PBXFrameworksBuildPhaseSection("PBXFrameworksBuildPhase") },
                { "PBXResourcesBuildPhase", new PBXResourcesBuildPhaseSection("PBXResourcesBuildPhase") },
                { "PBXCopyFilesBuildPhase", new PBXCopyFilesBuildPhaseSection("PBXCopyFilesBuildPhase") },
                { "PBXShellScriptBuildPhase", new PBXShellScriptBuildPhaseSection("PBXShellScriptBuildPhase") },
                { "PBXNativeTarget", new PBXNativeTargetSection("PBXNativeTarget") },
                { "PBXTargetDependency", new PBXTargetDependencySection("PBXTargetDependency") },
                { "PBXVariantGroup", new PBXVariantGroupSection("PBXVariantGroup") },
                { "XCBuildConfiguration", new XCBuildConfigurationSection("XCBuildConfiguration") },
                { "XCConfigurationList", new XCConfigurationListSection("XCConfigurationList") },

                { "PBXProject", new PBXProjectSection() },
            };
            m_Header       = new List <string>();
            m_Footer       = new List <string>();
            m_SectionOrder = new List <string> {
                "PBXBuildFile", "PBXContainerItemProxy", "PBXCopyFilesBuildPhase", "PBXFileReference",
                "PBXFrameworksBuildPhase", "PBXGroup", "PBXNativeTarget", "PBXProject", "PBXReferenceProxy",
                "PBXResourcesBuildPhase", "PBXShellScriptBuildPhase", "PBXSourcesBuildPhase", "PBXTargetDependency",
                "PBXVariantGroup", "XCBuildConfiguration", "XCConfigurationList"
            };
            m_FileGuidToBuildFileMap      = new Dictionary <string, Dictionary <string, PBXBuildFile> >();
            m_ProjectPathToFileRefMap     = new Dictionary <string, PBXFileReference>();
            m_FileRefGuidToProjectPathMap = new Dictionary <string, string>();
            m_RealPathToFileRefMap        = new Dictionary <PBXSourceTree, Dictionary <string, PBXFileReference> >();
            foreach (var tree in FileTypeUtils.AllSourceTrees())
            {
                m_RealPathToFileRefMap.Add(tree, new Dictionary <string, PBXFileReference>());
            }
            m_ProjectPathToGroupMap     = new Dictionary <string, PBXGroup>();
            m_GroupGuidToProjectPathMap = new Dictionary <string, string>();
            m_GuidToParentGroupMap      = new Dictionary <string, PBXGroup>();
        }