public void InitUPL(TargetReceipt Receipt) { DirectoryReference ProjectDirectory = Receipt.ProjectDir ?? UnrealBuildTool.EngineDirectory; string UE4BuildPath = Path.Combine(ProjectDirectory.FullName, "Intermediate/Lumin/Mabu"); string RelativeEnginePath = UnrealBuildTool.EngineDirectory.MakeRelativeTo(DirectoryReference.GetCurrentDirectory()); string RelativeProjectPath = ProjectDirectory.MakeRelativeTo(DirectoryReference.GetCurrentDirectory()); //.MakeRelativeTo(ProjectDirectory); string ConfigurationString = Receipt.Configuration.ToString(); IconDirectory = Path.Combine(ProjectDirectory.FullName, "Build/Lumin/Resources/"); IconDirectory = IconDirectory.Replace('\\', '/').Replace("//", "/"); string Architecture = "arm64-v8a"; List <string> MLSDKArches = new List <string>(); MLSDKArches.Add(Architecture); SetLuminPluginData(MLSDKArches, CollectPluginDataPaths(Receipt)); bool bIsEmbedded = Receipt.HasValueForAdditionalProperty("CompileAsDll", "true"); //gather all of the xml UPL.Init(MLSDKArches, true, RelativeEnginePath, UE4BuildPath, RelativeProjectPath, ConfigurationString, bIsEmbedded); }
public void InitUPL(string ProjectName, DirectoryReference ProjectDirectory, UnrealTargetConfiguration Configuration) { string UE4BuildPath = Path.Combine(ProjectDirectory.FullName, "Intermediate/Lumin/Mabu"); string RelativeEnginePath = UnrealBuildTool.EngineDirectory.MakeRelativeTo(DirectoryReference.GetCurrentDirectory()); string RelativeProjectPath = ProjectDirectory.MakeRelativeTo(DirectoryReference.GetCurrentDirectory()); //.MakeRelativeTo(ProjectDirectory); UnrealTargetPlatform Platform = UnrealTargetPlatform.Lumin; string ConfigurationString = Configuration.ToString(); string Architecture = "arm64-v8a"; List <string> MLSDKArches = new List <string>(); MLSDKArches.Add(Architecture); // get the receipt FileReference ReceiptFilename = TargetReceipt.GetDefaultPath(ProjectDirectory, ProjectName, Platform, Configuration, ""); if (!File.Exists(ReceiptFilename.ToString())) { ReceiptFilename = TargetReceipt.GetDefaultPath(UnrealBuildTool.EngineDirectory, "UE4Game", Platform, Configuration, ""); } Log.TraceInformation("Receipt Filename: {0}", ReceiptFilename); SetLuminPluginData(MLSDKArches, CollectPluginDataPaths(TargetReceipt.Read(ReceiptFilename, UnrealBuildTool.EngineDirectory, ProjectDirectory))); //gather all of the xml UPL.Init(MLSDKArches, true, RelativeEnginePath, UE4BuildPath, RelativeProjectPath, ConfigurationString); }
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, ProjectDirectory); 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); }
public void InitUPL(TargetReceipt Receipt) { DirectoryReference ProjectDirectory = Receipt.ProjectDir ?? UnrealBuildTool.EngineDirectory; string UE4BuildPath = Path.Combine(ProjectDirectory.FullName, "Intermediate/Lumin/Mabu"); string RelativeEnginePath = UnrealBuildTool.EngineDirectory.MakeRelativeTo(DirectoryReference.GetCurrentDirectory()); string RelativeProjectPath = ProjectDirectory.MakeRelativeTo(DirectoryReference.GetCurrentDirectory()); //.MakeRelativeTo(ProjectDirectory); string ConfigurationString = Receipt.Configuration.ToString(); string Architecture = "arm64-v8a"; List <string> MLSDKArches = new List <string>(); MLSDKArches.Add(Architecture); SetLuminPluginData(MLSDKArches, CollectPluginDataPaths(Receipt)); //gather all of the xml UPL.Init(MLSDKArches, true, RelativeEnginePath, UE4BuildPath, RelativeProjectPath, ConfigurationString); }