コード例 #1
0
        PBXBuildFile AddFile(string path, string tree, PBXGroup grp)
        {
            var fileref   = new PBXFileReference(path, tree);
            var buildfile = new PBXBuildFile(fileref);

            files.Add(fileref);
            grp.AddChild(fileref);
            sources.Add(buildfile);

            return(buildfile);
        }
コード例 #2
0
        public void AddResource(string path, PBXGroup grp = null)
        {
            string       dir = Path.GetDirectoryName(path);
            PBXBuildFile buildFile;

            if (dir.EndsWith(".lproj"))
            {
                string          name    = Path.GetFileName(path);
                PBXVariantGroup variant = GetGroup(name) as PBXVariantGroup;

                if (variant == null)
                {
                    variant = new PBXVariantGroup(name);
                    groups.Add(variant);

                    if (grp == null)
                    {
                        projectGroup.AddChild(variant);
                    }
                    else
                    {
                        grp.AddChild(variant);
                    }

                    buildFile = new PBXBuildFile(variant);
                    resourcesBuildPhase.AddResource(buildFile);
                }

                string lang = dir.Substring(0, dir.LastIndexOf('.'));
                project.KnownRegions.Add(lang);

                var fileref = new PBXFileReference(path, "\"<group>\"");
                variant.AddChild(fileref);
                files.Add(fileref);
            }
            else
            {
                if (grp == null)
                {
                    grp = CreateGroupFromPath(path);
                }

                buildFile = AddFile(path, "\"<group>\"", grp);
                resourcesBuildPhase.AddResource(buildFile);
            }
        }
コード例 #3
0
        PBXBuildFile AddFile(string path, string tree, PBXGroup grp = null)
        {
            var fileref   = new PBXFileReference(path, tree);
            var buildfile = new PBXBuildFile(fileref);

            files.Add(fileref);
            sources.Add(buildfile);
            if (grp == null)
            {
                grp = projectGroup;

                var parts = path.Split(new [] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < parts.Length - 1; i++)
                {
                    grp = (PBXGroup)(grp.GetGroup(parts [i]) ?? AddGroup(grp, parts [i]));
                }
            }

            grp.AddChild(fileref);

            return(buildfile);
        }
コード例 #4
0
		PBXBuildFile AddFile (string name, string path, string tree, PBXGroup grp = null)
		{
			var fileref = new PBXFileReference (name, path, tree);
			var buildfile = new PBXBuildFile (fileref);

			files.Add (fileref);
			sources.Add (buildfile);
			(grp ?? this.rootGroup).AddChild (fileref);

			return buildfile;
		}
コード例 #5
0
		public void AddFramework (PBXBuildFile framework)
		{
			framework.BuildPhase = this;
			frameworks.Add (framework);
		}
コード例 #6
0
		public void AddSource (PBXBuildFile source)
		{
			source.BuildPhase = this;
			sources.Add (source);
		}
コード例 #7
0
 public void AddSource(PBXBuildFile source)
 {
     this.sources.Add(source);
 }
コード例 #8
0
		public void AddResource (string path, PBXGroup grp = null)
		{
			string dir = Path.GetDirectoryName (path);
			PBXBuildFile buildFile;
			
			if (dir.EndsWith (".lproj")) {
				string name = Path.GetFileName (path);
				PBXVariantGroup variant = GetGroup (name) as PBXVariantGroup;
				
				if (variant == null) {
					variant = new PBXVariantGroup (name);
					groups.Add (variant);
					
					if (grp == null)
						projectGroup.AddChild (variant);
					else
						grp.AddChild (variant);
					
					buildFile = new PBXBuildFile (variant);
					resourcesBuildPhase.AddResource (buildFile);
				}
				
				string lang = dir.Substring (0, dir.LastIndexOf ('.'));
				project.KnownRegions.Add (lang);
				
				var fileref = new PBXFileReference (path, "\"<group>\"");
				variant.AddChild (fileref);
				files.Add (fileref);
			} else {
				if (grp == null)
					grp = CreateGroupFromPath (path);
				
				buildFile = AddFile (path, "\"<group>\"", grp);
				resourcesBuildPhase.AddResource (buildFile);
			}
		}
コード例 #9
0
ファイル: XcodeProject.cs プロジェクト: nieve/monodevelop
		PBXBuildFile AddFile (string path, string tree, PBXGroup grp = null)
		{
			var fileref = new PBXFileReference (path, tree);
			var buildfile = new PBXBuildFile (fileref);

			files.Add (fileref);
			sources.Add (buildfile);
			if (grp == null) {
				grp = projectGroup;
				
				var parts = path.Split (new [] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
				for (int i = 0; i < parts.Length - 1; i ++)
					grp = (PBXGroup) (grp.GetGroup (parts [i]) ?? AddGroup (grp, parts [i]));
			}
			
			grp.AddChild (fileref);

			return buildfile;
		}
コード例 #10
0
		public void AddFramework (PBXBuildFile framework)
		{
			this.frameworks.Add (framework);
		}
コード例 #11
0
		public void AddResource (PBXBuildFile resource)
		{
			this.resources.Add (resource);
		}
コード例 #12
0
		public void AddSource (PBXBuildFile source)
		{
			this.sources.Add (source);
		}
コード例 #13
0
 public void AddSource(PBXBuildFile source)
 {
     source.BuildPhase = this;
     sources.Add(source);
 }
コード例 #14
0
 public void AddResource(PBXBuildFile resource)
 {
     this.resources.Add(resource);
 }
コード例 #15
0
		public void AddResource (PBXBuildFile resource)
		{
			resource.BuildPhase = this;
			resources.Add (resource);
		}
コード例 #16
0
 public void AddResource(PBXBuildFile resource)
 {
     resource.BuildPhase = this;
     resources.Add(resource);
 }
コード例 #17
0
 public void AddFramework(PBXBuildFile framework)
 {
     framework.BuildPhase = this;
     frameworks.Add(framework);
 }
コード例 #18
0
ファイル: XcodeProject.cs プロジェクト: yayanyang/monodevelop
		PBXBuildFile AddFile (string name, string path, string tree)
		{
			var fileref = new PBXFileReference (name, path, tree);
			var buildfile = new PBXBuildFile (fileref);

			files.Add (fileref);
			sources.Add (buildfile);
			group.AddChild (fileref);

			return buildfile;
		}
コード例 #19
0
 public void AddFramework(PBXBuildFile framework)
 {
     this.frameworks.Add(framework);
 }