Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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));
                }
            }
        }
Exemplo n.º 4
0
 public static bool IsValidTargetPlatform(TargetPlatformDescriptor PlatformDesc)
 {
     return(AllPlatforms.ContainsKey(PlatformDesc));
 }
Exemplo n.º 5
0
        public static Platform GetPlatform(UnrealTargetPlatform PlatformType, string CookFlavor)
        {
            TargetPlatformDescriptor Desc = new TargetPlatformDescriptor(PlatformType, CookFlavor);

            return(AllPlatforms[Desc]);
        }
Exemplo n.º 6
0
        public static Platform GetPlatform(UnrealTargetPlatform PlatformType)
        {
            TargetPlatformDescriptor Desc = new TargetPlatformDescriptor(PlatformType);

            return(AllPlatforms[Desc]);
        }