/// <summary> /// Optionally compiles and loads target rules assembly. /// </summary> /// <param name="Properties"></param> /// <param name="TargetsDllFilename"></param> /// <param name="DoNotCompile"></param> /// <param name="TargetScripts"></param> private static void CompileAndLoadTargetsAssembly(ProjectProperties Properties, FileReference TargetsDllFilename, bool DoNotCompile, List <FileReference> TargetScripts) { CommandUtils.LogVerbose("Compiling targets DLL: {0}", TargetsDllFilename); List <string> ReferencedAssemblies = new List <string>() { "System.dll", "System.Core.dll", "System.Xml.dll", typeof(UnrealBuildTool.PlatformExports).Assembly.Location }; List <string> PreprocessorDefinitions = RulesAssembly.GetPreprocessorDefinitions(); Assembly TargetsDLL = DynamicCompilation.CompileAndLoadAssembly(TargetsDllFilename, new HashSet <FileReference>(TargetScripts), ReferencedAssemblies, PreprocessorDefinitions, DoNotCompile); Type[] AllCompiledTypes = TargetsDLL.GetTypes(); foreach (Type TargetType in AllCompiledTypes) { // Find TargetRules but skip all "UE4Editor", "UE4Game" targets. if (typeof(TargetRules).IsAssignableFrom(TargetType) && !TargetType.IsAbstract) { string TargetName = GetTargetName(TargetType); TargetInfo DummyTargetInfo = new TargetInfo(TargetName, BuildHostPlatform.Current.Platform, UnrealTargetConfiguration.Development, "", Properties.RawProjectPath, null); // Create an instance of this type CommandUtils.LogVerbose("Creating target rules object: {0}", TargetType.Name); TargetRules Rules = Activator.CreateInstance(TargetType, DummyTargetInfo) as TargetRules; CommandUtils.LogVerbose("Adding target: {0} ({1})", TargetType.Name, Rules.Type); SingleTargetProperties TargetData = new SingleTargetProperties(); TargetData.TargetName = GetTargetName(TargetType); TargetData.Rules = Rules; if (Rules.Type == global::UnrealBuildTool.TargetType.Program) { Properties.Programs.Add(TargetData); } else { Properties.Targets.Add(TargetData); } } } }
public static string StaticGetFullName(UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) { return "InternalTools_" + InProgramTarget.TargetName + StaticGetHostPlatformSuffix(InHostPlatform); }
private void SetupSingleInternalToolsNode(SingleTargetProperties InProgramTarget, bool bSkipRootEditorPsuedoDependency = true) { ProgramTarget = InProgramTarget; AgentSharingGroup = "ToolsGroup" + StaticGetHostPlatformSuffix(HostPlatform); if (!bSkipRootEditorPsuedoDependency) { AddPseudodependency(RootEditorNode.StaticGetFullName(HostPlatform)); } }
public SingleInternalToolsNode(GUBP bp, GUBPBranchConfig InBranchConfig, UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) : base(InBranchConfig, InHostPlatform) { // Don't add rooteditor dependency if it isn't in the graph var bRootEditorNodeDoesExit = BranchConfig.HasNode(RootEditorNode.StaticGetFullName(HostPlatform)); SetupSingleInternalToolsNode(InProgramTarget, !bRootEditorNodeDoesExit && BranchConfig.BranchOptions.bNoEditorDependenciesForTools); }
public SingleInternalToolsNode(GUBP.GUBPBranchConfig InBranchConfig, UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) : base(InBranchConfig, InHostPlatform) { SetupSingleInternalToolsNode(InProgramTarget); }
public SingleToolsNode(GUBP.GUBPBranchConfig InBranchConfig, UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) : base(InBranchConfig, InHostPlatform) { ProgramTarget = InProgramTarget; AddPseudodependency(RootEditorNode.StaticGetFullName(HostPlatform)); AgentSharingGroup = "ToolsGroup" + StaticGetHostPlatformSuffix(HostPlatform); }
public static string StaticGetFullName(UnrealTargetPlatform InHostPlatform, SingleTargetProperties InGameProj) { return InGameProj.TargetName + "_NonUnityTestCompile" + StaticGetHostPlatformSuffix(InHostPlatform); }
public NonUnityToolNode(UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) : base(InHostPlatform) { ProgramTarget = InProgramTarget; AddPseudodependency(SingleInternalToolsNode.StaticGetFullName(HostPlatform, ProgramTarget)); AddPseudodependency(RootEditorNode.StaticGetFullName(HostPlatform)); }
public SingleInternalToolsNode(GUBP bp, UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) : base(InHostPlatform) { // Don't add rooteditor dependency if it isn't in the graph var bRootEditorNodeDoesExit = bp.HasNode(RootEditorNode.StaticGetFullName(HostPlatform)); SetupSingleInternalToolsNode(InProgramTarget, !bRootEditorNodeDoesExit); }
public SingleInternalToolsNode(UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) : base(InHostPlatform) { SetupSingleInternalToolsNode(InProgramTarget); }
public SingleInternalToolsNode(UnrealTargetPlatform InHostPlatform, SingleTargetProperties InProgramTarget) : base(InHostPlatform) { ProgramTarget = InProgramTarget; if (!GUBP.bBuildRocket) // more errors and more performance by just starting before the root editor is done { AddPseudodependency(RootEditorNode.StaticGetFullName(HostPlatform)); } AgentSharingGroup = "ToolsGroup" + StaticGetHostPlatformSuffix(HostPlatform); }