Пример #1
0
        public void AddEmbeddedFramework(string path)
        {
            path = ProjectUtil.MakePathRelativeToProject(path);

            if (_entries.FindIndex(o => o.Path == path) < 0)
            {
                BaseFileEntry entry    = null;
                var           fileType = PBXFileTypeHelper.FileTypeFromFileName(path);

                if (PBXFileTypeHelper.IsFramework(fileType))
                {
                    entry = FileAndFolderEntryFactory.CreateFrameworkEntry(path, AddMethod.Copy, LinkType.Required, true);

                    if (entry == null)
                    {
                        Debug.LogError("EgoXproject: Could not add file. Either it does not exist or is on Ignore List: " + path);
                    }
                    else
                    {
                        _entries.Add(entry);
                    }
                }
                else
                {
                    Debug.LogWarning("EgoXproject: File is not a Framework type. Skipping: " + path);
                }
            }
        }
Пример #2
0
        public void AddFrameworkOrLibrary(string path, AddMethod addMethod, LinkType linkType)
        {
            path = ProjectUtil.MakePathRelativeToProject(path);

            if (_entries.FindIndex(o => o.Path == path) < 0)
            {
                BaseFileEntry entry    = null;
                var           fileType = PBXFileTypeHelper.FileTypeFromFileName(path);

                if (PBXFileTypeHelper.IsFrameworkOrLibrary(fileType))
                {
                    entry = FileAndFolderEntryFactory.CreateFrameworkEntry(path, addMethod, linkType, false);
                }
                else
                {
                    Debug.LogWarning("EgoXproject: File is not a known Framework or library file type. Adding as a regular file: " + path);
                    entry = FileAndFolderEntryFactory.Create(path, addMethod);
                }

                if (entry == null)
                {
                    Debug.LogError("EgoXproject: Could not add file. Either it does not exist or is on Ignore List: " + path);
                }
                else
                {
                    _entries.Add(entry);
                }
            }
        }
Пример #3
0
        public void AddSourceFile(string path, AddMethod addMethod, string compilerFlags = "")
        {
            path = ProjectUtil.MakePathRelativeToProject(path);

            if (_entries.FindIndex(o => o.Path == path) < 0)
            {
                BaseFileEntry entry    = null;
                var           fileType = PBXFileTypeHelper.FileTypeFromFileName(path);

                if (PBXFileTypeHelper.IsSourceCodeFile(fileType))
                {
                    entry = FileAndFolderEntryFactory.CreateSourceEntry(path, addMethod, compilerFlags);
                }
                else
                {
                    Debug.LogWarning("EgoXproject: File is not a known source file type. Adding as a regular file: " + path);
                    entry = FileAndFolderEntryFactory.Create(path, addMethod);
                }

                if (entry == null)
                {
                    Debug.LogError("EgoXproject: Could not add file. Either it does not exist or is on Ignore List: " + path);
                }
                else
                {
                    _entries.Add(entry);
                }
            }
        }
Пример #4
0
        //Upgrader use only
        public void Upgrader_AddEntry(BaseFileEntry entry)
        {
            if (entry == null)
            {
                return;
            }

            if (_entries.FindIndex(o => o.Path == entry.Path) < 0)
            {
                _entries.Add(entry);
            }
        }
Пример #5
0
        void AddEntry(BaseFileEntry entry)
        {
            if (entry == null)
            {
                return;
            }

            if (_entries.FindIndex(o => o.Path == entry.Path) >= 0)
            {
                return;
            }

            entry.Add = Add;
            _entries.Add(entry);
        }
Пример #6
0
 public void Remove(BaseFileEntry entry)
 {
     _entries.Remove(entry);
 }