using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UnrealBuildTool { /// /// A DLL built by MSBuild from a C# project. /// class UEBuildBinaryCSDLL : UEBuildBinary { /// /// Create an instance initialized to the given configuration /// /// The build binary configuration to initialize the instance to public UEBuildBinaryCSDLL(UEBuildBinaryConfiguration InConfig) : base(InConfig) { } /// /// Builds the binary. /// /// The target rules /// The toolchain to use for building /// The environment to compile the binary in /// The environment to link the binary in /// List of available shared PCHs /// The graph to add build actions to /// Set of produced build artifacts public override IEnumerable Build(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment CompileEnvironment, LinkEnvironment LinkEnvironment, List SharedPCHs, ActionGraph ActionGraph) { CSharpEnvironment ProjectCSharpEnviroment = new CSharpEnvironment(); if (LinkEnvironment.Configuration == CppConfiguration.Debug) { ProjectCSharpEnviroment.TargetConfiguration = CSharpTargetConfiguration.Debug; } else { ProjectCSharpEnviroment.TargetConfiguration = CSharpTargetConfiguration.Development; } ProjectCSharpEnviroment.EnvironmentTargetPlatform = LinkEnvironment.Platform; ToolChain.CompileCSharpProject(ProjectCSharpEnviroment, Config.ProjectFilePath, Config.OutputFilePath, ActionGraph); return new FileItem[] { FileItem.GetItemByFileReference(Config.OutputFilePath) }; } } }