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
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3284872 on 2017/02/03 by Graeme.Thornton
Seperate pak cache granularity from pak signing chunk size
Change 3285765 on 2017/02/03 by Graeme.Thornton
Fix stats warnings because each slate new loading screen thread has the same stat name, but is assigned to a different thread
#jira UE-41478
Change 3286913 on 2017/02/04 by Ben.Marsh
IncludeTool: Merging fixes.
* Don't remove existing forward declarations unless explicitly instructed to do so. Files are optimized with these declarations in place, so removing them can cause output files to fail to build. It can be a useful separate step though, so expose it as a command-line option instead.
* Add a specific option for which files should be output by the tool. Any files which are excluded from this list are treated specially when generating output files, so as to prevent them from causing files to be omitted from other files that include them. Also add an option to force this mode for all headers, for use when testing formatting/include path generation.
Change 3287100 on 2017/02/05 by Ben.Marsh
UBT: Move platform settings into platform-specific TargetRules objects.
Change 3287106 on 2017/02/05 by Ben.Marsh
Merge UEBuildPlatformContext into UEBuildPlatform. Now that targets can have platform-specific settings, there is no need to separate a platform class which contains target-specific information.
Change 3287398 on 2017/02/06 by Steve.Robb
Fix for UHT failing when -WarningsAsErrors and -Verbose are specified together.
Change 3287399 on 2017/02/06 by Steve.Robb
Log verbosities made more readable in the debugger.
Change 3287410 on 2017/02/06 by Steve.Robb
Fix for TStructOpsTypeTraits where WithCopy gives a different result between specializing the traits and not providing WithCopy and not specializing the traits at all.
#fyi marc.audy
Change 3288020 on 2017/02/06 by Ben.Marsh
Prevent forward declaration of the ITextData class. We need to include the header for the debugger visualizers to work correctly.
Change 3291817 on 2017/02/08 by Steve.Robb
New EBlueprintCompileReinstancerFlags used to construct FBlueprintCompileReinstancer, instead of lots of bools.
Change 3292090 on 2017/02/08 by Graeme.Thornton
Crash fix - don't update font engine services if it was never created
#jira UE-33953
Change 3292993 on 2017/02/08 by Ben.Marsh
Add an option to disable force-including PCHs for files in the non-unity working set. (bAdaptiveUnityDisablesPCH)
Change 3293231 on 2017/02/08 by Ben.Marsh
BuildGraph: Allow overriding the changelist that a badge should be displayed for (with the Change="" attribute on the Badge declaration in XML), so the code changelist can be used if necessary. Also link to the failed step if only one has failed.
Change 3294213 on 2017/02/09 by Ben.Marsh
EC: Allow setting a property on frequent CI jobs that allows us to exclude it from job searches for generating the dashboard. Filtering on the client side is causing dashboard pages to be almost empty.
Change 3294753 on 2017/02/09 by Ben.Zeigler
#jira UE-41151 Fix UObjectLibrary::RemoveObject to remove from the correct array, and add comment mentioning that the dynamic use of Object Library is semi-deprecated
Change 3296070 on 2017/02/09 by Ben.Zeigler
Explicitly turn off Copy for a struct that has a linked list internally. I think turning Copy on by default for all non POD Types is pretty risky and is likely to crash for other games. In this case it was being copied for network replication, and it didn't have one defined so the default C++ one copied the linked list and crashed on destruction.
Change 3296420 on 2017/02/10 by Graeme.Thornton
Remove remaining references to AES_KEY, instead using the encryption key delegates to access the key where needed
Refactored encryption and signing key access in unrealpak to make it easier to use
Change 3296609 on 2017/02/10 by Ben.Marsh
BuildGraph: Fix error running the <Copy> task with an empty "From" argument.
* FileSystemReference.IsUnderDirectory() was not correctly handling cases where the directory was a root directory (and has to end in a path separator)
* FilePattern.AsDirectoryReference() with an empty token would append a path separator to an empty string, resulting in it referencing the root directory rather than the given base directory.
Change 3297440 on 2017/02/10 by Ben.Marsh
UBT: Move the FileFilter class into UnrealBuildTool.
Change 3297725 on 2017/02/10 by Ben.Zeigler
#jira UE-39199 Fix issue with enum value redirects using the wrong short or long name, it now fully supports both.
Clean up a lot of confusingly named and broken functions on UEnum:
#jira UE-41348 Deprecate FindEnumIndex, GetEnum, GetEnumName, replace with GetIndexByName, GetNameByIndex, and GetNameStringByIndex and clean up warnings
#jira UE-38187 Deprecate GetDisplayNameText and GetEnumText, replaced both with GetDisplayNameTextAtIndex which is now callable outside the editor and has a better comment
Deprecate FindEnumRedirects and replace with GetIndexByNameString. Fix code to not check the redirects array 5 times per enum lookup
Fix GetValueAsString to actually act on a value, not an index. This matches common usage and the function's name
While fixing deprecation warnings on internal games, fixed dozens of cases where it was using Index functions when it should have been using Value functions
Delete some now redundant enum editor code and pipe everything through UEnum
Change 3297979 on 2017/02/10 by Ben.Zeigler
Fix issues parsing Enums that are literally the string "None", which is allowed but leads to some odd behavior
Change 3298299 on 2017/02/10 by Steve.Robb
TTuple improvements:
- equality comparable
- serializable
- in the correct folder
2-tuples are specialized to be syntactically compatible with both TPair and TTuple.
TPair is now an alias for a 2-tuple and is no longer bound to TPairInitializer.
#fyi robert.manuszewski,ben.marsh
Change 3298460 on 2017/02/11 by Ben.Marsh
UGS: Set the correct result from running custom tasks.
Change 3298462 on 2017/02/11 by Ben.Marsh
UBT: Fix some deprecated messages that have the wrong release version, and add a better message for how ModuleRules constructors need to be updated.
Change 3299447 on 2017/02/13 by Graeme.Thornton
Fix AES and pak signing key embedding for content only projects
- Force temp target when any keys are specified by project config
Change 3299649 on 2017/02/13 by Steve.Robb
PLATFORM_HAS_DEFAULTED_OPERATORS fixed.
Other obsolete compiler switches removed.
Change 3299787 on 2017/02/13 by Steve.Robb
IsAbstract() for testing if a reflected native type contains pure virtual functions. Needed for BP nativization.
#fyi robert.manuszewski
Change 3300576 on 2017/02/13 by Ben.Marsh
EC: Add support for starting builds on any agent type. Mapping from agent types to resource pools is stored in an EC property sheet (/Generated/<Stream>/AgentTypes), allowing EC procedures to map it to a resource pool from a parameter.
Change 3300600 on 2017/02/13 by Ben.Marsh
EC: Add the -ClearHistory argument to UAT run to export BuildGraph settings, to allow running on incremental workspaces.
Change 3300624 on 2017/02/13 by Ben.Marsh
Switch incremental builds for all streams to start up on the incremental agent.
Change 3302134 on 2017/02/14 by Steve.Robb
UnrealCodeAnalyzer removed.
#fyi ben.marsh,robert.manuszewski
Change 3302639 on 2017/02/14 by Ben.Zeigler
Fix crash cooking odin with default command line
#jira UE-41952 Delete StealthTeleport map that crashes on load, and update default cook list that gets used if nothing specified
Change 3303002 on 2017/02/14 by Ben.Zeigler
#jira UE-41061 Fix it so editor only filtering on savepackage is uniformly applied regardless of if it's at package or object level
#jira UE-41880 Rewrite editor/client/server only filtering logic in SavePackage to fix various bugs. It now does all of the filtering up front, and won't process any filtered objects for imports or exports
Rename NotForEditorGame to NotAlwaysLoadedForEditorGame and improve comments, this flag says that the asset should be loaded EVEN IF it is editor only, it does not affect loading for normal objects
Change the non-map cook flags to RF_Public instead of RF_Standalone. Blueprint classes aren't RF_Standalone so were only being cooked before due to an accident of the dependency checker
Change it so anything with a Transient outer is marked transient at save time. These objects would not save out properly anyway
Fix it so -cooksinglepackage works properly again and excludes localization and startup packages
Tested with Fortnite and Odin, Odin works but with lots of warnings with nativization on which I need to investigate
Change 3303084 on 2017/02/14 by Ben.Zeigler
Attempt to get Nativization and EDL working without warnings
Change 3305153 on 2017/02/15 by Ben.Zeigler
Fix Fortnite and Orion cook, I don't understand why this passed my local testing
Fix the CDO subobject finder to actually return things instead of doing nothing, and fix a shadow variable warning
Change 3305959 on 2017/02/16 by Gil.Gribb
UE4 - Tweaked out the EDL loader for the switch with benefits to all platforms.
Change 3306159 on 2017/02/16 by Ben.Marsh
Fix path to target binaries when building non-monolithic in a unique build environment.
Change 3306584 on 2017/02/16 by Steve.Robb
UEnum internal functions renamed from Index to Value.
GetValueAsString_Internal() parameter now takes an int64, as is expected for enum values.
#fyi ben.zeigler
Change 3307836 on 2017/02/16 by Ben.Zeigler
#jira UE-42055 Load very old redirects in cooked builds. Matinee has no way of resaving redirects, so as long as matinee exists we need to keep them around forever, or fix matinee manually
Fixes lighting in Infiltrator demo
Change 3307929 on 2017/02/16 by Ben.Zeigler
#jira UE-42055 Second half of matinee redirector fix
Change 3308840 on 2017/02/17 by Matthew.Griffin
Reimplementing CL#3305808 from 4.15
Changed QA label build process so that it only allows version with 3 components (we always add the .0 for initial releases)
Change 3309115 on 2017/02/17 by Ben.Marsh
Windows: Fix the GetModulesDirectory() function always returning the engine binaries directory. It's possible to build non-monolithic targets which output all engine binaries to the game binaries directory - a requirement to being able to set game-specific defines or build settings, because we don't want shared engine binaries to be tainted with them. The module manager needs to be able to operate early on, before many of the game settings have been initialized, so just return the directory containing the Core module instead.
Change 3309120 on 2017/02/17 by Ben.Marsh
Fix support for creating modular builds which don't use the shared build environment.
Change 3309125 on 2017/02/17 by Ben.Marsh
Require that -CookDir arguments are specified separately on the command line. '+' is a valid path character (and common in build versions), so we shouldn't treat it as an argument separator.
Change 3309128 on 2017/02/17 by Ben.Marsh
Fix UnrealPak failures when enumerating all files from a source directory, if that directory happens to contain spaces.
Change 3309131 on 2017/02/17 by Ben.Marsh
Fix list of discovered assets being cleared by second call to FindFilesRecursive() when building DDC. Disable the -cookdir parameter again.
Change 3309140 on 2017/02/17 by Ben.Marsh
UAT: Fix exception moving a file from one location to another if the target directory does not exist.
Change 3309212 on 2017/02/17 by Ben.Marsh
Fixes/improvements for mod editor and code mods:
* A separate top-level project is generated for each code mod in the Visual Studio solution.
* Plugin descriptors now have a flag to identify themselves as mod as opposed to a regular game plugin, which prevents project plugins from getting their own VS project. New mods created with the mod editor will have this set by default, as do the three existing sample mods.
* Cleaning and building code mods will never modify engine binaries. Presence of the Engine/Build/InstalledProjectBuild.txt file is used to indicate running in this environment. This flag also disables options to edit metadata for non-mod plugins in installed builds.
* Plugin browser now includes a separate category for mods.
* Mod editor now behaves as an "installed" program by default, and will use the user's home folder for storing settings.
Change 3309231 on 2017/02/17 by Steve.Robb
Fix for Ar << bSomeBool where Ar is a derived class which overrides an operator<<.
#jira UE-42052
Change 3309248 on 2017/02/17 by Ben.Marsh
Add support for hot-reloading game plugin modules from Visual Studio, as long as their module returns IsGameModule() = true.
Change 3309257 on 2017/02/17 by Ben.Marsh
Prevent game binaries from being renamed for hot reload when working with installed projects.
Change 3309355 on 2017/02/17 by Steven.Hutton
Changes to make the website compatible with the new database changes.
Change 3309371 on 2017/02/17 by Ben.Marsh
Fix exception on shutdown when running asset registry with threads disabled.
#jira UE-41951
Change 3309389 on 2017/02/17 by Ben.Zeigler
#jira UE-42051 Fix ensure and crash when loading a null asset ID via the LoadAsset BP node
Change 3309570 on 2017/02/17 by Gil.Gribb
UE4 - Switch load time performace tweaks, plus abstracted the IO tracker and handle manager for other platforms and applied it to the PS4.
Change 3310039 on 2017/02/17 by Ben.Marsh
BuildGraph: Prevent exception when trying to delete a file that does not exist.
Change 3311484 on 2017/02/20 by Chris.Wood
CrashReportProcess crash add retry logic improvements (CRP v1.2.16)
Change 3311600 on 2017/02/20 by Matthew.Griffin
Updated StripSymbols functions so that all platforms can deal with the source and target file being the same
Change 3311675 on 2017/02/20 by Steve.Robb
FNativeClassHeaderGenerator::CurrentSourceFile stack replaced with C++ stack.
Change 3311893 on 2017/02/20 by Ben.Marsh
UGS: Add support for notifying users if CIS steps fail for content changes. Badges which test content should be listed in the [Notifications] section of the project-specific INI file, through +ContentBadges= lines.
Change 3313966 on 2017/02/21 by Ben.Marsh
Fix EC parsing of error messages output by the editor in the form "LogXYZ:Error:". Greedy optional subexpression in regex was matching everything until a space, so terminate a colon too.
Change 3314398 on 2017/02/21 by Ben.Zeigler
#jira UE-42212 Fix shutdown of AnimGraph module to be safer
[CL 3315211 by Ben Marsh in Main branch]
782 lines
29 KiB
C#
782 lines
29 KiB
C#
// Copyright 1998-2017 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>
|
|
/// List of all targets detected for this project.
|
|
/// </summary>
|
|
public Dictionary<TargetType, SingleTargetProperties> Targets = new Dictionary<TargetType, SingleTargetProperties>();
|
|
|
|
/// <summary>
|
|
/// List of all Engine ini files for this project
|
|
/// </summary>
|
|
public Dictionary<UnrealTargetPlatform, ConfigHierarchy> EngineConfigs = new Dictionary<UnrealTargetPlatform,ConfigHierarchy>();
|
|
|
|
/// <summary>
|
|
/// List of all Game ini files for this project
|
|
/// </summary>
|
|
public Dictionary<UnrealTargetPlatform, ConfigHierarchy> GameConfigs = new Dictionary<UnrealTargetPlatform, ConfigHierarchy>();
|
|
|
|
/// <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;
|
|
}
|
|
|
|
if (ClientTargetPlatforms != null)
|
|
{
|
|
foreach (UnrealTargetPlatform ClientPlatform in ClientTargetPlatforms)
|
|
{
|
|
String EncryptionKey;
|
|
String[] SigningKeys;
|
|
EncryptionAndSigning.ParseEncryptionIni(RawProjectPath.Directory, ClientPlatform, out SigningKeys, out EncryptionKey);
|
|
if (SigningKeys != null || !string.IsNullOrEmpty(EncryptionKey))
|
|
{
|
|
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
|
|
DirectoryReference oldCWD = DirectoryReference.GetCurrentDirectory();
|
|
try
|
|
{
|
|
DirectoryReference EngineSourceDirectory = DirectoryReference.Combine(CommandUtils.EngineDirectory, "Source");
|
|
if (!DirectoryReference.Exists(EngineSourceDirectory)) // only set the directory if it exists, this should only happen if we are launching the editor from an artist sync
|
|
{
|
|
EngineSourceDirectory = DirectoryReference.Combine(CommandUtils.EngineDirectory, "Binaries");
|
|
}
|
|
Directory.SetCurrentDirectory(EngineSourceDirectory.FullName);
|
|
|
|
// Read the project descriptor, and find all the plugins available to this project
|
|
ProjectDescriptor Project = ProjectDescriptor.FromFile(RawProjectPath.FullName);
|
|
List<PluginInfo> AvailablePlugins = Plugins.ReadAvailablePlugins(CommandUtils.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)
|
|
{
|
|
if(!Automation.IsEngineInstalled() && !PlatformExports.HasDefaultBuildConfig(RawProjectPath, TargetPlatformType))
|
|
{
|
|
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, TargetType.Game);
|
|
if ((bPluginEnabledForProject && !Plugin.Descriptor.bEnabledByDefault) || (bPluginEnabledForProject && Plugin.Descriptor.bInstalled))
|
|
{
|
|
// NOTE: this code was only marking plugins that compiled for the platform to upgrade to code project, however
|
|
// this doesn't work in practice, because the runtime code will look for the plugin, without a .uplugin file,
|
|
// and will fail. This is the safest way to make sure all platforms are acting the same. However, if you
|
|
// whitelist the plugin in the .uproject file, the above UProjectInfo.IsPluginEnabledForProject check won't pass
|
|
// so you won't get in here. Leaving this commented out code in there, because someone is bound to come looking
|
|
// for why a non-whitelisted platform module is causing a project to convert to code-based.
|
|
// As an aside, if you run the project with UE4Game (not your Project's binary) from the debugger, it will work
|
|
// _in this case_ because the .uplugin file will have been staged, and there is no needed library
|
|
// if(Plugin.Descriptor.Modules.Any(Module => Module.IsCompiledInConfiguration(TargetPlatformType, TargetType.Game, bBuildDeveloperTools: false, bBuildEditor: false)))
|
|
{
|
|
RetVal = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return RetVal;
|
|
}
|
|
finally
|
|
{
|
|
// Change back to the original directory
|
|
Directory.SetCurrentDirectory(oldCWD.FullName);
|
|
}
|
|
}
|
|
|
|
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);
|
|
|
|
foreach (UnrealTargetPlatform TargetPlatformType in Enum.GetValues(typeof(UnrealTargetPlatform)))
|
|
{
|
|
if (TargetPlatformType != UnrealTargetPlatform.Unknown)
|
|
{
|
|
var Config = ConfigCache.ReadHierarchy(ConfigHierarchyType.Engine, RawProjectPath.Directory, TargetPlatformType);
|
|
Properties.EngineConfigs.Add(TargetPlatformType, Config);
|
|
}
|
|
}
|
|
|
|
foreach (UnrealTargetPlatform TargetPlatformType in Enum.GetValues(typeof(UnrealTargetPlatform)))
|
|
{
|
|
if (TargetPlatformType != UnrealTargetPlatform.Unknown)
|
|
{
|
|
var Config = ConfigCache.ReadHierarchy(ConfigHierarchyType.Game, RawProjectPath.Directory, TargetPlatformType);
|
|
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, TargetType TargetType, bool bIsCodeBasedProject)
|
|
{
|
|
var BinPath = String.Empty;
|
|
switch (TargetType)
|
|
{
|
|
case TargetType.Program:
|
|
BinPath = CommandUtils.CombinePaths(CommandUtils.CmdEnv.LocalRoot, "Engine", "Binaries");
|
|
break;
|
|
case TargetType.Client:
|
|
case 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<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.PlatformExports).Assembly.Location
|
|
};
|
|
var TargetsDLL = DynamicCompilation.CompileAndLoadAssembly(TargetsDllFilename, TargetScripts, ReferencedAssemblies, null, DoNotCompile);
|
|
var AllCompiledTypes = TargetsDLL.GetTypes();
|
|
foreach (Type TargetType in AllCompiledTypes)
|
|
{
|
|
// Find TargetRules but skip all "UE4Editor", "UE4Game" targets.
|
|
if (typeof(TargetRules).IsAssignableFrom(TargetType))
|
|
{
|
|
string TargetName = GetTargetName(TargetType);
|
|
|
|
FileReference ProjectFile;
|
|
UProjectInfo.TryGetProjectForTarget(TargetName, out ProjectFile);
|
|
|
|
var DummyTargetInfo = new TargetInfo(TargetName, BuildHostPlatform.Current.Platform, UnrealTargetConfiguration.Development, "", ProjectFile);
|
|
|
|
// 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);
|
|
TargetData.Rules = Rules;
|
|
if (Rules.Type == global::UnrealBuildTool.TargetType.Program)
|
|
{
|
|
Properties.Programs.Add(TargetData);
|
|
}
|
|
else
|
|
{
|
|
Properties.Targets.Add(Rules.Type, TargetData);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <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<TargetType> MonolithicKinds = new List<TargetType>
|
|
{
|
|
TargetType.Game,
|
|
TargetType.Client,
|
|
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(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"));
|
|
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;
|
|
}
|
|
};
|
|
|
|
}
|