You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3106449 on 2016/08/30 by Michael.Dupuis #jira UETOOL-229 Added generic command icons used in Edit Menu (including contextual menu) Change 3133997 on 2016/09/21 by Alex.Delesky #jira UE-34079 - FSceneView parameter for FBatchedElements::Draw is no longer an optional parameter. Change 3134132 on 2016/09/21 by Jamie.Dale Added the "unattended" flag when running the localzation commandlets via UAT Change 3134147 on 2016/09/21 by Frank.Fella Core - Add multitouch support to windows. Change 3134349 on 2016/09/21 by Michael.Dupuis #jira UE-36151 Update the title bar to display the branch also Change 3134355 on 2016/09/21 by Michael.Dupuis #jira UE-36041 When initially creating a projet and trying to add everything to source control, also add the uproject file Change 3134447 on 2016/09/21 by Alexis.Matte #jira UE-36064 The SpriteComponent is now properly reused when duplicating a light. Change 3134451 on 2016/09/21 by Alexis.Matte #jira UE-22782 Make sure when we re-import we dont try to match the mesh name if the option bCombineToSingle is true Change 3134457 on 2016/09/21 by Jamie.Dale FInternationalization::Leetify now deals with escape sequences correctly. This also changes it to mark all leetified text with the start and end marker, and the unit tests have been updated accordingly. Change 3134685 on 2016/09/21 by Matt.Kuhlenschmidt Cleaned up some of the UI for the new material slot workflow (part 1) Change 3134743 on 2016/09/21 by Matt.Kuhlenschmidt Fix crash clicking OK to the import mesh dialog in persona when a path is not selected. The OK button is now disabled until a valid path is selected Change 3134760 on 2016/09/21 by Matt.Kuhlenschmidt Guard against cascade crash if cascade was shutdown but there is an old cascade particle system component in the undo buffer that attempts to refresh cascade Change 3134837 on 2016/09/21 by Matt.Kuhlenschmidt Fix static analysis warnings in this file Change 3134939 on 2016/09/21 by Nick.Darnell Automation - Moving the functional testing hooks for the editor into a plugin, the goal is to make it so you don't have to see all the extra stuff automation adds to the editor until the game project needs it. Refactoring the way automation messages are serialized, no longer relying on a comma delimited string to serialize automation data. Improving the filter for automation window so it lets you put in a path, and find it that way. Fixing RunTests from the commandline so that it properly finds the tests, instead of jumping out of the loop as soon as it finds any one match. Change 3134941 on 2016/09/21 by Nick.Darnell Automation - Functional tests now support warnings as errors on a per test basis. Continued itteration on screenshot comparison. Change 3135051 on 2016/09/21 by Matt.Kuhlenschmidt Fixed size of material slots in persona details panel Change 3135076 on 2016/09/21 by Nick.Darnell Automation - Adding a missing file. Change 3135584 on 2016/09/22 by Gareth.Martin Removed unused ULandscapeInfo::BeginDestroy Slight cleanup to FLandscapeEditDataInterface::DeleteLayer Change 3135585 on 2016/09/22 by Gareth.Martin New Count algo Const'd Copy/Accumulate/Transform Change 3135599 on 2016/09/22 by Gareth.Martin Resolve crash if a Landscape Layer Info object is force deleted while it is in use :( #jira UE-35709 Change 3135724 on 2016/09/22 by Michael.Dupuis #jira UE-32662 Remove old migration code that was causing this side effect Change 3135726 on 2016/09/22 by Nick.Darnell Slate - Removing the SLATE_PRE_MULTIPLY macro. Change 3135730 on 2016/09/22 by Nick.Darnell UMG - Exposing the 2D hit location that the WidgetInteractionComponent hit on the WidgetComponent. Change 3135738 on 2016/09/22 by Matt.Kuhlenschmidt Ensure any handles to the backbuffer are released before the backbuffer is resized https://jira.it.epicgames.net/browse/UE-30488 Change 3135810 on 2016/09/22 by Ben.Marsh Build: Compile tools before running automated tests. Change 3135993 on 2016/09/22 by Matt.Kuhlenschmidt Ensure you can unpause after toggling play/pause with a keyboard shortcut. We were processing the keybinding on key down AND up which caused the unpause to instantly pause again https://jira.it.epicgames.net/browse/UE-36276 Change 3136257 on 2016/09/22 by Matt.Kuhlenschmidt Fixed assign of materials to components not working if you multi-select multiple components of a blueprint and assign the material. The construction script was running before all the material had been set on all components. Change 3136318 on 2016/09/22 by Alex.Delesky #jira UE-7405 - Forcing the mouse cursor to show and then clicking inside the viewport will no longer cause the mouse to lose focus Change 3136494 on 2016/09/22 by Matt.Kuhlenschmidt Fix crash restarting a mission in Odin Change 3136741 on 2016/09/22 by Cody.Albert Fixed SButton and SWidget to not multiply color and opacity, since that's already being done by SCompoundWidget #jira UE-36322 Change 3137711 on 2016/09/23 by Matt.Kuhlenschmidt Added guard against slate rendering with deleted materials. In this will now be caught with a looged with the deleted material name. Change 3137713 on 2016/09/23 by Matt.Kuhlenschmidt Removed the pooled draw elements stuff which is not used Change 3137791 on 2016/09/23 by Nick.Darnell MediaPlayer - Removing .png from one of the style files, as that's not required. Was causing warnings to be logged on load. Change 3137793 on 2016/09/23 by Nick.Darnell Localization - Adjusting some log statements to say with instead of w/ Change 3137796 on 2016/09/23 by Nick.Darnell Slate - Adding missing and replacing corrupted style files in the editor. Change 3137864 on 2016/09/23 by Matt.Kuhlenschmidt Fixed "actors are referenced are you sure you want to delete" dialog appearing when you are copying a lot of actors to another level Change 3137876 on 2016/09/23 by Jamie.Dale Added allocation tagging to MProf2 This hooks into the existing FScopeCycleCounterUObject used by the stats system to track object tags (object, package, and class) when an allocation is made. Tags should be in the format "Category:Tag", and the "Tag" part may include "/" to create levels in the tag hierarchy (as shown in the MProf2 tool). #jira UETOOL-950 Change 3137982 on 2016/09/23 by Gareth.Martin Added Invoke() support to CopyIf Change 3137983 on 2016/09/23 by Gareth.Martin Added ULandscapeInfo::ForAllLandscapeProxies to clean up a lot of horrible code - Removed some dependencies on ALandscape and ALandscapeStreamingProxy in the process :) Also made FLandscapeEditorLayerSettings's constructor explicit to clean up some other horrible code Change 3138053 on 2016/09/23 by Matt.Kuhlenschmidt Fixed Child Actor Template properties not visible after changing Child Actor Class Change 3138079 on 2016/09/23 by Jamie.Dale Fixing some Clang warnings Change 3138087 on 2016/09/23 by Jamie.Dale Added GetResourceSizeEx and GetResourceSizeBytes, and deprecated GetResourceSize GetResourceSizeEx populates a struct which reports not only how much memory is allocated, but also which arenas the memory was allocated from. GetResourceSizeBytes just wraps a call to GetResourceSizeEx and returns the total size from all arenas (this has the same behavior as the now deprecated GetResourceSize). Classes that used to override GetResourceSize should instead override GetResourceSizeEx and report their allocations as appropriate. #jira UETOOL-952 Change 3138127 on 2016/09/23 by Gareth.Martin Fixed crash when merging levels containing landscape #jira UE-36267 Change 3138821 on 2016/09/23 by Stephan.Jiang Fixes "Select all input node" doesn't work properly on output node. #jira UE-36335 Change 3138915 on 2016/09/23 by Stephan.Jiang Disable "select all linked nodes" for output nodes in material editor Change 3139341 on 2016/09/25 by Nick.Darnell Automation - Moving the Blueprint Compiler Tests into the RuntimeTests plugin, and making the context client only since that's the only valid place to runt these tests. Change 3139342 on 2016/09/25 by Nick.Darnell Landscape - Fixing some compiler errors on mac. Change 3139345 on 2016/09/25 by Nick.Darnell Automation - Spelling and cleanup. Change 3139346 on 2016/09/25 by Nick.Darnell Engine - Changing a check to an ensure, there's no reason to crash if this happens. Change 3139347 on 2016/09/25 by Nick.Darnell Automation - Making EFunctionalTestResult a BlueprintType Change 3139348 on 2016/09/25 by Nick.Darnell Automation - Adding another test map. Change 3139676 on 2016/09/26 by Michael.Dupuis #jira UE-32335 If we are a config object simply permit the transaction for undo/redo Change 3139702 on 2016/09/26 by Nick.Darnell UMG - Making GetLocalHitLocation on UWidgetComponent virtual. Change 3139760 on 2016/09/26 by Alexis.Matte Make sure we remove override materials from the list when the mesh point by the component has less materials. #jira UE-28845 Change 3139761 on 2016/09/26 by Alex.Delesky Added additional validation code to FPropertyNode to now properly validate TMap value and key nodes. #jira none Change 3139843 on 2016/09/26 by Alex.Delesky #jira UE-36066 - Clearing all options from a ComboBox String when selecting an option will now also clear out the selected text correctly. Change 3139880 on 2016/09/26 by Frank.Fella QAGame - Update multitouch test with less crashy assets? Change 3139908 on 2016/09/26 by Matt.Kuhlenschmidt Fix selections having the potential to be out of sync after undo/redo Change 3139928 on 2016/09/26 by Nick.Darnell Automation - tweaking the test maps some more. Change 3140646 on 2016/09/26 by Matt.Kuhlenschmidt Fix false positive with the test for vaild materials being rendered by slate. Change 3140912 on 2016/09/26 by Frank.Fella Core - Fix multitouch ifdef which was preventing it from actually being enabled.Also update test level blueprint so that it's actually testable. Change 3141218 on 2016/09/27 by Matt.Kuhlenschmidt PR #2798: BP open anim interferes with mouse movement (Contributed by projectgheist) Change 3141223 on 2016/09/27 by Jamie.Dale Updated UTextProperty::Identical to no longer compare display strings all the time It was supposed to compare the identity at runtime as the display string can change at runtime. This was preventing FText properties from being used in TSet/TMap as the hash needs to be consistent. #jira UE-36456 Change 3141242 on 2016/09/27 by Richard.TalbotWatkin Fixed various issues where making changes to components in the Blueprint Editor could cause a crash if there is an active component in the component visualizer. #jira UE-36402 - Editor crash when adding a spline component after having deleted another spline component Duplicated CL 3139370 from //UE4/Release-4.13 Duplicated CL 3139878 from //UE4/Release-4.13 Change 3141323 on 2016/09/27 by Michael.Dupuis #jira UE-35081 Enable bDisplayEngineVersionInBadge by default Change 3141798 on 2016/09/27 by tim.gautier Added UMG_DisplayWidget Change 3143038 on 2016/09/28 by Jamie.Dale Added extra context to FTableRowBase::OnPostDataImport It now takes the owning data table and the row name as parameters. This allows is to do more useful fix-up that depends on the context of where it's used (such as stabilized text keys). Change 3143039 on 2016/09/28 by Jamie.Dale Optimized UTextProperty::Identical to use a pointer comparison rather than read out the identity Only texts which have the same display string pointer can have the same identity, so this is a much faster check. Change 3143098 on 2016/09/28 by Gareth.Martin Fixed crash when loading duplicated landscape levels #jira UE-34890 Change 3143300 on 2016/09/28 by Gareth.Martin Fixed crash when duplicating a level containing a landscape through the content browser #jira UE-34890 Change 3143389 on 2016/09/28 by Jamie.Dale LastResort is no longer staged in shipping builds You can now use the Content/SlateDebug folder to store any Slate resources that shouldn't be used in a shipping build (either for the Engine or for a game). This also removes the old bUsesSlateEditorStyle hack as everything should have migrated away from that now. Change 3143565 on 2016/09/28 by Matt.Kuhlenschmidt Fixed this file Change 3143717 on 2016/09/28 by Michael.Dupuis Fixed lowercase Change 3143798 on 2016/09/28 by Matt.Kuhlenschmidt Fixed StreamingPauseRendering code to not attempt to tick the scene viewport on the slate loading thread while where are blocked on level streaming. The viewport is rendered once and the render target is passed to slate instead of the entire viewport Change 3143820 on 2016/09/28 by Alexis.Matte Use the PersonaToolikit to get the mesh Change 3143833 on 2016/09/28 by Matt.Kuhlenschmidt Added guard for UE-36499 Change 3144144 on 2016/09/28 by Matt.Kuhlenschmidt Fix constructor init order Change 3144821 on 2016/09/29 by Jamie.Dale Fixed feedback loop in FSlateEditableTextLayout::ComputeDesiredSize If the wrapping width is less than the scrollbar width, the scrollbar could constantly re-appear and then disappear. Change 3144867 on 2016/09/29 by Matt.Kuhlenschmidt Added a commandlet to allow command line importing of any asset type the engine supports. - Intermediate checkin Change 3144875 on 2016/09/29 by Nick.Darnell Automation - Adding CornellBox example map, fixing some additional tests, removing the Movement Test. Change 3144975 on 2016/09/29 by Matt.Kuhlenschmidt Disable auto-applying of scalability settings The user will still be asked if the settings should be applied but if they do nothing the notification will just go away without setting stuff. Change 3145274 on 2016/09/29 by Jamie.Dale New asset menu no longer has a scrollbar on most displays Change 3146004 on 2016/09/29 by Matt.Barnes Adding two FBX test files to help facilitate QA coverage on the new material/section workflow. Change 3146377 on 2016/09/30 by Gareth.Martin Fixed landscape rendering errors after using the "change component size" tool - also affected initial import of a landscape+weightmaps #jira UE-34518 Change 3146455 on 2016/09/30 by Jamie.Dale Fixing more menus that had scrollbars due to only being able to use half the vertical resolution Change 3146466 on 2016/09/30 by Gareth.Martin Fixed not being able to erase foliage attached to BSP #jira UE-36297 Change 3146471 on 2016/09/30 by Jamie.Dale Can no longer localize sequences via the Content Browser Change 3146569 on 2016/09/30 by Jamie.Dale Fixed UGatherTextFromSourceCommandlet::ParseSourceText being able to underflow while parsing Change 3147116 on 2016/09/30 by Michael.Dupuis #jira UE-33068 Update selection once after the bulk operation so the AssetContextMenu will have a proper selection, but only perform this if we're not in UserSearchingMode (which mean AssetPicker) Change 3148091 on 2016/10/01 by Matt.Barnes Adding a map and relevant assets to facilitate testing around the new material blueprint nodes - GetMaterialSlotNames, GetMaterialIndex, and SetMaterialByName, respectively Change 3148714 on 2016/10/03 by Nick.Darnell PR #2770: [Git plugin] Fix bug where history and merging do not work if the user has format.pretty settings in their gitconfig (Contributed by SRombauts) #jira UE-35568 Change 3148793 on 2016/10/03 by Nick.Darnell Automation - TPS for SM_Cornellbox Change 3148801 on 2016/10/03 by Nick.Darnell PR #2820: [WidgetBlueprintLibrary] Throwing Essential-Functionality-Understanding PIE Errors when Player Controller ptr not supplied (Contributed by EverNewJoy) #jira UE-36711 Change 3148805 on 2016/10/03 by Nick.Darnell PR #2822: Add missing base includes and forward declarations for UProgressBar and UTextBlock (Contributed by error454) #jira UE-36715 Change 3148813 on 2016/10/03 by Nick.Darnell UMG - The retainer now contains the SVirtualWindow directly in the hierarchy. This should now make it possible to reliably focus elements inside the retainer widget. Change 3148855 on 2016/10/03 by Gareth.Martin Fixed performance regression when importing landscape heightmaps #jira UE-36659 Change 3149482 on 2016/10/03 by Cody.Albert Added link to Support landing page to Help menu #jira UE-36603 Change 3149520 on 2016/10/03 by tim.gautier Edited UMG_Behavior - Collapsed now has a toggleable state to demonstrate functionality. Change 3149945 on 2016/10/04 by Gareth.Martin Fixed invisible landscape components when using tessellation on landscape material #jira UE-35494 Change 3149951 on 2016/10/04 by Gareth.Martin Reduced material update log spam when creating and editing landscapes - Some will remain, landscape fundementally manipulates a lot of material instances #jira UE-34440 Change 3150143 on 2016/10/04 by Matt.Kuhlenschmidt Fix not crashing when trying to clear objects which have a specific class filter in the property settings https://jira.it.epicgames.net/browse/UE-36692 Change 3150614 on 2016/10/04 by Nick.Darnell Git - Disabling some logging in non-debug builds of the git source control plugin. Change 3151647 on 2016/10/05 by Matt.Kuhlenschmidt Fix loc warnings in these files (duplicate loc keys) Change 3151679 on 2016/10/05 by Nick.Darnell Editor - Fixing the build, removing the VREditor module from the dynamically loaded list. Change 3151722 on 2016/10/05 by Gareth.Martin Fix breakage to LandscapeEdModeSplineTools.cpp caused by Dev-VREditor from main integration Change 3151816 on 2016/10/05 by Gareth.Martin Fixed more breakage to Landscape caused by Dev-VREditor from main integration [CL 3152072 by Matt Kuhlenschmidt in Main branch]
794 lines
30 KiB
C#
794 lines
30 KiB
C#
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.IO;
|
|
using UnrealBuildTool;
|
|
using System.Diagnostics;
|
|
using Tools.DotNETCommon.CaselessDictionary;
|
|
using Tools.DotNETCommon;
|
|
using System.Reflection;
|
|
|
|
namespace AutomationTool
|
|
{
|
|
public struct SingleTargetProperties
|
|
{
|
|
public string TargetName;
|
|
public TargetRules Rules;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Autodetected project properties.
|
|
/// </summary>
|
|
public class ProjectProperties
|
|
{
|
|
/// <summary>
|
|
/// Full Project path. Must be a .uproject file
|
|
/// </summary>
|
|
public FileReference RawProjectPath;
|
|
|
|
/// <summary>
|
|
/// True if the uproject contains source code.
|
|
/// </summary>
|
|
public bool bIsCodeBasedProject;
|
|
|
|
/// <summary>
|
|
/// Whether the project uses Steam (todo: substitute with more generic functionality)
|
|
/// </summary>
|
|
public bool bUsesSteam;
|
|
|
|
/// <summary>
|
|
/// Whether the project uses CEF3
|
|
/// </summary>
|
|
public bool bUsesCEF3;
|
|
|
|
/// <summary>
|
|
/// Whether the project uses visual Slate UI (as opposed to the low level windowing/messaging which is always used)
|
|
/// </summary>
|
|
public bool bUsesSlate = true;
|
|
|
|
/// <summary>
|
|
/// Hack for legacy game styling isses. No new project should ever set this to true
|
|
/// Whether the project uses the Slate editor style in game.
|
|
/// </summary>
|
|
public bool bUsesSlateEditorStyle = false;
|
|
|
|
/// <summary>
|
|
// By default we use the Release C++ Runtime (CRT), even when compiling Debug builds. This is because the Debug C++
|
|
// Runtime isn't very useful when debugging Unreal Engine projects, and linking against the Debug CRT libraries forces
|
|
// our third party library dependencies to also be compiled using the Debug CRT (and often perform more slowly.) Often
|
|
// it can be inconvenient to require a separate copy of the debug versions of third party static libraries simply
|
|
// so that you can debug your program's code.
|
|
/// </summary>
|
|
public bool bDebugBuildsActuallyUseDebugCRT = false;
|
|
|
|
/// <summary>
|
|
/// List of all targets detected for this project.
|
|
/// </summary>
|
|
public Dictionary<TargetRules.TargetType, SingleTargetProperties> Targets = new Dictionary<TargetRules.TargetType, SingleTargetProperties>();
|
|
|
|
/// <summary>
|
|
/// List of all Engine ini files for this project
|
|
/// </summary>
|
|
public Dictionary<UnrealTargetPlatform, ConfigCacheIni> EngineConfigs = new Dictionary<UnrealTargetPlatform,ConfigCacheIni>();
|
|
|
|
/// <summary>
|
|
/// List of all Game ini files for this project
|
|
/// </summary>
|
|
public Dictionary<UnrealTargetPlatform, ConfigCacheIni> GameConfigs = new Dictionary<UnrealTargetPlatform, ConfigCacheIni>();
|
|
|
|
/// <summary>
|
|
/// List of all programs detected for this project.
|
|
/// </summary>
|
|
public List<SingleTargetProperties> Programs = new List<SingleTargetProperties>();
|
|
|
|
/// <summary>
|
|
/// Specifies if the target files were generated
|
|
/// </summary>
|
|
public bool bWasGenerated = false;
|
|
|
|
internal ProjectProperties()
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Project related utility functions.
|
|
/// </summary>
|
|
public class ProjectUtils
|
|
{
|
|
private static CaselessDictionary<ProjectProperties> PropertiesCache = new CaselessDictionary<ProjectProperties>();
|
|
|
|
/// <summary>
|
|
/// Gets a short project name (QAGame, Elemental, etc)
|
|
/// </summary>
|
|
/// <param name="RawProjectPath">Full project path.</param>
|
|
/// <param name="bIsUProjectFile">True if a uproject.</param>
|
|
/// <returns>Short project name</returns>
|
|
public static string GetShortProjectName(FileReference RawProjectPath)
|
|
{
|
|
return CommandUtils.GetFilenameWithoutAnyExtensions(RawProjectPath.FullName);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets project properties.
|
|
/// </summary>
|
|
/// <param name="RawProjectPath">Full project path.</param>
|
|
/// <returns>Properties of the project.</returns>
|
|
public static ProjectProperties GetProjectProperties(FileReference RawProjectPath, List<UnrealTargetPlatform> ClientTargetPlatforms = null, bool AssetNativizationRequested = false)
|
|
{
|
|
string ProjectKey = "UE4";
|
|
if (RawProjectPath != null)
|
|
{
|
|
ProjectKey = CommandUtils.ConvertSeparators(PathSeparator.Slash, RawProjectPath.FullName);
|
|
}
|
|
ProjectProperties Properties;
|
|
if (PropertiesCache.TryGetValue(ProjectKey, out Properties) == false)
|
|
{
|
|
Properties = DetectProjectProperties(RawProjectPath, ClientTargetPlatforms, AssetNativizationRequested);
|
|
PropertiesCache.Add(ProjectKey, Properties);
|
|
}
|
|
return Properties;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Checks if the project is a UProject file with source code.
|
|
/// </summary>
|
|
/// <param name="RawProjectPath">Full project path.</param>
|
|
/// <returns>True if the project is a UProject file with source code.</returns>
|
|
public static bool IsCodeBasedUProjectFile(FileReference RawProjectPath)
|
|
{
|
|
return GetProjectProperties(RawProjectPath, null).bIsCodeBasedProject;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns a path to the client binaries folder.
|
|
/// </summary>
|
|
/// <param name="RawProjectPath">Full project path.</param>
|
|
/// <param name="Platform">Platform type.</param>
|
|
/// <returns>Path to the binaries folder.</returns>
|
|
public static string GetProjectClientBinariesFolder(string ProjectClientBinariesPath, UnrealTargetPlatform Platform = UnrealTargetPlatform.Unknown)
|
|
{
|
|
if (Platform != UnrealTargetPlatform.Unknown)
|
|
{
|
|
ProjectClientBinariesPath = CommandUtils.CombinePaths(ProjectClientBinariesPath, Platform.ToString());
|
|
}
|
|
return ProjectClientBinariesPath;
|
|
}
|
|
|
|
private static bool RequiresTempTarget(FileReference RawProjectPath, List<UnrealTargetPlatform> ClientTargetPlatforms, bool AssetNativizationRequested)
|
|
{
|
|
// check to see if we already have a Target.cs file
|
|
if (File.Exists (Path.Combine (Path.GetDirectoryName (RawProjectPath.FullName), "Source", RawProjectPath.GetFileNameWithoutExtension() + ".Target.cs")))
|
|
{
|
|
return false;
|
|
}
|
|
else if (Directory.Exists(Path.Combine(Path.GetDirectoryName(RawProjectPath.FullName), "Source")))
|
|
{
|
|
// wasn't one in the main Source directory, let's check all sub-directories
|
|
//@todo: may want to read each target.cs to see if it has a target corresponding to the project name as a final check
|
|
FileInfo[] Files = (new DirectoryInfo( Path.Combine (Path.GetDirectoryName (RawProjectPath.FullName), "Source")).GetFiles ("*.Target.cs", SearchOption.AllDirectories));
|
|
if (Files.Length > 0)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//
|
|
// once we reach this point, we can surmise that this is an asset-
|
|
// only (code free) project
|
|
|
|
if (AssetNativizationRequested)
|
|
{
|
|
// we're going to be converting some of the project's assets
|
|
// into native code, so we require a distinct target (executable)
|
|
// be generated for this project
|
|
return true;
|
|
}
|
|
|
|
// no Target file, now check to see if build settings have changed
|
|
List<UnrealTargetPlatform> TargetPlatforms = ClientTargetPlatforms;
|
|
if (ClientTargetPlatforms == null || ClientTargetPlatforms.Count < 1)
|
|
{
|
|
// No client target platforms, add all in
|
|
TargetPlatforms = new List<UnrealTargetPlatform>();
|
|
foreach (UnrealTargetPlatform TargetPlatformType in Enum.GetValues(typeof(UnrealTargetPlatform)))
|
|
{
|
|
if (TargetPlatformType != UnrealTargetPlatform.Unknown)
|
|
{
|
|
TargetPlatforms.Add(TargetPlatformType);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Change the working directory to be the Engine/Source folder. We are running from Engine/Binaries/DotNET
|
|
string oldCWD = Directory.GetCurrentDirectory();
|
|
if (BuildConfiguration.RelativeEnginePath == "../../Engine/")
|
|
{
|
|
string EngineSourceDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().GetOriginalLocation()), "..", "..", "..", "Engine", "Source");
|
|
if (!Directory.Exists(EngineSourceDirectory)) // only set the directory if it exists, this should only happen if we are launching the editor from an artist sync
|
|
{
|
|
EngineSourceDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().GetOriginalLocation()), "..", "..", "..", "Engine", "Binaries");
|
|
}
|
|
Directory.SetCurrentDirectory(EngineSourceDirectory);
|
|
}
|
|
|
|
// Read the project descriptor, and find all the plugins available to this project
|
|
ProjectDescriptor Project = ProjectDescriptor.FromFile(RawProjectPath.FullName);
|
|
DirectoryReference EngineDirectory = new DirectoryReference(BuildConfiguration.RelativeEnginePath);
|
|
List<PluginInfo> AvailablePlugins = Plugins.ReadAvailablePlugins(EngineDirectory, RawProjectPath, Project.AdditionalPluginDirectories);
|
|
|
|
// check the target platforms for any differences in build settings or additional plugins
|
|
bool RetVal = false;
|
|
foreach (UnrealTargetPlatform TargetPlatformType in TargetPlatforms)
|
|
{
|
|
UEBuildPlatform BuildPlat = UEBuildPlatform.GetBuildPlatform(TargetPlatformType, true);
|
|
if (!Automation.IsEngineInstalled() && BuildPlat != null && !(BuildPlat as UEBuildPlatform).HasDefaultBuildConfig(TargetPlatformType, RawProjectPath.Directory))
|
|
{
|
|
RetVal = true;
|
|
break;
|
|
}
|
|
|
|
// find if there are any plugins enabled or disabled which differ from the default
|
|
foreach(PluginInfo Plugin in AvailablePlugins)
|
|
{
|
|
bool bPluginEnabledForProject = UProjectInfo.IsPluginEnabledForProject(Plugin, Project, TargetPlatformType, TargetRules.TargetType.Game);
|
|
if ((bPluginEnabledForProject && !Plugin.Descriptor.bEnabledByDefault) || (bPluginEnabledForProject && Plugin.Descriptor.bInstalled))
|
|
{
|
|
if(Plugin.Descriptor.Modules.Any(Module => Module.IsCompiledInConfiguration(TargetPlatformType, TargetRules.TargetType.Game, bBuildDeveloperTools: false, bBuildEditor: false)))
|
|
{
|
|
RetVal = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Change back to the original directory
|
|
Directory.SetCurrentDirectory(oldCWD);
|
|
return RetVal;
|
|
}
|
|
|
|
private static void GenerateTempTarget(FileReference RawProjectPath)
|
|
{
|
|
// read in the template target cs file
|
|
var TempCSFile = CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, "Engine", "Build", "Target.cs.template");
|
|
string TargetCSFile = File.ReadAllText(TempCSFile);
|
|
|
|
// replace {GAME_NAME} with the game name
|
|
TargetCSFile = TargetCSFile.Replace("{GAME_NAME}", Path.GetFileNameWithoutExtension(RawProjectPath.FullName));
|
|
|
|
// write out the file in a new Source directory
|
|
string FileName = CommandUtils.CombinePaths(Path.GetDirectoryName(RawProjectPath.FullName), "Intermediate", "Source", Path.GetFileNameWithoutExtension(RawProjectPath.FullName) + ".Target.cs");
|
|
if (!Directory.Exists(Path.GetDirectoryName(FileName)))
|
|
{
|
|
Directory.CreateDirectory(Path.GetDirectoryName(FileName));
|
|
}
|
|
|
|
File.WriteAllText(FileName, TargetCSFile);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Attempts to autodetect project properties.
|
|
/// </summary>
|
|
/// <param name="RawProjectPath">Full project path.</param>
|
|
/// <returns>Project properties.</returns>
|
|
private static ProjectProperties DetectProjectProperties(FileReference RawProjectPath, List<UnrealTargetPlatform> ClientTargetPlatforms, bool AssetNativizationRequested)
|
|
{
|
|
var Properties = new ProjectProperties();
|
|
Properties.RawProjectPath = RawProjectPath;
|
|
|
|
// detect if the project is content only, but has non-default build settings
|
|
List<string> ExtraSearchPaths = null;
|
|
if (RawProjectPath != null)
|
|
{
|
|
string TempTargetDir = CommandUtils.CombinePaths(Path.GetDirectoryName(RawProjectPath.FullName), "Intermediate", "Source");
|
|
if (RequiresTempTarget(RawProjectPath, ClientTargetPlatforms, AssetNativizationRequested))
|
|
{
|
|
GenerateTempTarget(RawProjectPath);
|
|
Properties.bWasGenerated = true;
|
|
ExtraSearchPaths = new List<string>();
|
|
ExtraSearchPaths.Add(TempTargetDir);
|
|
}
|
|
else if (File.Exists(Path.Combine(Path.GetDirectoryName(RawProjectPath.FullName), "Intermediate", "Source", Path.GetFileNameWithoutExtension(RawProjectPath.FullName) + ".Target.cs")))
|
|
{
|
|
File.Delete(Path.Combine(Path.GetDirectoryName(RawProjectPath.FullName), "Intermediate", "Source", Path.GetFileNameWithoutExtension(RawProjectPath.FullName) + ".Target.cs"));
|
|
}
|
|
|
|
// in case the RulesCompiler (what we use to find all the
|
|
// Target.cs files) has already cached the contents of this
|
|
// directory, then we need to invalidate that cache (so
|
|
// it'll find/use the new Target.cs file)
|
|
RulesCompiler.InvalidateRulesFileCache(TempTargetDir);
|
|
}
|
|
|
|
if (CommandUtils.CmdEnv.HasCapabilityToCompile)
|
|
{
|
|
DetectTargetsForProject(Properties, ExtraSearchPaths);
|
|
Properties.bIsCodeBasedProject = !CommandUtils.IsNullOrEmpty(Properties.Targets) || !CommandUtils.IsNullOrEmpty(Properties.Programs);
|
|
}
|
|
else
|
|
{
|
|
// should never ask for engine targets if we can't compile
|
|
if (RawProjectPath == null)
|
|
{
|
|
throw new AutomationException("Cannot determine engine targets if we can't compile.");
|
|
}
|
|
|
|
Properties.bIsCodeBasedProject = Properties.bWasGenerated;
|
|
// if there's a Source directory with source code in it, then mark us as having source code
|
|
string SourceDir = CommandUtils.CombinePaths(Path.GetDirectoryName(RawProjectPath.FullName), "Source");
|
|
if (Directory.Exists(SourceDir))
|
|
{
|
|
string[] CppFiles = Directory.GetFiles(SourceDir, "*.cpp", SearchOption.AllDirectories);
|
|
string[] HFiles = Directory.GetFiles(SourceDir, "*.h", SearchOption.AllDirectories);
|
|
Properties.bIsCodeBasedProject |= (CppFiles.Length > 0 || HFiles.Length > 0);
|
|
}
|
|
}
|
|
|
|
// check to see if the uproject loads modules, only if we haven't already determined it is a code based project
|
|
if (!Properties.bIsCodeBasedProject && RawProjectPath != null)
|
|
{
|
|
string uprojectStr = File.ReadAllText(RawProjectPath.FullName);
|
|
Properties.bIsCodeBasedProject = uprojectStr.Contains("\"Modules\"");
|
|
}
|
|
|
|
// Get all ini files
|
|
if (RawProjectPath != null)
|
|
{
|
|
CommandUtils.LogVerbose("Loading ini files for {0}", RawProjectPath);
|
|
|
|
var EngineDirectory = CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, "Engine");
|
|
foreach (UnrealTargetPlatform TargetPlatformType in Enum.GetValues(typeof(UnrealTargetPlatform)))
|
|
{
|
|
if (TargetPlatformType != UnrealTargetPlatform.Unknown)
|
|
{
|
|
var Config = ConfigCacheIni.CreateConfigCacheIni(TargetPlatformType, "Engine", RawProjectPath.Directory, new DirectoryReference(EngineDirectory));
|
|
Properties.EngineConfigs.Add(TargetPlatformType, Config);
|
|
}
|
|
}
|
|
|
|
foreach (UnrealTargetPlatform TargetPlatformType in Enum.GetValues(typeof(UnrealTargetPlatform)))
|
|
{
|
|
if (TargetPlatformType != UnrealTargetPlatform.Unknown)
|
|
{
|
|
var Config = ConfigCacheIni.CreateConfigCacheIni(TargetPlatformType, "Game", RawProjectPath.Directory);
|
|
Properties.GameConfigs.Add(TargetPlatformType, Config);
|
|
}
|
|
}
|
|
}
|
|
|
|
return Properties;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Gets the project's root binaries folder.
|
|
/// </summary>
|
|
/// <param name="RawProjectPath">Full project path.</param>
|
|
/// <param name="TargetType">Target type.</param>
|
|
/// <param name="bIsUProjectFile">True if uproject file.</param>
|
|
/// <returns>Binaries path.</returns>
|
|
public static string GetClientProjectBinariesRootPath(FileReference RawProjectPath, TargetRules.TargetType TargetType, bool bIsCodeBasedProject)
|
|
{
|
|
var BinPath = String.Empty;
|
|
switch (TargetType)
|
|
{
|
|
case TargetRules.TargetType.Program:
|
|
BinPath = CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, "Engine", "Binaries");
|
|
break;
|
|
case TargetRules.TargetType.Client:
|
|
case TargetRules.TargetType.Game:
|
|
if (!bIsCodeBasedProject)
|
|
{
|
|
BinPath = CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, "Engine", "Binaries");
|
|
}
|
|
else
|
|
{
|
|
BinPath = CommandUtils.CombinePaths(CommandUtils.GetDirectoryName(RawProjectPath.FullName), "Binaries");
|
|
}
|
|
break;
|
|
}
|
|
return BinPath;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the location where all rules assemblies should go
|
|
/// </summary>
|
|
private static string GetRulesAssemblyFolder()
|
|
{
|
|
string RulesFolder;
|
|
if (GlobalCommandLine.Installed.IsSet)
|
|
{
|
|
RulesFolder = CommandUtils.CombinePaths(Path.GetTempPath(), "UAT", CommandUtils.EscapePath(CommandUtils.CmdEnv.LocalRoot), "Rules");
|
|
}
|
|
else
|
|
{
|
|
RulesFolder = CommandUtils.CombinePaths(CommandUtils.CmdEnv.EngineSavedFolder, "Rules");
|
|
}
|
|
return RulesFolder;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Finds all targets for the project.
|
|
/// </summary>
|
|
/// <param name="Properties">Project properties.</param>
|
|
/// <param name="ExtraSearchPaths">Additional search paths.</param>
|
|
private static void DetectTargetsForProject(ProjectProperties Properties, List<string> ExtraSearchPaths = null)
|
|
{
|
|
Properties.Targets = new Dictionary<TargetRules.TargetType, SingleTargetProperties>();
|
|
FileReference TargetsDllFilename;
|
|
string FullProjectPath = null;
|
|
|
|
var GameFolders = new List<DirectoryReference>();
|
|
var RulesFolder = new DirectoryReference(GetRulesAssemblyFolder());
|
|
if (Properties.RawProjectPath != null)
|
|
{
|
|
CommandUtils.LogVerbose("Looking for targets for project {0}", Properties.RawProjectPath);
|
|
|
|
TargetsDllFilename = FileReference.Combine(RulesFolder, String.Format("UATRules{0}.dll", Properties.RawProjectPath.GetHashCode()));
|
|
|
|
FullProjectPath = CommandUtils.GetDirectoryName(Properties.RawProjectPath.FullName);
|
|
GameFolders.Add(new DirectoryReference(FullProjectPath));
|
|
CommandUtils.LogVerbose("Searching for target rule files in {0}", FullProjectPath);
|
|
}
|
|
else
|
|
{
|
|
TargetsDllFilename = FileReference.Combine(RulesFolder, String.Format("UATRules{0}.dll", "_BaseEngine_"));
|
|
}
|
|
|
|
// the UBT code assumes a certain CWD, but artists don't have this CWD.
|
|
var SourceDir = CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, "Engine", "Source");
|
|
bool DirPushed = false;
|
|
if (CommandUtils.DirectoryExists_NoExceptions(SourceDir))
|
|
{
|
|
CommandUtils.PushDir(SourceDir);
|
|
DirPushed = true;
|
|
}
|
|
var ExtraSearchDirectories = (ExtraSearchPaths == null)? null : ExtraSearchPaths.Select(x => new DirectoryReference(x)).ToList();
|
|
var TargetScripts = RulesCompiler.FindAllRulesSourceFiles(RulesCompiler.RulesFileType.Target, GameFolders: GameFolders, ForeignPlugins: null, AdditionalSearchPaths: ExtraSearchDirectories);
|
|
if (DirPushed)
|
|
{
|
|
CommandUtils.PopDir();
|
|
}
|
|
|
|
if (!CommandUtils.IsNullOrEmpty(TargetScripts))
|
|
{
|
|
// We only care about project target script so filter out any scripts not in the project folder, or take them all if we are just doing engine stuff
|
|
var ProjectTargetScripts = new List<FileReference>();
|
|
foreach (var TargetScript in TargetScripts)
|
|
{
|
|
if (FullProjectPath == null || TargetScript.IsUnderDirectory(new DirectoryReference(FullProjectPath)))
|
|
{
|
|
ProjectTargetScripts.Add(TargetScript);
|
|
}
|
|
}
|
|
TargetScripts = ProjectTargetScripts;
|
|
}
|
|
|
|
if (!CommandUtils.IsNullOrEmpty(TargetScripts))
|
|
{
|
|
CommandUtils.LogVerbose("Found {0} target rule files:", TargetScripts.Count);
|
|
foreach (var Filename in TargetScripts)
|
|
{
|
|
CommandUtils.LogVerbose(" {0}", Filename);
|
|
}
|
|
|
|
// Check if the scripts require compilation
|
|
bool DoNotCompile = false;
|
|
if (!CommandUtils.IsBuildMachine && !CheckIfScriptAssemblyIsOutOfDate(TargetsDllFilename, TargetScripts))
|
|
{
|
|
Log.TraceVerbose("Targets DLL {0} is up to date.", TargetsDllFilename);
|
|
DoNotCompile = true;
|
|
}
|
|
if (!DoNotCompile && CommandUtils.FileExists_NoExceptions(TargetsDllFilename.FullName))
|
|
{
|
|
if (!CommandUtils.DeleteFile_NoExceptions(TargetsDllFilename.FullName, true))
|
|
{
|
|
DoNotCompile = true;
|
|
CommandUtils.LogVerbose("Could not delete {0} assuming it is up to date and reusable for a recursive UAT call.", TargetsDllFilename);
|
|
}
|
|
}
|
|
|
|
CompileAndLoadTargetsAssembly(Properties, TargetsDllFilename, DoNotCompile, TargetScripts);
|
|
}
|
|
}
|
|
|
|
/// <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);
|
|
|
|
var ReferencedAssemblies = new List<string>()
|
|
{
|
|
"System.dll",
|
|
"System.Core.dll",
|
|
"System.Xml.dll",
|
|
typeof(UnrealBuildTool.UnrealBuildTool).Assembly.Location
|
|
};
|
|
var TargetsDLL = DynamicCompilation.CompileAndLoadAssembly(TargetsDllFilename, TargetScripts, ReferencedAssemblies, null, DoNotCompile);
|
|
var DummyTargetInfo = new TargetInfo(BuildHostPlatform.Current.Platform, UnrealTargetConfiguration.Development, "");
|
|
var AllCompiledTypes = TargetsDLL.GetTypes();
|
|
foreach (Type TargetType in AllCompiledTypes)
|
|
{
|
|
// Find TargetRules but skip all "UE4Editor", "UE4Game" targets.
|
|
if (typeof(TargetRules).IsAssignableFrom(TargetType))
|
|
{
|
|
// Create an instance of this type
|
|
CommandUtils.LogVerbose("Creating target rules object: {0}", TargetType.Name);
|
|
var Rules = Activator.CreateInstance(TargetType, DummyTargetInfo) as TargetRules;
|
|
CommandUtils.LogVerbose("Adding target: {0} ({1})", TargetType.Name, Rules.Type);
|
|
|
|
SingleTargetProperties TargetData;
|
|
TargetData.TargetName = GetTargetName(TargetType);
|
|
Rules.TargetName = TargetData.TargetName;
|
|
TargetData.Rules = Rules;
|
|
if (Rules.Type == TargetRules.TargetType.Program)
|
|
{
|
|
Properties.Programs.Add(TargetData);
|
|
}
|
|
else
|
|
{
|
|
Properties.Targets.Add(Rules.Type, TargetData);
|
|
}
|
|
|
|
Properties.bUsesSteam |= Rules.bUsesSteam;
|
|
Properties.bUsesCEF3 |= Rules.bUsesCEF3;
|
|
Properties.bUsesSlate |= Rules.bUsesSlate;
|
|
Properties.bDebugBuildsActuallyUseDebugCRT |= Rules.bDebugBuildsActuallyUseDebugCRT;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Checks if any of the script files in newer than the generated assembly.
|
|
/// </summary>
|
|
/// <param name="TargetsDllFilename"></param>
|
|
/// <param name="TargetScripts"></param>
|
|
/// <returns>True if the generated assembly is out of date.</returns>
|
|
private static bool CheckIfScriptAssemblyIsOutOfDate(FileReference TargetsDllFilename, List<FileReference> TargetScripts)
|
|
{
|
|
var bOutOfDate = false;
|
|
var AssemblyInfo = new FileInfo(TargetsDllFilename.FullName);
|
|
if (AssemblyInfo.Exists)
|
|
{
|
|
foreach (var ScriptFilename in TargetScripts)
|
|
{
|
|
var ScriptInfo = new FileInfo(ScriptFilename.FullName);
|
|
if (ScriptInfo.Exists && ScriptInfo.LastWriteTimeUtc > AssemblyInfo.LastWriteTimeUtc)
|
|
{
|
|
bOutOfDate = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
bOutOfDate = true;
|
|
}
|
|
return bOutOfDate;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Converts class type name (usually ends with Target) to a target name (without the postfix).
|
|
/// </summary>
|
|
/// <param name="TargetRulesType">Tagert class.</param>
|
|
/// <returns>Target name</returns>
|
|
private static string GetTargetName(Type TargetRulesType)
|
|
{
|
|
const string TargetPostfix = "Target";
|
|
var Name = TargetRulesType.Name;
|
|
if (Name.EndsWith(TargetPostfix, StringComparison.InvariantCultureIgnoreCase))
|
|
{
|
|
Name = Name.Substring(0, Name.Length - TargetPostfix.Length);
|
|
}
|
|
return Name;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Performs initial cleanup of target rules folder
|
|
/// </summary>
|
|
public static void CleanupFolders()
|
|
{
|
|
CommandUtils.LogVerbose("Cleaning up project rules folder");
|
|
var RulesFolder = GetRulesAssemblyFolder();
|
|
if (CommandUtils.DirectoryExists(RulesFolder))
|
|
{
|
|
CommandUtils.DeleteDirectoryContents(RulesFolder);
|
|
}
|
|
}
|
|
}
|
|
|
|
public class BranchInfo
|
|
{
|
|
|
|
public static List<TargetRules.TargetType> MonolithicKinds = new List<TargetRules.TargetType>
|
|
{
|
|
TargetRules.TargetType.Game,
|
|
TargetRules.TargetType.Client,
|
|
TargetRules.TargetType.Server,
|
|
};
|
|
|
|
[DebuggerDisplay("{GameName}")]
|
|
public class BranchUProject
|
|
{
|
|
public string GameName;
|
|
public FileReference FilePath;
|
|
public ProjectProperties Properties;
|
|
|
|
public BranchUProject(UnrealBuildTool.UProjectInfo InfoEntry)
|
|
{
|
|
GameName = InfoEntry.GameName;
|
|
|
|
//not sure what the heck this path is relative to
|
|
FilePath = InfoEntry.FilePath;
|
|
|
|
if (!CommandUtils.FileExists_NoExceptions(FilePath.FullName))
|
|
{
|
|
throw new AutomationException("Could not resolve relative path corrctly {0} -> {1} which doesn't exist.", InfoEntry.FilePath, FilePath);
|
|
}
|
|
|
|
Properties = ProjectUtils.GetProjectProperties(FilePath);
|
|
|
|
|
|
|
|
}
|
|
public BranchUProject()
|
|
{
|
|
GameName = "UE4";
|
|
Properties = ProjectUtils.GetProjectProperties(null);
|
|
if (!Properties.Targets.ContainsKey(TargetRules.TargetType.Editor))
|
|
{
|
|
throw new AutomationException("Base UE4 project did not contain an editor target.");
|
|
}
|
|
}
|
|
public void Dump(List<UnrealTargetPlatform> InHostPlatforms)
|
|
{
|
|
CommandUtils.LogVerbose(" ShortName: " + GameName);
|
|
CommandUtils.LogVerbose(" FilePath : " + FilePath);
|
|
CommandUtils.LogVerbose(" bIsCodeBasedProject : " + (Properties.bIsCodeBasedProject ? "YES" : "NO"));
|
|
CommandUtils.LogVerbose(" bUsesSteam : " + (Properties.bUsesSteam ? "YES" : "NO"));
|
|
CommandUtils.LogVerbose(" bUsesCEF3 : " + (Properties.bUsesCEF3 ? "YES" : "NO"));
|
|
CommandUtils.LogVerbose(" bUsesSlate : " + (Properties.bUsesSlate ? "YES" : "NO"));
|
|
foreach (var HostPlatform in InHostPlatforms)
|
|
{
|
|
CommandUtils.LogVerbose(" For Host : " + HostPlatform.ToString());
|
|
CommandUtils.LogVerbose(" Targets {0}:", Properties.Targets.Count);
|
|
foreach (var ThisTarget in Properties.Targets)
|
|
{
|
|
CommandUtils.LogVerbose(" TargetName : " + ThisTarget.Value.TargetName);
|
|
CommandUtils.LogVerbose(" Type : " + ThisTarget.Key.ToString());
|
|
CommandUtils.LogVerbose(" bUsesSteam : " + (ThisTarget.Value.Rules.bUsesSteam ? "YES" : "NO"));
|
|
CommandUtils.LogVerbose(" bUsesCEF3 : " + (ThisTarget.Value.Rules.bUsesCEF3 ? "YES" : "NO"));
|
|
CommandUtils.LogVerbose(" bUsesSlate : " + (ThisTarget.Value.Rules.bUsesSlate ? "YES" : "NO"));
|
|
}
|
|
CommandUtils.LogVerbose(" Programs {0}:", Properties.Programs.Count);
|
|
foreach (var ThisTarget in Properties.Programs)
|
|
{
|
|
CommandUtils.LogVerbose(" TargetName : " + ThisTarget.TargetName);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
public BranchUProject BaseEngineProject = null;
|
|
public List<BranchUProject> CodeProjects = new List<BranchUProject>();
|
|
public List<BranchUProject> NonCodeProjects = new List<BranchUProject>();
|
|
|
|
public IEnumerable<BranchUProject> AllProjects
|
|
{
|
|
get { return CodeProjects.Union(NonCodeProjects); }
|
|
}
|
|
|
|
public BranchInfo(List<UnrealTargetPlatform> InHostPlatforms)
|
|
{
|
|
BaseEngineProject = new BranchUProject();
|
|
|
|
var AllProjects = UnrealBuildTool.UProjectInfo.FilterGameProjects(false, null);
|
|
using(TelemetryStopwatch SortProjectsStopwatch = new TelemetryStopwatch("SortProjects"))
|
|
{
|
|
foreach (var InfoEntry in AllProjects)
|
|
{
|
|
var UProject = new BranchUProject(InfoEntry);
|
|
if (UProject.Properties.bIsCodeBasedProject)
|
|
{
|
|
CodeProjects.Add(UProject);
|
|
}
|
|
else
|
|
{
|
|
NonCodeProjects.Add(UProject);
|
|
// the base project uses BlankProject if it really needs a .uproject file
|
|
if (BaseEngineProject.FilePath == null && UProject.GameName == "BlankProject")
|
|
{
|
|
BaseEngineProject.FilePath = UProject.FilePath;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/* if (String.IsNullOrEmpty(BaseEngineProject.FilePath))
|
|
{
|
|
throw new AutomationException("All branches must have the blank project /Samples/Sandbox/BlankProject");
|
|
}*/
|
|
|
|
using(TelemetryStopwatch ProjectDumpStopwatch = new TelemetryStopwatch("Project Dump"))
|
|
{
|
|
CommandUtils.LogVerbose(" Base Engine:");
|
|
BaseEngineProject.Dump(InHostPlatforms);
|
|
|
|
CommandUtils.LogVerbose(" {0} Code projects:", CodeProjects.Count);
|
|
foreach (var Proj in CodeProjects)
|
|
{
|
|
Proj.Dump(InHostPlatforms);
|
|
}
|
|
CommandUtils.LogVerbose(" {0} Non-Code projects:", CodeProjects.Count);
|
|
foreach (var Proj in NonCodeProjects)
|
|
{
|
|
Proj.Dump(InHostPlatforms);
|
|
}
|
|
}
|
|
}
|
|
|
|
public BranchUProject FindGame(string GameName)
|
|
{
|
|
foreach (var Proj in CodeProjects)
|
|
{
|
|
if (Proj.GameName.Equals(GameName, StringComparison.InvariantCultureIgnoreCase))
|
|
{
|
|
return Proj;
|
|
}
|
|
}
|
|
foreach (var Proj in NonCodeProjects)
|
|
{
|
|
if (Proj.GameName.Equals(GameName, StringComparison.InvariantCultureIgnoreCase))
|
|
{
|
|
return Proj;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
public BranchUProject FindGameChecked(string GameName)
|
|
{
|
|
BranchUProject Project = FindGame(GameName);
|
|
if(Project == null)
|
|
{
|
|
throw new AutomationException("Cannot find project '{0}' in branch", GameName);
|
|
}
|
|
return Project;
|
|
}
|
|
public SingleTargetProperties FindProgram(string ProgramName)
|
|
{
|
|
foreach (var Proj in BaseEngineProject.Properties.Programs)
|
|
{
|
|
if (Proj.TargetName.Equals(ProgramName, StringComparison.InvariantCultureIgnoreCase))
|
|
{
|
|
return Proj;
|
|
}
|
|
}
|
|
|
|
foreach (var CodeProj in CodeProjects)
|
|
{
|
|
foreach (var Proj in CodeProj.Properties.Programs)
|
|
{
|
|
if (Proj.TargetName.Equals(ProgramName, StringComparison.InvariantCultureIgnoreCase))
|
|
{
|
|
return Proj;
|
|
}
|
|
}
|
|
}
|
|
|
|
SingleTargetProperties Result;
|
|
Result.TargetName = ProgramName;
|
|
Result.Rules = null;
|
|
return Result;
|
|
}
|
|
};
|
|
|
|
}
|