Пример #1
0
 appendFrameworksBuildPhase(
     FrameworksBuildPhase phase)
 {
     lock (this.FrameworksBuildPhases)
     {
         this.FrameworksBuildPhases.Add(phase);
     }
 }
Пример #2
0
 EnsureFrameworksBuildPhaseExists()
 {
     lock (this)
     {
         if (null != this.FrameworksBuildPhase)
         {
             return;
         }
         var frameworks = new FrameworksBuildPhase();
         this.Project.FrameworksBuildPhases.Add(frameworks);
         this.BuildPhases.Add(frameworks);
         this.FrameworksBuildPhase = frameworks;
     }
 }
Пример #3
0
 private void EnsureFrameworksBuildPhaseExists()
 {
     lock (this)
     {
         if (null != this.FrameworksBuildPhase)
         {
             return;
         }
         var frameworks = new FrameworksBuildPhase();
         this.Project.FrameworksBuildPhases.Add(frameworks);
         this.BuildPhases.Add(frameworks);
         this.FrameworksBuildPhase = frameworks;
     }
 }
Пример #4
0
        public Target(
            Bam.Core.Module module,
            Project project)
            :
            base(project, module.GetType().Name, "PBXNativeTarget", project.GUID)
        {
            this.Module = module;
            this.Type   = EProductType.NA;

            var configList = new ConfigurationList(this);

            this.ConfigurationList = configList;
            project.appendConfigurationList(configList);

            this.TargetDependencies         = new Bam.Core.Array <TargetDependency>();
            this.ProposedTargetDependencies = new Bam.Core.Array <Target>();

            this.BuildPhases       = new System.Lazy <Bam.Core.Array <BuildPhase> >(() => new Bam.Core.Array <BuildPhase>());
            this.SourcesBuildPhase = new System.Lazy <SourcesBuildPhase>(() =>
            {
                var phase = new SourcesBuildPhase(this);
                this.appendBuildPhase(phase);
                this.Project.appendSourcesBuildPhase(phase);
                return(phase);
            });
            this.FrameworksBuildPhase = new System.Lazy <XcodeBuilder.FrameworksBuildPhase>(() =>
            {
                var phase = new FrameworksBuildPhase(this);
                this.Project.appendFrameworksBuildPhase(phase);
                this.appendBuildPhase(phase);
                return(phase);
            });
            this.PreBuildBuildPhase = new System.Lazy <ShellScriptBuildPhase>(() =>
            {
                return(new ShellScriptBuildPhase(this, "Pre Build", (target) =>
                {
                    var content = new System.Text.StringBuilder();
                    foreach (var config in target.ConfigurationList)
                    {
                        content.AppendFormat("if [ \\\"$CONFIGURATION\\\" = \\\"{0}\\\" ]; then\\n\\n", config.Name);
                        config.SerializePreBuildCommands(content, 1);
                        content.AppendFormat("fi\\n\\n");
                    }
                    return content.ToString();
                }));
            });
            this.PostBuildBuildPhase = new System.Lazy <ShellScriptBuildPhase>(() =>
            {
                return(new ShellScriptBuildPhase(this, "Post Build", (target) =>
                {
                    var content = new System.Text.StringBuilder();
                    foreach (var config in target.ConfigurationList)
                    {
                        content.AppendFormat("if [ \\\"$CONFIGURATION\\\" = \\\"{0}\\\" ]; then\\n\\n", config.Name);
                        config.SerializePostBuildCommands(content, 1);
                        content.AppendFormat("fi\\n\\n");
                    }
                    return content.ToString();
                }));
            });
        }