コード例 #1
0
ファイル: UEDeployIOS.cs プロジェクト: kerwinzxc/UnrealEngine
        public override bool PrepTargetForDeployment(UEBuildTarget InTarget)
        {
            string SubDir = GetTargetPlatformName();

            string GameName         = InTarget.TargetName;
            string BuildPath        = (GameName == "UE4Game" ? "../../Engine" : InTarget.ProjectDirectory.FullName) + "/Binaries/" + SubDir;
            string ProjectDirectory = InTarget.ProjectDirectory.FullName;
            bool   bIsUE4Game       = GameName.Contains("UE4Game");

            string DecoratedGameName;

            if (InTarget.Configuration == UnrealTargetConfiguration.Development)
            {
                DecoratedGameName = GameName;
            }
            else
            {
                DecoratedGameName = String.Format("{0}-{1}-{2}", GameName, InTarget.Platform.ToString(), InTarget.Configuration.ToString());
            }

            // Run through iOS APL file
            IOSPlatformContext PlatformContext = new IOSPlatformContext(InTarget.ProjectFile);

            PlatformContext.SetUpProjectEnvironment(InTarget.Configuration);

            string BaseSoName = InTarget.OutputPaths[0].FullName;

            // get the receipt
            UnrealTargetPlatform      Platform      = InTarget.Platform;
            UnrealTargetConfiguration Configuration = InTarget.Configuration;
            string ProjectBaseName = Path.GetFileName(BaseSoName).Replace("-" + Platform, "").Replace("-" + Configuration, "").Replace(".so", "");
            string ReceiptFilename = TargetReceipt.GetDefaultPath(InTarget.ProjectDirectory.FullName, ProjectBaseName, Platform, Configuration, "");

            Log.TraceInformation("Receipt Filename: {0}", ReceiptFilename);
            SetIOSPluginData(PlatformContext.ProjectArches, CollectPluginDataPaths(TargetReceipt.Read(ReceiptFilename)));

            string BundlePath = Path.Combine(ProjectDirectory, "Binaries", "IOS", "Payload", ProjectBaseName + ".app");

            // Passing in true for distribution is not ideal here but given the way that ios packaging happens and this call chain it seems unavoidable for now, maybe there is a way to correctly pass it in that I can't find?
            UPL.Init(PlatformContext.ProjectArches, true, BuildConfiguration.RelativeEnginePath, BundlePath);

            if (BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Mac && Environment.GetEnvironmentVariable("UBT_NO_POST_DEPLOY") != "true")
            {
                return(PrepForUATPackageOrDeploy(InTarget.ProjectFile, GameName, ProjectDirectory, BuildPath + "/" + DecoratedGameName, "../../Engine", false, "", false));
            }
            else
            {
                // @todo tvos merge: This used to copy the bundle back - where did that code go? It needs to be fixed up for TVOS directories
                GeneratePList(ProjectDirectory, bIsUE4Game, GameName, (InTarget.ProjectFile == null) ? "" : Path.GetFileNameWithoutExtension(InTarget.ProjectFile.FullName), "../../Engine", "");
            }
            return(true);
        }
コード例 #2
0
    public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
    {
        //		if (UnrealBuildTool.BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac)
        {
            // copy the icons/launch screens from the engine
            {
                string SourcePath = CombinePaths(SC.LocalRoot, "Engine", "Binaries", "TVOS");
                SC.StageFiles(StagedFileType.NonUFS, SourcePath, "Assets.car", false, null, "", true, false);
            }

            // copy any additional framework assets that will be needed at runtime
            {
                string SourcePath = CombinePaths((SC.IsCodeBasedProject ? SC.ProjectRoot : SC.LocalRoot + "\\Engine"), "Intermediate", "TVOS", "FrameworkAssets");
                if (Directory.Exists(SourcePath))
                {
                    SC.StageFiles(StagedFileType.NonUFS, SourcePath, "*.*", true, null, "", true, false);
                }
            }

            // copy the icons/launch screens from the game (may stomp the engine copies)
            {
                string SourcePath = CombinePaths(SC.ProjectRoot, "Binaries", "TVOS");
                SC.StageFiles(StagedFileType.NonUFS, SourcePath, "Assets.car", false, null, "", true, false);
            }

            // copy the plist (only if code signing, as it's protected by the code sign blob in the executable and can't be modified independently)
            if (GetCodeSignDesirability(Params))
            {
                string SourcePath = CombinePaths((SC.IsCodeBasedProject ? SC.ProjectRoot : SC.LocalRoot + "/Engine"), "Intermediate", "TVOS");
                string TargetPListFile = Path.Combine(SourcePath, (SC.IsCodeBasedProject ? SC.ShortProjectName : "UE4Game") + "-Info.plist");
                //				if (!File.Exists(TargetPListFile))
                {
                    // ensure the plist, entitlements, and provision files are properly copied
                    Console.WriteLine("CookPlat {0}, this {1}", GetCookPlatform(false, false), ToString());
                    if (!SC.IsCodeBasedProject)
                    {
                        UnrealBuildTool.UnrealBuildTool.SetRemoteIniPath(SC.ProjectRoot);
                    }

                    if (SC.StageTargetConfigurations.Count != 1)
                    {
                        throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
                    }

                    var TargetConfiguration = SC.StageTargetConfigurations[0];

                    UnrealBuildTool.IOSPlatformContext BuildPlatContext = new IOSPlatformContext(Params.RawProjectPath);
                    BuildPlatContext.SetUpProjectEnvironment(TargetConfiguration);

                    GetDeployHandler(new FileReference(SC.ProjectRoot), BuildPlatContext).GeneratePList((SC.IsCodeBasedProject ? SC.ProjectRoot : SC.LocalRoot + "/Engine"), !SC.IsCodeBasedProject, (SC.IsCodeBasedProject ? SC.ShortProjectName : "UE4Game"), SC.ShortProjectName, SC.LocalRoot + "/Engine", (SC.IsCodeBasedProject ? SC.ProjectRoot : SC.LocalRoot + "/Engine") + "/Binaries/TVOS/Payload/" + (SC.IsCodeBasedProject ? SC.ShortProjectName : "UE4Game") + ".app");
                }

                SC.StageFiles(StagedFileType.NonUFS, SourcePath, Path.GetFileName(TargetPListFile), false, null, "", false, false, "Info.plist");
            }
        }

        // copy the movies from the project
        {
            SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Build/TVOS/Resources/Movies"), "*", false, null, "", true, false);
            SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Movies"), "*", true, null, "", true, false);
        }
    }
コード例 #3
0
 public override UnrealBuildTool.UEDeployIOS GetDeployHandler(FileReference InProject, IOSPlatformContext inPlatformContext)
 {
     Console.WriteLine("Getting TVOS Deploy()");
     return new UnrealBuildTool.UEDeployTVOS(InProject, inPlatformContext);
 }
コード例 #4
0
 public TVOSToolChain(FileReference InProjectFile, IOSPlatformContext InPlatformContext)
     : base(CPPTargetPlatform.TVOS, InProjectFile, InPlatformContext)
 {
 }
コード例 #5
0
 public UEDeployIOS(FileReference InProjectFile, IOSPlatformContext inIOSPlatformContext)
 {
     ProjectFile        = InProjectFile;
     IOSPlatformContext = inIOSPlatformContext;
 }
コード例 #6
0
 public UEDeployTVOS(FileReference InProjectFile, IOSPlatformContext inIOSPlatformContext) : base(InProjectFile, inIOSPlatformContext)
 {
 }
コード例 #7
0
		public TVOSToolChain(FileReference InProjectFile, IOSPlatformContext InPlatformContext)
			: base(CPPTargetPlatform.TVOS, InProjectFile, InPlatformContext)
		{
		}
コード例 #8
0
 public UEDeployTVOS(FileReference InProjectFile, IOSPlatformContext inIOSPlatformContext) : base(InProjectFile, inIOSPlatformContext)
 {
 }
コード例 #9
0
		protected IOSToolChain(CPPTargetPlatform TargetPlatform, FileReference InProjectFile, IOSPlatformContext InPlatformContext)
			: base(TargetPlatform, UnrealTargetPlatform.Mac, InProjectFile)
		{
			PlatformContext = InPlatformContext;
		}
コード例 #10
0
		public IOSToolChain(FileReference InProjectFile, IOSPlatformContext InPlatformContext)
			: this(CPPTargetPlatform.IOS, InProjectFile, InPlatformContext)
		{
		}
コード例 #11
0
		public override bool PrepTargetForDeployment(UEBuildTarget InTarget)
		{
			string SubDir = GetTargetPlatformName();

			string GameName = InTarget.TargetName;
			string BuildPath = (GameName == "UE4Game" ? "../../Engine" : InTarget.ProjectDirectory.FullName) + "/Binaries/" + SubDir;
			string ProjectDirectory = InTarget.ProjectDirectory.FullName;
			bool bIsUE4Game = GameName.Contains("UE4Game");

			string DecoratedGameName;
			if (InTarget.Configuration == UnrealTargetConfiguration.Development)
			{
				DecoratedGameName = GameName;
			}
			else
			{
				DecoratedGameName = String.Format("{0}-{1}-{2}", GameName, InTarget.Platform.ToString(), InTarget.Configuration.ToString());
			}

			// Run through iOS APL file
			IOSPlatformContext PlatformContext = new IOSPlatformContext(InTarget.ProjectFile);
            PlatformContext.SetUpProjectEnvironment(InTarget.Configuration);

            string BaseSoName = InTarget.OutputPaths[0].FullName;

			// get the receipt
			UnrealTargetPlatform Platform = InTarget.Platform;
			UnrealTargetConfiguration Configuration = InTarget.Configuration;
			string ProjectBaseName = Path.GetFileName(BaseSoName).Replace("-" + Platform, "").Replace("-" + Configuration, "").Replace(".so", "");
			string ReceiptFilename = TargetReceipt.GetDefaultPath(InTarget.ProjectDirectory.FullName, ProjectBaseName, Platform, Configuration, "");
			Log.TraceInformation("Receipt Filename: {0}", ReceiptFilename);
			SetIOSPluginData(PlatformContext.ProjectArches, CollectPluginDataPaths(TargetReceipt.Read(ReceiptFilename)));

			string BundlePath = Path.Combine (ProjectDirectory, "Binaries", "IOS", "Payload", ProjectBaseName + ".app");

			// Passing in true for distribution is not ideal here but given the way that ios packaging happens and this call chain it seems unavoidable for now, maybe there is a way to correctly pass it in that I can't find?
			UPL.Init (PlatformContext.ProjectArches, true, BuildConfiguration.RelativeEnginePath, BundlePath);

			if (BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Mac && Environment.GetEnvironmentVariable("UBT_NO_POST_DEPLOY") != "true")
			{
				return PrepForUATPackageOrDeploy(InTarget.ProjectFile, GameName, ProjectDirectory, BuildPath + "/" + DecoratedGameName, "../../Engine", false, "", false);
			}
			else
			{
				// @todo tvos merge: This used to copy the bundle back - where did that code go? It needs to be fixed up for TVOS directories
				GeneratePList(ProjectDirectory, bIsUE4Game, GameName, (InTarget.ProjectFile == null) ? "" : Path.GetFileNameWithoutExtension(InTarget.ProjectFile.FullName), "../../Engine", "");
			}
			return true;
		}
コード例 #12
0
 public UEDeployIOS(FileReference InProjectFile, IOSPlatformContext inIOSPlatformContext)
 {
     ProjectFile = InProjectFile;
     IOSPlatformContext = inIOSPlatformContext;
 }