Exemplo n.º 1
0
        private static IDeploymentTargetsExtension GetExtension(BuildTargetGroup targetGroup, BuildTarget buildTarget)
        {
            IDeploymentTargetsExtension deploymentTargetsExtension = ModuleManager.GetDeploymentTargetsExtension(targetGroup, buildTarget);

            if (deploymentTargetsExtension == null)
            {
                throw new NotSupportedException("Platform does not implement DeploymentTargetsExtension");
            }
            return(deploymentTargetsExtension);
        }
Exemplo n.º 2
0
        private static IDeploymentTargetsExtension GetExtension(BuildTargetGroup targetGroup, BuildTarget buildTarget)
        {
            IDeploymentTargetsExtension extension = ModuleManager.GetDeploymentTargetsExtension(targetGroup, buildTarget);

            if (extension == null)
            {
                throw new NotSupportedException(kExtensionErrorMessage);
            }
            return(extension);
        }
Exemplo n.º 3
0
        public static List <DeploymentTargetId> FindValidTargetsForLaunchBuild(BuildTargetGroup targetGroup, BuildReport buildReport)
        {
            IDeploymentTargetsExtension        extension    = DeploymentTargetManager.GetExtension(targetGroup, buildReport.buildTarget);
            List <DeploymentTargetId>          list         = new List <DeploymentTargetId>();
            List <DeploymentTargetIdAndStatus> knownTargets = extension.GetKnownTargets(null);

            foreach (DeploymentTargetIdAndStatus current in knownTargets)
            {
                if (current.status == DeploymentTargetStatus.Ready)
                {
                    if (DeploymentTargetManager.SupportsLaunchBuild(extension.GetTargetInfo(current.id, null), buildReport))
                    {
                        list.Add(current.id);
                    }
                }
            }
            return(list);
        }
Exemplo n.º 4
0
        // Launch a build on any target on a platform
        public static List <DeploymentTargetId> FindValidTargetsForLaunchBuild(BuildTargetGroup targetGroup, BuildTarget buildTarget, BuildProperties buildProperties)
        {
            IDeploymentTargetsExtension        extension      = GetExtension(targetGroup, buildTarget);
            List <DeploymentTargetId>          validTargetIds = new List <DeploymentTargetId>();
            List <DeploymentTargetIdAndStatus> knownTargets   = extension.GetKnownTargets();

            foreach (var target in knownTargets)
            {
                if (target.status == DeploymentTargetStatus.Ready)
                {
                    if (SupportsLaunchBuild(extension.GetTargetInfo(target.id), buildProperties))
                    {
                        validTargetIds.Add(target.id);
                    }
                }
            }
            return(validTargetIds);
        }
Exemplo n.º 5
0
        public static List <DeploymentTargetIdAndStatus> GetKnownTargets(BuildTargetGroup targetGroup, BuildTarget buildTarget)
        {
            IDeploymentTargetsExtension extension = DeploymentTargetManager.GetExtension(targetGroup, buildTarget);

            return(extension.GetKnownTargets(null));
        }
Exemplo n.º 6
0
        public static void LaunchBuildOnTarget(BuildTargetGroup targetGroup, BuildReport buildReport, DeploymentTargetId targetId, ProgressHandler progressHandler = null)
        {
            IDeploymentTargetsExtension extension = DeploymentTargetManager.GetExtension(targetGroup, buildReport.buildTarget);

            extension.LaunchBuildOnTarget(buildReport, targetId, progressHandler);
        }
Exemplo n.º 7
0
        public static IDeploymentTargetInfo GetTargetInfo(BuildTargetGroup targetGroup, BuildTarget buildTarget, DeploymentTargetId targetId)
        {
            IDeploymentTargetsExtension extension = DeploymentTargetManager.GetExtension(targetGroup, buildTarget);

            return(extension.GetTargetInfo(targetId, null));
        }
 DeploymentTargetManager(IDeploymentTargetsExtension extension, IDeploymentTargetsMainThreadContext context)
 {
     m_Extension = extension;
     m_Context   = context;
 }
Exemplo n.º 9
0
        public static void LaunchBuildOnTarget(BuildTargetGroup targetGroup, BuildTarget buildTarget, BuildProperties buildProperties, DeploymentTargetId targetId, ProgressHandler progressHandler = null)
        {
            IDeploymentTargetsExtension extension = GetExtension(targetGroup, buildTarget);

            extension.LaunchBuildOnTarget(buildProperties, targetId, progressHandler);
        }