当前位置: 首页>>代码示例>>C#>>正文


C# UE4Build.AddUATFilesToBuildProducts方法代码示例

本文整理汇总了C#中AutomationTool.UE4Build.AddUATFilesToBuildProducts方法的典型用法代码示例。如果您正苦于以下问题:C# UE4Build.AddUATFilesToBuildProducts方法的具体用法?C# UE4Build.AddUATFilesToBuildProducts怎么用?C# UE4Build.AddUATFilesToBuildProducts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AutomationTool.UE4Build的用法示例。


在下文中一共展示了UE4Build.AddUATFilesToBuildProducts方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ExecuteBuild

	public override void ExecuteBuild()
	{
		// Get the output directory
		string TargetDir = ParseParamValue("TargetDir");
		if(TargetDir == null)
		{
			throw new AutomationException("Missing -Target argument to CopyUAT");
		}

		// Construct a dummy UE4Build object to get a list of the UAT and UBT build products
		UE4Build Build = new UE4Build(this);
		Build.AddUATFilesToBuildProducts();
		if(ParseParam("WithLauncher"))
		{
			Build.AddUATLauncherFilesToBuildProducts();
		}
		Build.AddUBTFilesToBuildProducts();

		// Get a list of all the input files
		List<string> FileNames = new List<string>(Build.BuildProductFiles);
		foreach(string FileName in Build.BuildProductFiles)
		{
			string SymbolFileName = Path.ChangeExtension(FileName, ".pdb");
			if(File.Exists(SymbolFileName))
			{
				FileNames.Add(SymbolFileName);
			}
		}

		// Copy all the files over
		foreach(string FileName in FileNames)
		{
			string TargetFileName = Utils.MakeRerootedFilePath(FileName, CommandUtils.CmdEnv.LocalRoot, TargetDir);
			Directory.CreateDirectory(Path.GetDirectoryName(TargetFileName));
			File.Copy(FileName, TargetFileName);
		}

		Log("Copied {0} files to {1}", FileNames.Count, TargetDir);
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:39,代码来源:CopyUAT.Automation.cs

示例2: ExecuteBuild

	public override void ExecuteBuild()
	{
		// get the project
		var UProjectFileName = ParseParamValue("Project");
		if (UProjectFileName == null)
		{
			throw new AutomationException("Project was not specified via the -project argument.");
		}

		// Get the list of targets
		var TargetList = ParseParamList("Target");
		if (TargetList == null)
		{
			throw new AutomationException("Target was not specified via the -target argument.");
		}

		// get the list of platforms
		var PlatformList = ParseParamList("TargetPlatforms", "Win64");
		List<UnrealTargetPlatform> TargetPlatforms = new List<UnrealTargetPlatform>();
		foreach(string Platform in PlatformList)
		{
			TargetPlatforms.Add((UnrealTargetPlatform)Enum.Parse(typeof(UnrealTargetPlatform), Platform, true));
		}

		// get the list configurations
		var ConfigList = ParseParamList("Config", "Development");
		List<UnrealTargetConfiguration> ConfigsToBuild = new List<UnrealTargetConfiguration>();
		foreach(string Config in ConfigList)
		{
			ConfigsToBuild.Add((UnrealTargetConfiguration)Enum.Parse(typeof(UnrealTargetConfiguration), Config, true));
		}

		// parse any extra parameters
		bool bClean = ParseParam("Clean");
		int WorkingCL = ParseParamInt("P4Change");

        FileReference UProjectFileReference = new FileReference( UProjectFileName);

		// add the targets to the agenda
		// verify the targets and add them to the agenda
		var Properties = ProjectUtils.GetProjectProperties(UProjectFileReference);
		UE4Build.BuildAgenda Agenda = new UE4Build.BuildAgenda();
		foreach (string Target in TargetList)
		{
			SingleTargetProperties TargetData;
			if (!Properties.Targets.TryGetValue((TargetRules.TargetType)Enum.Parse(typeof(TargetRules.TargetType), Target), out TargetData))
			{
				throw new AutomationException("Project does not support specified target: {0}", Target);
			}

			foreach (UnrealTargetPlatform TargetPlatform in TargetPlatforms)
			{
				if (TargetData.Rules.SupportsPlatform(TargetPlatform))
				{
                    List<UnrealTargetConfiguration> SupportedConfigurations = new List<UnrealTargetConfiguration>();
                    TargetData.Rules.GetSupportedConfigurations(ref SupportedConfigurations, true);

					foreach (UnrealTargetConfiguration TargetConfig in ConfigsToBuild)
					{
						if (SupportedConfigurations.Contains(TargetConfig))
						{
                            Agenda.AddTarget(TargetData.TargetName, TargetPlatform, TargetConfig, UProjectFileReference);
						}
						else
						{
							Log("{0} doesn't support the {1} configuration. It will not be built.", TargetData.TargetName, TargetConfig);
						}
					}
				}
				else
				{
					Log("{0} doesn't support the {1} platform. It will not be built.", TargetData.TargetName, TargetPlatform);
				}
			}
		}


		// build it
		UE4Build Build = new UE4Build(this);
		Build.Build(Agenda, InDeleteBuildProducts: bClean, InUpdateVersionFiles: WorkingCL > 0);

		if (WorkingCL > 0) // only move UAT files if we intend to check in some build products
		{
			Build.AddUATFilesToBuildProducts();
		}
		UE4Build.CheckBuildProducts(Build.BuildProductFiles);

		if (WorkingCL > 0)
		{
			// Sign everything we built
			CodeSign.SignMultipleIfEXEOrDLL(this, Build.BuildProductFiles);

			// Open files for add or edit
			UE4Build.AddBuildProductsToChangelist(WorkingCL, Build.BuildProductFiles);
		}

	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:97,代码来源:BuildTargetCommand.Automation.cs

示例3: Build

	public static void Build(BuildCommand Command, ProjectParams Params, int WorkingCL = -1)
	{

		Params.ValidateAndLog();

		if (!Params.Build)
		{
			return;
		}

		Log("********** BUILD COMMAND STARTED **********");

		var UE4Build = new UE4Build(Command);
		var Agenda = new UE4Build.BuildAgenda();
		var CrashReportPlatforms = new HashSet<UnrealTargetPlatform>();

		// Setup editor targets
		if (Params.HasEditorTargets && !Params.Rocket)
		{
			// @todo Mac: proper platform detection
			UnrealTargetPlatform EditorPlatform = HostPlatform.Current.HostEditorPlatform;
			const UnrealTargetConfiguration EditorConfiguration = UnrealTargetConfiguration.Development;

			CrashReportPlatforms.Add(EditorPlatform);
			Agenda.AddTargets(Params.EditorTargets.ToArray(), EditorPlatform, EditorConfiguration, Params.CodeBasedUprojectPath);
			if (Params.EditorTargets.Contains("UnrealHeaderTool") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.EditorTargets.Contains("ShaderCompileWorker") == false)
			{
				Agenda.AddTargets(new string[] { "ShaderCompileWorker" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.Pak && Params.EditorTargets.Contains("UnrealPak") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealPak" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.FileServer && Params.EditorTargets.Contains("UnrealFileServer") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealFileServer" }, EditorPlatform, EditorConfiguration);
			}
		}

		// Setup cooked targets
		if (Params.HasClientCookedTargets)
		{
			foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
				foreach (var ClientPlatform in Params.ClientTargetPlatforms)
				{
					CrashReportPlatforms.Add(ClientPlatform);
					Agenda.AddTargets(Params.ClientCookedTargets.ToArray(), ClientPlatform, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: " -remoteini=\""+Path.GetDirectoryName(Params.RawProjectPath)+"\"");
				}
			}
		}
		if (Params.HasServerCookedTargets)
		{
			foreach (var BuildConfig in Params.ServerConfigsToBuild)
			{
				foreach (var ServerPlatform in Params.ServerTargetPlatforms)
				{
					CrashReportPlatforms.Add(ServerPlatform);
					Agenda.AddTargets(Params.ServerCookedTargets.ToArray(), ServerPlatform, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: " -remoteini=\""+Path.GetDirectoryName(Params.RawProjectPath)+"\"");
				}
			}
		}
		if (Params.CrashReporter && !Params.Rocket)
		{
			var CrashReportClientTarget = new[] { "CrashReportClient" };
			foreach (var CrashReportPlatform in CrashReportPlatforms)
			{
				if (UnrealBuildTool.UnrealBuildTool.PlatformSupportsCrashReporter(CrashReportPlatform))
				{
					Agenda.AddTargets(CrashReportClientTarget, CrashReportPlatform, UnrealTargetConfiguration.Development);
				}
			}
		}
		if (Params.HasProgramTargets && !Params.Rocket)
		{
			foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
				foreach (var ClientPlatform in Params.ClientTargetPlatforms)
				{
					Agenda.AddTargets(Params.ProgramTargets.ToArray(), ClientPlatform, BuildConfig, Params.CodeBasedUprojectPath);
				}
			}
		}
		UE4Build.Build(Agenda, InDeleteBuildProducts: Params.Clean, InUpdateVersionFiles: WorkingCL > 0);

		if (WorkingCL > 0) // only move UAT files if we intend to check in some build products
		{
			UE4Build.AddUATFilesToBuildProducts();
		}
		UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

		if (WorkingCL > 0)
		{
			// Sign everything we built
			CodeSign.SignMultipleIfEXEOrDLL(Command, UE4Build.BuildProductFiles);

//.........这里部分代码省略.........
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:101,代码来源:BuildProjectCommand.Automation.cs

示例4: PostBuild

        public override void PostBuild(GUBP bp, UE4Build UE4Build)
        {
			if (HostPlatform == UnrealTargetPlatform.Win64)
            {
            	UE4Build.AddUATFilesToBuildProducts();
            	UE4Build.AddUBTFilesToBuildProducts();
        	}
    	}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:8,代码来源:LegacyNodes.cs

示例5: PostBuild

 public override void PostBuild(GUBP bp, UE4Build UE4Build)
 {
     UE4Build.AddUATFilesToBuildProducts();
     UE4Build.AddUBTFilesToBuildProducts();
 }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:5,代码来源:GUBP.Automation.cs

示例6: ExecuteBuild

    public override void ExecuteBuild()
    {
        UE4Build Build = new UE4Build(this);
        Build.AddUATFilesToBuildProducts();

        Log("Build products:");
        foreach (var Product in Build.BuildProductFiles)
        {
            Log("  " + Product);
        }
    }
开发者ID:colwalder,项目名称:unrealengine,代码行数:11,代码来源:Tests.Automation.cs

示例7: ExecuteInner


//.........这里部分代码省略.........
                        if (Exclude.Contains("Soul"))
                        {
                            RemoveTargetsFromList(Soul, List);
                        }
                        if (Exclude.Contains("StrategyVR"))
                        {
                            RemoveTargetsFromList(StrategyVR, List);
                        }
                    }
                }

                // @todo: make this programmatic by looping over the TargetLists (which maybe should be a map from config to list)
                string[] Win64Dev = Win64DevTargets.ToArray();
                string[] Win32Dev = Win32Targets.ToArray();
                string[] Win32Ship = Win32ShipTargets.ToArray();
                string[] PS4Dev = PS4DevTargets.ToArray();
                string[] XboxOneDev = XboxOneDevTargets.ToArray();
                string[] IOSDev = IOSDevTargets.ToArray();
                string[] MacDev = MacDevTargets.ToArray();
                string[] AndroidDev = AndroidDevTargets.ToArray();

                if (!String.IsNullOrEmpty(Config))
                {
                    switch (Config.ToUpperInvariant())
                    {
                        case "EDITORS":
                            Agenda.AddTargets(Win64Dev, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                            Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                            break;
                        case "WIN32DEV":
                            Agenda.AddTargets(Win32Dev, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);
                            break;
                        case "WIN32SHIP":
                            Agenda.AddTargets(Win32Ship, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping);
                            break;
                        case "PS4DEV":
                            Agenda.AddTargets(PS4Dev, UnrealTargetPlatform.PS4, UnrealTargetConfiguration.Development);
                            break;
                        case "XBOXONEDEV":
                            Agenda.AddTargets(XboxOneDev, UnrealTargetPlatform.XboxOne, UnrealTargetConfiguration.Development);
                            break;
                        case "IOSDEV":
                            Agenda.AddTargets(IOSDev, UnrealTargetPlatform.IOS, UnrealTargetConfiguration.Development);
                            break;
                        case "MACDEV":
                            Agenda.AddTargets(MacDev, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);
                            Agenda.AddTargets(MacProgramTargets, UnrealTargetPlatform.Mac, UnrealTargetConfiguration.Development);
                            break;
                        case "ANDROIDDEV":
                            Agenda.AddTargets(AndroidDev, UnrealTargetPlatform.Android, UnrealTargetConfiguration.Development);
                            break;
                    }
                }
                else
                {
                    Agenda.AddTargets(Win64Dev, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(ProgramTargets, UnrealTargetPlatform.Win64, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(Win32Dev, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(Win32Ship, UnrealTargetPlatform.Win32, UnrealTargetConfiguration.Shipping);
                    Agenda.AddTargets(PS4Dev, UnrealTargetPlatform.PS4, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(XboxOneDev, UnrealTargetPlatform.XboxOne, UnrealTargetConfiguration.Development);
                    Agenda.AddTargets(IOSDev, UnrealTargetPlatform.IOS, UnrealTargetConfiguration.Development);
                }
            }
        }

        UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);
        if (String.IsNullOrEmpty(Config) || Config.ToLower() == "editors")
        {
            UE4Build.AddUATFilesToBuildProducts();
        }
        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

        if (P4Enabled)
        {
            // Sign everything we built
            CodeSign.SignMultipleIfEXEOrDLL(this, UE4Build.BuildProductFiles);

            // Open files for add or edit
            UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);

            // Check everything in!
            int SubmittedCL;
            Submit(WorkingCL, out SubmittedCL, true, true);

            // Label it
            if (String.IsNullOrEmpty(Config))
            {
                MakeDownstreamLabel("Promotable");
            }
            else if (Config.ToLower() == "editors")
            {
                MakeDownstreamLabel("Promotable-Partial-" + Config);
            }
            else
            {
                MakeDownstreamLabel("Partial-Promotable-" + Config, UE4Build.BuildProductFiles);
            }
        }
    }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:101,代码来源:PromotableBuild.Automation.cs

示例8: ExecuteBuild

    public override void ExecuteBuild()
    {
        Log("************************* BuildUAT");

        int WorkingCL = -1;
        if (P4Enabled)
        {
            WorkingCL = CreateChange(P4Env.Client, String.Format("UATOnly build built from changelist {0}", P4Env.Changelist));
            Log("Build from {0}    Working in {1}", P4Env.Changelist, WorkingCL);
        }

        ExecuteInner(WorkingCL);

        var UE4Build = new UE4Build(this);
        var Agenda = new UE4Build.BuildAgenda();

        Agenda.DotNetProjects.AddRange(
            new string[]
            {
                @"Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj",
            }
            );

        UE4Build.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true);

        UE4Build.AddUATFilesToBuildProducts();

        UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

        if (P4Enabled)
        {
            // Sign everything we built
            CodeSign.SignMultipleIfEXEOrDLL(this, UE4Build.BuildProductFiles);

            // Open files for add or edit
            UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);

            // Check everything in!
            int SubmittedCL;
            Submit(WorkingCL, out SubmittedCL, true, true);

            // Reset engine versions to 0 if required
            if (ParseParam("ZeroVersions"))
            {
                Execute<ZeroEngineVersions>(this);
            }
        }

        PrintRunTime();
    }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:50,代码来源:PromotableBuild.Automation.cs

示例9: ExecuteBuild

	public override void ExecuteBuild()
	{
		LogConsole("************************* BuildCommonTools");

		// Get the list of platform names
		string[] PlatformNames = ParseParamValue("platforms", BuildHostPlatform.Current.Platform.ToString()).Split('+');

		// Parse the platforms
		List<UnrealBuildTool.UnrealTargetPlatform> Platforms = new List<UnrealTargetPlatform>();
		foreach(string PlatformName in PlatformNames)
		{
			UnrealBuildTool.UnrealTargetPlatform Platform;
			if(!UnrealBuildTool.UnrealTargetPlatform.TryParse(PlatformName, true, out Platform))
			{
				throw new AutomationException("Unknown platform specified on command line - '{0}' - valid platforms are {1}", PlatformName, String.Join("/", Enum.GetNames(typeof(UnrealBuildTool.UnrealTargetPlatform))));
			}
			Platforms.Add(Platform);
		}

		// Add all the platforms if specified
		if(ParseParam("allplatforms"))
		{
			foreach(UnrealTargetPlatform Platform in Enum.GetValues(typeof(UnrealTargetPlatform)))
			{
				if(!Platforms.Contains(Platform))
				{
					Platforms.Add(Platform);
				}
			}
		}

		// Get the agenda
		List<string> ExtraBuildProducts = new List<string>();
		UE4Build.BuildAgenda Agenda = MakeAgenda(Platforms.ToArray(), ExtraBuildProducts);

		// Build everything. We don't want to touch version files for GitHub builds -- these are "programmer builds" and won't have a canonical build version
		UE4Build Builder = new UE4Build(this);
		Builder.Build(Agenda, InDeleteBuildProducts:true, InUpdateVersionFiles: false);

		// Add UAT and UBT to the build products
		Builder.AddUATFilesToBuildProducts();
		Builder.AddUBTFilesToBuildProducts();

		// Add all the extra build products
		foreach(string ExtraBuildProduct in ExtraBuildProducts)
		{
			Builder.AddBuildProduct(ExtraBuildProduct);
		}

		// Make sure all the build products exist
		UE4Build.CheckBuildProducts(Builder.BuildProductFiles);

		// Write the manifest if needed
		string ManifestPath = ParseParamValue("manifest");
		if(ManifestPath != null)
		{
			SortedSet<string> Files = new SortedSet<string>();
			foreach(string BuildProductFile in Builder.BuildProductFiles)
			{
				Files.Add(BuildProductFile);
			}
			File.WriteAllLines(ManifestPath, Files.ToArray());
		}
	}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:64,代码来源:BuildCommonTools.Automation.cs

示例10: ExecuteBuild

		public override void ExecuteBuild()
		{
			// Parse the target list
			string[] Targets = ParseParamValues("Target");
			if(Targets.Length == 0)
			{
				throw new AutomationException("No targets specified (eg. -Target=\"UE4Editor Win64 Development\")");
			}

			// Parse the archive path
			string ArchivePath = ParseParamValue("Archive");
			if(ArchivePath != null && (!ArchivePath.StartsWith("//") || ArchivePath.Sum(x => (x == '/')? 1 : 0) < 4))
			{
				throw new AutomationException("Archive path is not a valid depot filename");
			}

			// Prepare the build agenda
			UE4Build.BuildAgenda Agenda = new UE4Build.BuildAgenda();
			foreach(string Target in Targets)
			{
				string[] Tokens = Target.Split(new char[]{ ' ' }, StringSplitOptions.RemoveEmptyEntries);

				UnrealTargetPlatform Platform;
				UnrealTargetConfiguration Configuration;
				if(Tokens.Length < 3 || !Enum.TryParse(Tokens[1], true, out Platform) || !Enum.TryParse(Tokens[2], true, out Configuration))
				{
					throw new AutomationException("Invalid target '{0}' - expected <TargetName> <Platform> <Configuration>");
				}

				Agenda.AddTarget(Tokens[0], Platform, Configuration, InAddArgs: String.Join(" ", Tokens.Skip(3)));
			}

			// Build everything
			UE4Build Builder = new UE4Build(this);
			Builder.Build(Agenda, InUpdateVersionFiles: ArchivePath != null);

			// Include the build products for UAT and UBT if required
			if(ParseParam("WithUAT"))
			{
				Builder.AddUATFilesToBuildProducts();
			}
			if(ParseParam("WithUBT"))
			{
				Builder.AddUBTFilesToBuildProducts();
			}

			// Archive the build products
			if(ArchivePath != null)
			{
				// Create an output folder
				string OutputFolder = Path.Combine(CommandUtils.CmdEnv.LocalRoot, "ArchiveForUGS");
				Directory.CreateDirectory(OutputFolder);

				// Create a temp folder for storing stripped PDB files
				string SymbolsFolder = Path.Combine(OutputFolder, "Symbols");
				Directory.CreateDirectory(SymbolsFolder);

				// Get the Windows toolchain
				UEToolChain WindowsToolChain = UEBuildPlatform.GetBuildPlatform(UnrealTargetPlatform.Win64).CreateContext(null).CreateToolChain(CPPTargetPlatform.Win64);

				// Figure out all the files for the archive
				Ionic.Zip.ZipFile Zip = new Ionic.Zip.ZipFile();
				Zip.UseZip64WhenSaving = Ionic.Zip.Zip64Option.Always;
				foreach(string BuildProduct in Builder.BuildProductFiles)
				{
					if(!File.Exists(BuildProduct))
					{
						throw new AutomationException("Missing build product: {0}", BuildProduct);
					}
					if(BuildProduct.EndsWith(".pdb", StringComparison.InvariantCultureIgnoreCase))
					{
						string StrippedFileName = CommandUtils.MakeRerootedFilePath(BuildProduct, CommandUtils.CmdEnv.LocalRoot, SymbolsFolder);
						Directory.CreateDirectory(Path.GetDirectoryName(StrippedFileName));
						WindowsToolChain.StripSymbols(BuildProduct, StrippedFileName);
						Zip.AddFile(StrippedFileName, Path.GetDirectoryName(CommandUtils.StripBaseDirectory(StrippedFileName, SymbolsFolder)));
					}
					else
					{
						Zip.AddFile(BuildProduct, Path.GetDirectoryName(CommandUtils.StripBaseDirectory(BuildProduct, CommandUtils.CmdEnv.LocalRoot)));
					}
				}
				// Create the zip file
				string ZipFileName = Path.Combine(OutputFolder, "Archive.zip");
				Console.WriteLine("Writing {0}...", ZipFileName);
				Zip.Save(ZipFileName);

				// Submit it to Perforce if required
				if(CommandUtils.AllowSubmit)
				{
					// Delete any existing clientspec for submitting
					string ClientName = Environment.MachineName + "_BuildForUGS";

					// Create a brand new one
					P4ClientInfo Client = new P4ClientInfo();
					Client.Owner = CommandUtils.P4Env.User;
					Client.Host = Environment.MachineName;
					Client.Stream = ArchivePath.Substring(0, ArchivePath.IndexOf('/', ArchivePath.IndexOf('/', 2) + 1));
					Client.RootPath = Path.Combine(OutputFolder, "Perforce");
					Client.Name = ClientName;
					Client.Options = P4ClientOption.NoAllWrite | P4ClientOption.NoClobber | P4ClientOption.NoCompress | P4ClientOption.Unlocked | P4ClientOption.NoModTime | P4ClientOption.RmDir;
//.........这里部分代码省略.........
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:101,代码来源:BuildForUGS.Automation.cs

示例11: Build


//.........这里部分代码省略.........
            Agenda.AddTargets(Params.EditorTargets.ToArray(), EditorPlatform, EditorConfiguration, Params.CodeBasedUprojectPath);
			if (Params.EditorTargets.Contains("UnrealHeaderTool") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealHeaderTool" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.EditorTargets.Contains("ShaderCompileWorker") == false)
			{
				Agenda.AddTargets(new string[] { "ShaderCompileWorker" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.Pak && Params.EditorTargets.Contains("UnrealPak") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealPak" }, EditorPlatform, EditorConfiguration);
			}
			if (Params.FileServer && Params.EditorTargets.Contains("UnrealFileServer") == false)
			{
				Agenda.AddTargets(new string[] { "UnrealFileServer" }, EditorPlatform, EditorConfiguration);
			}
		}

		// Setup cooked targets
		if (Params.HasClientCookedTargets && (TargetMask & ProjectBuildTargets.ClientCooked) == ProjectBuildTargets.ClientCooked)
		{
            List<UnrealTargetPlatform> UniquePlatformTypes = Params.ClientTargetPlatforms.ConvertAll(x => x.Type).Distinct().ToList();

            foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
                foreach (var ClientPlatformType in UniquePlatformTypes)
				{
                    string ScriptPluginArgs = GetBlueprintPluginPathArgument(Params, true, ClientPlatformType);
                    CrashReportPlatforms.Add(ClientPlatformType);
					Agenda.AddTargets(Params.ClientCookedTargets.ToArray(), ClientPlatformType, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: ScriptPluginArgs + " -remoteini=\"" + Params.RawProjectPath.Directory.FullName + "\"");
				}
			}
		}
		if (Params.HasServerCookedTargets && (TargetMask & ProjectBuildTargets.ServerCooked) == ProjectBuildTargets.ServerCooked)
		{
            List<UnrealTargetPlatform> UniquePlatformTypes = Params.ServerTargetPlatforms.ConvertAll(x => x.Type).Distinct().ToList();

            foreach (var BuildConfig in Params.ServerConfigsToBuild)
			{
				foreach (var ServerPlatformType in UniquePlatformTypes)
				{
                    string ScriptPluginArgs = GetBlueprintPluginPathArgument(Params, false, ServerPlatformType);
                    CrashReportPlatforms.Add(ServerPlatformType);
					Agenda.AddTargets(Params.ServerCookedTargets.ToArray(), ServerPlatformType, BuildConfig, Params.CodeBasedUprojectPath, InAddArgs: ScriptPluginArgs + " -remoteini=\"" + Params.RawProjectPath.Directory.FullName + "\"");
				}
			}
		}
		if (!Params.NoBootstrapExe && !Automation.IsEngineInstalled() && (TargetMask & ProjectBuildTargets.Bootstrap) == ProjectBuildTargets.Bootstrap)
		{
			UnrealBuildTool.UnrealTargetPlatform[] BootstrapPackagedGamePlatforms = { UnrealBuildTool.UnrealTargetPlatform.Win32, UnrealBuildTool.UnrealTargetPlatform.Win64 };
			foreach(UnrealBuildTool.UnrealTargetPlatform BootstrapPackagedGamePlatformType in BootstrapPackagedGamePlatforms)
			{
				if(Params.ClientTargetPlatforms.Contains(new TargetPlatformDescriptor(BootstrapPackagedGamePlatformType)))
				{
					Agenda.AddTarget("BootstrapPackagedGame", BootstrapPackagedGamePlatformType, UnrealBuildTool.UnrealTargetConfiguration.Shipping);
				}
			}
		}
		if (Params.CrashReporter && !Automation.IsEngineInstalled() && (TargetMask & ProjectBuildTargets.CrashReporter) == ProjectBuildTargets.CrashReporter)
		{
			foreach (var CrashReportPlatform in CrashReportPlatforms)
			{
				if (UnrealBuildTool.UnrealBuildTool.PlatformSupportsCrashReporter(CrashReportPlatform))
				{
					Agenda.AddTarget("CrashReportClient", CrashReportPlatform, UnrealTargetConfiguration.Shipping);
				}
			}
		}
		if (Params.HasProgramTargets && (TargetMask & ProjectBuildTargets.Programs) == ProjectBuildTargets.Programs)
		{
            List<UnrealTargetPlatform> UniquePlatformTypes = Params.ClientTargetPlatforms.ConvertAll(x => x.Type).Distinct().ToList();

            foreach (var BuildConfig in Params.ClientConfigsToBuild)
			{
				foreach (var ClientPlatformType in UniquePlatformTypes)
				{
					Agenda.AddTargets(Params.ProgramTargets.ToArray(), ClientPlatformType, BuildConfig, Params.CodeBasedUprojectPath);
				}
			}
		}
		UE4Build.Build(Agenda, InDeleteBuildProducts: Params.Clean, InUpdateVersionFiles: WorkingCL > 0);

		if (WorkingCL > 0) // only move UAT files if we intend to check in some build products
		{
			UE4Build.AddUATFilesToBuildProducts();
		}
		UE4Build.CheckBuildProducts(UE4Build.BuildProductFiles);

		if (WorkingCL > 0)
		{
			// Sign everything we built
			CodeSign.SignMultipleIfEXEOrDLL(Command, UE4Build.BuildProductFiles);

			// Open files for add or edit
			UE4Build.AddBuildProductsToChangelist(WorkingCL, UE4Build.BuildProductFiles);
		}

		Log("********** BUILD COMMAND COMPLETED **********");
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:101,代码来源:BuildProjectCommand.Automation.cs


注:本文中的AutomationTool.UE4Build.AddUATFilesToBuildProducts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。