public static List <TargetPlatformDescriptor> GetValidTargetPlatforms(UnrealTargetPlatform PlatformType, List <string> CookFlavors) { List <TargetPlatformDescriptor> ValidPlatforms = new List <TargetPlatformDescriptor>(); if (!CommandUtils.IsNullOrEmpty(CookFlavors)) { foreach (string CookFlavor in CookFlavors) { TargetPlatformDescriptor TargetDesc = new TargetPlatformDescriptor(PlatformType, CookFlavor); if (IsValidTargetPlatform(TargetDesc)) { ValidPlatforms.Add(TargetDesc); } } } // In case there are no flavors specified or this platform type does not care/support flavors add it as generic platform if (ValidPlatforms.Count == 0) { TargetPlatformDescriptor TargetDesc = new TargetPlatformDescriptor(PlatformType); if (IsValidTargetPlatform(TargetDesc)) { ValidPlatforms.Add(TargetDesc); } } return(ValidPlatforms); }
public static bool IsSymbolFile(UnrealTargetPlatform ForPlatform, string FileToCopy) { TargetPlatformDescriptor PlatformDesc = new TargetPlatformDescriptor(ForPlatform); var DebugExts = Platform.Platforms[PlatformDesc].GetDebugFileExtentions(); foreach (var DebugExt in DebugExts) { if (Path.GetExtension(FileToCopy).Equals(DebugExt, StringComparison.InvariantCultureIgnoreCase)) { return(true); } } return(false); }
internal static void InitializePlatforms(Assembly[] AssembliesWithPlatforms = null) { LogVerbose("Creating platforms."); // Create all available platforms. foreach (var ScriptAssembly in (AssembliesWithPlatforms != null ? AssembliesWithPlatforms : AppDomain.CurrentDomain.GetAssemblies())) { CreatePlatformsFromAssembly(ScriptAssembly); } // Create dummy platforms for platforms we don't support foreach (var PlatformType in Enum.GetValues(typeof(UnrealTargetPlatform))) { var TargetDesc = new TargetPlatformDescriptor((UnrealTargetPlatform)PlatformType); Platform ExistingInstance; if (AllPlatforms.TryGetValue(TargetDesc, out ExistingInstance) == false) { LogVerbose("Creating placeholder platform for target: {0}", TargetDesc.Type); AllPlatforms.Add(TargetDesc, new Platform(TargetDesc.Type)); } } }
public static bool IsValidTargetPlatform(TargetPlatformDescriptor PlatformDesc) { return(AllPlatforms.ContainsKey(PlatformDesc)); }
public static Platform GetPlatform(UnrealTargetPlatform PlatformType, string CookFlavor) { TargetPlatformDescriptor Desc = new TargetPlatformDescriptor(PlatformType, CookFlavor); return(AllPlatforms[Desc]); }
public static Platform GetPlatform(UnrealTargetPlatform PlatformType) { TargetPlatformDescriptor Desc = new TargetPlatformDescriptor(PlatformType); return(AllPlatforms[Desc]); }