public StackOverload(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; var factoryGamePchPath = new DirectoryReference(Path.Combine(Target.ProjectFile.Directory.ToString(), "Source", "FactoryGame", "Public", "FactoryGame.h")); PrivatePCHHeaderFile = factoryGamePchPath.MakeRelativeTo(new DirectoryReference(ModuleDirectory)); PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemUtils", "OnlineSubsystemNULL", "SignificanceManager", "PhysX", "APEX", "PhysXVehicles", "ApexDestruction", "AkAudio", "ReplicationGraph", "UMG", "AIModule", "NavigationSystem", "AssetRegistry", "GameplayTasks", "AnimGraphRuntime", "Slate", "SlateCore", "Json" }); if (Target.Type == TargetRules.TargetType.Editor) { PublicDependencyModuleNames.AddRange(new string[] { "OnlineBlueprintSupport", "AnimGraph" }); } PublicDependencyModuleNames.AddRange(new string[] { "FactoryGame", "SML" }); }
public FicsItNetworks(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; bLegacyPublicIncludePaths = false; PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemUtils", "OnlineSubsystemNULL", "SignificanceManager", "PhysX", "APEX", "PhysXVehicles", "ApexDestruction", "AkAudio", "ReplicationGraph", "UMG", "AIModule", "NavigationSystem", "AssetRegistry", "GameplayTasks", "AnimGraphRuntime", "Slate", "SlateCore", "Json", "ApplicationCore", "Vorbis", "Http", "AudioPlatformConfiguration" }); if (Target.Type == TargetRules.TargetType.Editor) { PublicDependencyModuleNames.AddRange(new string[] { "OnlineBlueprintSupport", "AnimGraph" }); } PublicDependencyModuleNames.AddRange(new string[] { "FactoryGame", "SML" }); var thirdPartyFolder = Path.Combine(ModuleDirectory, "../../ThirdParty"); PublicIncludePaths.Add(Path.Combine(thirdPartyFolder, "include")); var platformName = Target.Platform.ToString(); var libraryFolder = Path.Combine(thirdPartyFolder, platformName); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "eris.lib")); bEnableExceptions = true; bUseRTTI = true; CppStandard = CppStandardVersion.Cpp17; var factoryGamePchPath = new DirectoryReference(Path.Combine(Target.ProjectFile.Directory.ToString(), "Source", "FactoryGame", "Public", "FactoryGame.h")); PrivatePCHHeaderFile = factoryGamePchPath.MakeRelativeTo(new DirectoryReference(ModuleDirectory)); }
public static void SetupModuleBlastSupport(ModuleRules Rules, string[] BlastLibs) { string LibConfiguration = GetBlastLibrarySuffix(Rules); Rules.PublicDefinitions.Add(string.Format("BLAST_LIB_CONFIG_STRING=\"{0}\"", LibConfiguration)); //Go up two from Source/Blast DirectoryReference ModuleRootFolder = (new DirectoryReference(Rules.ModuleDirectory)).ParentDirectory.ParentDirectory; DirectoryReference EngineDirectory = new DirectoryReference(Path.GetFullPath(Rules.Target.RelativeEnginePath)); string BLASTLibDir = Path.Combine("$(EngineDir)", ModuleRootFolder.MakeRelativeTo(EngineDirectory), "Libraries", Rules.Target.Platform.ToString()); Rules.PublicLibraryPaths.Add(Path.Combine(ModuleRootFolder.ToString(), "Libraries", Rules.Target.Platform.ToString())); string DLLSuffix = ""; string DLLPrefix = ""; string LibSuffix = ""; // Libraries and DLLs for windows platform if (Rules.Target.Platform == UnrealTargetPlatform.Win64) { DLLSuffix = "_x64.dll"; LibSuffix = "_x64.lib"; } else if (Rules.Target.Platform == UnrealTargetPlatform.Win32) { DLLSuffix = "_x86.dll"; LibSuffix = "_x86.lib"; } else if (Rules.Target.Platform == UnrealTargetPlatform.Linux) { DLLPrefix = "lib"; DLLSuffix = ".so"; } Rules.PublicDefinitions.Add(string.Format("BLAST_LIB_DLL_SUFFIX=\"{0}\"", DLLSuffix)); Rules.PublicDefinitions.Add(string.Format("BLAST_LIB_DLL_PREFIX=\"{0}\"", DLLPrefix)); foreach (string Lib in BlastLibs) { Rules.PublicAdditionalLibraries.Add(String.Format("{0}{1}{2}", Lib, LibConfiguration, LibSuffix)); var DllName = String.Format("{0}{1}{2}{3}", DLLPrefix, Lib, LibConfiguration, DLLSuffix); Rules.PublicDelayLoadDLLs.Add(DllName); Rules.RuntimeDependencies.Add(Path.Combine(BLASTLibDir, DllName)); } //It's useful to periodically turn this on since the order of appending files in unity build is random. //The use of types without the right header can creep in and cause random build failures //Rules.bFasterWithoutUnity = true; }
public PowerSuit(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; var factoryGamePchPath = new DirectoryReference(Path.Combine(Target.ProjectFile.Directory.ToString(), "Source", "FactoryGame", "Public", "FactoryGame.h")); PrivatePCHHeaderFile = factoryGamePchPath.MakeRelativeTo(new DirectoryReference(ModuleDirectory)); PrivateDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "SML", "FactoryGame" // ... add private dependencies that you statically link with here ... } ); }
public SatisfactoryHelper(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; bLegacyPublicIncludePaths = true; ShadowVariableWarningLevel = WarningLevel.Warning; PublicDependencyModuleNames.AddRange(new[] { "SML", "FactoryGame" }); PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemUtils", "OnlineSubsystemNULL", "SignificanceManager", "PhysX", "APEX", "PhysXVehicles", "ApexDestruction", "AkAudio", "ReplicationGraph", "UMG", "AIModule", "NavigationSystem", "AssetRegistry", "GameplayTasks", "AnimGraphRuntime", "Slate", "SlateCore" }); if (Target.Type == TargetRules.TargetType.Editor) { PublicDependencyModuleNames.AddRange(new string[] { "OnlineBlueprintSupport", "AnimGraph", "UnrealEd", "BlueprintGraph", "Kismet", "UMGEditor", "MovieScene" }); } PublicDependencyModuleNames.AddRange(new string[] { "FactoryGame", "SML" }); // Workaround for build errors // https://discord.com/channels/555424930502541343/555515791592652823/831559486158012487 (sorry for discord link but its the only source) // Discord message above can be found in the satisfactory modding server. var factoryGamePchPath = new DirectoryReference(Path.Combine(Target.ProjectFile.Directory.ToString(), "Source", "FactoryGame", "Public", "FactoryGame.h")); PrivatePCHHeaderFile = factoryGamePchPath.MakeRelativeTo(new DirectoryReference(ModuleDirectory)); }
/// <summary> /// Stage multiple files for use by crash reporter /// </summary> /// <param name="FileType">The type of the staged file</param> /// <param name="InputDir">Location of the input directory</param> /// <param name="Option">Whether to stage all subdirectories or just the top-level directory</param> public void StageCrashReporterFiles(StagedFileType FileType, DirectoryReference InputDir, StageFilesSearch Option) { StageCrashReporterFiles(FileType, InputDir, Option, new StagedDirectoryReference(InputDir.MakeRelativeTo(LocalRoot))); }
public PowerChecker(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; bLegacyPublicIncludePaths = false; PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemNull", "OnlineSubsystemEOS", "OnlineSubsystemUtils", "SignificanceManager", "APEX", "ApexDestruction", "AkAudio", "PhysXVehicles", "AssetRegistry", "NavigationSystem", "ReplicationGraph", "AIModule", "GameplayTasks", "SlateCore", "Slate", "UMG", "InstancedSplines", "Json", // ... add other public dependencies that you statically link with here ... } ); PublicDependencyModuleNames.AddRange(new string[] { "FactoryGame", "SML" }); PrivateDependencyModuleNames.AddRange( new string[] { "RenderCore", // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); var factoryGamePchPath = new DirectoryReference(Path.Combine(Target.ProjectFile.Directory.ToString(), "Source", "FactoryGame", "Public", "FactoryGame.h")); PrivatePCHHeaderFile = factoryGamePchPath.MakeRelativeTo(new DirectoryReference(ModuleDirectory)); }
//#nv begin #Blast Linux build void StageBootstrapExecutable(DeploymentContext SC, StageTarget Target, string ExeName, string TargetFile, string StagedRelativeTargetPath, string StagedArguments) //@third party code - NVSTUDIOS Set LD_LIBRARY_PATH //nv end { // create a temp script file location DirectoryReference IntermediateDir = DirectoryReference.Combine(SC.ProjectRoot, "Intermediate", "Staging"); FileReference IntermediateFile = FileReference.Combine(IntermediateDir, ExeName); DirectoryReference.CreateDirectory(IntermediateDir); // make sure slashes are good StagedRelativeTargetPath = StagedRelativeTargetPath.Replace("\\", "/"); // make contents StringBuilder Script = new StringBuilder(); string EOL = "\n"; Script.Append("#!/bin/sh" + EOL); // allow running from symlinks Script.AppendFormat("UE4_TRUE_SCRIPT_NAME=$(echo \\\"$0\\\" | xargs readlink -f)" + EOL); Script.AppendFormat("UE4_PROJECT_ROOT=$(dirname \"$UE4_TRUE_SCRIPT_NAME\")" + EOL); Script.AppendFormat("chmod +x \"$UE4_PROJECT_ROOT/{0}\"" + EOL, StagedRelativeTargetPath); //#nv begin #Blast Linux build //The Blast .so files are not loaded by dlopen so we we need to setup the search paths //Really UE should be doing this for all dependent libraries, but they usually statically link HashSet <string> LDLibraryPaths = new HashSet <string>(); DirectoryReference TargetFileDir = (new FileReference(TargetFile)).Directory; DirectoryReference SourceEngineDir = SC.LocalRoot; DirectoryReference SourceProjectDir = SC.ProjectRoot; foreach (var RuntimeDependency in Target.Receipt.RuntimeDependencies) { foreach (FileReference File in CommandUtils.ResolveFilespec(CommandUtils.RootDirectory, RuntimeDependency.Path.FullName, new string[] { })) { if (FileReference.Exists(File) && File.GetExtension().Equals(".so", StringComparison.OrdinalIgnoreCase)) { string FileRelativePath = null; DirectoryReference SharedLibFolder = File.Directory; if (SharedLibFolder.IsUnderDirectory(SourceProjectDir)) { FileRelativePath = Path.Combine(SharedLibFolder.MakeRelativeTo(SourceProjectDir), SC.RelativeProjectRootForStage.ToString()); } else if (SharedLibFolder.IsUnderDirectory(SourceEngineDir)) { FileRelativePath = SharedLibFolder.MakeRelativeTo(SourceEngineDir); } if (FileRelativePath != null) { FileRelativePath = Path.Combine("$UE4_PROJECT_ROOT", FileRelativePath); FileRelativePath = FileRelativePath.Replace("\\", "/"); //Escape spaces FileRelativePath = FileRelativePath.Replace(" ", @"\ "); LDLibraryPaths.Add(FileRelativePath); } } } } if (LDLibraryPaths.Count > 0) { Script.AppendFormat("export LD_LIBRARY_PATH={0}" + EOL, string.Join(":", LDLibraryPaths)); } //nv end Script.AppendFormat("\"$UE4_PROJECT_ROOT/{0}\" {1} $@ " + EOL, StagedRelativeTargetPath, StagedArguments); // write out the FileReference.WriteAllText(IntermediateFile, Script.ToString()); if (Utils.IsRunningOnMono) { var Result = CommandUtils.Run("sh", string.Format("-c 'chmod +x \\\"{0}\\\"'", IntermediateFile)); if (Result.ExitCode != 0) { throw new AutomationException(string.Format("Failed to chmod \"{0}\"", IntermediateFile)); } } SC.StageFile(StagedFileType.NonUFS, IntermediateFile, new StagedFileReference(ExeName)); }
public UEBuildModule( string InName, UHTModuleType InType, DirectoryReference InModuleDirectory, ModuleRules InRules, FileReference InRulesFile ) { 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 = (InRules.RuntimeDependencies == null) ? new RuntimeDependencyList() : new RuntimeDependencyList(InRules.RuntimeDependencies); IsRedistributableOverride = InRules.IsRedistributableOverride; }
public SML(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; bLegacyPublicIncludePaths = false; //SML transitive dependencies PublicDependencyModuleNames.AddRange(new[] { "Json", "MovieScene", "Projects" }); PrivateDependencyModuleNames.AddRange(new[] { "RenderCore" }); PublicDependencyModuleNames.AddRange(new string[] { "FactoryGame" }); //FactoryGame transitive dependencies PublicDependencyModuleNames.AddRange(new[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemNull", "OnlineSubsystemEOS", "OnlineSubsystemUtils", "SignificanceManager", "APEX", "ApexDestruction", "AnimGraphRuntime", "AkAudio", "PhysXVehicles", "AssetRegistry", "NavigationSystem", "ReplicationGraph", "AIModule", "GameplayTasks", "SlateCore", "Slate", "UMG", "InstancedSplines" }); if (Target.bBuildEditor) { PublicDependencyModuleNames.Add("UnrealEd"); PrivateDependencyModuleNames.Add("MainFrame"); } var factoryGamePchPath = new DirectoryReference(Path.Combine(Target.ProjectFile.Directory.ToString(), "Source", "FactoryGame", "Public", "FactoryGame.h")); PrivatePCHHeaderFile = factoryGamePchPath.MakeRelativeTo(new DirectoryReference(ModuleDirectory)); var thirdPartyFolder = Path.Combine(ModuleDirectory, "../../ThirdParty"); PublicIncludePaths.Add(Path.Combine(thirdPartyFolder, "include")); var platformName = Target.Platform.ToString(); var libraryFolder = Path.Combine(thirdPartyFolder, platformName); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "funchook.lib")); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "detex.lib")); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "libfbxsdk-md.lib")); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "libxml2-md.lib")); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "zlib-md.lib")); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "AssemblyAnalyzer.lib")); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "Zydis.lib")); PublicAdditionalLibraries.Add(Path.Combine(libraryFolder, "Zycore.lib")); //Collect build metadata from the environment and pass it to C++ var currentBranch = Environment.GetEnvironmentVariable("BRANCH_NAME"); var buildId = Environment.GetEnvironmentVariable("BUILD_NUMBER"); if (currentBranch == null) { RetrieveHeadBranchAndCommitFromGit(Target.ProjectFile.Directory, out currentBranch, out buildId); if (buildId != null && buildId.Length > 8) { buildId = buildId.Substring(0, 8); } } Log.TraceInformation("Environment: Branch = {0} BuildId = {1}", currentBranch, buildId); if (currentBranch != null && buildId != null) { var buildMetadataString = currentBranch == "master" ? buildId : string.Format("{0}+{1}", currentBranch, buildId); PrivateDefinitions.Add(string.Format("SML_BUILD_METADATA=\"{0}\"", buildMetadataString)); } }