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); }
/// <summary> /// Constructor /// </summary> /// <param name="InName">Name of the module</param> /// <param name="InType">Type of the module, for UHT</param> /// <param name="InModuleDirectory">Base directory for the module</param> /// <param name="InRules">Rules for this module</param> /// <param name="InRulesFile">Path to the rules file</param> /// <param name="InRuntimeDependencies">List of runtime dependencies</param> public UEBuildModule(string InName, UHTModuleType InType, DirectoryReference InModuleDirectory, ModuleRules InRules, FileReference InRulesFile, List <RuntimeDependency> InRuntimeDependencies) { Name = InName; Type = InType; ModuleDirectory = InModuleDirectory; Rules = InRules; RulesFile = InRulesFile; NormalizedModuleIncludePath = Utils.CleanDirectorySeparators(ModuleDirectory.MakeRelativeTo(UnrealBuildTool.EngineSourceDirectory), '/'); ModuleApiDefine = Name.ToUpperInvariant() + "_API"; PublicDefinitions = HashSetFromOptionalEnumerableStringParameter(InRules.Definitions); PublicIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicIncludePaths); PublicSystemIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicSystemIncludePaths); PublicLibraryPaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicLibraryPaths); PublicAdditionalLibraries = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalLibraries); PublicFrameworks = HashSetFromOptionalEnumerableStringParameter(InRules.PublicFrameworks); PublicWeakFrameworks = HashSetFromOptionalEnumerableStringParameter(InRules.PublicWeakFrameworks); PublicAdditionalFrameworks = InRules.PublicAdditionalFrameworks == null ? new HashSet <UEBuildFramework>() : new HashSet <UEBuildFramework>(InRules.PublicAdditionalFrameworks); PublicAdditionalShadowFiles = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalShadowFiles); PublicAdditionalBundleResources = InRules.AdditionalBundleResources == null ? new HashSet <UEBuildBundleResource>() : new HashSet <UEBuildBundleResource>(InRules.AdditionalBundleResources); PublicDelayLoadDLLs = HashSetFromOptionalEnumerableStringParameter(InRules.PublicDelayLoadDLLs); PrivateIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PrivateIncludePaths); RuntimeDependencies = InRuntimeDependencies; IsRedistributableOverride = InRules.IsRedistributableOverride; WhitelistRestrictedFolders = new HashSet <DirectoryReference>(InRules.WhitelistRestrictedFolders.Select(x => DirectoryReference.Combine(ModuleDirectory, x))); }
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); }
private static string PerformFinalExpansions(string InString, string PlatformName, DirectoryReference ProjectDir) { string PlatformExtensionEngineConfigDir = DirectoryReference.Combine(UnrealBuildTool.EngineDirectory, "Platforms", PlatformName).FullName; string OutString = InString.Replace("{ENGINE}", UnrealBuildTool.EngineDirectory.FullName); OutString = OutString.Replace("{EXTENGINE}", PlatformExtensionEngineConfigDir); OutString = OutString.Replace("{PLATFORM}", PlatformName); if (ProjectDir != null) { DirectoryReference NFLDir; DirectoryReference NRDir; if (ProjectDir.IsUnderDirectory(UnrealBuildTool.EngineDirectory)) { string RelativeDir = ProjectDir.MakeRelativeTo(UnrealBuildTool.EngineDirectory); NFLDir = DirectoryReference.Combine(UnrealBuildTool.EngineDirectory, "Restricted/NotForLicensees", RelativeDir); NRDir = DirectoryReference.Combine(UnrealBuildTool.EngineDirectory, "Restricted/NoRedist", RelativeDir); } else { NFLDir = DirectoryReference.Combine(ProjectDir, "Restricted/NotForLicensees"); NRDir = DirectoryReference.Combine(ProjectDir, "Restricted/NoRedist"); } string PlatformExtensionProjectConfigDir = DirectoryReference.Combine(ProjectDir, "Platforms", PlatformName).FullName; OutString = OutString.Replace("{PROJECT}", ProjectDir.FullName); OutString = OutString.Replace("{EXTPROJECT}", PlatformExtensionProjectConfigDir); OutString = OutString.Replace("{RESTRICTEDPROJECT_NFL}", NFLDir.FullName); OutString = OutString.Replace("{RESTRICTEDPROJECT_NR}", NRDir.FullName); } return(OutString); }
public void AddIncludePath(ref string Arguments, DirectoryReference IncludePath) { if (IncludePath.IsUnderDirectory(UnrealBuildTool.EngineDirectory)) { Arguments += string.Format(" -I\"{0}\"", IncludePath.MakeRelativeTo(UnrealBuildTool.EngineSourceDirectory)); } else { Arguments += string.Format(" -I\"{0}\"", IncludePath); } }
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); }