Example #1
0
    public bool LoadModio(ReadOnlyTargetRules Target)
    {
        bool isLibrarySupported = false;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicDefinitions.Add("MODIO_UE4_WINDOWS_BUILD");

            isLibrarySupported = true;

            string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "msvc", "x64");
            string DLLPath       = Path.Combine(ThirdPartyPath, modio_directory, "bin", "msvc", "x64");

            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "modio.lib"));
            RuntimeDependencies.Add(Path.Combine(DLLPath, "modio.dll"));
            RuntimeDependencies.Add(Path.Combine(DLLPath, "modio.pdb"));

            string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Win64");
            if (!Directory.Exists(ProjectBinariesDirectory))
            {
                System.IO.Directory.CreateDirectory(ProjectBinariesDirectory);
            }

            CopyFile(Path.Combine(DLLPath, "modio.dll"), Path.Combine(ProjectBinariesDirectory, "modio.dll"));
            CopyFile(Path.Combine(DLLPath, "modio.pdb"), Path.Combine(ProjectBinariesDirectory, "modio.pdb"));
            PublicDelayLoadDLLs.AddRange(new string[] { "modio.dll" });
        }

        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicDefinitions.Add("MODIO_UE4_LINUX_BUILD");

            isLibrarySupported = true;

            string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "linux", "x64");

            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libmodio.so"));
            RuntimeDependencies.Add(Path.Combine(LibrariesPath, "libmodio.so"));

            string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Linux");
            if (!Directory.Exists(ProjectBinariesDirectory))
            {
                System.IO.Directory.CreateDirectory(ProjectBinariesDirectory);
            }
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicDefinitions.Add("MODIO_UE4_MAC_BUILD");

            isLibrarySupported = true;

            string LibrariesPath = Path.Combine(ThirdPartyPath, modio_directory, "lib", "macOS", "x64");
            string OrigPath      = Path.Combine(LibrariesPath, "libmodio.dylib");
            string DylibPath     = "Binaries/Mac/libmodio.dylib";
            PublicAdditionalLibraries.Add(Path.Combine(ProjectPath, DylibPath));
            RuntimeDependencies.Add("$(BinaryOutputDir)/libmodio.dylib", OrigPath);

            string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Mac");
            if (!Directory.Exists(ProjectBinariesDirectory))
            {
                System.IO.Directory.CreateDirectory(ProjectBinariesDirectory);
            }

            CopyFile(OrigPath, Path.Combine(ProjectPath, "Binaries/Mac/libmodio.dylib"));
        }

        if (isLibrarySupported)
        {
            PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, modio_directory, "include"));
            PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, modio_directory, "additional_dependencies"));
        }

        return(isLibrarySupported);
    }
Example #2
0
    public DNSSD(TargetInfo Target)
    {
        Type = ModuleType.External;

        Console.WriteLine("^...iterating through Definitions...");

        foreach (string s in Definitions)
        {
            Console.WriteLine("-->" + s);
        }


        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // Uncomment if you are using Slate UI  ANDROIDLIBS_ROOT
            // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

            // Uncomment if you are using online features
            // PrivateDependencyModuleNames.Add("OnlineSubsystem");
            // if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
            // {
            //		if (UEBuildConfiguration.bCompileSteamOSS == true)
            //		{
            //			DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
            //		}
            // }
            PrivateIncludePaths.AddRange(
                new string[] {
                "../../../../Source/Runtime/Renderer/Private",
                "../../../../Source/Runtime/Launch/Private"
            }
                );
        }

        bUseRTTI = true; //oh so very important...lets boost dynamic cast return horror to the client. /GR
        UEBuildConfiguration.bForceEnableExceptions = true;

        //BOOST_REGEX_NO_EXTERNAL_TEMPLATES
        //  var ros_preproc = "OPENCV;_NO_FTDI;GREG1;BOOST_LIB_DIAGNOSTIC";// ;BOOST_LIB_DIAGNOSTIC";BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY;BOOST_NO_RTTI;BOOST_NO_TYPEID
        // addPreproc(ros_preproc);


        if (Target.Platform == UnrealTargetPlatform.Android || Target.Platform == UnrealTargetPlatform.Win64)
        {
        }


        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            Console.WriteLine("^In Win64 Build/Single DLL dns-sd.dll");


            //ModuleDirectory + \x64\Rel-64-15\rosjadecpp-r-2015.lib"
            string lib = ModuleDirectory + @"\Lib\Windows\x64\Rel-64-15\dns-sd.lib";
            PublicAdditionalLibraries.Add(ModuleDirectory + @"\Lib\Windows\x64\Rel-64-15\dns-sd.lib");
            Console.WriteLine(lib);

            string fname = Path.Combine(ModuleDirectory + @"\bin\x64\dns-sd.dll");
            PublicDelayLoadDLLs.Add(fname);
            RuntimeDependencies.Add(new RuntimeDependency(fname));
            RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(ModuleDirectory + @"\bin\Windows\x64\dns-sd.dll")));
        }

        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            Console.WriteLine("^^^^DNSD for android isn't applicable.  Android uses a java DNS.");
        }
    }
Example #3
0
    public ICU(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        bool bNeedsDlls = false;

        string ICUVersion  = "icu4c-53_1";
        string ICURootPath = Target.UEThirdPartySourceDirectory + "ICU/" + ICUVersion + "/";

        // Includes
        PublicSystemIncludePaths.Add(ICURootPath + "include" + "/");

        string PlatformFolderName = Target.Platform.ToString();

        string TargetSpecificPath = ICURootPath + PlatformFolderName + "/";

        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            TargetSpecificPath = ICURootPath + "Linux/";
        }

        // make all Androids use the Android directory
        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            TargetSpecificPath = ICURootPath + "Android/";
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string VSVersionFolderName = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            TargetSpecificPath += VSVersionFolderName + "/";

            string[] LibraryNameStems =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            PublicLibraryPaths.Add(TargetSpecificPath + "lib" + "/");

            EICULinkType ICULinkType = (Target.LinkType == TargetLinkType.Monolithic)? EICULinkType.Static : EICULinkType.Dynamic;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "sicu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }

                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "53" + "." + "dll";
                    PublicDelayLoadDLLs.Add(LibraryName);
                }

                if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
                {
                    string BinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/VS{2}/", ICUVersion, Target.Platform.ToString(), Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = BinariesDir + String.Format("icu{0}{1}53.dll", Stem, LibraryNamePostfix);
                        RuntimeDependencies.Add(LibraryName);
                    }
                }

                bNeedsDlls = true;

                break;
            }
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix) ||
                 Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            string StaticLibraryExtension = "a";

            if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
            {
                TargetSpecificPath += Target.Architecture + "/";
            }
            else
            {
                PublicLibraryPaths.Add(TargetSpecificPath + "ARMv7/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "ARM64/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x86/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x64/lib");
            }

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            // Temporarily? only link statically on Linux too
            //EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.Android || Target.IsMonolithic) ? EICULinkType.Static : EICULinkType.Dynamic;
            EICULinkType ICULinkType = EICULinkType.Static;
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix;
                    if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
                    {
                        // Linux needs the path, not just the filename, to avoid linking to system lib instead of a bundled one.
                        PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + "lib" + LibraryName + "." + StaticLibraryExtension);
                    }
                    else
                    {
                        // other platforms will just use the library name
                        PublicAdditionalLibraries.Add(LibraryName);
                    }
                }
                break;

            case EICULinkType.Dynamic:
                if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
                {
                    string PathToBinary = String.Format("$(EngineDir)/Binaries/ThirdParty/ICU/{0}/{1}/{2}/", ICUVersion, Target.Platform.ToString(),
                                                        Target.Architecture);

                    foreach (string Stem in LibraryNameStems)
                    {
                        string LibraryName = "icu" + Stem + LibraryNamePostfix;
                        string LibraryPath = Target.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/";

                        PublicLibraryPaths.Add(LibraryPath);
                        PublicAdditionalLibraries.Add(LibraryName);

                        // add runtime dependencies (for staging)
                        RuntimeDependencies.Add(PathToBinary + "lib" + LibraryName + ".so");
                        RuntimeDependencies.Add(PathToBinary + "lib" + LibraryName + ".so.53");                                  // version-dependent
                    }
                }
                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.TVOS)
        {
            string StaticLibraryExtension  = "a";
            string DynamicLibraryExtension = "dylib";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            EICULinkType ICULinkType = (Target.Platform == UnrealTargetPlatform.IOS || (Target.LinkType == TargetLinkType.Monolithic)) ? EICULinkType.Static : EICULinkType.Dynamic;
            // Library Paths
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "libicu" + Stem + LibraryNamePostfix + "." + StaticLibraryExtension;
                    PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + LibraryName);
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    if (Target.Platform == UnrealTargetPlatform.Mac)
                    {
                        string LibraryName = "libicu" + Stem + ".53.1" + LibraryNamePostfix + "." + DynamicLibraryExtension;
                        string LibraryPath = Target.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Mac/" + LibraryName;

                        PublicDelayLoadDLLs.Add(LibraryPath);
                        RuntimeDependencies.Add(LibraryPath);
                    }
                }

                bNeedsDlls = true;

                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            // we don't bother with debug libraries on HTML5. Mainly because debugging isn't viable on html5 currently
            string StaticLibraryExtension = "bc";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };

            string OpimizationSuffix = "";
            if (Target.bCompileForSize)
            {
                OpimizationSuffix = "_Oz";
            }
            else
            {
                if (Target.Configuration == UnrealTargetConfiguration.Development)
                {
                    OpimizationSuffix = "_O2";
                }
                else if (Target.Configuration == UnrealTargetConfiguration.Shipping)
                {
                    OpimizationSuffix = "_O3";
                }
            }

            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = "libicu" + Stem + OpimizationSuffix + "." + StaticLibraryExtension;
                PublicAdditionalLibraries.Add(TargetSpecificPath + LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            string   LibraryNamePrefix = "sicu";
            string[] LibraryNameStems  =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug) ?
                                        "d" : string.Empty;
            string LibraryExtension = "lib";
            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = ICURootPath + "PS4/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                PublicAdditionalLibraries.Add(LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            string   LibraryNamePrefix = "sicu";
            string[] LibraryNameStems  =
            {
                "dt",                       // Data
                "uc",                       // Unicode Common
                "in",                       // Internationalization
                "le",                       // Layout Engine
                "lx",                       // Layout Extensions
                "io"                        // Input/Output
            };
            string LibraryNamePostfix = ""; //(Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ? "d" : string.Empty;
            string LibraryExtension   = "a";
            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = ICURootPath + "Switch/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                PublicAdditionalLibraries.Add(LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Use reflection to allow type not to exist if console code is not present
            System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool");
            if (XboxOnePlatformType != null)
            {
                string   LibraryNamePrefix = "sicu";
                string[] LibraryNameStems  =
                {
                    "dt",                       // Data
                    "uc",                       // Unicode Common
                    "in",                       // Internationalization
                    "le",                       // Layout Engine
                    "lx",                       // Layout Extensions
                    "io"                        // Input/Output
                };
                string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT) ?
                                            "d" : string.Empty;
                string LibraryExtension = "lib";
                foreach (string Stem in LibraryNameStems)
                {
                    System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                    string        LibraryName = ICURootPath + "XboxOne/VS" + VersionName.ToString() + "/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                    PublicAdditionalLibraries.Add(LibraryName);
                }
            }
        }

        // common defines (this used to be inside an if TargetPlatform == ___ block that looked to include every platform known to man, so just removed the if)
        // Definitions
        PublicDefinitions.Add("U_USING_ICU_NAMESPACE=0");              // Disables a using declaration for namespace "icu".
        PublicDefinitions.Add("U_STATIC_IMPLEMENTATION");              // Necessary for linking to ICU statically.
        PublicDefinitions.Add("UNISTR_FROM_CHAR_EXPLICIT=explicit");   // Makes UnicodeString constructors for ICU character types explicit.
        PublicDefinitions.Add("UNISTR_FROM_STRING_EXPLICIT=explicit"); // Makes UnicodeString constructors for "char"/ICU string types explicit.
        PublicDefinitions.Add("UCONFIG_NO_TRANSLITERATION=1");         // Disables declarations and compilation of unused ICU transliteration functionality.


        if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            // Definitions
            PublicDefinitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            PublicDefinitions.Add("U_PLATFORM=U_PF_ORBIS");
        }

        if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Definitions
            PublicDefinitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            PublicDefinitions.Add("U_PLATFORM=U_PF_DURANGO");
        }

        PublicDefinitions.Add("NEEDS_ICU_DLLS=" + (bNeedsDlls ? "1" : "0"));
    }
    public UnrealEnginePython(TargetInfo Target)
#endif
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD");

        bFasterWithoutUnity = string.IsNullOrEmpty(enableUnityBuild);

        PublicIncludePaths.AddRange(
            new string[] {
            "UnrealEnginePython/Public",
            // ... add public include paths required here ...
        }
            );


        PrivateIncludePaths.AddRange(
            new string[] {
            "UnrealEnginePython/Private",
            PythonHome,
            // ... add other private include paths required here ...
        }
            );


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Sockets",
            "Networking",
            "Projects"
            // ... add other public dependencies that you statically link with here ...
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "InputCore",
            "Slate",
            "SlateCore",
            "MovieScene",
            "LevelSequence",
            "HTTP",
            "UMG",
            "AppFramework",
            "RHI",
            "Voice",
            "RenderCore",
            "MovieSceneCapture",
            "Landscape",
            "Foliage",
            "AIModule"
            // ... add private dependencies that you statically link with here ...
        }
            );


#if WITH_FORWARDED_MODULE_RULES_CTOR
        BuildVersion Version;
        if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version))
        {
            if (Version.MinorVersion >= 18)
            {
                PrivateDependencyModuleNames.Add("ApplicationCore");
            }
        }
#endif


        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );

#if WITH_FORWARDED_MODULE_RULES_CTOR
        if (Target.bBuildEditor)
#else
        if (UEBuildConfiguration.bBuildEditor)
#endif
        {
            PrivateDependencyModuleNames.AddRange(new string[] {
                "UnrealEd",
                "LevelEditor",
                "BlueprintGraph",
                "Projects",
                "Sequencer",
                "SequencerWidgets",
                "AssetTools",
                "LevelSequenceEditor",
                "MovieSceneTools",
                "MovieSceneTracks",
                "CinematicCamera",
                "EditorStyle",
                "GraphEditor",
                "UMGEditor",
                "AIGraph",
                "RawMesh",
                "DesktopWidgets",
                "EditorWidgets",
                "FBX",
                "Persona",
                "PropertyEditor",
                "LandscapeEditor",
                "MaterialEditor"
            });
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            if (UseThirdPartyPython)
            {
                PythonHome = ThirdPartyPythonHome;

                System.Console.WriteLine("Using Embedded Python at: " + PythonHome);
                PublicIncludePaths.Add(PythonHome);
                string libPath = Path.Combine(PythonHome, "Lib", string.Format("{0}.lib", PythonType.ToLower()));

                System.Console.WriteLine("full lib path: " + libPath);
                PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
                PublicAdditionalLibraries.Add(libPath);

                string dllPath = Path.Combine(BinariesPath, "Win64", string.Format("{0}.dll", PythonType.ToLower()));
                RuntimeDependencies.Add(dllPath);
            }
            else if (PythonHome == "")
            {
                PythonHome = DiscoverPythonPath(windowsKnownPaths, "Win64");
                if (PythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }

                System.Console.WriteLine("Using Python at: " + PythonHome);
                PublicIncludePaths.Add(PythonHome);
                string libPath = GetWindowsPythonLibFile(PythonHome);
                PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
                PublicAdditionalLibraries.Add(libPath);
            }
        }

        //other platforms
        else
        {
            if (PythonHome == "")
            {
                PythonHome = DiscoverPythonPath(macKnownPaths, "Mac");
                if (PythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
                System.Console.WriteLine("Using Python at: " + PythonHome);
                PublicIncludePaths.Add(PythonHome);
                PublicAdditionalLibraries.Add(Path.Combine(PythonHome, "Lib", string.Format("{0}.lib", PythonType)));
            }
            System.Console.WriteLine("Using Python at: " + PythonHome);
            PublicIncludePaths.Add(PythonHome);
            string libPath = GetMacPythonLibFile(PythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicDelayLoadDLLs.Add(libPath);
        }
        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (PythonHome == "")
            {
                string includesPath = DiscoverLinuxPythonIncludesPath();
                if (includesPath == null)
                {
                    throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths");
                }
                string libsPath = DiscoverLinuxPythonLibsPath();
                if (libsPath == null)
                {
                    throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths");
                }
                PublicIncludePaths.Add(includesPath);
                PublicAdditionalLibraries.Add(libsPath);
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                string[] items = PythonHome.Split(';');
                PublicIncludePaths.Add(items[0]);
                PublicAdditionalLibraries.Add(items[1]);
            }
        }
    }
Example #5
0
        public FMODStudio(TargetInfo Target)
    #endif
        {
            PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
            PrivatePCHHeaderFile = "Private/FMODStudioPrivatePCH.h";

            bFasterWithoutUnity = true;

            PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/FMOD"));

            PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Classes"));

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "Media",
                "Projects"
            }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "MovieScene",
                "MovieSceneTracks"
            }
                );

            if (Target.bBuildEditor == true)
            {
                PrivateDependencyModuleNames.Add("AssetRegistry");
                PrivateDependencyModuleNames.Add("UnrealEd");
                PrivateDependencyModuleNames.Add("Settings");
            }

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
            }
                );

            string configName = "";

            if (Target.Configuration != UnrealTargetConfiguration.Shipping)
            {
                configName = "L";
                PublicDefinitions.Add("FMODSTUDIO_LINK_LOGGING=1");
            }
            else
            {
                configName = "";
                PublicDefinitions.Add("FMODSTUDIO_LINK_RELEASE=1");
            }

            string platformName = Target.Platform.ToString();

            string linkExtension = "";
            string dllExtension  = "";
            string libPrefix     = "";

            // ModuleDirectory points to FMODStudio\source\FMODStudio, need to get back to binaries directory for our libs
            string BasePath = System.IO.Path.Combine(ModuleDirectory, "../../Binaries", platformName);

            // Collapse the directory path, otherwise OSX is having issues with plugin paths.
            BasePath = Utils.CleanDirectorySeparators(BasePath);

            string copyThirdPartyPath      = "";
            bool   bAddRuntimeDependencies = true;
            bool   bAddDelayLoad           = false;
            bool   bShortLinkNames         = false;
            bool   bLinkFromBinaries       = true;

            // Minimum UE version for Switch 4.15
            System.Console.WriteLine("Target Platform -- " + Target.Platform.ToString());
            if (Target.Platform == UnrealTargetPlatform.Switch)
            {
                linkExtension           = ".a";
                dllExtension            = ".a";
                libPrefix               = "lib";
                bAddRuntimeDependencies = false;
            }
            else if (Target.Platform.ToString() == "UWP64")
            {
                linkExtension = ".lib";
                dllExtension  = ".dll";
                bAddDelayLoad = true;
            }
            else if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                linkExtension = "_vc.lib";
                dllExtension  = ".dll";
                bAddDelayLoad = true;
            }
            else if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                linkExtension = "_vc.lib";
                dllExtension  = ".dll";
                bAddDelayLoad = true;
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                linkExtension     = dllExtension = ".dylib";
                libPrefix         = "lib";
                bLinkFromBinaries = false;
            }
            else if (Target.Platform == UnrealTargetPlatform.XboxOne)
            {
                linkExtension      = "_vc.lib";
                dllExtension       = ".dll";
                copyThirdPartyPath = "../XBoxOne"; // XBoxOne still doesn't seem to support plugins with .dlls
                bAddDelayLoad      = false;
            }
            else if (Target.Platform == UnrealTargetPlatform.PS4)
            {
                linkExtension = "_stub.a";
                dllExtension  = ".prx";
                libPrefix     = "lib";
                bAddDelayLoad = true;
            }
            else if (Target.Platform == UnrealTargetPlatform.Android)
            {
                // Don't use an explicit path with the .so, let the architecture dirs be filtered by UBT
                PublicLibraryPaths.Add(System.IO.Path.Combine(BasePath, "armeabi-v7a"));
                PublicLibraryPaths.Add(System.IO.Path.Combine(BasePath, "arm64-v8a"));
                PublicLibraryPaths.Add(System.IO.Path.Combine(BasePath, "x86"));
                bAddRuntimeDependencies = false; // Don't use this system
                bShortLinkNames         = true;  // strip off lib and .so
                linkExtension           = dllExtension = ".so";
                libPrefix = "lib";
            }
            else if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                linkExtension           = "_iphoneos.a";
                libPrefix               = "lib";
                bAddRuntimeDependencies = false;
            }
            else if (Target.Platform == UnrealTargetPlatform.TVOS)
            {
                linkExtension           = "_appletvos.a";
                libPrefix               = "lib";
                bAddRuntimeDependencies = false;
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                BasePath      = System.IO.Path.Combine(BasePath, "x86_64");
                linkExtension = ".so";
                dllExtension  = ".so";
                libPrefix     = "lib";
            }
            else if (Target.Platform.ToString() == "Stadia")
            {
                linkExtension = ".so";
                dllExtension  = ".so";
                libPrefix     = "lib";
            }
            else
            {
                //extName = ".a";
                throw new System.Exception(System.String.Format("Unsupported platform {0}", Target.Platform.ToString()));
                //break;
            }

            //System.Console.WriteLine("FMOD Current path: " + System.IO.Path.GetFullPath("."));
            //System.Console.WriteLine("FMOD Base path: " + BasePath);

            PublicLibraryPaths.Add(BasePath);

            string fmodLibName       = System.String.Format("{0}fmod{1}{2}", libPrefix, configName, linkExtension);
            string fmodStudioLibName = System.String.Format("{0}fmodstudio{1}{2}", libPrefix, configName, linkExtension);

            string fmodDllName       = System.String.Format("{0}fmod{1}{2}", libPrefix, configName, dllExtension);
            string fmodStudioDllName = System.String.Format("{0}fmodstudio{1}{2}", libPrefix, configName, dllExtension);

            string fmodLibPath       = System.IO.Path.Combine(BasePath, fmodLibName);
            string fmodStudioLibPath = System.IO.Path.Combine(BasePath, fmodStudioLibName);

            string fmodDllPath       = System.IO.Path.Combine(BasePath, fmodDllName);
            string fmodStudioDllPath = System.IO.Path.Combine(BasePath, fmodStudioDllName);

            System.Collections.Generic.List <string> plugins = GetPlugins(BasePath);

            if (bShortLinkNames)
            {
                // For android we have provided the paths to all architectures above
                // Just provide the name without "lib" and without extension
                PublicAdditionalLibraries.Add(System.String.Format("fmod{0}", configName));
                PublicAdditionalLibraries.Add(System.String.Format("fmodstudio{0}", configName));
            }
            else if (bLinkFromBinaries)
            {
                PublicAdditionalLibraries.Add(fmodLibPath);
                PublicAdditionalLibraries.Add(fmodStudioLibPath);
            }
            else
            {
                string LibPath = System.IO.Path.Combine(ModuleDirectory, "../../Libs/Mac/");
                PublicAdditionalLibraries.Add(System.String.Format("{0}libfmod{1}.dylib", LibPath, configName));
                PublicAdditionalLibraries.Add(System.String.Format("{0}libfmodStudio{1}.dylib", LibPath, configName));
            }

            if (bAddRuntimeDependencies)
            {
                RuntimeDependencies.Add(fmodDllPath);
                RuntimeDependencies.Add(fmodStudioDllPath);
                foreach (string plugin in plugins)
                {
                    string pluginPath = System.IO.Path.Combine(BasePath, plugin + dllExtension);
                    System.Console.WriteLine("Adding reference to FMOD plugin: " + pluginPath);
                    RuntimeDependencies.Add(pluginPath);
                }
            }

            if (copyThirdPartyPath.Length != 0)
            {
                string destPath = System.IO.Path.Combine(Target.UEThirdPartyBinariesDirectory, copyThirdPartyPath);
                System.IO.Directory.CreateDirectory(destPath);

                string fmodDllDest       = System.IO.Path.Combine(destPath, fmodDllName);
                string fmodStudioDllDest = System.IO.Path.Combine(destPath, fmodStudioDllName);

                CopyFile(fmodDllPath, fmodDllDest);
                CopyFile(fmodStudioDllPath, fmodStudioDllDest);
            }

            if (bAddDelayLoad)
            {
                PublicDelayLoadDLLs.AddRange(
                    new string[] {
                    fmodDllName,
                    fmodStudioDllName
                }
                    );
            }

            if (Target.Platform == UnrealTargetPlatform.Android)
            {
                string APLName    = System.String.Format("FMODStudio{0}_APL.xml", configName);
                string RelAPLPath = Utils.MakePathRelativeTo(System.IO.Path.Combine(ModuleDirectory, APLName), Target.RelativeEnginePath);
                System.Console.WriteLine("Adding {0}", RelAPLPath);
                AdditionalPropertiesForReceipt.Add("AndroidPlugin", RelAPLPath);
                foreach (string PluginName in System.IO.Directory.GetFiles(BasePath))
                {
                    if (PluginName.EndsWith("_APL.xml", System.StringComparison.OrdinalIgnoreCase))
                    {
                        string RelPluginPath = Utils.MakePathRelativeTo(PluginName, Target.RelativeEnginePath);
                        System.Console.WriteLine("Adding {0}", RelPluginPath);
                        AdditionalPropertiesForReceipt.Add("AndroidPlugin", RelPluginPath);
                    }
                }
            }
        }
Example #6
0
    public ICU(TargetInfo Target)
    {
        Type = ModuleType.External;

        string ICURootPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "ICU/icu4c-53_1/";

        // Includes
        PublicSystemIncludePaths.Add(ICURootPath + "include" + "/");

        string PlatformFolderName = Target.Platform.ToString();

        EICULinkType ICULinkType;

        switch (Target.Type)
        {
        case TargetRules.TargetType.Game:
        case TargetRules.TargetType.Client:
        case TargetRules.TargetType.Server:
            ICULinkType = EICULinkType.Static;
            break;

        case TargetRules.TargetType.Editor:
        case TargetRules.TargetType.Program:
            ICULinkType = EICULinkType.Dynamic;
            break;

        default:
            ICULinkType = EICULinkType.None;
            break;
        }

        string TargetSpecificPath = ICURootPath + PlatformFolderName + "/";

        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            TargetSpecificPath = ICURootPath + "Win32/";
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            string VSVersionFolderName = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            TargetSpecificPath += VSVersionFolderName + "/";

            string[] LibraryNameStems =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            PublicLibraryPaths.Add(TargetSpecificPath + "lib" + "/");

            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "sicu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "." + "lib";
                    PublicAdditionalLibraries.Add(LibraryName);
                }

                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix + "53" + "." + "dll";
                    PublicDelayLoadDLLs.Add(LibraryName);
                }
                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.Android)
        {
            string StaticLibraryExtension = "a";

            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Linux:
                TargetSpecificPath += Target.Architecture + "/";
                break;

            case UnrealTargetPlatform.Android:
                PublicLibraryPaths.Add(TargetSpecificPath + "ARMv7/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "ARM64/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x86/lib");
                PublicLibraryPaths.Add(TargetSpecificPath + "x64/lib");
                break;
            }

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "icu" + Stem + LibraryNamePostfix;
                    if (Target.Platform == UnrealTargetPlatform.Android)
                    {
                        // we will filter out in the toolchain
                        PublicAdditionalLibraries.Add(LibraryName);                                 // Android requires only the filename.
                    }
                    else
                    {
                        PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + "lib" + LibraryName + "." + StaticLibraryExtension);     // Linux seems to need the path, not just the filename.
                    }
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    if (Target.Platform == UnrealTargetPlatform.Linux)
                    {
                        string LibraryName = "icu" + Stem + LibraryNamePostfix;
                        string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/";

                        PublicLibraryPaths.Add(LibraryPath);
                        PublicAdditionalLibraries.Add(LibraryName);
                    }
                }
                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.IOS)
        {
            string StaticLibraryExtension  = "a";
            string DynamicLibraryExtension = "dylib";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ?
                                        "d" : string.Empty;

            // Library Paths
            switch (ICULinkType)
            {
            case EICULinkType.Static:
                foreach (string Stem in LibraryNameStems)
                {
                    string LibraryName = "libicu" + Stem + LibraryNamePostfix + "." + StaticLibraryExtension;
                    PublicAdditionalLibraries.Add(TargetSpecificPath + "lib/" + LibraryName);
                    if (Target.Platform == UnrealTargetPlatform.IOS)
                    {
                        PublicAdditionalShadowFiles.Add(TargetSpecificPath + "lib/" + LibraryName);
                    }
                }
                break;

            case EICULinkType.Dynamic:
                foreach (string Stem in LibraryNameStems)
                {
                    if (Target.Platform == UnrealTargetPlatform.Mac)
                    {
                        string LibraryName = "libicu" + Stem + LibraryNamePostfix + ".53.1" + "." + DynamicLibraryExtension;
                        string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Mac/" + LibraryName;

                        PublicDelayLoadDLLs.Add(LibraryPath);
                        PublicAdditionalShadowFiles.Add(LibraryPath);
                    }
                    else if (Target.Platform == UnrealTargetPlatform.Linux)
                    {
                        string LibraryName = "icu" + Stem + LibraryNamePostfix;
                        string LibraryPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "ICU/icu4c-53_1/Linux/" + Target.Architecture + "/";

                        PublicLibraryPaths.Add(LibraryPath);
                        PublicAdditionalLibraries.Add(LibraryName);
                    }
                }
                break;
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            // we don't bother with debug libraries on HTML5. Mainly because debugging isn't viable on html5 currently
            string StaticLibraryExtension = "bc";

            string[] LibraryNameStems =
            {
                "data",                 // Data
                "uc",                   // Unicode Common
                "i18n",                 // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };

            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = "libicu" + Stem + "." + StaticLibraryExtension;
                PublicAdditionalLibraries.Add(TargetSpecificPath + LibraryName);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            string   LibraryNamePrefix = "sicu";
            string[] LibraryNameStems  =
            {
                "dt",                   // Data
                "uc",                   // Unicode Common
                "in",                   // Internationalization
                "le",                   // Layout Engine
                "lx",                   // Layout Extensions
                "io"                    // Input/Output
            };
            string LibraryNamePostfix = (Target.Configuration == UnrealTargetConfiguration.Debug) ?
                                        "d" : string.Empty;
            string LibraryExtension = "lib";
            foreach (string Stem in LibraryNameStems)
            {
                string LibraryName = ICURootPath + "PS4/lib/" + LibraryNamePrefix + Stem + LibraryNamePostfix + "." + LibraryExtension;
                PublicAdditionalLibraries.Add(LibraryName);
            }
        }

        // common defines
        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.Linux) ||
            (Target.Platform == UnrealTargetPlatform.Android) ||
            (Target.Platform == UnrealTargetPlatform.Mac) ||
            (Target.Platform == UnrealTargetPlatform.IOS) ||
            (Target.Platform == UnrealTargetPlatform.PS4) ||
            (Target.Platform == UnrealTargetPlatform.HTML5))
        {
            // Definitions
            Definitions.Add("U_USING_ICU_NAMESPACE=0");              // Disables a using declaration for namespace "icu".
            Definitions.Add("U_STATIC_IMPLEMENTATION");              // Necessary for linking to ICU statically.
            Definitions.Add("U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1");   // Disables unnecessary inclusion of headers - inclusions are for ease of use.
            Definitions.Add("UNISTR_FROM_CHAR_EXPLICIT=explicit");   // Makes UnicodeString constructors for ICU character types explicit.
            Definitions.Add("UNISTR_FROM_STRING_EXPLICIT=explicit"); // Makes UnicodeString constructors for "char"/ICU string types explicit.
            Definitions.Add("UCONFIG_NO_TRANSLITERATION=1");         // Disables declarations and compilation of unused ICU transliteration functionality.
        }

        if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            // Definitions
            Definitions.Add("ICU_NO_USER_DATA_OVERRIDE=1");
            Definitions.Add("U_PLATFORM=U_PF_ORBIS");
        }
    }
Example #7
0
    public PhysX(TargetInfo Target)
    {
        Type = ModuleType.External;

        // Determine which kind of libraries to link against
        PhysXLibraryMode LibraryMode   = GetPhysXLibraryMode(Target.Configuration);
        string           LibrarySuffix = GetPhysXLibrarySuffix(LibraryMode);

        Definitions.Add("WITH_PHYSX=1");
        if (UEBuildConfiguration.bCompileAPEX == false)
        {
            // Since APEX is dependent on PhysX, if APEX is not being include, set the flag properly.
            // This will properly cover the case where PhysX is compiled but APEX is not.
            Definitions.Add("WITH_APEX=0");
        }

        if (LibraryMode == PhysXLibraryMode.Shipping)
        {
            Definitions.Add("WITH_PHYSX_RELEASE=1");
        }
        else
        {
            Definitions.Add("WITH_PHYSX_RELEASE=0");
        }

        string PhysXVersion    = "PhysX_3.4";
        string PxSharedVersion = "PxShared";

        string PhysXDir    = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PhysXVersion + "/";
        string PxSharedDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PxSharedVersion + "/";

        string PhysXLibDir    = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/";
        string PxSharedLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib/";

        string PhysXIncludeDir    = PhysXDir + "Include/";
        string PxSharedIncludeDir = PxSharedDir + "include/";

        if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            // all physx includes in a Switch subdir
            PhysXIncludeDir    = PhysXIncludeDir + "Switch/";
            PxSharedIncludeDir = PxSharedIncludeDir + "Switch/";
        }


        PublicSystemIncludePaths.AddRange(
            new string[] {
            PxSharedIncludeDir,
            PxSharedIncludeDir + "cudamanager",
            PxSharedIncludeDir + "filebuf",
            PxSharedIncludeDir + "foundation",
            PxSharedIncludeDir + "pvd",
            PxSharedIncludeDir + "task",
            PhysXIncludeDir,
            PhysXIncludeDir + "foundation",
            PhysXIncludeDir + "cooking",
            PhysXIncludeDir + "common",
            PhysXIncludeDir + "extensions",
            PhysXIncludeDir + "geometry"
        }
            );

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PhysXLibDir    += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PxSharedLibDir += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesX64 = new string[] {
                "PhysX3{0}_x64.lib",
                "PhysX3Extensions{0}_x64.lib",
                "PhysX3Cooking{0}_x64.lib",
                "PhysX3Common{0}_x64.lib",
                "PsFastXml{0}_x64.lib",
                "PxFoundation{0}_x64.lib",
                "PxPvdSDK{0}_x64.lib",
                "PxTask{0}_x64.lib",
            };

            string[] DelayLoadDLLsX64 = new string[] {
                "PxFoundation{0}_x64.dll",
                "PxPvdSDK{0}_x64.dll",
                "PhysX3{0}_x64.dll",
                "PhysX3Cooking{0}_x64.dll",
                "PhysX3Common{0}_x64.dll",
            };

            string[] PxSharedRuntimeDependenciesX64 = new string[] {
                "PxFoundation{0}_x64.dll",
                "PxPvdSDK{0}_x64.dll",
            };

            foreach (string Lib in StaticLibrariesX64)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX64)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX64)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }

            string PxSharedBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in PxSharedRuntimeDependenciesX64)
            {
                RuntimeDependencies.Add(new RuntimeDependency(PxSharedBinariesDir + String.Format(DLL, LibrarySuffix)));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32 || (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
        {
            PhysXLibDir    += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PxSharedLibDir += "Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesX86 = new string[] {
                "PhysX3{0}_x86.lib",
                "PhysX3Extensions{0}_x86.lib",
                "PhysX3Cooking{0}_x86.lib",
                "PhysX3Common{0}_x86.lib",
                "PsFastXml{0}_x86.lib",
                "PxFoundation{0}_x86.lib",
                "PxPvdSDK{0}_x86.lib",
                "PxTask{0}_x86.lib",
            };

            string[] DelayLoadDLLsX86 = new string[] {
                "PxFoundation{0}_x86.dll",
                "PxPvdSDK{0}_x86.dll",
                "PhysX3{0}_x86.dll",
                "PhysX3Cooking{0}_x86.dll",
                "PhysX3Common{0}_x86.dll"
            };

            foreach (string Lib in StaticLibrariesX86)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX86)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string DLL in DelayLoadDLLsX86)
            {
                string FileName = PhysXBinariesDir + String.Format(DLL, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PhysXLibDir    += "Mac";
            PxSharedLibDir += "Mac";
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesMac = new string[] {
                PhysXLibDir + "/libLowLevel{0}.a",
                PhysXLibDir + "/libLowLevelCloth{0}.a",
                PhysXLibDir + "/libPhysX3Extensions{0}.a",
                PhysXLibDir + "/libSceneQuery{0}.a",
                PhysXLibDir + "/libSimulationController{0}.a",
                PxSharedLibDir + "/libPxTask{0}.a",
                PxSharedLibDir + "/libPsFastXml{0}.a"
            };

            foreach (string Lib in StaticLibrariesMac)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            string[] DynamicLibrariesMac = new string[] {
                "/libPhysX3{0}.dylib",
                "/libPhysX3Cooking{0}.dylib",
                "/libPhysX3Common{0}.dylib",
                "/libPxFoundation{0}.dylib",
                "/libPxPvdSDK{0}.dylib",
            };

            string PhysXBinariesDir = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "PhysX/Mac";
            foreach (string Lib in DynamicLibrariesMac)
            {
                string LibraryPath = PhysXBinariesDir + String.Format(Lib, LibrarySuffix);
                PublicDelayLoadDLLs.Add(LibraryPath);
                RuntimeDependencies.Add(new RuntimeDependency(LibraryPath));
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_PHYSX_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x86");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/ARM64");
            PublicLibraryPaths.Add(PhysXLibDir + "Android/x64");

            PublicLibraryPaths.Add(PxSharedLibDir + "Android/ARMv7");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/x86");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/arm64");
            PublicLibraryPaths.Add(PxSharedLibDir + "Android/x64");

            string[] StaticLibrariesAndroid = new string[] {
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                // "PhysX3Cooking{0}", // not needed until Apex
                "PhysX3Common{0}",
                //"PhysXVisualDebuggerSDK{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            //if you are shipping, and you actually want the shipping libs, you do not need this lib
            if (!(LibraryMode == PhysXLibraryMode.Shipping && BuildConfiguration.bUseShippingPhysXLibraries))
            {
//				PublicAdditionalLibraries.Add("nvToolsExt");
            }

            foreach (string Lib in StaticLibrariesAndroid)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PhysXLibDir    += "/Linux/" + Target.Architecture;
            PxSharedLibDir += "/Linux/" + Target.Architecture;

            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] StaticLibrariesPhysXLinux = new string[] {
                "rt",
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            foreach (string Lib in StaticLibrariesPhysXLinux)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            if (UEBuildConfiguration.bCompileAPEX)
            {
                string[] StaticLibrariesApexLinux = new string[] {
                    "NvParameterized{0}",
                    "RenderDebug{0}"
                };

                foreach (string Lib in StaticLibrariesApexLinux)
                {
                    PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "IOS/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "IOS/");
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
                PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "TVOS/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "TVOS/");
            PublicLibraryPaths.Add(PhysXLibDir);
            PublicLibraryPaths.Add(PxSharedLibDir);

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string PhysXLib in PhysXLibs)
            {
                PublicAdditionalLibraries.Add(PhysXLib + LibrarySuffix);
                PublicAdditionalShadowFiles.Add(Path.Combine(PhysXLibDir, "lib" + PhysXLib + LibrarySuffix + ".a"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PhysXLibDir    = Path.Combine(PhysXLibDir, "HTML5/");
            PxSharedLibDir = Path.Combine(PxSharedLibDir, "HTML5/");

            string[] PhysXLibs = new string[]
            {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3CharacterKinematic",
                "PhysX3Common",
                "PhysX3Cooking",
                "PhysX3Extensions",
                //"PhysXVisualDebuggerSDK",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (var lib in PhysXLibs)
            {
                if (!lib.Contains("Cooking") || Target.IsCooked == false)
                {
                    PublicAdditionalLibraries.Add(PhysXLibDir + lib + (UEBuildConfiguration.bCompileForSize ? "_Oz" : "") + ".bc");
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "PS4");

            string[] StaticLibrariesPS4 = new string[] {
                "PhysX3{0}",
                "PhysX3Extensions{0}",
                "PhysX3Cooking{0}",
                "PhysX3Common{0}",
                "LowLevel{0}",
                "LowLevelAABB{0}",
                "LowLevelCloth{0}",
                "LowLevelDynamics{0}",
                "LowLevelParticles{0}",
                "SceneQuery{0}",
                "SimulationController{0}",
                "PxFoundation{0}",
                "PxTask{0}",
                "PxPvdSDK{0}",
                "PsFastXml{0}"
            };

            foreach (string Lib in StaticLibrariesPS4)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            Definitions.Add("PX_PHYSX_STATIC_LIB=1");
            Definitions.Add("_XBOX_ONE=1");

            PublicLibraryPaths.Add(Path.Combine(PhysXLibDir, "XboxOne\\VS" + WindowsPlatform.GetVisualStudioCompilerVersionName()));

            string[] StaticLibrariesXB1 = new string[] {
                "PhysX3{0}.lib",
                "PhysX3Extensions{0}.lib",
                "PhysX3Cooking{0}.lib",
                "PhysX3Common{0}.lib",
                "LowLevel{0}.lib",
                "LowLevelAABB{0}.lib",
                "LowLevelCloth{0}.lib",
                "LowLevelDynamics{0}.lib",
                "LowLevelParticles{0}.lib",
                "SceneQuery{0}.lib",
                "SimulationController{0}.lib",
                "PxFoundation{0}.lib",
                "PxTask{0}.lib",
                "PxPvdSDK{0}.lib",
                "PsFastXml{0}.lib"
            };

            foreach (string Lib in StaticLibrariesXB1)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            PublicLibraryPaths.Add(PhysXLibDir + "Switch");
            PublicLibraryPaths.Add(PxSharedLibDir + "Switch");

            string[] StaticLibrariesSwitch = new string[] {
                "LowLevel",
                "LowLevelAABB",
                "LowLevelCloth",
                "LowLevelDynamics",
                "LowLevelParticles",
                "PhysX3",
                "PhysX3Common",
                // "PhysX3Cooking", // not needed until Apex
                "PhysX3Extensions",
                "SceneQuery",
                "SimulationController",
                "PxFoundation",
                "PxTask",
                "PxPvdSDK",
                "PsFastXml"
            };

            foreach (string Lib in StaticLibrariesSwitch)
            {
                PublicAdditionalLibraries.Add(Lib + LibrarySuffix);
            }
        }
    }
Example #8
0
        public TobiiCore(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

            PrivateDependencyModuleNames.AddRange(new string[]
            {
                "Core"
                , "CoreUObject"
                , "Engine"
                , "UMG"
                , "InputCore"
                , "InputDevice"
                , "HeadMountedDisplay"
            });

            PublicDependencyModuleNames.AddRange(new string[]
            {
                "EyeTracker"
            });

            if (Target.bBuildEditor)
            {
                DynamicallyLoadedModuleNames.AddRange(new string[] { "LevelEditor" });
                PublicDependencyModuleNames.AddRange(new string[]
                {
                    "Slate"
                    , "SlateCore"
                    , "EditorStyle"
                    , "UnrealEd"
                    , "MainFrame"
                    , "GameProjectGeneration"
                    , "WebBrowser"
                    , "RHI"
                });
            }

            string             AssemblyLocation = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
            DirectoryReference RootDirectory    = new DirectoryReference(Path.Combine(AssemblyLocation, "..", "..", ".."));
            bool IsEnginePlugin = RootDirectory.GetDirectoryName() == "Engine";

            PublicDefinitions.Add("TOBII_COMPILE_AS_ENGINE_PLUGIN=" + (IsEnginePlugin ? 1 : 0));

            //Platform specific
            if (IsEyetrackingActive && (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32))
            {
                string PlatformString               = (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64" : "Win32";
                string PluginsPath                  = Path.Combine(ModuleDirectory, "../../../");
                string TobiiRelativeAPIPath         = "TobiiEyetracking/ThirdParty/GameIntegration";
                string TobiiRelativeIncludePath     = Path.Combine(TobiiRelativeAPIPath, "include");
                string TobiiRelativeLibraryBasePath = Path.Combine(TobiiRelativeAPIPath, "lib");

                //Includes
                PrivateIncludePaths.Add(Path.Combine(PluginsPath, TobiiRelativeIncludePath));

                //Add libraries
                AddLibrary(Path.Combine(PluginsPath, TobiiRelativeLibraryBasePath, PlatformString, (Target.Platform == UnrealTargetPlatform.Win32) ? "tobii_gameintegration_x86.lib" : "tobii_gameintegration_x64.lib"));

                //Add DLL
                string RelativeGICDllPath = "";
                string GICDllName         = (Target.Platform == UnrealTargetPlatform.Win32) ? "tobii_gameintegration_x86.dll" : "tobii_gameintegration_x64.dll";

                if (IsEnginePlugin)
                {
                    RelativeGICDllPath = Path.Combine("Binaries/ThirdParty/TobiiEyetracking", PlatformString, GICDllName);
                    RuntimeDependencies.Add("$(EngineDir)/" + RelativeGICDllPath);
                }
                else
                {
                    RelativeGICDllPath = Path.Combine(TobiiRelativeLibraryBasePath, PlatformString, GICDllName);
                    RuntimeDependencies.Add(Path.Combine(PluginsPath, RelativeGICDllPath));
                }

                PublicDefinitions.Add("TOBII_EYETRACKING_ACTIVE=1");
                PublicDefinitions.Add("TOBII_GIC_RELATIVE_DLL_PATH=R\"(" + RelativeGICDllPath + ")\"");
                PublicDelayLoadDLLs.Add(GICDllName);
            }
            else
            {
                PublicDefinitions.Add("TOBII_EYETRACKING_ACTIVE=0");
            }
        }
Example #9
0
        public NdiMedia(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "Media",
            }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[] {
                "Core",
                "CoreUObject",
                "NdiMediaFactory",
                "Networking",
                "Projects",
                "RenderCore",
            }
                );

            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "Media",
            }
                );

            PrivateIncludePaths.AddRange(
                new string[] {
                "NdiMedia/Private",
                "NdiMedia/Private/Assets",
                "NdiMedia/Private/Ndi",
                "NdiMedia/Private/Player",
                "NdiMedia/Private/Shared",
            }
                );

            PublicDependencyModuleNames.AddRange(
                new string[] {
                "MediaAssets",
            }
                );

            // add NDI libraries
            string NdiDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "ThirdParty"));

            PrivateIncludePaths.Add(Path.Combine(NdiDir, "include"));

            if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                string LibDir  = Path.Combine(NdiDir, "lib", "apple", "iOS");
                string LibPath = Path.Combine(LibDir, "libndi_ios.a");

                PublicAdditionalLibraries.Add(LibPath);
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                string LibDir  = Path.Combine(NdiDir, "lib", "linux", "x86_64-linux-gnu-5.4");
                string LibPath = Path.Combine(LibDir, "libndi.a");
                string DllPath = Path.Combine(LibDir, "libndi.so.1.0.1");

                PublicAdditionalLibraries.Add(LibPath);
                PublicAdditionalLibraries.Add("stdc++");
                RuntimeDependencies.Add(new RuntimeDependency(DllPath));
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string LibDir  = Path.Combine(NdiDir, "lib", "apple", "x64");
                string DllPath = Path.Combine(LibDir, "libndi.dylib");

                PublicLibraryPaths.Add(LibDir);
                PublicAdditionalLibraries.Add(DllPath);
                PublicDelayLoadDLLs.Add(DllPath);
                RuntimeDependencies.Add(new RuntimeDependency(DllPath));
            }
            else if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                string LibDir  = Path.Combine(NdiDir, "lib", "windows", "x86");
                string DllPath = Path.Combine(LibDir, "Processing.NDI.Lib.x86.dll");

                PublicLibraryPaths.Add(LibDir);
                PublicAdditionalLibraries.Add("Processing.NDI.Lib.x86.lib");
                PublicDelayLoadDLLs.Add("Processing.NDI.Lib.x86.dll");
                RuntimeDependencies.Add(new RuntimeDependency(DllPath));
            }
            else if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                string LibDir  = Path.Combine(NdiDir, "lib", "windows", "x64");
                string DllPath = Path.Combine(LibDir, "Processing.NDI.Lib.x64.dll");

                PublicLibraryPaths.Add(LibDir);
                PublicAdditionalLibraries.Add("Processing.NDI.Lib.x64.lib");
                PublicDelayLoadDLLs.Add("Processing.NDI.Lib.x64.dll");
                RuntimeDependencies.Add(new RuntimeDependency(DllPath));
            }
            else
            {
                System.Console.WriteLine("NDI SDK does not supported this platform");
            }
        }
Example #10
0
        public WmfMedia(ReadOnlyTargetRules Target) : base(Target)
        {
            bEnableExceptions = true;

            DynamicallyLoadedModuleNames.AddRange(
                new string[] {
                "Media",
            });

            PublicDependencyModuleNames.AddRange(
                new string[] {
                "WmfMediaFactory"
            });

            PrivateDependencyModuleNames.AddRange(
                new string[] {
                "Core",
                "CoreUObject",
                "Engine",
                "MediaUtils",
                "Projects",
                "RenderCore",
                "RHI",
                "UtilityShaders",
                "WmfMediaFactory",
            });

            if (Target.Platform != UnrealTargetPlatform.XboxOne)
            {
                PrivateDependencyModuleNames.Add("D3D11RHI");
            }

            PrivateIncludePathModuleNames.AddRange(
                new string[] {
                "Media",
            });

            PrivateIncludePaths.AddRange(
                new string[] {
                "WmfMedia/Private",
                "WmfMedia/Private/Player",
                "WmfMedia/Private/Wmf",
                "WmfMedia/Private/WmfMediaCodec",
                "../../../../Source/Runtime/Windows/D3D11RHI/Private",
                "../../../../Source/Runtime/Windows/D3D11RHI/Private/Windows",
            });

            AddEngineThirdPartyPrivateStaticDependencies(Target, "IntelMetricsDiscovery");
            AddEngineThirdPartyPrivateStaticDependencies(Target, "NVAftermath");

            if (Target.bCompileAgainstEngine)
            {
                PrivateDependencyModuleNames.Add("Engine");
                PrivateDependencyModuleNames.Add("HeadMountedDisplay");
            }

            if ((Target.Platform == UnrealTargetPlatform.Win64) ||
                (Target.Platform == UnrealTargetPlatform.Win32))
            {
                PublicDelayLoadDLLs.Add("mf.dll");
                PublicDelayLoadDLLs.Add("mfplat.dll");
                PublicDelayLoadDLLs.Add("mfplay.dll");
                PublicDelayLoadDLLs.Add("shlwapi.dll");
            }
        }
Example #11
0
    public SpatialGDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
#pragma warning disable 0618
        bFasterWithoutUnity = true;             // Deprecated in 4.24, replace with bUseUnity = false; once we drop support for 4.23
        if (Target.Version.MinorVersion == 24)  // Due to a bug in 4.24, bFasterWithoutUnity is inversed, fixed in master, so should hopefully roll into the next release, remove this once it does
        {
            bFasterWithoutUnity = false;
        }
#pragma warning restore 0618

        PrivateIncludePaths.Add("SpatialGDK/Private");

        var WorkerSDKPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "Public", "WorkerSDK"));

        PublicIncludePaths.Add(WorkerSDKPath); // Worker SDK uses a different include format <improbable/x.h>
        PrivateIncludePaths.Add(WorkerSDKPath);

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "EngineSettings",
            "Projects",
            "OnlineSubsystemUtils",
            "InputCore",
            "Sockets",
            "ReplicationGraph"
        });

        if (Target.bBuildEditor)
        {
            PublicDependencyModuleNames.Add("UnrealEd");
            PublicDependencyModuleNames.Add("SpatialGDKServices");
        }

        if (Target.bWithPerfCounters)
        {
            PublicDependencyModuleNames.Add("PerfCounters");
        }

        var WorkerLibraryDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Binaries", "ThirdParty", "Improbable", Target.Platform.ToString()));

        var WorkerLibraryPaths = new List <string>
        {
            WorkerLibraryDir,
        };

        string LibPrefix       = "improbable_";
        string ImportLibSuffix = "";
        string SharedLibSuffix = "";
        bool   bAddDelayLoad   = false;

        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            ImportLibSuffix = ".lib";
            SharedLibSuffix = ".dll";
            bAddDelayLoad   = true;
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibPrefix       = "libimprobable_";
            ImportLibSuffix = SharedLibSuffix = ".dylib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            LibPrefix       = "libimprobable_";
            ImportLibSuffix = SharedLibSuffix = ".so";
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            LibPrefix       = "libimprobable_";
            ImportLibSuffix = "_stub.a";
            SharedLibSuffix = ".prx";
            bAddDelayLoad   = true;
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            ImportLibSuffix = ".lib";
            SharedLibSuffix = ".dll";
            // We don't set bAddDelayLoad = true here, because we get "unresolved external symbol __delayLoadHelper2".
            // See: https://www.fmod.org/questions/question/deploy-issue-on-xboxone-with-unrealengine-4-14/
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            LibPrefix       = "libimprobable_";
            ImportLibSuffix = SharedLibSuffix = "_static.a";
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            LibPrefix = "improbable_";
            WorkerLibraryPaths.AddRange(new string[]
            {
                Path.Combine(WorkerLibraryDir, "arm64-v8a"),
                Path.Combine(WorkerLibraryDir, "armeabi-v7a"),
                Path.Combine(WorkerLibraryDir, "x86_64"),
            });

            string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "SpatialGDK_APL.xml"));
        }
        else
        {
            throw new System.Exception(System.String.Format("Unsupported platform {0}", Target.Platform.ToString()));
        }

        string WorkerImportLib = System.String.Format("{0}worker{1}", LibPrefix, ImportLibSuffix);
        string WorkerSharedLib = System.String.Format("{0}worker{1}", LibPrefix, SharedLibSuffix);

        if (Target.Platform != UnrealTargetPlatform.Android)
        {
            RuntimeDependencies.Add(Path.Combine(WorkerLibraryDir, WorkerSharedLib), StagedFileType.NonUFS);
            if (bAddDelayLoad)
            {
                PublicDelayLoadDLLs.Add(WorkerSharedLib);
            }

            WorkerImportLib = Path.Combine(WorkerLibraryDir, WorkerImportLib);
        }

        PublicAdditionalLibraries.Add(WorkerImportLib);
#pragma warning disable 0618
        PublicLibraryPaths.AddRange(WorkerLibraryPaths); // Deprecated in 4.24, replace with PublicRuntimeLibraryPaths or move the full path into PublicAdditionalLibraries once we drop support for 4.23
#pragma warning restore 0618

        // Detect existence of trace library, if present add preprocessor
        string TraceStaticLibPath  = "";
        string TraceDynamicLib     = "";
        string TraceDynamicLibPath = "";
        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            TraceStaticLibPath  = Path.Combine(WorkerLibraryDir, "trace_dynamic.lib");
            TraceDynamicLib     = "trace_dynamic.dll";
            TraceDynamicLibPath = Path.Combine(WorkerLibraryDir, TraceDynamicLib);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            TraceStaticLibPath  = Path.Combine(WorkerLibraryDir, "libtrace_dynamic.so");
            TraceDynamicLib     = "libtrace_dynamic.so";
            TraceDynamicLibPath = Path.Combine(WorkerLibraryDir, TraceDynamicLib);
        }

        if (File.Exists(TraceStaticLibPath) && File.Exists(TraceDynamicLibPath))
        {
            Log.TraceInformation("Detection of trace libraries found at {0} and {1}, enabling trace functionality.", TraceStaticLibPath, TraceDynamicLibPath);
            PublicDefinitions.Add("TRACE_LIB_ACTIVE=1");

            PublicAdditionalLibraries.Add(TraceStaticLibPath);

            RuntimeDependencies.Add(TraceDynamicLibPath, StagedFileType.NonUFS);
            if (bAddDelayLoad)
            {
                PublicDelayLoadDLLs.Add(TraceDynamicLib);
            }
        }
        else
        {
            Log.TraceInformation("Didn't find trace libraries at {0} and {1}, disabling trace functionality.", TraceStaticLibPath, TraceDynamicLibPath);
            PublicDefinitions.Add("TRACE_LIB_ACTIVE=0");
        }
    }
        public GameLiftServerSDK(TargetInfo Target)
        {
            PublicIncludePaths.AddRange(
                new string[] {
                "GameLiftServerSDK/Public"
            }
                );


            PrivateIncludePaths.AddRange(
                new string[] {
                "GameLiftServerSDK/Private",
            }
                );


            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "Projects"
            }
                );


            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
            }
                );


            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
            }
                );

            string BaseDirectory = System.IO.Path.GetFullPath(System.IO.Path.Combine(ModuleDirectory, "..", ".."));
            string SDKDirectory  = System.IO.Path.Combine(BaseDirectory, "ThirdParty", "GameLiftServerSDK", Target.Platform.ToString());

            bool bHasGameLiftSDK = System.IO.Directory.Exists(SDKDirectory);

            if (bHasGameLiftSDK)
            {
                if (Target.Type == TargetRules.TargetType.Server)
                {
                    Definitions.Add("WITH_GAMELIFT=1");
                    if (Target.Platform == UnrealTargetPlatform.Linux)
                    {
                        SDKDirectory = System.IO.Path.Combine(SDKDirectory, "x86_64-unknown-linux-gnu");
                        string SDKLib = System.IO.Path.Combine(SDKDirectory, "libaws-cpp-sdk-gamelift-server.so");

                        PublicLibraryPaths.Add(SDKDirectory);
                        PublicAdditionalLibraries.Add(SDKLib);
                        RuntimeDependencies.Add(new RuntimeDependency(SDKLib));
                    }
                    else if (Target.Platform == UnrealTargetPlatform.Win64)
                    {
                        PublicLibraryPaths.Add(SDKDirectory);
                        PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.lib"));
                        PublicDelayLoadDLLs.Add("aws-cpp-sdk-gamelift-server.dll");
                        string SDKLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.dll");
                        RuntimeDependencies.Add(new RuntimeDependency(SDKLibWindows));
                    }
                }
                else
                {
                    Definitions.Add("WITH_GAMELIFT=0");
                }
            }
            else
            {
                Definitions.Add("WITH_GAMELIFT=0");
            }
        }
Example #13
0
        public WindowsMixedRealityHMD(ReadOnlyTargetRules Target) : base(Target)
        {
            bEnableExceptions = true;

            if (Target.Platform == UnrealTargetPlatform.Win32 ||
                Target.Platform == UnrealTargetPlatform.Win64 ||
                Target.Platform == UnrealTargetPlatform.HoloLens)
            {
                PublicDependencyModuleNames.AddRange(
                    new string[]
                {
                    "HeadMountedDisplay",
                    "ProceduralMeshComponent",
                    "MixedRealityInteropLibrary",
                    "InputDevice",
                }
                    );

                PrivateDependencyModuleNames.AddRange(
                    new string[]
                {
                    "Core",
                    "CoreUObject",
                    "ApplicationCore",
                    "Engine",
                    "InputCore",
                    "RHI",
                    "RenderCore",
                    "Renderer",
                    "HeadMountedDisplay",
                    "D3D11RHI",
                    "Slate",
                    "SlateCore",
                    "Projects",
                    "WindowsMixedRealityHandTracking",
                    "AugmentedReality",
                }
                    );

                if (Target.Platform == UnrealTargetPlatform.Win64 ||
                    Target.Platform == UnrealTargetPlatform.HoloLens)
                {
                    PrivateDependencyModuleNames.Add("HoloLensAR");
                }

                if (Target.bBuildEditor == true)
                {
                    PrivateDependencyModuleNames.Add("UnrealEd");
                    PrivateDependencyModuleNames.Add("WindowsMixedRealityRuntimeSettings");
                }

                if (Target.Platform != UnrealTargetPlatform.HoloLens)
                {
                    AddEngineThirdPartyPrivateStaticDependencies(Target, "NVAftermath");
                    AddEngineThirdPartyPrivateStaticDependencies(Target, "IntelMetricsDiscovery");
                }

                AddEngineThirdPartyPrivateStaticDependencies(Target, "WindowsMixedRealityInterop");

                LoadMixedReality(Target);

                PrivateIncludePaths.AddRange(
                    new string[]
                {
                    "WindowsMixedRealityHMD/Private",
                    "../../../../Source/Runtime/Windows/D3D11RHI/Private",
                    "../../../../Source/Runtime/Renderer/Private",
                });

                if (Target.Platform == UnrealTargetPlatform.Win32 ||
                    Target.Platform == UnrealTargetPlatform.Win64)
                {
                    PrivateIncludePaths.Add("../../../../Source/Runtime/Windows/D3D11RHI/Private/Windows");
                }
                else if (Target.Platform == UnrealTargetPlatform.HoloLens)
                {
                    PrivateIncludePaths.Add("../../../../Source/Runtime/Windows/D3D11RHI/Private/HoloLens");
                }

                PCHUsage             = PCHUsageMode.NoSharedPCHs;
                PrivatePCHHeaderFile = "Private/WindowsMixedRealityPrecompiled.h";

                if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.Azure.SpatialAnchors.dll"));
                    RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.Azure.SpatialAnchors.winmd"));
                    PublicDelayLoadDLLs.Add("Microsoft.Azure.SpatialAnchors.dll");
                    RuntimeDependencies.Add(Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.MixedReality.QR.dll"));
                    PublicDelayLoadDLLs.Add("Microsoft.MixedReality.QR.dll");
                    RuntimeDependencies.Add(Path.Combine("$(EngineDir)/Binaries/ThirdParty/Windows/x64", "Microsoft.MixedReality.SceneUnderstanding.dll"));
                    PublicDelayLoadDLLs.Add("Microsoft.MixedReality.SceneUnderstanding.dll");
                    PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=1");
                    foreach (var Dll in Directory.EnumerateFiles(Path.Combine(Target.UEThirdPartyBinariesDirectory, "Windows/x64"), "*_app.dll"))
                    {
                        RuntimeDependencies.Add(Dll);
                    }
                }
                else if (Target.Platform == UnrealTargetPlatform.HoloLens)
                {
                    RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.Azure.SpatialAnchors.dll"));
                    RuntimeDependencies.Add(System.IO.Path.Combine("$(EngineDir)/Binaries/ThirdParty/HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.Azure.SpatialAnchors.winmd"));
                    PublicDelayLoadDLLs.Add("Microsoft.Azure.SpatialAnchors.dll");
                    PublicDelayLoadDLLs.Add("Microsoft.MixedReality.QR.dll");
                    RuntimeDependencies.Add(Path.Combine("$(EngineDir)/Binaries/ThirdParty/HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.MixedReality.QR.dll"));

                    string SceneUnderstandingPath = Path.Combine(Target.UEThirdPartyBinariesDirectory, "HoloLens", Target.WindowsPlatform.GetArchitectureSubpath(), "Microsoft.MixedReality.SceneUnderstanding.dll");
                    if (File.Exists(SceneUnderstandingPath))
                    {
                        RuntimeDependencies.Add(SceneUnderstandingPath);
                        PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=1");
                    }
                    else
                    {
                        PublicDefinitions.Add("WITH_SCENE_UNDERSTANDING=0");
                    }
                }
            }

            if (Target.Platform == UnrealTargetPlatform.Win64 && Target.bBuildEditor == true)
            {
                PrivateDependencyModuleNames.Add("WindowsMixedRealityInputSimulation");
                PrivateDefinitions.Add("WITH_INPUT_SIMULATION=1");
            }
            else
            {
                PrivateDefinitions.Add("WITH_INPUT_SIMULATION=0");
            }
        }
Example #14
0
    public FLEX(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        if (Target.bCompileNvFlexD3D == false && Target.bCompileNvFlexCUDA == false)
        {
            Definitions.Add("WITH_FLEX=0");
            return;
        }

        Definitions.Add("WITH_FLEX=1");

        if (Target.bCompileNvFlexD3D)
        {
            Definitions.Add("WITH_FLEX_DX=1");
            Definitions.Add("WITH_FLEX_CUDA=0");
        }

        if (Target.bCompileNvFlexCUDA)
        {
            Definitions.Add("WITH_FLEX_CUDA=1");
            Definitions.Add("WITH_FLEX_DX=0");
        }

        string FLEXDir    = Target.UEThirdPartySourceDirectory + "PhysX/FLEX-1.1.0/";
        string FLEXLibDir = FLEXDir + "lib";

        PublicIncludePaths.Add(FLEXDir + "include");
        PublicSystemIncludePaths.Add(FLEXDir + "include");

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(FLEXLibDir + "/win64");

            if (Target.bCompileNvFlexCUDA)
            {
                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    PublicAdditionalLibraries.Add("NvFlexDebugCUDA_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDebugCUDA_x64.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtDebugCUDA_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtDebugCUDA_x64.dll");
                    PublicAdditionalLibraries.Add("NvFlexDeviceDebug_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDeviceDebug_x64.dll");
                }
                else
                {
                    PublicAdditionalLibraries.Add("NvFlexReleaseCUDA_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexReleaseCUDA_x64.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtReleaseCUDA_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtReleaseCUDA_x64.dll");
                    PublicAdditionalLibraries.Add("NvFlexDeviceRelease_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDeviceRelease_x64.dll");
                }
            }

            if (Target.bCompileNvFlexD3D)
            {
                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    PublicAdditionalLibraries.Add("NvFlexDebugD3D_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDebugD3D_x64.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtDebugD3D_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtDebugD3D_x64.dll");
                }
                else
                {
                    PublicAdditionalLibraries.Add("NvFlexReleaseD3D_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexReleaseD3D_x64.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtReleaseD3D_x64.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtReleaseD3D_x64.dll");
                }
            }

            PublicLibraryPaths.Add(FLEXDir + "/Win64");

            string FlexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/FLEX-1.1.0/Win64/");


            if (Target.bCompileNvFlexCUDA)
            {
                string[] RuntimeDependenciesX64 =
                {
                    "nvToolsExt64_1.dll",
                    "cudart64_80.dll",
                    "NvFlexDebugCUDA_x64.dll",
                    "NvFlexReleaseCUDA_x64.dll",
                    "NvFlexExtDebugCUDA_x64.dll",
                    "NvFlexExtReleaseCUDA_x64.dll",
                    "NvFlexDeviceRelease_x64.dll",
                };

                foreach (string RuntimeDependency in RuntimeDependenciesX64)
                {
                    RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency));
                }
            }

            if (Target.bCompileNvFlexD3D)
            {
                string[] RuntimeDependenciesX64 =
                {
                    "nvToolsExt64_1.dll",
                    "amd_ags_x64.dll",
                    "NvFlexDebugD3D_x64.dll",
                    "NvFlexReleaseD3D_x64.dll",
                    "NvFlexExtDebugD3D_x64.dll",
                    "NvFlexExtReleaseD3D_x64.dll",
                };

                foreach (string RuntimeDependency in RuntimeDependenciesX64)
                {
                    RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency));
                }
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(FLEXLibDir + "/win32");

            if (Target.bCompileNvFlexCUDA)
            {
                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    PublicAdditionalLibraries.Add("NvFlexDebugCUDA_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDebugCUDA_x86.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtDebugCUDA_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtDebugCUDA_x86.dll");
                    PublicAdditionalLibraries.Add("NvFlexDeviceDebug_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDeviceDebug_x86.dll");
                }
                else
                {
                    PublicAdditionalLibraries.Add("NvFlexReleaseCUDA_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexReleaseCUDA_x86.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtReleaseCUDA_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtReleaseCUDA_x86.dll");
                    PublicAdditionalLibraries.Add("NvFlexDeviceRelease_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDeviceRelease_x86.dll");
                }
            }

            if (Target.bCompileNvFlexD3D)
            {
                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    PublicAdditionalLibraries.Add("NvFlexDebugD3D_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexDebugD3D_x86.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtDebugD3D_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtDebugD3D_x86.dll");
                }
                else
                {
                    PublicAdditionalLibraries.Add("NvFlexReleaseD3D_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexReleaseD3D_x86.dll");
                    PublicAdditionalLibraries.Add("NvFlexExtReleaseD3D_x86.lib");
                    PublicDelayLoadDLLs.Add("NvFlexExtReleaseD3D_x86.dll");
                }
            }

            PublicLibraryPaths.Add(FLEXDir + "/Win32");

            string FlexBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/FLEX-1.1.0/Win32/");

            if (Target.bCompileNvFlexCUDA)
            {
                string[] RuntimeDependenciesX86 =
                {
                    "nvToolsExt32_1.dll",
                    "cudart32_80.dll",
                    "NvFlexDebugCUDA_x86.dll",
                    "NvFlexReleaseCUDA_x86.dll",
                    "NvFlexExtDebugCUDA_x86.dll",
                    "NvFlexExtReleaseCUDA_x86.dll",
                    "NvFlexDeviceRelease_x86.dll",
                };

                foreach (string RuntimeDependency in RuntimeDependenciesX86)
                {
                    RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency));
                }
            }


            if (Target.bCompileNvFlexD3D)
            {
                string[] RuntimeDependenciesX86 =
                {
                    "nvToolsExt32_1.dll",
                    "amd_ags_x86.dll",
                    "NvFlexDebugD3D_x86.dll",
                    "NvFlexReleaseD3D_x86.dll",
                    "NvFlexExtDebugD3D_x86.dll",
                    "NvFlexExtReleaseD3D_x86.dll",
                };

                foreach (string RuntimeDependency in RuntimeDependenciesX86)
                {
                    RuntimeDependencies.Add(new RuntimeDependency(FlexBinariesDir + RuntimeDependency));
                }
            }
        }
    }
Example #15
0
        public SubstanceCore(ReadOnlyTargetRules Target) : base(Target)
        {
            //Internal defines
            PublicDefinitions.Add("WITH_SUBSTANCE=1");
            PublicDefinitions.Add("SUBSTANCE_PLATFORM_BLEND=1");
            PublicDefinitions.Add("SUBSTANCE_CORE_DEBUG_TOOLS=0");

            //PCH file
            PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
            bEnforceIWYU         = true;
            PrivatePCHHeaderFile = "Private/SubstanceCorePrivatePCH.h";

            //Thread usage
            if (Target.Platform == UnrealTargetPlatform.Win32 ||
                Target.Platform == UnrealTargetPlatform.Win64 ||
                Target.Platform == UnrealTargetPlatform.XboxOne)
            {
                PublicDefinitions.Add("AIR_USE_WIN32_SYNC=1");
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac ||
                     Target.Platform == UnrealTargetPlatform.PS4 ||
                     Target.Platform == UnrealTargetPlatform.Linux)
            {
                PublicDefinitions.Add("AIR_USE_PTHREAD_SYNC=1");
            }

            //Exposing the include path to substance core publicly. Even though the include paths are public, the libs should no longer be exposed.
            PrivateIncludePaths.Add("SubstanceCore/Private");

            //Exposing public include paths
            PublicIncludePaths.Add(Path.Combine(ModuleFullPath, "Public"));
            PublicIncludePaths.Add(Path.Combine(ModuleFullPath, "Classes"));
            PublicIncludePaths.Add(SubstanceIncludePath);

            //Module dependencies
            PrivateDependencyModuleNames.AddRange(new string[]
            {
                "Projects",
                "Slate",
                "SlateCore",
                "SubstanceEngine"
            });

            PublicDependencyModuleNames.AddRange(new string[]
            {
                "AssetRegistry",
                "Core",
                "CoreUObject",
                "Engine",
                "RenderCore",
                "RHI",
                "ImageWrapper",
                "SessionServices",
            });

            //Editor specific configuration
            bool IncludePS4Files = false;

            if (Target.bBuildEditor == true)
            {
                PublicDependencyModuleNames.AddRange(new string[]
                {
                    "UnrealEd",
                    "AssetTools",
                    "ContentBrowser",
                    "Settings",
                    "TargetPlatform",
                    "MainFrame"
                });

                //Used for ps4 cooking
                string SDKDir = System.Environment.GetEnvironmentVariable("SCE_ORBIS_SDK_DIR");
                if ((SDKDir != null) && (SDKDir.Length > 0))
                {
                    PublicIncludePaths.Add(SDKDir + "/target/include_common");
                    PublicLibraryPaths.Add(SDKDir + "/host_tools/lib");

                    PublicAdditionalLibraries.Add("libSceGpuAddress.lib");
                    PublicDelayLoadDLLs.Add("libSceGpuAddress.dll");
                    PublicAdditionalLibraries.Add("libSceGnm.lib");
                    PublicDelayLoadDLLs.Add("libSceGnm.dll");

                    //Toggle on our flag if we are building for PS4
                    IncludePS4Files = true;
                }
            }

            //Overwrite PS4 SDK if the files don't exist - Check both Engine and Project directories
            string ConsoleFilePath       = "SubstanceCore\\Private\\SubstanceCorePS4Utils.h";
            string BaseEnginePath        = Path.Combine("..", "Plugins", "Runtime", "Substance", "Source");
            string BaseProjectPath       = Path.Combine("Plugins", "Runtime", "Substance", "Source");
            string ConsoleEngineFilePath = Path.Combine(BaseEnginePath, ConsoleFilePath);

            bool ConsoleFilesFoundInEnginePluginDir  = false;
            bool ConsoleFilesFoundInProjectPluginDir = false;

            //If building plugin from engine dir, project file will not exist
            if (Target.ProjectFile != null)
            {
                string ProjectParentDir       = System.IO.Directory.GetParent(Target.ProjectFile.ToString()).ToString();
                string ConsoleProjectFilePath = Path.Combine(ProjectParentDir, BaseProjectPath, ConsoleFilePath);
                ConsoleFilesFoundInProjectPluginDir = File.Exists(ConsoleProjectFilePath) && IncludePS4Files;
            }

            //Check both possible locations of where the console files could be
            ConsoleFilesFoundInEnginePluginDir = File.Exists(ConsoleEngineFilePath) && IncludePS4Files;

            //Craft the project file location to test as well
            IncludePS4Files = (ConsoleFilesFoundInEnginePluginDir || ConsoleFilesFoundInProjectPluginDir) && IncludePS4Files;

            PublicDefinitions.Add("SUBSTANCE_HAS_PS4_SDK=" + (IncludePS4Files ? "1" : "0"));

            if (IncludePS4Files)
            {
                Log.WriteLine(LogEventType.Log, "Substance Editor Plugin: PS4 Cooking Enabled");
            }
        }
Example #16
0
    public UEOgg(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string OggPath = Target.UEThirdPartySourceDirectory + "Ogg/libogg-1.2.2/";

        PublicSystemIncludePaths.Add(OggPath + "include");

        string OggLibPath = OggPath + "lib/";

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            OggLibPath += "Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(OggLibPath);

            PublicAdditionalLibraries.Add("libogg_64.lib");

            PublicDelayLoadDLLs.Add("libogg_64.dll");

            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Ogg/Win64/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libogg_64.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            OggLibPath += "Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(OggLibPath);

            PublicAdditionalLibraries.Add("libogg.lib");

            PublicDelayLoadDLLs.Add("libogg.dll");

            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Ogg/Win32/VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName() + "/libogg.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string DylibPath = Target.UEThirdPartyBinariesDirectory + "Ogg/Mac/libogg.dylib";
            PublicDelayLoadDLLs.Add(DylibPath);
            RuntimeDependencies.Add(DylibPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            string OpimizationSuffix = "";
            if (Target.bCompileForSize)
            {
                OpimizationSuffix = "_Oz";
            }
            else
            {
                if (Target.Configuration == UnrealTargetConfiguration.Development)
                {
                    OpimizationSuffix = "_O2";
                }
                else if (Target.Configuration == UnrealTargetConfiguration.Shipping)
                {
                    OpimizationSuffix = "_O3";
                }
            }
            PublicAdditionalLibraries.Add(OggLibPath + "HTML5/libogg" + OpimizationSuffix + ".bc");
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
        {
            // Filtered in the toolchain.
            PublicLibraryPaths.Add(OggLibPath + "Android/ARMv7");
            PublicLibraryPaths.Add(OggLibPath + "Android/ARM64");
            PublicLibraryPaths.Add(OggLibPath + "Android/x86");
            PublicLibraryPaths.Add(OggLibPath + "Android/x64");

            PublicAdditionalLibraries.Add("ogg");
        }
        else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
        {
            if (Target.LinkType == TargetLinkType.Monolithic)
            {
                PublicAdditionalLibraries.Add(OggLibPath + "Linux/" + Target.Architecture + "/libogg.a");
            }
            else
            {
                PublicAdditionalLibraries.Add(OggLibPath + "Linux/" + Target.Architecture + "/libogg_fPIC.a");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            // Use reflection to allow type not to exist if console code is not present
            System.Type XboxOnePlatformType = System.Type.GetType("UnrealBuildTool.XboxOnePlatform,UnrealBuildTool");
            if (XboxOnePlatformType != null)
            {
                System.Object VersionName = XboxOnePlatformType.GetMethod("GetVisualStudioCompilerVersionName").Invoke(null, null);
                PublicLibraryPaths.Add(OggLibPath + "XboxOne/VS" + VersionName.ToString());
                PublicAdditionalLibraries.Add("libogg_static.lib");
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicAdditionalLibraries.Add(OggLibPath + "ios" + "/libogg.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.TVOS)
        {
            PublicAdditionalLibraries.Add(OggLibPath + "tvos" + "/libogg.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicAdditionalLibraries.Add(OggLibPath + "ORBIS_Release" + "/libogg-1.2.2_PS4_Static.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            PublicAdditionalLibraries.Add(OggLibPath + "NX64" + "/Ogg_Switch_Static.a");
        }
    }
Example #17
0
    public NvCloth(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        // Determine which kind of libraries to link against
        NvClothLibraryMode LibraryMode   = GetNvClothLibraryMode(Target.Configuration);
        string             LibrarySuffix = GetNvClothLibrarySuffix(LibraryMode);

        Definitions.Add("WITH_NVCLOTH=1");

        string NvClothDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/NvCloth/";

        string NvClothLibDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/Lib";

        string PxSharedVersion    = "PxShared";
        string PxSharedDir        = UEBuildConfiguration.UEThirdPartySourceDirectory + "PhysX/" + PxSharedVersion + "/";
        string PxSharedIncludeDir = PxSharedDir + "include/";

        PublicSystemIncludePaths.AddRange(
            new string[] {
            NvClothDir + "include",
            NvClothDir + "extensions/include",

            PxSharedIncludeDir,
            PxSharedIncludeDir + "filebuf",
            PxSharedIncludeDir + "foundation",
            PxSharedIncludeDir + "pvd",
            PxSharedIncludeDir + "task",
            PxSharedDir + "src/foundation/include"
        }
            );

        // List of default library names (unused unless LibraryFormatString is non-null)
        List <string> NvClothLibraries = new List <string>();

        NvClothLibraries.AddRange(
            new string[]
        {
            "NvCloth{0}"
        });
        string LibraryFormatString = null;

        // Libraries and DLLs for windows platform
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            NvClothLibDir += "/Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(NvClothLibDir);

            string[] StaticLibrariesX64 = new string[]
            {
                "NvCloth{0}_x64.lib"
            };

            string[] RuntimeDependenciesX64 =
            {
                "NvCloth{0}_x64.dll",
            };

            string[] DelayLoadDLLsX64 =
            {
                "NvCloth{0}_x64.dll",
            };

            foreach (string Lib in StaticLibrariesX64)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX64)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string NvClothBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win64/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string RuntimeDependency in RuntimeDependenciesX64)
            {
                string FileName = NvClothBinariesDir + String.Format(RuntimeDependency, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_NVCLOTH_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            NvClothLibDir += "/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
            PublicLibraryPaths.Add(NvClothLibDir);

            string[] StaticLibrariesX64 = new string[]
            {
                "NvCloth{0}_x86.lib"
            };

            string[] RuntimeDependenciesX64 =
            {
                "NvCloth{0}_x86.dll",
            };

            string[] DelayLoadDLLsX64 =
            {
                "NvCloth{0}_x86.dll",
            };

            foreach (string Lib in StaticLibrariesX64)
            {
                PublicAdditionalLibraries.Add(String.Format(Lib, LibrarySuffix));
            }

            foreach (string DLL in DelayLoadDLLsX64)
            {
                PublicDelayLoadDLLs.Add(String.Format(DLL, LibrarySuffix));
            }

            string NvClothBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/Win32/VS{0}/", WindowsPlatform.GetVisualStudioCompilerVersionName());
            foreach (string RuntimeDependency in RuntimeDependenciesX64)
            {
                string FileName = NvClothBinariesDir + String.Format(RuntimeDependency, LibrarySuffix);
                RuntimeDependencies.Add(FileName, StagedFileType.NonUFS);
                RuntimeDependencies.Add(Path.ChangeExtension(FileName, ".pdb"), StagedFileType.DebugNonUFS);
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_NVCLOTH_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            NvClothLibDir += "/Mac";

            LibraryFormatString = NvClothLibDir + "/lib{0}" + ".a";

            NvClothLibraries.Clear();

            string[] DynamicLibrariesMac = new string[]
            {
                "/libNvCloth{0}.dylib",
            };

            string PhysXBinDir = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "PhysX/Mac";

            foreach (string Lib in DynamicLibrariesMac)
            {
                string LibraryPath = PhysXBinDir + String.Format(Lib, LibrarySuffix);
                PublicDelayLoadDLLs.Add(LibraryPath);
                RuntimeDependencies.Add(new RuntimeDependency(LibraryPath));
            }

            if (LibrarySuffix != "")
            {
                Definitions.Add("UE_NVCLOTH_SUFFIX=" + LibrarySuffix);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.Architecture != "arm-unknown-linux-gnueabihf")
            {
                NvClothLibDir += "/Linux/" + Target.Architecture;

                NvClothLibraries.Add("NvCloth{0}");

                LibraryFormatString = NvClothLibDir + "/lib{0}" + ".a";
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            NvClothLibDir += "/PS4";
            PublicLibraryPaths.Add(NvClothLibDir);

            NvClothLibraries.Add("NvCloth{0}");

            LibraryFormatString = "{0}";
        }
        else if (Target.Platform == UnrealTargetPlatform.Switch)
        {
            NvClothLibDir += "/Switch";
            PublicLibraryPaths.Add(NvClothLibDir);

            NvClothLibraries.Add("NvCloth{0}");

            LibraryFormatString = "{0}";
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            Definitions.Add("_XBOX_ONE=1");

            // This MUST be defined for XboxOne!
            Definitions.Add("PX_HAS_SECURE_STRCPY=1");

            NvClothLibDir += "/XboxOne/VS2015";
            PublicLibraryPaths.Add(NvClothLibDir);

            NvClothLibraries.Add("NvCloth{0}");

            LibraryFormatString = "{0}.lib";
        }

        // Add the libraries needed (used for all platforms except Windows)
        if (LibraryFormatString != null)
        {
            foreach (string Lib in NvClothLibraries)
            {
                string ConfiguredLib = String.Format(Lib, LibrarySuffix);
                string FinalLib      = String.Format(LibraryFormatString, ConfiguredLib);
                PublicAdditionalLibraries.Add(FinalLib);
            }
        }
    }
Example #18
0
    public UnrealEnginePython(TargetInfo Target)
#endif
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD");

        bFasterWithoutUnity = string.IsNullOrEmpty(enableUnityBuild);

        PublicIncludePaths.AddRange(
            new string[] {
            "UnrealEnginePython/Public",
            // ... add public include paths required here ...
        }
            );


        PrivateIncludePaths.AddRange(
            new string[] {
            "UnrealEnginePython/Private",
            // ... add other private include paths required here ...
        }
            );


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Sockets",
            "Networking"
            // ... add other public dependencies that you statically link with here ...
        }
            );


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "InputCore",
            "Slate",
            "SlateCore",
            "MovieScene",
            "LevelSequence",
            "HTTP",
            "UMG",
            "AppFramework",
            "RHI",
            "Voice",
            "RenderCore",
            "MovieSceneCapture",
            "Landscape",
            "Foliage",
            "AIModule"
            // ... add private dependencies that you statically link with here ...
        }
            );


#if WITH_FORWARDED_MODULE_RULES_CTOR
        BuildVersion Version;
        if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version))
        {
            if (Version.MinorVersion >= 18)
            {
                PrivateDependencyModuleNames.Add("ApplicationCore");
            }
        }
#endif


        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );

#if WITH_FORWARDED_MODULE_RULES_CTOR
        if (Target.bBuildEditor)
#else
        if (UEBuildConfiguration.bBuildEditor)
#endif
        {
            PrivateDependencyModuleNames.AddRange(new string[] {
                "UnrealEd",
                "LevelEditor",
                "BlueprintGraph",
                "Projects",
                "Sequencer",
                "SequencerWidgets",
                "AssetTools",
                "LevelSequenceEditor",
                "MovieSceneTools",
                "MovieSceneTracks",
                "CinematicCamera",
                "EditorStyle",
                "GraphEditor",
                "UMGEditor",
                "AIGraph",
                "RawMesh",
                "DesktopWidgets",
                "EditorWidgets",
                "FBX",
                "Persona",
                "PropertyEditor",
                "LandscapeEditor",
                "MaterialEditor"
            });
        }

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            if (pythonHome == "")
            {
                pythonHome = DiscoverPythonPath(windowsKnownPaths, "Win64");
                if (pythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
            }
            System.Console.WriteLine("Using Python at: " + pythonHome);
            PublicIncludePaths.Add(pythonHome);
            string libPath = GetWindowsPythonLibFile(pythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicAdditionalLibraries.Add(libPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            if (pythonHome == "")
            {
                pythonHome = DiscoverPythonPath(macKnownPaths, "Mac");
                if (pythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
            }
            System.Console.WriteLine("Using Python at: " + pythonHome);
            PublicIncludePaths.Add(pythonHome);
            string libPath = GetMacPythonLibFile(pythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicDelayLoadDLLs.Add(libPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (pythonHome == "")
            {
                string includesPath = DiscoverLinuxPythonIncludesPath();
                if (includesPath == null)
                {
                    throw new System.Exception("Unable to find Python includes, please add a search path to linuxKnownIncludesPaths");
                }
                string libsPath = DiscoverLinuxPythonLibsPath();
                if (libsPath == null)
                {
                    throw new System.Exception("Unable to find Python libs, please add a search path to linuxKnownLibsPaths");
                }
                PublicIncludePaths.Add(includesPath);
                PublicAdditionalLibraries.Add(libsPath);
                PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Include"));
            }
            else
            {
                string[] items = pythonHome.Split(';');
                PublicIncludePaths.Add(items[0]);
                PublicAdditionalLibraries.Add(items[1]);
            }
        }
#if WITH_FORWARDED_MODULE_RULES_CTOR
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/python35/include"));
            PublicLibraryPaths.Add(System.IO.Path.Combine(ModuleDirectory, "../../android/armeabi-v7a"));
            PublicAdditionalLibraries.Add("python3.5m");

            string APLName    = "UnrealEnginePython_APL.xml";
            string RelAPLPath = Utils.MakePathRelativeTo(System.IO.Path.Combine(ModuleDirectory, APLName), Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", RelAPLPath));
        }
#endif
    }
    public Steamworks(TargetInfo Target)
    {
        /** Mark the current version of the Steam SDK */
        string SteamVersion = "v132";

        Type = ModuleType.External;

        string SdkBase = UEBuildConfiguration.UEThirdPartySourceDirectory + "Steamworks/Steam" + SteamVersion + "/sdk";

        if (!Directory.Exists(SdkBase))
        {
            string Err = string.Format("steamworks SDK not found in {0}", SdkBase);
            System.Console.WriteLine(Err);
            throw new BuildException(Err);
        }

        PublicIncludePaths.Add(SdkBase + "/public");

        string LibraryPath = SdkBase + "/redistributable_bin/";
        string LibraryName = "steam_api";

        if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(LibraryPath);
            PublicAdditionalLibraries.Add(LibraryName + ".lib");
            PublicDelayLoadDLLs.Add(LibraryName + ".dll");

            string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win32/", SteamVersion);
            RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steam_api.dll"));

            if (Target.Type == TargetRules.TargetType.Server)
            {
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steamclient.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "tier0_s.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "vstdlib_s.dll"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(LibraryPath + "win64");
            PublicAdditionalLibraries.Add(LibraryName + "64.lib");
            PublicDelayLoadDLLs.Add(LibraryName + "64.dll");

            string SteamBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/Steamworks/Steam{0}/Win64/", SteamVersion);
            RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + LibraryName + "64.dll"));

            if (Target.Type == TargetRules.TargetType.Server)
            {
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "steamclient64.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "tier0_s64.dll"));
                RuntimeDependencies.Add(new RuntimeDependency(SteamBinariesDir + "vstdlib_s64.dll"));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibraryPath += "osx32/libsteam_api.dylib";
            PublicDelayLoadDLLs.Add(LibraryPath);
            PublicAdditionalShadowFiles.Add(LibraryPath);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            if (Target.IsMonolithic)
            {
                LibraryPath += "linux64";
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add(LibraryName);
            }
            else
            {
                LibraryPath += "linux64/libsteam_api.so";
                PublicDelayLoadDLLs.Add(LibraryPath);
            }
        }
    }
Example #20
0
    public AudioEditor(ReadOnlyTargetRules Target) : base(Target)
    {
        PrivateIncludePaths.AddRange(
            new string[] {
            "Editor/AudioEditor/Private",
            "Editor/AudioEditor/Private/Factories",
            "Editor/AudioEditor/Private/AssetTypeActions"
        });

        PrivateDependencyModuleNames.AddRange(
            new string[] {
            "AudioMixer",
            "ToolMenus",
            "AudioExtensions"
        });

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "ApplicationCore",
            "AudioMixer",
            "InputCore",
            "Engine",
            "UnrealEd",
            "Slate",
            "SlateCore",
            "EditorStyle",
            "RenderCore",
            "LevelEditor",
            "Landscape",
            "PropertyEditor",
            "DetailCustomizations",
            "ClassViewer",
            "GraphEditor",
            "ContentBrowser",
        }
            );

        PrivateIncludePathModuleNames.AddRange(
            new string[] {
            "AssetTools"
        });

        if (Target.IsInPlatformGroup(UnrealPlatformGroup.Windows))
        {
            string PlatformName = Target.Platform == UnrealTargetPlatform.Win32 ? "Win32" : "Win64";

            string LibSndFilePath = Target.UEThirdPartyBinariesDirectory + "libsndfile/";
            LibSndFilePath += PlatformName;


            PublicAdditionalLibraries.Add(LibSndFilePath + "/libsndfile-1.lib");
            PublicDelayLoadDLLs.Add("libsndfile-1.dll");
            PublicIncludePathModuleNames.Add("UELibSampleRate");

            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/libsndfile/" + PlatformName + "/libsndfile-1.dll");

            PublicDefinitions.Add("WITH_SNDFILE_IO=1");
        }
        else
        {
            PublicDefinitions.Add("WITH_SNDFILE_IO=0");
        }
    }
Example #21
0
    public AkAudio(ReadOnlyTargetRules Target) : base(Target)
    {
        string ThirdPartyFolder = Path.Combine(ModuleDirectory, "../../ThirdParty");

        AkUEPlatformInstance = AkUEPlatform.GetAkUEPlatformInstance(Target, ThirdPartyFolder);
        PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
        bAllowConfidentialPlatformDefines = true;

        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 UE_4_26_OR_LATER
        PrivateDependencyModuleNames.Add("Chaos");
        PrivateDependencyModuleNames.Add("PhysicsCore");
#endif

        if (Target.bBuildEditor)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "UnrealEd",
                "DesktopPlatform",
                "TargetPlatform",
                "SharedSettingsWidgets",
                "RenderCore",
                "SourceControl"
            });

#if UE_4_25_OR_LATER
            PrivateDependencyModuleNames.Add("GeometryMode");
#endif

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "EditorStyle"
            });

            foreach (var Platform in GetAvailablePlatforms(ModuleDirectory))
            {
                PublicDefinitions.Add("AK_PLATFORM_" + Platform.ToUpper());
            }
        }

        PrivateIncludePaths.Add("AkAudio/Private");
        PrivateIncludePaths.Add("AkAudio/Classes/GTE");
        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);
        }

        PublicFrameworks.AddRange(AkUEPlatformInstance.GetPublicFrameworks());

        PublicDelayLoadDLLs.AddRange(AkUEPlatformInstance.GetPublicDelayLoadDLLs());
        foreach (var RuntimeDependency in AkUEPlatformInstance.GetRuntimeDependencies())
        {
            RuntimeDependencies.Add(RuntimeDependency);
        }
        PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetSanitizedAkLibList(AkLibs));
    }
Example #22
0
    public Blu(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "InputCore",
            "RenderCore",
            "RHI",
            "Slate",
            "SlateCore",
            "UMG",
            "Json"
        });

        PrivateIncludePaths.AddRange(
            new string[] {
            "Blu/Private",
        });

        PublicIncludePaths.AddRange(new string[] { "Blu/Public" });


        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "cef/Win/lib", "libcef.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "cef/Win/lib", "libcef_dll_wrapper.lib"));

            PublicDelayLoadDLLs.Add("d3dcompiler_43.dll");
            PublicDelayLoadDLLs.Add("d3dcompiler_47.dll");
            PublicDelayLoadDLLs.Add("ffmpegsumo.dll");
            PublicDelayLoadDLLs.Add("libcef.dll");
            PublicDelayLoadDLLs.Add("libEGL.dll");
            PublicDelayLoadDLLs.Add("libGLESv2.dll");

            PublicIncludePaths.AddRange(
                new string[] {
                Path.Combine(ThirdPartyPath, "cef/Win")
            });

            // Add our runtime dependencies
            var filesToStage = Directory.GetFiles(Path.Combine(ThirdPartyPath, "cef/Win/shipping"), "*", SearchOption.AllDirectories);
            stageFiles(filesToStage);
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "cef/Linux/lib", "libcef.so"));
            PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "cef/Linux/lib", "libcef_dll_wrapper.a"));

            PublicIncludePaths.AddRange(
                new string[] {
                Path.Combine(ThirdPartyPath, "cef/Linux")
            });
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            var frameworkPath = Path.Combine(ThirdPartyPath, "cef/Mac/lib", "Chromium Embedded Framework.framework");

            PublicFrameworks.Add(frameworkPath);
            PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "cef/Mac/lib", "libcef_dll_wrapper.a"));

            PublicIncludePaths.AddRange(
                new string[] {
                Path.Combine(ThirdPartyPath, "cef", "Mac")
            });

            var filesToStage = Directory.GetFiles(Path.Combine(ThirdPartyPath, "cef/Mac/shipping"), "*", SearchOption.AllDirectories);
            stageFiles(filesToStage);

            filesToStage = Directory.GetFiles(Path.Combine(ThirdPartyPath, "cef/Mac/lib"), "*", SearchOption.AllDirectories);
            stageFiles(filesToStage);

            if (!UEBuildConfiguration.bBuildEditor)
            {
                AdditionalBundleResources.Add(new UEBuildBundleResource(Path.Combine(frameworkPath, "Chromium Embedded Framework"), "MacOS", false));
            }
        }
        else
        {
            throw new BuildException("BLUI: Platform not supported");
        }
    }
Example #23
0
        public bool LoadLeapLib(ReadOnlyTargetRules Target)
        {
            bool IsLibrarySupported = false;

            if ((Target.Platform == UnrealTargetPlatform.Win64))
            {
                IsLibrarySupported = true;

                string PlatformString = Target.Platform.ToString();

                //Lib
                PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, PlatformString, "LeapC.lib"));

                //System.Console.WriteLine("plugin using lib at " + Path.Combine(LibraryPath, PlatformString, "LeapC.lib"));

                if (IsEnginePlugin())
                {
                    //string PluginDLLPath = Path.Combine(BinariesPath, PlatformString, "LeapC.dll");

                    //System.Console.WriteLine("Engine plugin detected, using dll at " + PluginDLLPath);

                    PublicDelayLoadDLLs.Add("LeapC.dll");
                    //RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/LeapMotion/" + PlatformString + "/LeapC.dll");
                    RuntimeDependencies.Add(Path.Combine(BinariesPath, PlatformString, "LeapC.dll"));
                }
                //Engine plugin, just add the dependency path
                else
                {
                    //DLL
                    string PluginDLLPath = Path.Combine(BinariesPath, PlatformString, "LeapC.dll");

                    System.Console.WriteLine("Project plugin detected, using dll at " + PluginDLLPath);

                    RuntimeDependencies.Add(PluginDLLPath);
                    if (!Target.bBuildEditor)
                    {
                        PublicDelayLoadDLLs.Add("LeapC.dll");
                    }
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                IsLibrarySupported = false;                     //Not supported since Leap SDK 3.0

                string PlatformString = "Mac";
                PublicAdditionalLibraries.Add(Path.Combine(BinariesPath, PlatformString, "libLeap.dylib"));
            }
            else if (Target.Platform == UnrealTargetPlatform.Android)
            {
                IsLibrarySupported = true;

                System.Console.WriteLine(Target.Architecture);                    //doesn't work

                string PlatformString = "Android";

                //For now comment/uncomment platform architectures
                //PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, PlatformString, "armeabi-v7a", "libLeapC.so"));
                PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, PlatformString, "arm64-v8a", "libLeapC.so"));

                AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModulePath, "LeapMotion_APL.xml"));
            }

            return(IsLibrarySupported);
        }