本文整理汇总了C#中AutomationTool.UE4Build.BuildAgenda.AddTarget方法的典型用法代码示例。如果您正苦于以下问题:C# UE4Build.BuildAgenda.AddTarget方法的具体用法?C# UE4Build.BuildAgenda.AddTarget怎么用?C# UE4Build.BuildAgenda.AddTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AutomationTool.UE4Build.BuildAgenda
的用法示例。
在下文中一共展示了UE4Build.BuildAgenda.AddTarget方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildNecessaryTargets
// Broken down steps used to run the process.
#region RebuildLightMaps Process Steps
private void BuildNecessaryTargets()
{
Log("Running Step:- RebuildLightMaps::BuildNecessaryTargets");
UE4Build.BuildAgenda Agenda = new UE4Build.BuildAgenda();
Agenda.AddTarget("UnrealHeaderTool", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("ShaderCompileWorker", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("UnrealLightmass", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget(CommandletTargetName, UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
try
{
UE4Build Builder = new UE4Build(this);
Builder.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true, InForceNoXGE: false, InChangelistNumberOverride: GetLatestCodeChange());
UE4Build.CheckBuildProducts(Builder.BuildProductFiles);
}
catch (AutomationException Ex)
{
LogError("Rebuild Light Maps has failed.");
throw Ex;
}
}
示例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);
}
}
示例3: ExecuteBuild
public override void ExecuteBuild()
{
if (ParseParam("BuildEditor"))
{
UE4Build.BuildAgenda Agenda = new UE4Build.BuildAgenda();
Agenda.AddTarget("UE4Editor", HostPlatform.Current.HostEditorPlatform, UnrealTargetConfiguration.Development);
Agenda.AddTarget("ShaderCompileWorker", HostPlatform.Current.HostEditorPlatform, UnrealTargetConfiguration.Development);
UE4Build Builder = new UE4Build(this);
Builder.Build(Agenda, InDeleteBuildProducts: true, InUpdateVersionFiles: true, InForceNoXGE: true);
}
var EditorExe = CombinePaths(CmdEnv.LocalRoot, @"Engine/Binaries/Win64/UE4Editor-Cmd.exe");
if (P4Enabled)
{
Log("Sync necessary content to head revision");
P4.Sync(P4Env.BuildRootP4 + "/Engine/Config/...");
P4.Sync(P4Env.BuildRootP4 + "/Engine/Content/...");
P4.Sync(P4Env.BuildRootP4 + "/Engine/Source/...");
P4.Sync(P4Env.BuildRootP4 + "/Portal/Config/...");
P4.Sync(P4Env.BuildRootP4 + "/Portal/Content/...");
P4.Sync(P4Env.BuildRootP4 + "/Portal/Source/...");
Log("Localize from label {0}", P4Env.LabelToSync);
}
OneSkyConfigData OneSkyConfig = OneSkyConfigHelper.Find("OneSkyConfig_EpicGames");
var oneSkyService = new OneSkyService(OneSkyConfig.ApiKey, OneSkyConfig.ApiSecret);
// Export Launcher text from OneSky
{
var launcherGroup = GetLauncherGroup(oneSkyService);
var appProject = GetAppProject(oneSkyService);
var appFile = appProject.UploadedFiles.FirstOrDefault(f => f.Filename == "App.po");
//Export
if (appFile != null)
{
ExportFileToDirectory(appFile, new DirectoryInfo(CmdEnv.LocalRoot + "/Portal/Content/Localization/App"), launcherGroup.EnabledCultures);
}
}
// Setup editor arguments for SCC.
string EditorArguments = String.Empty;
if (P4Enabled)
{
EditorArguments = String.Format("-SCCProvider={0} -P4Port={1} -P4User={2} -P4Client={3} -P4Passwd={4}", "Perforce", P4Env.P4Port, P4Env.User, P4Env.Client, P4.GetAuthenticationToken());
}
else
{
EditorArguments = String.Format("-SCCProvider={0}", "None");
}
// Setup commandlet arguments for SCC.
string CommandletSCCArguments = String.Empty;
if (P4Enabled) { CommandletSCCArguments += (string.IsNullOrEmpty(CommandletSCCArguments) ? "" : " ") + "-EnableSCC"; }
if (!AllowSubmit) { CommandletSCCArguments += (string.IsNullOrEmpty(CommandletSCCArguments) ? "" : " ") + "-DisableSCCSubmit"; }
// Setup commandlet arguments with configurations.
var CommandletArgumentSets = new string[]
{
String.Format("-config={0}", @"../Portal/Config/Localization/App.ini") + (string.IsNullOrEmpty(CommandletSCCArguments) ? "" : " " + CommandletSCCArguments)
};
// Execute commandlet for each set of arguments.
foreach (var CommandletArguments in CommandletArgumentSets)
{
Log("Localization for {0} {1}", EditorArguments, CommandletArguments);
Log("Running UE4Editor to generate Localization data");
string Arguments = String.Format("-run=GatherText {0} {1}", EditorArguments, CommandletArguments);
var RunResult = Run(EditorExe, Arguments);
if (RunResult.ExitCode != 0)
{
throw new AutomationException("Error while executing localization commandlet '{0}'", Arguments);
}
}
// Upload Launcher text to OneSky
UploadDirectoryToProject(GetAppProject(oneSkyService), new DirectoryInfo(CmdEnv.LocalRoot + "/Portal/Content/Localization/App"), "*.po");
}
示例4: MakeAgenda
public static UE4Build.BuildAgenda MakeAgenda(UnrealBuildTool.UnrealTargetPlatform[] Platforms, List<string> ExtraBuildProducts)
{
// Create the build agenda
UE4Build.BuildAgenda Agenda = new UE4Build.BuildAgenda();
// C# binaries
Agenda.SwarmProject = @"Engine\Source\Programs\UnrealSwarm\UnrealSwarm.sln";
Agenda.DotNetProjects.Add(@"Engine/Source/Editor/SwarmInterface/DotNET/SwarmInterface.csproj");
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/DotNETCommon/DotNETUtilities/DotNETUtilities.csproj");
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/RPCUtility/RPCUtility.csproj");
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/UnrealControls/UnrealControls.csproj");
// Windows binaries
if(Platforms.Contains(UnrealBuildTool.UnrealTargetPlatform.Win64))
{
Agenda.AddTarget("CrashReportClient", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("CrashReportClient", UnrealBuildTool.UnrealTargetPlatform.Win32, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("UnrealHeaderTool", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("UnrealPak", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("UnrealLightmass", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("ShaderCompileWorker", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("UnrealVersionSelector", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Shipping);
Agenda.AddTarget("BootstrapPackagedGame", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Shipping);
Agenda.AddTarget("BootstrapPackagedGame", UnrealBuildTool.UnrealTargetPlatform.Win32, UnrealBuildTool.UnrealTargetConfiguration.Shipping);
Agenda.AddTarget("UnrealCEFSubProcess", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.AddTarget("UnrealCEFSubProcess", UnrealBuildTool.UnrealTargetPlatform.Win32, UnrealBuildTool.UnrealTargetConfiguration.Development);
}
// Mac binaries
if(Platforms.Contains(UnrealBuildTool.UnrealTargetPlatform.Mac))
{
Agenda.AddTarget("CrashReportClient", UnrealBuildTool.UnrealTargetPlatform.Mac, UnrealBuildTool.UnrealTargetConfiguration.Development, InAddArgs: "-CopyAppBundleBackToDevice");
Agenda.AddTarget("UnrealPak", UnrealBuildTool.UnrealTargetPlatform.Mac, UnrealBuildTool.UnrealTargetConfiguration.Development, InAddArgs: "-CopyAppBundleBackToDevice");
Agenda.AddTarget("UnrealLightmass", UnrealBuildTool.UnrealTargetPlatform.Mac, UnrealBuildTool.UnrealTargetConfiguration.Development, InAddArgs: "-CopyAppBundleBackToDevice");
Agenda.AddTarget("ShaderCompileWorker", UnrealBuildTool.UnrealTargetPlatform.Mac, UnrealBuildTool.UnrealTargetConfiguration.Development, InAddArgs: "-CopyAppBundleBackToDevice");
Agenda.AddTarget("UE4EditorServices", UnrealBuildTool.UnrealTargetPlatform.Mac, UnrealBuildTool.UnrealTargetConfiguration.Development, InAddArgs: "-CopyAppBundleBackToDevice");
Agenda.AddTarget("UnrealCEFSubProcess", UnrealBuildTool.UnrealTargetPlatform.Mac, UnrealBuildTool.UnrealTargetConfiguration.Development, InAddArgs: "-CopyAppBundleBackToDevice");
}
// iOS binaries
if(Platforms.Contains(UnrealBuildTool.UnrealTargetPlatform.IOS))
{
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/iOS/iPhonePackager/iPhonePackager.csproj");
ExtraBuildProducts.Add(CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, @"Engine/Binaries/DotNET/iOS/iPhonePackager.exe"));
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/iOS/DeploymentServer/DeploymentServer.csproj");
ExtraBuildProducts.Add(CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, @"Engine/Binaries/DotNET/iOS/DeploymentServer.exe"));
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/iOS/DeploymentInterface/DeploymentInterface.csproj");
ExtraBuildProducts.Add(CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, @"Engine/Binaries/DotNET/iOS/DeploymentInterface.dll"));
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/iOS/MobileDeviceInterface/MobileDeviceInterface.csproj");
ExtraBuildProducts.Add(CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, @"Engine/Binaries/DotNET/iOS/MobileDeviceInterface.dll"));
}
// PS4 binaries
if(Platforms.Contains(UnrealBuildTool.UnrealTargetPlatform.PS4))
{
Agenda.AddTarget("PS4MapFileUtil", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
Agenda.DotNetProjects.Add(CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, @"Engine/Source/Programs/PS4/PS4DevKitUtil/PS4DevKitUtil.csproj"));
ExtraBuildProducts.Add(CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, @"Engine/Binaries/DotNET/PS4/PS4DevKitUtil.exe"));
}
// Xbox One binaries
if(Platforms.Contains(UnrealBuildTool.UnrealTargetPlatform.XboxOne))
{
Agenda.AddTarget("XboxOnePDBFileUtil", UnrealBuildTool.UnrealTargetPlatform.Win64, UnrealBuildTool.UnrealTargetConfiguration.Development);
}
// HTML5 binaries
if (Platforms.Contains(UnrealBuildTool.UnrealTargetPlatform.HTML5))
{
Agenda.DotNetProjects.Add(@"Engine/Source/Programs/HTML5/HTML5LaunchHelper/HTML5LaunchHelper.csproj");
ExtraBuildProducts.Add(CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, @"Engine/Binaries/DotNET/HTML5LaunchHelper.exe"));
}
return Agenda;
}
示例5: 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;
//.........这里部分代码省略.........
示例6: Build
public static void Build(BuildCommand Command, ProjectParams Params, int WorkingCL = -1, ProjectBuildTargets TargetMask = ProjectBuildTargets.All)
{
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 && !Automation.IsEngineInstalled() && (TargetMask & ProjectBuildTargets.Editor) == ProjectBuildTargets.Editor)
{
// @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 && (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)
{
//.........这里部分代码省略.........