public TsuAsio(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; string Platform = Target.Platform.ToString(); string ModulePath = UnrealBuildTool.RulesCompiler.GetFileNameFromType(GetType()); string ModuleBaseDirectory = Path.GetDirectoryName(ModulePath); string IncludeDirectory = Path.Combine(ModuleBaseDirectory, "include"); PublicIncludePaths.Add(IncludeDirectory); PublicDefinitions.AddRange( new string[] { "_WEBSOCKETPP_CPP11_STL_", "ASIO_STANDALONE" }); }
public TsuV8(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; string Platform = Target.Platform.ToString(); string ModulePath = UnrealBuildTool.RulesCompiler.GetFileNameFromType(GetType()); string ModuleBaseDirectory = Path.GetDirectoryName(ModulePath); string IncludeDirectory = Path.Combine(ModuleBaseDirectory, "include"); string LibraryDirectory = Path.Combine(ModuleBaseDirectory, "lib", Platform); string BinariesDirectory = Path.Combine("$(PluginDir)", "Binaries", "ThirdParty", "V8", Platform); var DllNames = new string[] { "v8.dll", "v8_libbase.dll", "v8_libplatform.dll" }; foreach (var DllName in DllNames) { PublicDelayLoadDLLs.Add(DllName); var LibName = DllName + ".lib"; PublicAdditionalLibraries.Add(LibName); var DllPath = Path.Combine(BinariesDirectory, DllName); RuntimeDependencies.Add(DllPath); } PublicIncludePaths.Add(IncludeDirectory); PublicLibraryPaths.Add(LibraryDirectory); PublicDefinitions.AddRange( new string[] { "USING_V8_SHARED", "V8_DEPRECATION_WARNINGS", "V8_IMMINENT_DEPRECATION_WARNINGS" }); }
public libprotobuf(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; bool is_supported = false; if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64)) { is_supported = true; string vs_path = "vs" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + ((Target.Platform == UnrealTargetPlatform.Win64) ? "win64" : ""); string protobuf_lib_directory_full_path = System.IO.Path.Combine(ModuleDirectoryFullPath, "lib", vs_path); PublicLibraryPaths.Add(protobuf_lib_directory_full_path); PublicAdditionalLibraries.Add("libprotobuf.lib"); PublicDefinitions.AddRange( new string[] { ((Target.Platform == UnrealTargetPlatform.Win64) ? "WIN64" : "WIN32"), "_WINDOWS", "NDEBUG", "GOOGLE_PROTOBUF_CMAKE_BUILD", }); } if (is_supported) { string protobuf_code_directory_full_path = System.IO.Path.Combine(ModuleDirectoryFullPath, "protobuf", "src"); PublicSystemIncludePaths.Add(protobuf_code_directory_full_path); } }
public Rosbridge2Unreal(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicDefinitions.AddRange( new string[] {} ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Sockets", "Networking", "Engine", "WebSockets", "jsoncons" } ); #if UE_4_26_OR_LATER PublicDependencyModuleNames.Add("DeveloperSettings"); #endif PrivateDependencyModuleNames.AddRange( new string[] {} ); DynamicallyLoadedModuleNames.AddRange( new string[] {} ); AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL"); }
public protobuf(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; PublicSystemIncludePaths.Add(Path.Combine(ModuleDirectory, "include")); PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "include")); if (Target.Platform == UnrealTargetPlatform.Win64) { PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "lib")); PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "lib", "libprotobuf.lib")); } else { throw new Exception("Currently " + Target.Platform.ToString() + " is unsupported"); } PublicDefinitions.AddRange( new string[] { "GOOGLE_PROTOBUF_NO_RTTI=1", "GOOGLE_PROTOBUF_USE_UNALIGNED=0" }); }
public CesiumEditor(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { Path.Combine(ModuleDirectory, "../ThirdParty/include") } ); string libPrefix; string libPostfix; string platform; if (Target.Platform == UnrealTargetPlatform.Win64) { platform = "Windows-x64"; libPostfix = ".lib"; libPrefix = ""; } else if (Target.Platform == UnrealTargetPlatform.Mac) { platform = "Darwin-x64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.Linux) { platform = "Linux-x64"; libPostfix = ".a"; libPrefix = "lib"; } else { platform = "Unknown"; libPostfix = ".Unknown"; libPrefix = "Unknown"; } string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform); string releasePostfix = ""; string debugPostfix = "d"; bool preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame); string postfix = preferDebug ? debugPostfix : releasePostfix; string[] libs = new string[] { "CesiumIonClient", "csprng" }; if (preferDebug) { // We prefer Debug, but might still use Release if that's all that's available. foreach (string lib in libs) { string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix); if (!File.Exists(debugPath)) { Console.WriteLine("Using release build of cesium-native because a debug build is not available."); preferDebug = false; postfix = releasePostfix; break; } } } PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix))); PublicDependencyModuleNames.AddRange( new string[] { "Core", "UnrealEd", "CesiumRuntime" } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "ApplicationCore", "Slate", "SlateCore", "MeshDescription", "StaticMeshDescription", "HTTP", "MikkTSpace", "Chaos", "Projects", "InputCore", "PropertyEditor", "DeveloperSettings" // ... add private dependencies that you statically link with here ... } ); PublicDefinitions.AddRange( new string[] { } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PrivatePCHHeaderFile = "Private/PCH.h"; CppStandard = CppStandardVersion.Cpp17; }
public HotPatcherEditor(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 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[] { "UnrealEd", "UMG", "UMGEditor", "Core", "Json", "ContentBrowser", "SandboxFile", "JsonUtilities", "TargetPlatform", "PropertyEditor", "DesktopPlatform", "Projects", "Settings", "HTTP", "RHI", "EngineSettings", "AssetRegistry", "PakFileUtilities", "HotPatcherRuntime", "BinariesPatchFeature" // ... add other public dependencies that you statically link with here ... } ); // only in UE5 if (Target.Version.MajorVersion > 4) { PublicDependencyModuleNames.AddRange(new string[] { "DeveloperToolSettings" }); } if (Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 23) { PublicDependencyModuleNames.Add("ToolMenus"); } System.Func <string, bool, bool> AddPublicDefinitions = (string MacroName, bool bEnable) => { PublicDefinitions.Add(string.Format("{0}={1}", MacroName, bEnable ? 1 : 0)); return(true); }; AddPublicDefinitions("GENERATE_ASSET_REGISTRY_DATA", false); bool bIOStoreSupport = Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 25; if (bIOStoreSupport) { PublicDependencyModuleNames.AddRange(new string[] { "IoStoreUtilities" }); } AddPublicDefinitions("WITH_IO_STORE_SUPPORT", bIOStoreSupport); PrivateDependencyModuleNames.AddRange( new string[] { "Core", "UnrealEd", "Projects", "DesktopPlatform", "InputCore", "EditorStyle", "LevelEditor", "CoreUObject", "Engine", "Slate", "SlateCore", "RenderCore" // ... add private dependencies that you statically link with here ... } ); switch (Target.Configuration) { case UnrealTargetConfiguration.Debug: { PublicDefinitions.Add("WITH_HOTPATCHER_DEBUG"); break; } case UnrealTargetConfiguration.DebugGame: { PublicDefinitions.Add("WITH_HOTPATCHER_DEBUGGAME"); break; } case UnrealTargetConfiguration.Development: { PublicDefinitions.Add("WITH_HOTPATCHER_DEVELOPMENT"); break; } } ; PublicDefinitions.AddRange(new string[] { "ENABLE_COOK_ENGINE_MAP=0", "ENABLE_COOK_PLUGIN_MAP=0" }); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); if (Target.Version.MajorVersion < 5 && Target.Version.MinorVersion <= 21) { bUseRTTI = true; } BuildVersion Version; BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version); // PackageContext AddPublicDefinitions("WITH_EDITOR_SECTION", Version.MajorVersion > 4 || Version.MinorVersion > 24); System.Console.WriteLine("MajorVersion {0} MinorVersion: {1} PatchVersion {2}", Target.Version.MajorVersion, Target.Version.MinorVersion, Target.Version.PatchVersion); bLegacyPublicIncludePaths = false; OptimizeCode = CodeOptimization.InShippingBuildsOnly; // Game feature bool bEnableGameFeature = true; if (bEnableGameFeature || (Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 26)) { PublicDefinitions.AddRange(new string[] { "ENGINE_GAME_FEATURE" }); PublicDependencyModuleNames.AddRange(new string[] { // "GameFeatures", // "ModularGameplay", }); } PublicDefinitions.AddRange(new string[] { "ENABLE_UPDATER_CHECK=1", "ENABLE_MULTI_COOKER=0", "TOOL_NAME=\"HotPatcher\"", "CURRENT_VERSION_ID=74", "REMOTE_VERSION_FILE=\"https://imzlp.com/opensource/version.json\"" }); bool bEnablePackageContext = true; AddPublicDefinitions("WITH_PACKAGE_CONTEXT", (Version.MajorVersion > 4 || Version.MinorVersion > 23) && bEnablePackageContext); if (Version.MajorVersion > 4 || Version.MajorVersion > 26) { PublicDependencyModuleNames.AddRange(new string[] { "IoStoreUtilities", "UnrealEd" }); } if (Version.MajorVersion > 4 && Version.MinorVersion > 0) { PublicIncludePaths.AddRange(new List <string>() { // Path.Combine(EngineDirectory,"Source/Developer/IoStoreUtilities/Internal"), // Path.Combine(EngineDirectory,"Source/Editor/UnrealEd/Private/Cooker"), // Path.Combine(EngineDirectory,"Source/Editor/UnrealEd/Private"), // Path.Combine(EngineDirectory,"Source/Runtime/CoreUObject/Internal"), Path.Combine(ModuleDirectory, "../CookerWriterForUE5") }); } }
public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { Path.Combine(ModuleDirectory, "../ThirdParty/include") } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); string libPrefix; string libPostfix; string platform; if (Target.Platform == UnrealTargetPlatform.Win64) { platform = "Windows-x64"; libPostfix = ".lib"; libPrefix = ""; } else if (Target.Platform == UnrealTargetPlatform.Mac) { platform = "Darwin-x64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.Linux) { platform = "Linux-x64"; libPostfix = ".a"; libPrefix = "lib"; } else { platform = "Unknown"; libPostfix = ".Unknown"; libPrefix = "Unknown"; } string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform); string releasePostfix = ""; string debugPostfix = "d"; bool preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame); string postfix = preferDebug ? debugPostfix : releasePostfix; string[] libs = new string[] { "async++", "Cesium3DTiles", "CesiumAsync", "CesiumGeometry", "CesiumGeospatial", "CesiumGltfReader", "CesiumGltf", "CesiumJsonReader", "CesiumUtility", "draco", "modp_b64", "spdlog", "sqlite3", "tinyxml2", "uriparser" }; if (preferDebug) { // We prefer Debug, but might still use Release if that's all that's available. foreach (string lib in libs) { string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix); if (!File.Exists(debugPath)) { Console.WriteLine("Using release build of cesium-native because a debug build is not available."); preferDebug = false; postfix = releasePostfix; break; } } } PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix))); PublicDependencyModuleNames.AddRange( new string[] { "Core", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "RHI", "CoreUObject", "Engine", "MeshDescription", "StaticMeshDescription", "HTTP", "MikkTSpace", "LevelSequence", "Projects" } ); PublicDefinitions.AddRange( new string[] { "SPDLOG_COMPILED_LIB", "LIBASYNC_STATIC" } ); if (Target.bCompilePhysX && !Target.bUseChaos) { PrivateDependencyModuleNames.Add("PhysXCooking"); PrivateDependencyModuleNames.Add("PhysicsCore"); } else { PrivateDependencyModuleNames.Add("Chaos"); } if (Target.bBuildEditor == true) { PublicDependencyModuleNames.AddRange( new string[] { "UnrealEd", "Slate", "SlateCore", } ); } DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PrivatePCHHeaderFile = "Private/PCH.h"; CppStandard = CppStandardVersion.Cpp17; bEnableExceptions = true; }
public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { Path.Combine(ModuleDirectory, "../ThirdParty/include") } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); string libPrefix; string libPostfix; string platform; if (Target.Platform == UnrealTargetPlatform.Win64) { platform = "Windows-x64"; libPostfix = ".lib"; libPrefix = ""; } else if (Target.Platform == UnrealTargetPlatform.Mac) { platform = "Darwin-x64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.Android) { platform = "Android-xaarch64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.Linux) { platform = "Linux-x64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.IOS) { platform = "iOS-xarm64"; libPostfix = ".a"; libPrefix = "lib"; } else { platform = "Unknown"; libPostfix = ".Unknown"; libPrefix = "Unknown"; } string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform); string releasePostfix = ""; string debugPostfix = "d"; bool preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame); string postfix = preferDebug ? debugPostfix : releasePostfix; string[] libs = new string[] { "async++", "Cesium3DTilesSelection", "CesiumAsync", "CesiumGeometry", "CesiumGeospatial", "CesiumGltfReader", "CesiumGltf", "CesiumJsonReader", "CesiumUtility", "draco", "ktx_read", //"MikkTSpace", "modp_b64", "s2geometry", "spdlog", "sqlite3", "tinyxml2", "uriparser", "ktx_read" }; // Use our own copy of MikkTSpace on Android. if (Target.Platform == UnrealTargetPlatform.Android || Target.Platform == UnrealTargetPlatform.IOS) { libs = libs.Concat(new string[] { "MikkTSpace" }).ToArray(); PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "../ThirdParty/include/mikktspace")); } if (preferDebug) { // We prefer Debug, but might still use Release if that's all that's available. foreach (string lib in libs) { string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix); if (!File.Exists(debugPath)) { Console.WriteLine("Using release build of cesium-native because a debug build is not available."); preferDebug = false; postfix = releasePostfix; break; } } } PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix))); PublicDependencyModuleNames.AddRange( new string[] { "Core", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "RHI", "CoreUObject", "Engine", "MeshDescription", "StaticMeshDescription", "HTTP", "LevelSequence", "Projects", "RenderCore", "SunPosition", "DeveloperSettings" } ); // Use UE's MikkTSpace on non-Android if (Target.Platform != UnrealTargetPlatform.Android) { PrivateDependencyModuleNames.Add("MikkTSpace"); } PublicDefinitions.AddRange( new string[] { "SPDLOG_COMPILED_LIB", "LIBASYNC_STATIC", "GLM_FORCE_XYZW_ONLY", "GLM_FORCE_EXPLICIT_CTOR", "GLM_FORCE_SIZE_T_LENGTH", //"CESIUM_TRACING_ENABLED" } ); if (Target.bCompilePhysX && !Target.bUseChaos) { PrivateDependencyModuleNames.Add("PhysXCooking"); PrivateDependencyModuleNames.Add("PhysicsCore"); } else { PrivateDependencyModuleNames.Add("Chaos"); } if (Target.bBuildEditor == true) { PublicDependencyModuleNames.AddRange( new string[] { "UnrealEd", "Slate", "SlateCore", "WorldBrowser" } ); } DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PrivatePCHHeaderFile = "Private/PCH.h"; CppStandard = CppStandardVersion.Cpp17; bEnableExceptions = true; if (Target.Platform == UnrealTargetPlatform.IOS || (Target.Platform == UnrealTargetPlatform.Android && Target.Version.MajorVersion == 4 && Target.Version.MinorVersion == 26 && Target.Version.PatchVersion < 2)) { // In UE versions prior to 4.26.2, the Unreal Build Tool on Android // (AndroidToolChain.cs) ignores the CppStandard property and just // always uses C++14. Our plugin can't be compiled with C++14. // // So this hack uses reflection to add an additional argument to // the compiler command-line to force C++17 mode. Clang ignores all // but the last `-std=` argument, so the `-std=c++14` added by the // UBT is ignored. // // This is also needed for iOS builds on all engine versions as Unreal // defaults to c++14 regardless of the CppStandard setting Type type = Target.GetType(); FieldInfo innerField = type.GetField("Inner", BindingFlags.Instance | BindingFlags.NonPublic); TargetRules inner = (TargetRules)innerField.GetValue(Target); inner.AdditionalCompilerArguments += " -std=c++17"; } }
public HotPatcherEditor(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 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", "Json", "ContentBrowser", "SandboxFile", "JsonUtilities", "TargetPlatform", "PropertyEditor", "Settings", "AssetManagerEx", "PakFileUtilities", "IoStoreUtilities", "HotPatcherRuntime" // ... add other public dependencies that you statically link with here ... } ); if (Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 23) { PublicDependencyModuleNames.Add("ToolMenus"); } PrivateDependencyModuleNames.AddRange( new string[] { "Core", "UnrealEd", "Projects", "DesktopPlatform", "InputCore", "EditorStyle", "LevelEditor", "CoreUObject", "Engine", "Slate", "SlateCore", "RenderCore" // ... add private dependencies that you statically link with here ... } ); switch (Target.Configuration) { case UnrealTargetConfiguration.DebugGame: { PublicDefinitions.Add("WITH_HOTPATCHER_DEBUGGAME"); break; } case UnrealTargetConfiguration.Development: { PublicDefinitions.Add("WITH_HOTPATCHER_DEVELOPMENT"); break; } } ; PublicDefinitions.AddRange(new string[] { "ENABLE_COOK_ENGINE_MAP=0", "ENABLE_COOK_PLUGIN_MAP=0" }); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); if (Target.Version.MajorVersion < 5 && Target.Version.MinorVersion <= 21) { bUseRTTI = true; } System.Console.WriteLine("MajorVersion {0} MinorVersion: {1} PatchVersion {2}", Target.Version.MajorVersion, Target.Version.MinorVersion, Target.Version.PatchVersion); bLegacyPublicIncludePaths = false; OptimizeCode = CodeOptimization.InShippingBuildsOnly; }
public ShowtimeRuntime(ReadOnlyTargetRules Target) : base(Target) { //For C++17 support PCHUsage = PCHUsageMode.NoSharedPCHs; PrivatePCHHeaderFile = Path.Combine(ModuleDirectory, "Public", "ShowtimePCH.h"); //Add any macros that need to be set PublicDefinitions.AddRange( new string[] { "ZST_IMPORT_CORE_API", "ZST_IMPORT_CLIENT_API", "ZST_IMPORT_SERVER_API", "ZST_IMPORT_PLUGIN_API" }); // C runtime flags bUseRTTI = false; bEnableExceptions = true; bool bUseDebug = true; // Add any include paths for the plugin PublicIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Public"), Path.Combine(PluginDirectory, "external", "include") }); PrivateIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Private") }); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine" }); PrivateDependencyModuleNames.AddRange(new string[] { "Core" }); // Architecture string arch = ""; if (Target.Platform == UnrealTargetPlatform.Win64) { arch = Target.WindowsPlatform.Architecture.ToString(); } else if (Target.Platform == UnrealTargetPlatform.Android) { arch = "arm64-v8a"; } else if (Target.Platform == UnrealTargetPlatform.HoloLens) { arch = Target.HoloLensPlatform.Architecture.ToString(); } Console.WriteLine(Target.Architecture); var win_lib_path = Path.Combine(PluginDirectory, "external", "lib", "Win64", arch); var win_bin_path = Path.Combine(PluginDirectory, "external", "bin", "Win64", arch); var win64_libs = new string[] { }; var win64_binaries = new string[] { }; // Get Win libraries if (bUseDebug) { win64_libs = new string[] { Path.Combine(win_lib_path, "Showtimed.lib") }; win64_binaries = new string[] { Path.Combine(win_bin_path, "Showtimed.dll") }; } else { win64_libs = new string[] { Path.Combine(win_lib_path, "Showtime.lib") }; win64_binaries = new string[] { Path.Combine(win_bin_path, "Showtime.dll") }; } // Mac paths and libraries var mac_lib_path = Path.Combine(PluginDirectory, "external", "lib", "Mac"); var mac_libraries = new string[] { Path.Combine(mac_lib_path, "Showtime") }; // Android paths var android_lib_path = Path.Combine(PluginDirectory, "external", "lib", "Android", arch); string[] android_libraries = new string[] { }; try { // Search for android libraries android_libraries = Directory.GetFiles(android_lib_path, "*.so", SearchOption.AllDirectories); } catch (System.IO.DirectoryNotFoundException) { } // Add any import libraries or static libraries List <string> platform_libs = new List <string>(); List <string> platform_binaries = new List <string>(); // Set windows binaries if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.HoloLens) { string binariesDir = Path.Combine(PluginDirectory, "Binaries", "Win64"); platform_libs.AddRange(win64_libs); platform_binaries.AddRange(win64_binaries); // Copy binaries to plugin binary folder for the editor if (!Directory.Exists(binariesDir)) { Directory.CreateDirectory(binariesDir); } foreach (var dll in platform_binaries) { File.Copy(dll, Path.Combine(binariesDir, Path.GetFileName(dll)), true); } } // Set mac binaries if (Target.Platform == UnrealTargetPlatform.Mac) { platform_libs.AddRange(mac_libraries); platform_binaries.AddRange(mac_libraries); } // Set android binaries if (Target.Platform == UnrealTargetPlatform.Android) { // Add fixed android libraries platform_libs.AddRange(android_libraries); platform_binaries.AddRange(android_libraries); // Add android plugins //platform_binaries.AddRange(get_platform_plugins(arch)); // Showtime plugin path string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath); // Add UPL script AdditionalPropertiesForReceipt.Add("AndroidPlugin", System.IO.Path.Combine(PluginPath, "ShowtimeUnreal_UPL.xml")); // Public modules PublicDependencyModuleNames.AddRange(new string[] { "Launch" }); // External binary source dir for plugin copying string binariesDir = Path.Combine(PluginDirectory, "Binaries", "Android", arch); // Copy binaries to plugin binary folder //if (!Directory.Exists(binariesDir)) // Directory.CreateDirectory(binariesDir); //foreach (var so in platform_binaries) // File.Copy(so, Path.Combine(binariesDir, Path.GetFileName(so)), true); } PublicAdditionalLibraries.AddRange(platform_libs); // Add runtime libraries that need to be bundled alongside the plugin List <string> binaries = new List <string>(); binaries.AddRange(platform_binaries); binaries.AddRange(get_platform_plugins(arch)); foreach (var path in binaries) { System.Console.WriteLine("Adding runtime dependency: " + path); RuntimeDependencies.Add(Path.Combine("$(TargetOutputDir)", Path.GetFileName(path)), path); } }
public OptickPlugin(ReadOnlyTargetRules Target) : base(Target) { PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { "Private", "ThirdParty/Optick/src", // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "EngineSettings", "RenderCore", "RHI", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); PublicDefinitions.AddRange( new string[] { "OPTICK_ENABLE_GPU_VULKAN=1", "OPTICK_ENABLE_GPU_D3D12=1", "_CRT_SECURE_NO_WARNINGS", "OPTICK_UE4=1", } ); PublicDefinitions.AddRange( new string[] { "OPTICK_UE4_GPU=1", } ); if (Target.bBuildEditor == true) { PublicDependencyModuleNames.AddRange( new string[] { "Slate", "SlateCore", "EditorStyle", "UnrealEd", "MainFrame", "GameProjectGeneration", "Projects", "InputCore", "LevelEditor", "DesktopPlatform", } ); } //PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; }
public ExportNavRuntime(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { Path.Combine(EngineDirectory, "Source/Runtime/Launch") // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "Slate", "SlateCore", "NavigationSystem", "NavMesh" // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); OptimizeCode = CodeOptimization.InShippingBuildsOnly; PublicDefinitions.AddRange( new string[] { "USE_DETOUR_BUILT_INTO_UE4", "EXPORT_NAV_MESH_AS_M", "EXPORT_NAV_MESH_AS_CM", } ); }
public CesiumEditor(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { Path.Combine(ModuleDirectory, "../ThirdParty/include") } ); string libPrefix; string libPostfix; string platform; if (Target.Platform == UnrealTargetPlatform.Win64) { platform = "Windows-x64"; libPostfix = ".lib"; libPrefix = ""; } else if (Target.Platform == UnrealTargetPlatform.Mac) { platform = "Darwin-x64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.Android) { platform = "Android-xaarch64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.Linux) { platform = "Linux-x64"; libPostfix = ".a"; libPrefix = "lib"; } else if (Target.Platform == UnrealTargetPlatform.IOS) { platform = "iOS-xarm64"; libPostfix = ".a"; libPrefix = "lib"; } else { platform = "Unknown"; libPostfix = ".Unknown"; libPrefix = "Unknown"; } string libPath = Path.Combine(ModuleDirectory, "../ThirdParty/lib/" + platform); string releasePostfix = ""; string debugPostfix = "d"; bool preferDebug = (Target.Configuration == UnrealTargetConfiguration.Debug || Target.Configuration == UnrealTargetConfiguration.DebugGame); string postfix = preferDebug ? debugPostfix : releasePostfix; string[] libs = new string[] { "CesiumIonClient", "csprng" }; if (preferDebug) { // We prefer Debug, but might still use Release if that's all that's available. foreach (string lib in libs) { string debugPath = Path.Combine(libPath, libPrefix + lib + debugPostfix + libPostfix); if (!File.Exists(debugPath)) { Console.WriteLine("Using release build of cesium-native because a debug build is not available."); preferDebug = false; postfix = releasePostfix; break; } } } PublicAdditionalLibraries.AddRange(libs.Select(lib => Path.Combine(libPath, libPrefix + lib + postfix + libPostfix))); PublicDependencyModuleNames.AddRange( new string[] { "Core", "UnrealEd", "CesiumRuntime" } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "ApplicationCore", "Slate", "SlateCore", "MeshDescription", "StaticMeshDescription", "HTTP", "MikkTSpace", "Chaos", "Projects", "InputCore", "PropertyEditor", "DeveloperSettings", "EditorStyle" // ... add private dependencies that you statically link with here ... } ); PublicDefinitions.AddRange( new string[] { } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PrivatePCHHeaderFile = "Private/PCH.h"; CppStandard = CppStandardVersion.Cpp17; if (Target.Platform == UnrealTargetPlatform.IOS || (Target.Platform == UnrealTargetPlatform.Android && Target.Version.MajorVersion == 4 && Target.Version.MinorVersion == 26 && Target.Version.PatchVersion < 2)) { // In UE versions prior to 4.26.2, the Unreal Build Tool on Android // (AndroidToolChain.cs) ignores the CppStandard property and just // always uses C++14. Our plugin can't be compiled with C++14. // // So this hack uses reflection to add an additional argument to // the compiler command-line to force C++17 mode. Clang ignores all // but the last `-std=` argument, so the `-std=c++14` added by the // UBT is ignored. // // This is also needed for iOS builds on all engine versions as Unreal // defaults to c++14 regardless of the CppStandard setting Type type = Target.GetType(); FieldInfo innerField = type.GetField("Inner", BindingFlags.Instance | BindingFlags.NonPublic); TargetRules inner = (TargetRules)innerField.GetValue(Target); inner.AdditionalCompilerArguments += " -std=c++17"; } }
public AkAudio(ReadOnlyTargetRules Target) : base(Target) { string ThirdPartyFolder = Path.Combine(ModuleDirectory, "../../ThirdParty"); AkUEPlatformInstance = AkUEPlatform.GetAkUEPlatformInstance(Target, ThirdPartyFolder); PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PrivateIncludePathModuleNames.AddRange(new string[] { "Settings", "UMG" }); PublicDependencyModuleNames.Add("UMG"); PrivateDependencyModuleNames.AddRange( new string[] { "Core", "CoreUObject", "Engine", "SlateCore", "NetworkReplayStreaming", "MovieScene", "MovieSceneTracks", "Projects", "Json", "Slate", "InputCore", "Projects" }); if (Target.bBuildEditor) { PrivateDependencyModuleNames.AddRange( new string[] { "UnrealEd", "DesktopPlatform" }); foreach (var Platform in GetAvailablePlatforms(ModuleDirectory)) { PublicDefinitions.Add("AK_PLATFORM_" + Platform.ToUpper()); } } PrivateIncludePaths.Add("AkAudio/Private"); PublicIncludePaths.Add(Path.Combine(ThirdPartyFolder, "include")); PublicDefinitions.Add("AK_UNREAL_MAX_CONCURRENT_IO=32"); PublicDefinitions.Add("AK_UNREAL_IO_GRANULARITY=32768"); if (Target.Configuration == UnrealTargetConfiguration.Shipping) { PublicDefinitions.Add("AK_OPTIMIZED"); } if (Target.Configuration != UnrealTargetConfiguration.Shipping && AkUEPlatformInstance.SupportsCommunication) { AddWwiseLib("CommunicationCentral"); PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=1"); } else { PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=0"); } // Platform-specific dependencies PublicLibraryPaths.AddRange(AkUEPlatformInstance.GetPublicLibraryPaths()); PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetPublicAdditionalLibraries()); PublicDefinitions.AddRange(AkUEPlatformInstance.GetPublicDefinitions()); var Frameworks = AkUEPlatformInstance.GetPublicAdditionalFrameworks(); foreach (var fw in Frameworks) { #if UE_4_22_OR_LATER PublicAdditionalFrameworks.Add(new ModuleRules.Framework(fw)); #else PublicAdditionalFrameworks.Add(new UEBuildFramework(fw)); #endif } AddWwiseLib("AkSoundEngine"); AddWwiseLib("AkMemoryMgr"); AddWwiseLib("AkStreamMgr"); AddWwiseLib("AkMusicEngine"); AddWwiseLib("AkSpatialAudio"); AddWwiseLib("AkVorbisDecoder"); AddWwiseLib("AkSilenceSource"); AddWwiseLib("AkSineSource"); AddWwiseLib("AkToneSource"); AddWwiseLib("AkPeakLimiterFX"); AddWwiseLib("AkMatrixReverbFX"); AddWwiseLib("AkParametricEQFX"); AddWwiseLib("AkDelayFX"); AddWwiseLib("AkExpanderFX"); AddWwiseLib("AkFlangerFX"); AddWwiseLib("AkCompressorFX"); AddWwiseLib("AkGainFX"); AddWwiseLib("AkHarmonizerFX"); AddWwiseLib("AkTimeStretchFX"); AddWwiseLib("AkPitchShifterFX"); AddWwiseLib("AkStereoDelayFX"); AddWwiseLib("AkMeterFX"); AddWwiseLib("AkGuitarDistortionFX"); AddWwiseLib("AkTremoloFX"); AddWwiseLib("AkRoomVerbFX"); AddWwiseLib("AkAudioInputSource"); AddWwiseLib("AkSynthOneSource"); AddWwiseLib("AkRecorderFX"); AddWwiseLib("AkOpusDecoder"); AddWwisePlugin("AkReflectFX"); AddWwisePlugin("AkConvolutionReverbFX"); AddWwisePlugin("AuroHeadphoneFX"); if (AkUEPlatformInstance.SupportsAkAutobahn) { PublicDefinitions.Add("AK_SUPPORT_WAAPI=1"); AddWwiseLib("AkAutobahn"); } else { PublicDefinitions.Add("AK_SUPPORT_WAAPI=0"); } }
public AkAudio(ReadOnlyTargetRules Target) : base(Target) { string ThirdPartyFolder = Path.Combine(ModuleDirectory, "../../ThirdParty"); AkUEPlatformInstance = AkUEPlatform.GetAkUEPlatformInstance(Target, ThirdPartyFolder); PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PrivateIncludePathModuleNames.AddRange(new[] { "Settings", "UMG", "TargetPlatform" }); PublicDependencyModuleNames.AddRange(new[] { "UMG", "PhysX", "APEX" }); PrivateDependencyModuleNames.AddRange(new[] { "Core", "CoreUObject", "Engine", "SlateCore", "NetworkReplayStreaming", "MovieScene", "MovieSceneTracks", "Projects", "Json", "Slate", "InputCore", "Projects" }); if (Target.bBuildEditor) { PrivateDependencyModuleNames.AddRange( new string[] { "UnrealEd", "DesktopPlatform", "TargetPlatform" }); foreach (var Platform in GetAvailablePlatforms(ModuleDirectory)) { PublicDefinitions.Add("AK_PLATFORM_" + Platform.ToUpper()); } } PrivateIncludePaths.Add("AkAudio/Private"); PublicIncludePaths.Add(Path.Combine(ThirdPartyFolder, "include")); PublicDefinitions.Add("AK_UNREAL_MAX_CONCURRENT_IO=32"); PublicDefinitions.Add("AK_UNREAL_IO_GRANULARITY=32768"); if (Target.Configuration == UnrealTargetConfiguration.Shipping) { PublicDefinitions.Add("AK_OPTIMIZED"); } if (Target.Configuration != UnrealTargetConfiguration.Shipping && AkUEPlatformInstance.SupportsCommunication) { AkLibs.Add("CommunicationCentral"); PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=1"); } else { PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=0"); } if (AkUEPlatformInstance.SupportsAkAutobahn) { AkLibs.Add("AkAutobahn"); PublicDefinitions.Add("AK_SUPPORT_WAAPI=1"); } else { PublicDefinitions.Add("AK_SUPPORT_WAAPI=0"); } if (AkUEPlatformInstance.SupportsOpus) { AkLibs.Add("AkOpusDecoder"); PublicDefinitions.Add("AK_SUPPORT_OPUS=1"); } else { PublicDefinitions.Add("AK_SUPPORT_OPUS=0"); } if (AkUEPlatformInstance.SupportsDeviceMemory) { PublicDefinitions.Add("AK_SUPPORT_DEVICE_MEMORY=1"); } else { PublicDefinitions.Add("AK_SUPPORT_DEVICE_MEMORY=0"); } // Platform-specific dependencies #if UE_4_24_OR_LATER PublicSystemLibraries.AddRange(AkUEPlatformInstance.GetPublicSystemLibraries()); #else PublicLibraryPaths.AddRange(AkUEPlatformInstance.GetPublicLibraryPaths()); PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetPublicSystemLibraries()); #endif AkLibs.AddRange(AkUEPlatformInstance.GetAdditionalWwiseLibs()); PublicDefinitions.AddRange(AkUEPlatformInstance.GetPublicDefinitions()); PublicDefinitions.Add(string.Format("AK_CONFIGURATION=\"{0}\"", AkUEPlatformInstance.akConfigurationDir)); var AdditionalProperty = AkUEPlatformInstance.GetAdditionalPropertyForReceipt(ModuleDirectory); if (AdditionalProperty != null) { AdditionalPropertiesForReceipt.Add(AdditionalProperty.Item1, AdditionalProperty.Item2); } var Frameworks = AkUEPlatformInstance.GetPublicAdditionalFrameworks(); foreach (var fw in Frameworks) { #if UE_4_22_OR_LATER PublicAdditionalFrameworks.Add(new ModuleRules.Framework(fw)); #else PublicAdditionalFrameworks.Add(new UEBuildFramework(fw)); #endif } PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetSanitizedAkLibList(AkLibs)); }
public V8(ReadOnlyTargetRules Target) : base(Target) { Type = ModuleType.External; var ModulePath = UnrealBuildTool.RulesCompiler.GetFileNameFromType(GetType()); var ModuleBaseDirectory = Path.GetDirectoryName(ModulePath); var DLLPrefix = "lib"; var DLLSuffix = ".so"; var LibPrefix = "lib"; var LibSuffix = ".a"; var IsWindows = false; var IsDynamic = true; var IsDebug = false; var Configuration = "Release"; var LibraryBase = Target.Platform.ToString(); switch (Target.Configuration) { case UnrealTargetConfiguration.Debug: IsDynamic = true; IsDebug = true; Configuration = "Release"; break; case UnrealTargetConfiguration.DebugGame: IsDynamic = true; IsDebug = true; Configuration = "Release"; break; case UnrealTargetConfiguration.Development: IsDynamic = true; Configuration = "Release"; break; case UnrealTargetConfiguration.Shipping: IsDynamic = false; Configuration = "Shipping"; break; case UnrealTargetConfiguration.Test: IsDynamic = false; Configuration = "Shipping"; break; } if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { DLLPrefix = ""; DLLSuffix = ".dll"; LibPrefix = ""; LibSuffix = ".lib"; IsWindows = true; } else if (Target.Platform == UnrealTargetPlatform.Mac) { DLLSuffix = ".dylib"; if (Configuration == "Release") { IsDynamic = false; Configuration = "Shipping"; } } else if (Target.Platform == UnrealTargetPlatform.IOS) { DLLSuffix = ".dylib"; IsDynamic = false; if (Configuration == "Shipping") { Configuration = "Release"; } } else if (Target.Platform == UnrealTargetPlatform.Linux) { } else if (Target.Platform == UnrealTargetPlatform.Android) { LibraryBase = Path.Combine( "Android", Target.Architecture ); } if (IsDynamic) { PublicDefinitions.AddRange(new string[] { // "USING_V8_SHARED", "TSU_DLL_DELAY_LOAD", "V8_DEPRECATION_WARNINGS", "V8_IMMINENT_DEPRECATION_WARNINGS" }); } else { PublicDefinitions.AddRange(new string[] { "V8_DEPRECATION_WARNINGS", "V8_IMMINENT_DEPRECATION_WARNINGS" }); } var IncludeDirectory = Path.Combine(ModuleBaseDirectory, "Include"); PublicSystemIncludePaths.Add(IncludeDirectory); var LibraryDirectory = Path.Combine( ModuleBaseDirectory, "Lib", LibraryBase, Configuration ); if (IsDynamic) { var DLLs = new string[] { "v8", "v8_libbase", "v8_libplatform" }; if (IsWindows) { PublicLibraryPaths.Add(LibraryDirectory); foreach (var DLL in DLLs) { var LibName = string.Format("{0}{1}.dll{2}", LibPrefix, DLL, LibSuffix); PublicAdditionalLibraries.Add(LibName); var DLLName = string.Format("{0}{1}{2}", DLLPrefix, DLL, DLLSuffix); PublicDelayLoadDLLs.Add(DLLName); } // PrivateDefinitions.Add("TSU_DLL_DELAY_LOAD"); } else { foreach (var DLL in DLLs) { var DLLName = string.Format("{0}{1}{2}", DLLPrefix, DLL, DLLSuffix); PublicDelayLoadDLLs.Add(Path.Combine(LibraryDirectory, DLLName)); } } } else { PublicAdditionalLibraries.Add(Path.Combine( LibraryDirectory, LibPrefix + "v8_monolith" + LibSuffix )); } }
//Determines if we have precomputed dependency data for the specified target and Engine version, and processes it if we do private bool ProcessPrecomputedData(ReadOnlyTargetRules target, string engineVersion, string stagingDir) { //Resolve the paths to the files and directories that will exist if we have precomputed data for the target string targetDir = Path.Combine(ModuleDirectory, "precomputed", engineVersion, this.TargetIdentifier(target)); string flagsFile = Path.Combine(targetDir, "flags.json"); string includeDir = Path.Combine(targetDir, "include"); string libDir = Path.Combine(targetDir, "lib"); string binDir = Path.Combine(targetDir, "bin"); string dataDir = Path.Combine(targetDir, "data"); //If any of the required files or directories do not exist then we do not have precomputed data if (!File.Exists(flagsFile) || !Directory.Exists(includeDir) || !Directory.Exists(libDir) || !Directory.Exists(binDir) || !Directory.Exists(dataDir)) { return(false); } //Add the precomputed include directory to our search paths PublicIncludePaths.Add(includeDir); //Link against all static library files (and import libraries for DLLs under Windows) in the lib directory string libExtension = ((this.IsWindows(target)) ? ".lib" : ".a"); string[] libs = Directory.GetFiles(libDir, "*" + libExtension); foreach (string lib in libs) { PublicAdditionalLibraries.Add(lib); } //Under non-Windows platforms, link against all shared library files in the lib directory if (this.IsWindows(target) == false) { List <string> sharedLibs = new List <string>(); sharedLibs.AddRange(Directory.GetFiles(libDir, "*.dylib")); sharedLibs.AddRange(Directory.GetFiles(libDir, "*.so")); foreach (string lib in sharedLibs) { PublicAdditionalLibraries.Add(lib); } } //Ensure any shared libraries are staged alongside the binaries for the plugin string[] searchDirs = new string[] { binDir, libDir }; foreach (string dir in searchDirs) { List <string> binaries = new List <string>(); binaries.AddRange(Directory.GetFiles(dir, "*.dll")); binaries.AddRange(Directory.GetFiles(dir, "*.dylib")); binaries.AddRange(Directory.GetFiles(dir, "*.so")); foreach (string binary in binaries) { RuntimeDependencies.Add(Path.Combine("$(BinaryOutputDir)", Path.GetFileName(binary)), binary, StagedFileType.NonUFS); } } //Attempt to parse the JSON file containing any additional flags, modules and system libraries JsonObject flags = JsonObject.Read(new FileReference(flagsFile)); //Link against any Unreal Engine modules for bundled third-party libraries PrivateDependencyModuleNames.AddRange(flags.GetStringArrayField("unreal_modules")); //Add any preprocessor definitions specified by the JSON file PublicDefinitions.AddRange(flags.GetStringArrayField("defines")); //Link against any system libraries specified by the JSON file, ensuring we add the file extension under Windows string[] systemLibs = flags.GetStringArrayField("system_libs"); foreach (string lib in systemLibs) { string libFull = lib + ((this.IsWindows(target)) ? libExtension : ""); PublicAdditionalLibraries.Add(libFull); } //Copy any data files needed by the package into our staging directory string[] files = Directory.GetFiles(dataDir, "*", SearchOption.AllDirectories); foreach (string file in files) { RuntimeDependencies.Add(Path.Combine(stagingDir, Path.GetFileName(file)), file, StagedFileType.NonUFS); } return(true); }
public GoogleSTT(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; PublicIncludePaths.AddRange( new string[] { // ... add public include paths required here ... } ); PrivateIncludePaths.AddRange( new string[] { // ... add other private include paths required here ... Path.GetFullPath(Path.Combine(EngineDirectory, "Source/Runtime/AudioCaptureImplementations/AudioCaptureRtAudio/Private")), } ); PublicSystemIncludePaths.AddRange( new string[] { SystemPath + "Include/10.0.18362.0/um", SystemPath + "Include/10.0.18362.0/shared", } ); PublicSystemLibraryPaths.AddRange( new string[] { SystemPath + "Lib/10.0.18362.0/um/x64", } ); PublicSystemLibraries.AddRange( new string[] { "Crypt32.Lib", "bcrypt.lib", "Winhttp.lib", } ); PublicDependencyModuleNames.AddRange( new string[] { "Core", "InputCore", // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "CoreUObject", "Engine", "Slate", "SlateCore", "AudioCaptureCore", "AudioCaptureRtAudio", // ... add private dependencies that you statically link with here ... } ); DynamicallyLoadedModuleNames.AddRange( new string[] { // ... add any modules that your module loads dynamically here ... } ); PublicDefinitions.AddRange( new string[] { "CPPREST_FORCE_PPLX=0", "_WIN32_WINNT_VISTA=0", } ); LoadThirdParty(Target); }
public HotPatcherEditor(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; bLegacyPublicIncludePaths = false; OptimizeCode = CodeOptimization.InShippingBuildsOnly; if (Target.Version.MajorVersion < 5 && Target.Version.MinorVersion <= 21) { bUseRTTI = true; } PublicIncludePaths.AddRange(new string[] { }); PrivateIncludePaths.AddRange(new string[] {}); PublicDependencyModuleNames.AddRange( new string[] { "UnrealEd", "UMG", "UMGEditor", "Core", "Json", "ContentBrowser", "SandboxFile", "JsonUtilities", "TargetPlatform", "DesktopPlatform", "Projects", "Settings", "HTTP", "RHI", "EngineSettings", "AssetRegistry", "PakFileUtilities", "HotPatcherRuntime", "BinariesPatchFeature", "HotPatcherCore" // ... add other public dependencies that you statically link with here ... } ); PrivateDependencyModuleNames.AddRange( new string[] { "Core", "UnrealEd", "Projects", "DesktopPlatform", "InputCore", "EditorStyle", "LevelEditor", "CoreUObject", "Engine", "Slate", "SlateCore", "RenderCore" // ... add private dependencies that you statically link with here ... } ); if (Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 23) { PublicDependencyModuleNames.AddRange(new string[] { "ToolMenus", "TraceLog" }); } System.Func <string, bool, bool> AddPublicDefinitions = (string MacroName, bool bEnable) => { PublicDefinitions.Add(string.Format("{0}={1}", MacroName, bEnable ? 1 : 0)); return(true); }; AddPublicDefinitions("ENABLE_COOK_ENGINE_MAP", false); AddPublicDefinitions("ENABLE_COOK_PLUGIN_MAP", false); BuildVersion Version; BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version); AddPublicDefinitions("WITH_EDITOR_SECTION", Version.MajorVersion > 4 || Version.MinorVersion > 24); // Game feature bool bEnableGameFeature = false; AddPublicDefinitions("ENGINE_GAME_FEATURE", bEnableGameFeature || (Target.Version.MajorVersion > 4 || Target.Version.MinorVersion > 26)); System.Console.WriteLine("MajorVersion {0} MinorVersion: {1} PatchVersion {2}", Target.Version.MajorVersion, Target.Version.MinorVersion, Target.Version.PatchVersion); PublicDefinitions.AddRange(new string[] { "ENABLE_UPDATER_CHECK=1", "ENABLE_MULTI_COOKER=0", "TOOL_NAME=\"HotPatcher\"", "CURRENT_VERSION_ID=75", "CURRENT_PATCH_ID=2", "REMOTE_VERSION_FILE=\"https://imzlp.com/opensource/version.json\"" }); bool bEnablePackageContext = true; AddPublicDefinitions("WITH_PACKAGE_CONTEXT", (Version.MajorVersion > 4 || Version.MinorVersion > 23) && bEnablePackageContext); if (Version.MajorVersion > 4 || Version.MajorVersion > 26) { PublicDependencyModuleNames.AddRange(new string[] { "IoStoreUtilities", "UnrealEd" }); } }