/// <summary>
		/// Construct a compile task
		/// </summary>
		/// <param name="Parameters">Parameters for this task</param>
		public CompileTask(CompileTaskParameters Parameters)
		{
			UE4Build.BuildTarget Target = new UE4Build.BuildTarget { TargetName = Parameters.Target, Platform = Parameters.Platform, Config = Parameters.Configuration, UBTArgs = "-nobuilduht " + (Parameters.Arguments ?? "") };
			if(!String.IsNullOrEmpty(Parameters.Tag))
			{
				TargetToTagName.Add(Target, Parameters.Tag);
			}
			Targets.Add(Target);
		}
Esempio n. 2
0
 /// <summary>
 /// Construct a compile task
 /// </summary>
 /// <param name="Parameters">Parameters for this task</param>
 public CompileTask(CompileTaskParameters Parameters)
 {
     UE4Build.BuildTarget Target = new UE4Build.BuildTarget {
         TargetName = Parameters.Target, Platform = Parameters.Platform, Config = Parameters.Configuration, UBTArgs = "-nobuilduht " + (Parameters.Arguments ?? "")
     };
     if (!String.IsNullOrEmpty(Parameters.Tag))
     {
         TargetToTagName.Add(Target, Parameters.Tag);
     }
     Targets.Add(Target);
 }
Esempio n. 3
0
        /// <summary>
        /// Output this task out to an XML writer.
        /// </summary>
        public override void Write(XmlWriter Writer)
        {
            foreach (UE4Build.BuildTarget Target in Targets)
            {
                CompileTaskParameters Parameters = new CompileTaskParameters();
                Parameters.Target        = Target.TargetName;
                Parameters.Platform      = Target.Platform;
                Parameters.Configuration = Target.Config;
                Parameters.Arguments     = Target.UBTArgs;

                string TagName;
                if (TargetToTagName.TryGetValue(Target, out TagName))
                {
                    Parameters.Tag = TagName;
                }

                Write(Writer, Parameters);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Adds another task to this executor
        /// </summary>
        /// <param name="Task">Task to add</param>
        /// <returns>True if the task could be added, false otherwise</returns>
        public bool Add(CustomTask Task)
        {
            CompileTask CompileTask = Task as CompileTask;

            if (CompileTask == null)
            {
                return(false);
            }

            CompileTaskParameters Parameters = CompileTask.Parameters;

            UE4Build.BuildTarget Target = new UE4Build.BuildTarget {
                TargetName = Parameters.Target, Platform = Parameters.Platform, Config = Parameters.Configuration, UBTArgs = "-nobuilduht " + (Parameters.Arguments ?? "")
            };
            if (!String.IsNullOrEmpty(Parameters.Tag))
            {
                TargetToTagName.Add(Target, Parameters.Tag);
            }
            Targets.Add(Target);

            return(true);
        }
        /// <summary>
        /// Adds another task to this executor
        /// </summary>
        /// <param name="Task">Task to add</param>
        /// <returns>True if the task could be added, false otherwise</returns>
        public bool Add(CustomTask Task)
        {
            CompileTask CompileTask = Task as CompileTask;

            if (CompileTask == null)
            {
                return(false);
            }

            if (Targets.Count > 0)
            {
                if (bAllowXGE != CompileTask.Parameters.AllowXGE)
                {
                    return(false);
                }
                if (!bAllowParallelExecutor || !CompileTask.Parameters.AllowParallelExecutor)
                {
                    return(false);
                }
            }

            CompileTaskParameters Parameters = CompileTask.Parameters;

            bAllowXGE &= Parameters.AllowXGE;
            bAllowParallelExecutor &= Parameters.AllowParallelExecutor;

            UE4Build.BuildTarget Target = new UE4Build.BuildTarget {
                TargetName = Parameters.Target, Platform = Parameters.Platform, Config = Parameters.Configuration, UBTArgs = "-nobuilduht " + (Parameters.Arguments ?? "")
            };
            if (!String.IsNullOrEmpty(Parameters.Tag))
            {
                TargetToTagName.Add(Target, Parameters.Tag);
            }
            Targets.Add(Target);

            return(true);
        }
		/// <summary>
		/// Output this task out to an XML writer.
		/// </summary>
		public override void Write(XmlWriter Writer)
		{
			foreach (UE4Build.BuildTarget Target in Targets)
			{
				CompileTaskParameters Parameters = new CompileTaskParameters();
				Parameters.Target = Target.TargetName;
				Parameters.Platform = Target.Platform;
				Parameters.Configuration = Target.Config;
				Parameters.Arguments = Target.UBTArgs;

				string TagName;
				if (TargetToTagName.TryGetValue(Target, out TagName))
				{
					Parameters.Tag = TagName;
				}

				Write(Writer, Parameters);
			}
		}
 /// <summary>
 /// Construct a compile task
 /// </summary>
 /// <param name="Parameters">Parameters for this task</param>
 public CompileTask(CompileTaskParameters Parameters)
 {
     this.Parameters = Parameters;
 }