Beispiel #1
0
    public OSVRClientKit(TargetInfo Target)
    {
        Type = ModuleType.External;

        PublicIncludePaths.Add(ModuleDirectory + "/include");

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string PlatformAbbrev = "Win32";
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PlatformAbbrev = "Win64";
            }


            PublicLibraryPaths.Add(String.Format("{0}/lib/{1}", ModuleDirectory, PlatformAbbrev));
            PublicAdditionalLibraries.Add("osvrClientKit.lib");
            PublicDelayLoadDLLs.AddRange(
                new string[] {
                "osvrClientKit.dll",
                "osvrClient.dll",
                "osvrCommon.dll",
                "osvrUtil.dll"
            });


            string DllFormat = "{0}/bin/{1}/{2}";
            foreach (var dll in PublicDelayLoadDLLs)
            {
                RuntimeDependencies.Add(new RuntimeDependency(String.Format(DllFormat, ModuleDirectory, PlatformAbbrev, dll)));
            }
        }
    }
Beispiel #2
0
    public DX12(TargetInfo Target)
    {
        Type = ModuleType.External;

        string DirectXSDKDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "Windows/DirectX";

        PublicSystemIncludePaths.Add(DirectXSDKDir + "/include");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x64");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x86");
        }

        // Always delay-load D3D12
        PublicDelayLoadDLLs.AddRange(new string[] {
            "d3d12.dll"
        });

        PublicAdditionalLibraries.AddRange(
            new string[] {
            "d3d12.lib"
        }
            );
    }
Beispiel #3
0
    public DX12(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string DirectXSDKDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "Windows/DirectX";

        PublicSystemIncludePaths.Add(DirectXSDKDir + "/include");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x64");

            PublicDelayLoadDLLs.Add("WinPixEventRuntime.dll");
            PublicAdditionalLibraries.Add("WinPixEventRuntime.lib");
            RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/Windows/DirectX/x64/WinPixEventRuntime.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x86");
        }

        // Always delay-load D3D12
        PublicDelayLoadDLLs.AddRange(new string[] {
            "d3d12.dll"
        });

        PublicAdditionalLibraries.AddRange(
            new string[] {
            "d3d12.lib"
        }
            );
    }
    public OSVRClientKit(TargetInfo Target)
    {
        Type = ModuleType.External;
        PublicIncludePaths.Add(ModuleDirectory + "/include");

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string PlatformAbbrev = "Win32";
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PlatformAbbrev = "Win64";
            }


            PublicLibraryPaths.Add(String.Format("{0}/lib/{1}", ModuleDirectory, PlatformAbbrev));
            PublicAdditionalLibraries.Add("osvrClientKit.lib");
            PublicAdditionalLibraries.Add("osvrRenderManager.lib");

            var osvrDlls = new string[] {
                "osvrClientKit.dll",
                "osvrClient.dll",
                "osvrCommon.dll",
                "osvrUtil.dll",
                "osvrRenderManager.dll",
                "d3dcompiler_47.dll",
                "glew32.dll",
                "SDL2.dll"
            };

            PublicDelayLoadDLLs.AddRange(osvrDlls);

            string baseBinaryDirectory = ModuleDirectory + "/bin";
            if (!System.IO.Directory.Exists(baseBinaryDirectory))
            {
                baseBinaryDirectory = "$(EngineDir)/Binaries/ThirdParty/OSVRClientKit/bin";
            }

            string DllFormat = "{0}/{1}/{2}";
            foreach (var dll in osvrDlls)
            {
                var src = String.Format(DllFormat, baseBinaryDirectory, PlatformAbbrev, dll);
                RuntimeDependencies.Add(new RuntimeDependency(src));
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            string PlatformAbbrev = "armeabi-v7a";

            PublicLibraryPaths.Add(String.Format("{0}/bin/Android/{1}", ModuleDirectory, PlatformAbbrev));
            PublicAdditionalLibraries.Add("osvrClientKit");

            var basePath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
            var xmlPath  = Path.Combine(ModuleDirectory, "OSVR_APL.xml");
            //System.Console.WriteLine("xmlPath: {0}", xmlPath);
            AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", xmlPath));
        }
    }
Beispiel #5
0
    public MQTTPlugin(ReadOnlyTargetRules TargetRules) : base(TargetRules)
    {
        PrivatePCHHeaderFile = "Public/MQTTPlugiin.h";

        PublicIncludePaths.Add(String.Format("{0}/PahoMQTT/src", ThirdPartyPath));

        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Engine",
            "Core",
            "CoreUObject",
            "InputCore",
            "Networking",
            "Sockets",
        });

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(String.Format("{0}/PahoMQTT/build/src/Release", ThirdPartyPath));
            PublicAdditionalLibraries.Add("paho-mqtt3a.lib");
            PublicAdditionalLibraries.Add("paho-mqtt3c.lib");

            var DLLs = new string[] {
                "paho-mqtt3a.dll",
                "paho-mqtt3c.dll"
            };

            PublicDelayLoadDLLs.AddRange(DLLs);
            string BaseBinaryDirectory = String.Format("{0}/PahoMQTT/build/src/Release", ThirdPartyPath);

            foreach (var DLL in DLLs)
            {
                var ThirdPartyDLLPath = String.Format("{0}/{1}", BaseBinaryDirectory, DLL);
                CopyToProjectBinaries(ThirdPartyDLLPath, Target);
                string DLLPath = Path.GetFullPath(Path.Combine(GetUProjectPath(), "Binaries", Target.Platform.ToString(), DLL));
                RuntimeDependencies.Add(DLLPath);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            var BaseBinaryDirectory = String.Format("{0}/PahoMQTT/build/output/", ThirdPartyPath);

            PublicLibraryPaths.Add(BaseBinaryDirectory);
            PublicAdditionalLibraries.Add("paho-mqtt3a");
            PublicAdditionalLibraries.Add("paho-mqtt3as");
            PublicAdditionalLibraries.Add("paho-mqtt3c");
            PublicAdditionalLibraries.Add("paho-mqtt3cs");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            var AndroidBinaryPath = String.Format("{0}/PahoMQTT/obj/local/", ThirdPartyPath);
            PublicLibraryPaths.Add(AndroidBinaryPath + "armeabi-v7a");
            PublicLibraryPaths.Add(AndroidBinaryPath + "arm64-v8a");
            PublicLibraryPaths.Add(AndroidBinaryPath + "x86");
            PublicLibraryPaths.Add(AndroidBinaryPath + "x86_64");
            PublicAdditionalLibraries.Add("PahoMQTT");
        }
    }
Beispiel #6
0
    public bool LoadModio(ReadOnlyTargetRules Target)
    {
        bool isLibrarySupported = false;

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

            isLibrarySupported = true;

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

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

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

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

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

            isLibrarySupported = true;


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

            PublicLibraryPaths.Add(LibrariesPath);
            PublicAdditionalLibraries.Add("modio");

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

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

        return(isLibrarySupported);
    }
    public Lylat(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

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

        PrivateDependencyModuleNames.AddRange(new string[]
        {
            "Slate",
            "SlateCore"
        });

        string dllSuffix = ".", libSuffix = ".";

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            dllSuffix += "dll";
            libSuffix += "dll.lib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            dllSuffix += "dylib";
            libSuffix += "dylib";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            dllSuffix += "so";
            libSuffix += "so";
        }
        else
        {
            throw new Exception("Unsupported platform.");
        }

        PublicIncludePaths.AddRange(new string[]
        {
            Path.Combine(ModuleDirectory, "Discord")
        });

        PublicAdditionalLibraries.AddRange(new string[]
        {
            Path.Combine(ModuleDirectory, "Discord", "discord_game_sdk" + libSuffix)
        });

        PublicDelayLoadDLLs.AddRange(new string[]
        {
            Path.Combine(ModuleDirectory, "Discord", "discord_game_sdk" + dllSuffix)
        });

        RuntimeDependencies.Add("$(TargetOutputDir)/discord_game_sdk" + dllSuffix, Path.Combine(ModuleDirectory, "Discord", "discord_game_sdk" + dllSuffix));
    }
Beispiel #8
0
    public void LoadOpenCV(TargetInfo Target)
    {
        string opencv_dir = Path.Combine(ThirdPartyPath, "opencv");

        // Include OpenCV headers
        PublicIncludePaths.Add(Path.Combine(opencv_dir, "include"));

        // Libraries are platform-dependent
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            Console.WriteLine("AUR: OpenCV for Win64");

            var suffix = OpenCVVersion;
            if (IsDebug(Target))
            {
                Console.WriteLine("AUR: Debug");
                suffix += "d";
            }
            else
            {
                Console.WriteLine("AUR: Not debug");
            }

            // Static linking
            var lib_dir = Path.Combine(opencv_dir, "lib", "Win64");
            PublicAdditionalLibraries.AddRange(
                OpenCVModules.ConvertAll(m => Path.Combine(lib_dir, m + suffix + ".lib"))
                );

            // Dynamic libraries
            // The DLLs need to be in Binaries/Win64 anyway, so let us keep them there instead of ThirdParty/opencv
            PublicDelayLoadDLLs.AddRange(
                OpenCVModules.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), m + suffix + ".dll"))
                );
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            Console.WriteLine("AUR: OpenCV for Linux");

            var opencv_libs = OpenCVModules.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), "lib" + m + ".so"));

            PublicAdditionalLibraries.AddRange(opencv_libs);
            PublicDelayLoadDLLs.AddRange(opencv_libs);
        }
        else
        {
            Console.WriteLine("AUR: No prebuilt binaries for OpenCV on platform " + Target.Platform);
        }

        // Force execption handling across all modules.
        UEBuildConfiguration.bForceEnableExceptions = true;
    }
    public OpenSSL(TargetInfo Target)
    {
        Type = ModuleType.External;

        string LibFolder        = "lib/";
        string LibPrefix        = "";
        string LibPostfixAndExt = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d." : ".";
        string OpenSSLPath      = UEBuildConfiguration.UEThirdPartySourceDirectory + "OpenSSL/1.0.1g/";

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibPostfixAndExt = ".a";
            LibFolder       += "Mac/";
            LibPrefix        = OpenSSLPath + LibFolder;
            PublicIncludePaths.Add(OpenSSLPath + "include");
            PublicLibraryPaths.Add(OpenSSLPath + LibFolder);
            PublicAdditionalLibraries.Add(LibPrefix + "libssl" + LibPostfixAndExt);
            PublicAdditionalLibraries.Add(LibPrefix + "libcrypto" + LibPostfixAndExt);
        }
        else
        {
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicIncludePaths.Add(OpenSSLPath + "include");

                LibFolder += "Win64/";

                if (WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2013)
                {
                    LibFolder += "VS2013/";
                }
                else
                {
                    LibFolder += "VS2012/";
                }

                LibPostfixAndExt += "lib";
                PublicLibraryPaths.Add(OpenSSLPath + LibFolder);
            }

            PublicAdditionalLibraries.Add(LibPrefix + "libeay32" + LibPostfixAndExt);
            PublicAdditionalLibraries.Add(LibPrefix + "ssleay32" + LibPostfixAndExt);

            PublicDelayLoadDLLs.AddRange(
                new string[] {
                "libeay32.dll",
                "ssleay32.dll"
            }
                );
        }
    }
Beispiel #10
0
    public BeatBeat(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

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

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

        //Include ThirdParty Plugins
        //**FMOD**//
        var    basePath       = Path.GetDirectoryName(RulesCompiler.GetFileNameFromType(GetType()));
        string thirdPartyPath = Path.Combine(basePath, "..", "..", "ThirdParty");

        PublicIncludePaths.Add(Path.Combine(thirdPartyPath, "FMOD", "inc"));

        switch (Target.Platform)
        {
        case UnrealTargetPlatform.Win64:
            PublicLibraryPaths.Add(Path.Combine(thirdPartyPath, "FMOD", "lib", "Win64"));
            PublicAdditionalLibraries.Add("fmod64_vc.lib");
            string fmodDllPath = Path.Combine(thirdPartyPath, "FMOD", "lib", "Win64", "fmod64.dll");
            RuntimeDependencies.Add(new RuntimeDependency(fmodDllPath));

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

            string fmodDllDest = System.IO.Path.Combine(binariesDir, "fmod64.dll");
            CopyFile(fmodDllPath, fmodDllDest);
            PublicDelayLoadDLLs.AddRange(new string[] { "fmod64.dll" });

            break;

        case UnrealTargetPlatform.Android:

            break;

        default:
            throw new System.Exception(System.String.Format("Unsupported platform {0}", Target.Platform.ToString()));
        }

        // Uncomment if you are using Slate UI
        // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

        // Uncomment if you are using online features
        // PrivateDependencyModuleNames.Add("OnlineSubsystem");

        // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
    }
Beispiel #11
0
    //-------------------------------------------------------------------------

    protected void LoadOpenCV(ReadOnlyTargetRules Target)
    {
        var opencvDir = Path.Combine(ThirdPartyPath, "OpenCV");

        // Include opencv headers
        PublicIncludePaths.Add(Path.Combine(opencvDir, "include"));
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            bEnableExceptions = true;
            Console.WriteLine("VIVE: OpenCV for Win64");

            var suffix = OpenCVVersion;
            if (IsDebug(Target))
            {
                Console.WriteLine("VIVE: Debug");
                suffix += "d";
            }
            else
            {
                Console.WriteLine("VIVE: Not debug");
            }

            // Static linking
            var libDir = Path.Combine(opencvDir, "x64", "vc16", "lib");
            PublicAdditionalLibraries.AddRange(
                OpenCVModules.ConvertAll(m => Path.Combine(libDir, m + suffix + ".lib"))
                );

            // Dynamic libraries
            // Delay load the DLL, so we can load it from the right place first.
            PublicDelayLoadDLLs.AddRange(
                OpenCVModules.ConvertAll(m => m + suffix + ".dll")
                );

            // Add a Runtime Dependency so the DLLs will be packaged correctly.
            var dllDir = Path.Combine(opencvDir, "x64", "vc16", "bin");
            OpenCVModules
            .ConvertAll(m => Path.Combine(dllDir, m + suffix + ".dll"))
            .ForEach(
                m => {
                RuntimeDependencies.Add(m);
                Console.WriteLine("Runtime dependencies:");
                Console.WriteLine(" " + m);
            }
                );
        }
        else
        {
            Console.WriteLine("VIVE: No prebuild binaries for OpenCV on platform" + Target.Platform);
        }
    }
    public OpenSSL(TargetInfo Target)
    {
        Type = ModuleType.External;

        string LibFolder        = "lib/";
        string LibPrefix        = "";
        string LibPostfixAndExt = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d." : ".";
        string OpenSSLPath      = UEBuildConfiguration.UEThirdPartySourceDirectory + "OpenSSL/1.0.1g/";

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            LibPostfixAndExt = ".a";
            LibFolder       += "Mac/";
            LibPrefix        = OpenSSLPath + LibFolder;
            PublicIncludePaths.Add(OpenSSLPath + "include");
            PublicLibraryPaths.Add(OpenSSLPath + LibFolder);
            PublicAdditionalLibraries.Add(LibPrefix + "libssl" + LibPostfixAndExt);
            PublicAdditionalLibraries.Add(LibPrefix + "libcrypto" + LibPostfixAndExt);
        }
        else
        {
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PublicIncludePaths.Add(OpenSSLPath + "include");
                LibFolder        += "Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName() + "/";
                LibPostfixAndExt += "lib";
                PublicLibraryPaths.Add(OpenSSLPath + LibFolder);
            }

            PublicAdditionalLibraries.Add(LibPrefix + "libeay32" + LibPostfixAndExt);
            PublicAdditionalLibraries.Add(LibPrefix + "ssleay32" + LibPostfixAndExt);

            PublicDelayLoadDLLs.AddRange(
                new string[] {
                "libeay32.dll",
                "ssleay32.dll"
            }
                );

            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
            {
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/OpenSSL/Win64/VS2012/libeay32.dll"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/OpenSSL/Win64/VS2012/ssleay32.dll"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/OpenSSL/Win64/VS2013/libeay32.dll"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/OpenSSL/Win64/VS2013/ssleay32.dll"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/OpenSSL/Win64/VS2015/libeay32.dll"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/OpenSSL/Win64/VS2015/ssleay32.dll"));
            }
        }
    }
Beispiel #13
0
    private void HandleWindows(ReadOnlyTargetRules Target)
    {
        string libsPath = CommonSharedLibsPath;

        if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            libsPath = Path.Combine(libsPath, "win32");
        }
        else
        {
            libsPath = Path.Combine(libsPath, "win64");
        }

        switch (Target.WindowsPlatform.Compiler)
        {
                #if !UE_4_22_OR_LATER
        case WindowsCompiler.VisualStudio2015: libsPath = Path.Combine(libsPath, "v140"); break;
                #endif
        case WindowsCompiler.VisualStudio2017: libsPath = Path.Combine(libsPath, "v141"); break;

                #if UE_4_22_OR_LATER
        case WindowsCompiler.VisualStudio2019: libsPath = Path.Combine(libsPath, "v142"); break;
                #endif
        default:
            throw new NotImplementedException("Nakama Unreal client does not currently support compiler: " + Target.WindowsPlatform.GetVisualStudioCompilerVersionName());
        }

        string libSuffix;

        /*if (Target.Configuration == UnrealTargetConfiguration.DebugGame || Target.Configuration == UnrealTargetConfiguration.DebugGameEditor)
         * {
         *      libsPath = Path.Combine(libsPath, "Debug");
         *      libSuffix = "d";
         * }
         * else*/
        {
            libsPath  = Path.Combine(libsPath, "Release");
            libSuffix = "";
        }

        PublicLibraryPaths.Add(libsPath);

        PublicAdditionalLibraries.Add("nakama-cpp" + libSuffix + ".lib");
        CopyToBinaries(Path.Combine(libsPath, "nakama-cpp" + libSuffix + ".dll"), Target);
        PublicDelayLoadDLLs.AddRange(new string[] { "nakama-cpp" + libSuffix + ".dll" });
    }
    public Tutorial_spectrum(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

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

        var    basePath       = Path.GetDirectoryName(RulesCompiler.GetFileNameFromType(GetType()));
        string thirdPartyPath = Path.Combine(basePath, "..", "..", "Thirdparty");


        //FMOD
        PublicIncludePaths.Add(Path.Combine(thirdPartyPath, "FMOD", "Includes"));

        switch (Target.Platform)
        {
        case UnrealTargetPlatform.Win64:
            PublicLibraryPaths.Add(Path.Combine(thirdPartyPath, "FMOD", "Libraries", "Win64"));
            PublicAdditionalLibraries.Add("fmod64_vc.lib");
            string fmodDllPath = Path.Combine(thirdPartyPath, "FMOD", "Libraries", "Win64", "fmod64.dll");
            RuntimeDependencies.Add(new RuntimeDependency(fmodDllPath));

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

            string fmodDllDest = System.IO.Path.Combine(binariesDir, "fmod64.dll");
            CopyFile(fmodDllPath, fmodDllDest);
            PublicDelayLoadDLLs.AddRange(new string[] { "fmod64.dll" });

            break;

        case UnrealTargetPlatform.Android:
            PublicLibraryPaths.Add(Path.Combine(thirdPartyPath, "FMOD", "Libraries", "Android", "armeabi-v7a"));
            PublicLibraryPaths.Add(Path.Combine(thirdPartyPath, "FMOD", "Libraries", "Android", "arm64-v8a"));
            PublicAdditionalLibraries.Add("fmod");
            string RelAPLPath = Utils.MakePathRelativeTo(System.IO.Path.Combine(thirdPartyPath, "FMOD", "FMOD_APL.xml"), Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", RelAPLPath));
            break;

        default:
            throw new System.Exception(System.String.Format("Unsupported platform {0}", Target.Platform.ToString()));
        }
    }
    public OSVRClientKit(TargetInfo Target)
    {
        Type = ModuleType.External;
        PublicIncludePaths.Add(ModuleDirectory + "/include");

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string PlatformAbbrev = "Win32";
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PlatformAbbrev = "Win64";
            }


            PublicLibraryPaths.Add(String.Format("{0}/lib/{1}", ModuleDirectory, PlatformAbbrev));
            PublicAdditionalLibraries.Add("osvrClientKit.lib");
            PublicAdditionalLibraries.Add("osvrRenderManager.lib");

            var osvrDlls = new string[] {
                "osvrClientKit.dll",
                "osvrClient.dll",
                "osvrCommon.dll",
                "osvrUtil.dll",
                "osvrRenderManager.dll",
                "d3dcompiler_47.dll",
                "glew32.dll",
                "SDL2.dll"
            };

            PublicDelayLoadDLLs.AddRange(osvrDlls);

            string baseBinaryDirectory = ModuleDirectory + "/bin";
            if (!System.IO.Directory.Exists(baseBinaryDirectory))
            {
                baseBinaryDirectory = "$(EngineDir)/Binaries/ThirdParty/OSVRClientKit/bin";
            }

            string DllFormat = "{0}/{1}/{2}";
            foreach (var dll in osvrDlls)
            {
                var src = String.Format(DllFormat, baseBinaryDirectory, PlatformAbbrev, dll);
                RuntimeDependencies.Add(new RuntimeDependency(src));
            }
        }
    }
Beispiel #16
0
    public ANGLE(TargetInfo Target)
    {
        Type = ModuleType.External;

        if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
        {
            PublicIncludePaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "ANGLE");
            PublicAdditionalLibraries.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "ANGLE/lib/libGLESv2.lib");
            PublicAdditionalLibraries.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "ANGLE/lib/libEGL.lib");

            PublicDelayLoadDLLs.AddRange(
                new string[] {
                "libGLESv2.dll",
                "libEGL.dll"
            }
                );
        }
    }
Beispiel #17
0
    public DX11(TargetInfo Target)
    {
        Type = ModuleType.External;

        Definitions.Add("WITH_D3DX_LIBS=1");

        string DirectXSDKDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "Windows/DirectX";

        PublicSystemIncludePaths.Add(DirectXSDKDir + "/include");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x64");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x86");
        }

        // If we're targeting Windows XP, then always delay-load D3D11 as it won't exist on that architecture
        if (WindowsPlatform.IsWindowsXPSupported())
        {
            PublicDelayLoadDLLs.AddRange(new string[] {
                "d3d11.dll",
                "dxgi.dll"
            });
        }

        PublicAdditionalLibraries.AddRange(
            new string[] {
            "dxgi.lib",
            "d3d9.lib",
            "d3d11.lib",
            "dxguid.lib",
            "d3dcompiler.lib",
            (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "d3dx11d.lib" : "d3dx11.lib",
            "dinput8.lib",
            "X3DAudio.lib",
            "xapobase.lib",
            "XAPOFX.lib"
        }
            );
    }
Beispiel #18
0
    public K4WLib(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string SDKDIR = Utils.ResolveEnvironmentVariable("%KINECTSDK20_DIR%");

        SDKDIR = SDKDIR.Replace("\\", "/");

        // if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string BaseDirectory   = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", ".."));
            string RedistDirectory = Path.Combine(BaseDirectory, "ThirdParty", "Redist");


            //string ShortPlatform = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
            //string PlatformPath = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64/" : "x86/";
            string ShortPlatform = "x64";
            string PlatformPath  = "x64/";

            PublicIncludePaths.Add(SDKDIR + "inc/");
            string LibPath = SDKDIR + "Lib/" + PlatformPath;

            //PublicLibraryPaths.Add(LibPath);
            //PublicAdditionalLibraries.AddRange(new string[] { "Kinect20.lib", /*"Kinect20.face.lib" */});
            PublicAdditionalLibraries.Add(Path.Combine(LibPath, "Kinect20.lib"));

            PublicDelayLoadDLLs.AddRange(new string[] { /*"Kinect20.Face.dll",*/ "Kinect20.dll", /*"Microsoft.Kinect.Face.dll", /*vgbtechs/AdaBoostTech.dll", "vgbtechs/RFRProgressTech.dll" */ });


            /*
             * RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(RedistDirectory, "Face", ShortPlatform, "Kinect20.Face.dll")));
             * RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(RedistDirectory, "Face", ShortPlatform, "NuiDataBase")));
             * RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(RedistDirectory, "Face", ShortPlatform, "Microsoft.Kinect.Face.dll")));
             * RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(RedistDirectory, "Face", ShortPlatform, "Microsoft.Kinect.Face.xml")));
             */



            //PublicDelayLoadDLLs.AddRange(new string[] { "Kinect20.dll", "Kinect20.Face.dll","Microsoft.Kinect.Face.dll", /*vgbtechs/AdaBoostTech.dll", "vgbtechs/RFRProgressTech.dll" */});
        }
    }
    public void LoadOpenCV(ReadOnlyTargetRules Target)
    {
        string opencv_dir = Path.Combine(ThirdPartyPath, "opencv");

        // Include OpenCV headers
        PublicIncludePaths.Add(Path.Combine(opencv_dir, "include"));

        // Libraries are platform-dependent
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            Console.WriteLine("AUR: OpenCV for Win64");

            var suffix = OpenCVVersion;
            if (IsDebug(Target))
            {
                Console.WriteLine("AUR: Debug");
                suffix += "d";
            }
            else
            {
                Console.WriteLine("AUR: Not debug");
            }

            // Add the aur_allocator fix for crashes on windows
            List <string> modules = new List <string>();
            modules.AddRange(OpenCVModules);
            //modules.Add("opencv_aur_allocator");

            // Static linking
            var lib_dir = Path.Combine(opencv_dir, "install", "Win64", "x64", "vc15", "lib");
            PublicAdditionalLibraries.AddRange(
                OpenCVModules.ConvertAll(m => Path.Combine(lib_dir, m + suffix + ".lib"))
                );

            // Dynamic libraries
            // The DLLs need to be in Binaries/Win64 anyway, so let us keep them there instead of ThirdParty/opencv
            PublicDelayLoadDLLs.AddRange(
                OpenCVModules.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), m + suffix + ".dll"))
                );

            bEnableExceptions = true;
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            Console.WriteLine("AUR: OpenCV for Linux");

            //var lib_dir = Path.Combine(opencv_dir, "install", "Linux", "lib");
            //var opencv_libs = OpenCVModules.ConvertAll(m => Path.Combine(lib_dir, "lib" + m + ".a"));

            var opencv_libs = OpenCVModules.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), "lib" + m + ".so"));
            PublicAdditionalLibraries.AddRange(opencv_libs);

            PublicAdditionalLibraries.AddRange(
                LinuxStdLibs.ConvertAll(m => Path.Combine(BinariesDirForTarget(Target), m))
                );

            //var lib_dir_other = Path.Combine(opencv_dir, "install", "Linux", "share", "OpenCV", "3rdparty", "lib");
            //var opencv_libs_other = LinuxAdditionalLibs.ConvertAll(m => Path.Combine(lib_dir_other, m));
            //PublicAdditionalLibraries.AddRange(opencv_libs_other);
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            Console.WriteLine("AUR: Android with arch=", Target.Architecture);

            var arch = "armeabi-v7a";             //Target.Architecture

            var src_dir = Path.Combine(opencv_dir, "install", "Android", "sdk", "native");

            var modules_lib_dir = Path.Combine(src_dir, "libs", arch);
            var opencv_libs     = OpenCVModules.ConvertAll(
                m => Path.Combine(modules_lib_dir, "lib" + m + ".a")
                );
            PublicLibraryPaths.Add(modules_lib_dir);
            PublicAdditionalLibraries.AddRange(opencv_libs);

            var thirdparty_lib_dir = Path.Combine(src_dir, "3rdparty", "libs", arch);
            var thirdparty_libs    = new List <string>(Directory.GetFiles(thirdparty_lib_dir)).ConvertAll(
                fn => Path.Combine(thirdparty_lib_dir, fn)
                );
            PublicLibraryPaths.Add(thirdparty_lib_dir);
            PublicAdditionalLibraries.AddRange(thirdparty_libs);

            bEnableExceptions = true;
        }
        else
        {
            Console.WriteLine("AUR: No prebuilt binaries for OpenCV on platform " + Target.Platform);
        }
    }
Beispiel #20
0
    public ARToolkit(TargetInfo Target)
    {
        Type = ModuleType.External;

        string SDKDIR = Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name));

        SDKDIR = SDKDIR.Replace("\\", "/");
        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicIncludePaths.Add(SDKDIR + "/include/OSX/");
            string LibPath = SDKDIR + "/lib/OSX/";

            PublicAdditionalLibraries.Add(LibPath + "macosx-universal/libjpeg.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR2.a");
            PublicAdditionalLibraries.Add(LibPath + "libARICP.a");
            PublicAdditionalLibraries.Add(LibPath + "libKPM.a");
            PublicAdditionalLibraries.Add(LibPath + "libARUtil.a");
            PublicAdditionalLibraries.Add(LibPath + "libARMulti.a");
            PublicAdditionalLibraries.Add(LibPath + "libARvideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libEden.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_lite.a");

            PublicFrameworks.AddRange(
                new string[] {
                "QTKit",
                "CoreVideo",
                "Accelerate"
            }
                );
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicIncludePaths.Add(SDKDIR + "/include/iOS/");
            string LibPath = SDKDIR + "/lib/iOS/";

            PublicAdditionalLibraries.Add(LibPath + "libKPM.a");
            PublicAdditionalLibraries.Add(LibPath + "ios511/libjpeg.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR.a");
            PublicAdditionalLibraries.Add(LibPath + "libARVideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR2.a");
            PublicAdditionalLibraries.Add(LibPath + "libARICP.a");
            PublicAdditionalLibraries.Add(LibPath + "libARUtil.a");
            PublicAdditionalLibraries.Add(LibPath + "libARMulti.a");
            PublicAdditionalLibraries.Add(LibPath + "libARvideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libEden.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_es.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_es2.a");
            PublicAdditionalLibraries.Add(LibPath + "libc++.dylib"); //Need this from IOS SDK

            PublicFrameworks.AddRange(
                new string[] {
                "CoreVideo",
                "Accelerate",
                "AVFoundation"
            }
                );
        }
        else if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            PublicIncludePaths.Add(SDKDIR + "/include/Windows/");

            string LibPath;

            switch (WindowsPlatform.Compiler)
            {
            case WindowsCompiler.VisualStudio2015:
                LibPath = SDKDIR + "/lib/Win64/vs2015";
                break;

            case WindowsCompiler.VisualStudio2013:
                LibPath = SDKDIR + "/lib/Win64/vs2013";
                break;

            default:
                throw new BuildException("Unexpected compiler version on Visual Studio 2013 / 2015 is supported!");
            }


            PublicLibraryPaths.Add(LibPath);
            PublicAdditionalLibraries.AddRange(
                new string[] {
                "libjpeg.lib",
                "pthreadVC2.lib",
                "ARUtil.lib",
                "AR.lib",
                "ARMulti.lib",
                "AR2.lib",
                "KPM.lib",
                "ARvideo.lib",
                "ARICP.lib"
            }
                );

            PublicDelayLoadDLLs.AddRange(new string[] { "DSVL.dll", "ARvideo.dll", "pthreadVC2.dll" });
            RuntimeDependencies.Add(new RuntimeDependency(SDKDIR + "/../../../Binaries/Win64/DSVL.dll"));
            RuntimeDependencies.Add(new RuntimeDependency(SDKDIR + "/../../../Binaries/Win64/ARvideo.dll"));
            RuntimeDependencies.Add(new RuntimeDependency(SDKDIR + "/../../../Binaries/Win64/pthreadVC2.dll"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add(SDKDIR + "/include/Android/");
            string LibPathAndroid = SDKDIR + "/lib/Android/armeabi-v7a/";
            PublicLibraryPaths.Add(LibPathAndroid);

            PublicAdditionalLibraries.Add(LibPathAndroid + "libar.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libar2.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libaricp.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libkpm.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libutil.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libarmulti.a");
            PublicAdditionalLibraries.Add(LibPathAndroid + "libjpeg.a");

            PublicAdditionalLibraries.Add(LibPathAndroid + "libc++_shared.so");
        }
    }
    public ARMarkerLibrary(ReadOnlyTargetRules ROTargetRules) : base(ROTargetRules)
    {
        Type = ModuleType.External;

        string SDKDIR = ModuleDirectory;

        SDKDIR = SDKDIR.Replace("\\", "/");

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Mac", "include/OSX/"));
            string LibPath = SDKDIR + "/Mac" + "/lib/OSX/";

            PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "Mac", "lib/OSX/"));
            PublicAdditionalLibraries.Add(LibPath + "macosx-universal/libjpeg.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR2.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_lite.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub.a");
            PublicAdditionalLibraries.Add(LibPath + "libARICP.a");
            PublicAdditionalLibraries.Add(LibPath + "libARMulti.a");
            PublicAdditionalLibraries.Add(LibPath + "libARosg.a");
            PublicAdditionalLibraries.Add(LibPath + "libARUtil.a");
            PublicAdditionalLibraries.Add(LibPath + "libARvideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libEden.a");
            PublicAdditionalLibraries.Add(LibPath + "libKPM.a");

            PublicDelayLoadDLLs.Add(Path.Combine(ModuleDirectory, "Mac", "Release", "libExampleLibrary.dylib"));

            PublicFrameworks.AddRange(
                new string[] {
                "QTKit",
                "CoreVideo",
                "Accelerate"
            });
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "iOS", "include/iOS/"));

            string LibPath = SDKDIR + "/iOS" + "/lib/iOS/";

            PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "iOS", "lib/iOS/"));

            PublicAdditionalLibraries.Add(LibPath + "libKPM.a");
            PublicAdditionalLibraries.Add(LibPath + "ios511/libjpeg.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR.a");
            PublicAdditionalLibraries.Add(LibPath + "libAR2.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_es.a");
            PublicAdditionalLibraries.Add(LibPath + "libARgsub_es2.a");
            PublicAdditionalLibraries.Add(LibPath + "libARICP.a");
            PublicAdditionalLibraries.Add(LibPath + "libARMulti.a");
            PublicAdditionalLibraries.Add(LibPath + "libARosg.a");
            PublicAdditionalLibraries.Add(LibPath + "libARUtil.a");
            PublicAdditionalLibraries.Add(LibPath + "libARvideo.a");
            PublicAdditionalLibraries.Add(LibPath + "libARWrapper.a");
            PublicAdditionalLibraries.Add(LibPath + "libEden.a");
            PublicAdditionalLibraries.Add(LibPath + "libc++.dylib");


            PublicFrameworks.AddRange(
                new string[] {
                "CoreVideo",
                "Accelerate",
                "AVFoundation"
            });
        }
        else if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "x64", "include/x64/"));

            string LibPath = SDKDIR + "/x64" + "/lib/vs2015/";

            PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "x64", "lib/x64/"));
            PublicAdditionalLibraries.Add(LibPath + "AR.lib");
            PublicAdditionalLibraries.Add(LibPath + "AR.lib");
            PublicAdditionalLibraries.Add(LibPath + "AR2.lib");
            PublicAdditionalLibraries.Add(LibPath + "ARICP.lib");
            PublicAdditionalLibraries.Add(LibPath + "ARMulti.lib");
            PublicAdditionalLibraries.Add(LibPath + "ARUtil.lib");
            PublicAdditionalLibraries.Add(LibPath + "ARvideo.lib");
            PublicAdditionalLibraries.Add(LibPath + "KPM.lib");
            PublicAdditionalLibraries.Add(LibPath + "libjpeg.lib");
            PublicAdditionalLibraries.Add(LibPath + "pthreadVC2.lib");

            PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "x64", "Release"));
            PublicAdditionalLibraries.Add("ExampleLibrary.lib");

            PublicDelayLoadDLLs.AddRange(new string[] { "ExampleLibrary.dll", "ARvideo.dll", "DSVL.dll", "pthreadVC2.dll" });
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Android", "include/Android/"));

            string LibPath = SDKDIR + "/Android" + "/lib/Android/armeabi-v7a/";

            PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "Android", "lib/Android/armeabi-v7a/"));
            PublicAdditionalLibraries.Add(LibPath + "libar.a");
            PublicAdditionalLibraries.Add(LibPath + "libar.a");
            PublicAdditionalLibraries.Add(LibPath + "libar.a");
            PublicAdditionalLibraries.Add(LibPath + "libar2.a");
            PublicAdditionalLibraries.Add(LibPath + "libaricp.a");
            PublicAdditionalLibraries.Add(LibPath + "libarmulti.a");
            PublicAdditionalLibraries.Add(LibPath + "libjpeg.a");
            PublicAdditionalLibraries.Add(LibPath + "libkpm.a");
            PublicAdditionalLibraries.Add(LibPath + "libutil.a");

            PublicAdditionalLibraries.Add(LibPath + "libc++_shared.so");
        }
    }
Beispiel #22
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",
                "SourceControl",
                "EditorStyle"
            });

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

        PrivateIncludePaths.Add("AkAudio/Private");
        PublicIncludePaths.Add(Path.Combine(ThirdPartyFolder, "include"));

        PublicDefinitions.Add("AK_UNREAL_MAX_CONCURRENT_IO=32");
        PublicDefinitions.Add("AK_UNREAL_IO_GRANULARITY=32768");
        if (Target.Configuration == UnrealTargetConfiguration.Shipping)
        {
            PublicDefinitions.Add("AK_OPTIMIZED");
        }

        if (Target.Configuration != UnrealTargetConfiguration.Shipping && AkUEPlatformInstance.SupportsCommunication)
        {
            AkLibs.Add("CommunicationCentral");
            PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=1");
        }
        else
        {
            PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=0");
        }

        if (AkUEPlatformInstance.SupportsAkAutobahn)
        {
            AkLibs.Add("AkAutobahn");
            PublicDefinitions.Add("AK_SUPPORT_WAAPI=1");
        }
        else
        {
            PublicDefinitions.Add("AK_SUPPORT_WAAPI=0");
        }

        if (AkUEPlatformInstance.SupportsOpus)
        {
            AkLibs.Add("AkOpusDecoder");
            PublicDefinitions.Add("AK_SUPPORT_OPUS=1");
        }
        else
        {
            PublicDefinitions.Add("AK_SUPPORT_OPUS=0");
        }

        if (AkUEPlatformInstance.SupportsDeviceMemory)
        {
            PublicDefinitions.Add("AK_SUPPORT_DEVICE_MEMORY=1");
        }
        else
        {
            PublicDefinitions.Add("AK_SUPPORT_DEVICE_MEMORY=0");
        }

        // Platform-specific dependencies
#if UE_4_24_OR_LATER
        PublicSystemLibraries.AddRange(AkUEPlatformInstance.GetPublicSystemLibraries());
#else
        PublicLibraryPaths.AddRange(AkUEPlatformInstance.GetPublicLibraryPaths());
        PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetPublicSystemLibraries());
#endif
        AkLibs.AddRange(AkUEPlatformInstance.GetAdditionalWwiseLibs());
        PublicDefinitions.AddRange(AkUEPlatformInstance.GetPublicDefinitions());
        PublicDefinitions.Add(string.Format("AK_CONFIGURATION=\"{0}\"", AkUEPlatformInstance.AkConfigurationDir));
        var AdditionalProperty = AkUEPlatformInstance.GetAdditionalPropertyForReceipt(ModuleDirectory);
        if (AdditionalProperty != null)
        {
            AdditionalPropertiesForReceipt.Add(AdditionalProperty.Item1, AdditionalProperty.Item2);
        }

        PublicFrameworks.AddRange(AkUEPlatformInstance.GetPublicFrameworks());

        PublicDelayLoadDLLs.AddRange(AkUEPlatformInstance.GetPublicDelayLoadDLLs());
        foreach (var RuntimeDependency in AkUEPlatformInstance.GetRuntimeDependencies())
        {
            RuntimeDependencies.Add(RuntimeDependency);
        }
        PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetSanitizedAkLibList(AkLibs));
    }
Beispiel #23
0
        public TrueSkyPlugin(TargetInfo Target)
        {
            //string trueSKYPath=UEBuildConfiguration.UEThirdPartySourceDirectory+"Vorbis/libvorbis-1.3.2/";

            if (Target.Configuration != UnrealTargetConfiguration.Debug)
            {
                Definitions.Add("NDEBUG=1");
            }

            PublicIncludePaths.AddRange(
                new string[] {
                "Core",
                "CoreUObject",
                "Engine",
            }
                );
            if (UEBuildConfiguration.bBuildEditor == true)
            {
                PublicIncludePaths.AddRange(new string[] {
                    "Editor/LevelEditor/Public",
                    "Editor/PlacementMode/Private",
                    "Editor/MainFrame/Public/Interfaces",
                    "Developer/AssetTools/Private",
                });
            }

            // ... Add private include paths required here ...
            PrivateIncludePaths.AddRange(
                new string[] {
                "TrueSkyPlugin/Private"
            }
                );

            // Add public dependencies that we statically link with here ...
            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Slate",
                "Engine",
            }
                );

            if (UEBuildConfiguration.bBuildEditor == true)
            {
                PublicDependencyModuleNames.AddRange(
                    new string[]
                {
                    "UnrealEd",
                    "EditorStyle",
                    "CollectionManager",
                    "EditorStyle",
                    "AssetTools",
                    "PlacementMode",
                    "ContentBrowser"
                }
                    );
            }

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "RenderCore",
                "RHI",
                "Slate",
                "SlateCore",
                "Renderer"
                // ... add private dependencies that you statically link with here ...
            }
                );
            if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                string SimulBinariesDir = "$(EngineDir)/Binaries/ThirdParty/Simul/Win64/";
                RuntimeDependencies.Add(new RuntimeDependency(SimulBinariesDir + "TrueSkyPluginRender_MT.dll"));
                PrivateDependencyModuleNames.Add("D3D11RHI");
                AddThirdPartyPrivateStaticDependencies(Target, "DX11");
            }
            if (Target.Platform == UnrealTargetPlatform.XboxOne)
            {
                PrivateIncludePathModuleNames.Add("XboxOneD3D11RHI");
                PrivateDependencyModuleNames.AddRange(
                    new string[] { "DX11",
                                   "XboxOneSDK" }
                    );
            }
            if (Target.Platform == UnrealTargetPlatform.PS4)
            {
                string SimulBinariesDir = "$(EngineDir)/Binaries/ThirdParty/Simul/PS4/";

                PrivateDependencyModuleNames.Add("PS4RHI");
                PublicIncludePaths.AddRange(new string[] {
                    "Runtime/PS4/PS4RHI/Public"
                    , "Runtime/PS4/PS4RHI/Private"
                });
                string trueskypluginrender = "trueskypluginrender";
                if (Target.Configuration == UnrealTargetConfiguration.Debug)
                {
                    trueskypluginrender += "-debug";
                }
                RuntimeDependencies.Add(new RuntimeDependency(SimulBinariesDir + trueskypluginrender + ".prx"));
                PublicAdditionalLibraries.Add("../binaries/thirdparty/simul/ps4/" + trueskypluginrender + "_stub.a");
                PublicDelayLoadDLLs.AddRange(
                    new string[] {
                    trueskypluginrender + ".prx"
                }
                    );
                string SDKDir = System.Environment.GetEnvironmentVariable("SCE_ORBIS_SDK_DIR");
                if ((SDKDir == null) || (SDKDir.Length <= 0))
                {
                    SDKDir = "C:/Program Files (x86)/SCE/ORBIS SDKs/3.000";
                }
                PrivateIncludePaths.AddRange(
                    new string[] {
                    SDKDir + "/target/include_common/gnmx"
                }
                    );
            }

            PublicDelayLoadDLLs.Add("SimulBase_MD.dll");
            PublicDelayLoadDLLs.Add("SimulCamera_MD.dll");
            PublicDelayLoadDLLs.Add("SimulClouds_MD.dll");
            PublicDelayLoadDLLs.Add("SimulCrossPlatform_MD.dll");
            PublicDelayLoadDLLs.Add("SimulDirectX11_MD.dll");
            PublicDelayLoadDLLs.Add("SimulGeometry_MD.dll");
            PublicDelayLoadDLLs.Add("SimulMath_MD.dll");
            PublicDelayLoadDLLs.Add("SimulMeta_MD.dll");
            PublicDelayLoadDLLs.Add("SimulScene_MD.dll");
            PublicDelayLoadDLLs.Add("SimulSky_MD.dll");
            PublicDelayLoadDLLs.Add("SimulTerrain_MD.dll");
            PublicDelayLoadDLLs.Add("TrueSkyPluginRender_MT.dll");
        }
Beispiel #24
0
    public AWSSDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

        string AWSSDKPath = Path.Combine(ModuleDirectory, "..", "..", "ThirdParty", "awssdk");

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


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


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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "Projects",
            // ... add private dependencies that you statically link with here ...
        }
            );


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

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            string libPath = Path.Combine(AWSSDKPath, "lib");
            PublicAdditionalLibraries.AddRange(
                new string[]
            {
                Path.Combine(libPath, "aws-cpp-sdk-core.lib"),
                Path.Combine(libPath, "aws-cpp-sdk-s3.lib"),
            }
                );

            string dllPath = Path.Combine(ModuleDirectory, "..", "..", "Binaries", "Win64");

            string[] dlls = new string[]
            {
                "aws-checksums.dll",
                "aws-c-common.dll",
                "aws-c-event-stream.dll",
                "aws-cpp-sdk-core.dll",
                "aws-cpp-sdk-s3.dll",
            };

            PublicDelayLoadDLLs.AddRange(dlls);

            foreach (string dll in dlls)
            {
                RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(dllPath, dll)));
            }
        }

        string AwsAccessKeyId     = System.Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID");
        string AwsSecretAccessKey = System.Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY");

        Definitions.Add(string.Format("AWS_ACCESS_KEY_ID=\"{0}\"", AwsAccessKeyId));
        Definitions.Add(string.Format("AWS_SECRET_ACCESS_KEY=\"{0}\"", AwsSecretAccessKey));
    }
Beispiel #25
0
    public CEF3(ReadOnlyTargetRules Target) : base(Target)
    {
        /** Mark the current version of the library */
        string CEFVersion  = "3.3071.1611.g4a19305";
        string CEFPlatform = "";

        Type = ModuleType.External;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            CEFPlatform = "windows64";
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            CEFPlatform = "windows32";
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            CEFPlatform = "macosx64";
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            CEFVersion  = "3.2623.1395.g3034273";
            CEFPlatform = "linux64";
        }

        if (CEFPlatform.Length > 0 && Target.bCompileCEF3)
        {
            string PlatformPath = Path.Combine(Target.UEThirdPartySourceDirectory, "CEF3", "cef_binary_" + CEFVersion + "_" + CEFPlatform);

            PublicSystemIncludePaths.Add(PlatformPath);

            string LibraryPath = Path.Combine(PlatformPath, "Release");
            string RuntimePath = Path.Combine(Target.UEThirdPartyBinariesDirectory, "CEF3", Target.Platform.ToString());

            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add("libcef.lib");

                // There are different versions of the C++ wrapper lib depending on the version of VS we're using
                string VSVersionFolderName = "VS" + Target.WindowsPlatform.GetVisualStudioCompilerVersionName();
                string WrapperLibraryPath  = Path.Combine(PlatformPath, VSVersionFolderName, "libcef_dll");

                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    WrapperLibraryPath += "/Debug";
                }
                else
                {
                    WrapperLibraryPath += "/Release";
                }

                PublicLibraryPaths.Add(WrapperLibraryPath);
                PublicAdditionalLibraries.Add("libcef_dll_wrapper.lib");

                List <string> Dlls = new List <string>();

                Dlls.Add("chrome_elf.dll");
                Dlls.Add("d3dcompiler_43.dll");
                Dlls.Add("d3dcompiler_47.dll");
                Dlls.Add("libcef.dll");
                Dlls.Add("libEGL.dll");
                Dlls.Add("libGLESv2.dll");

                PublicDelayLoadDLLs.AddRange(Dlls);

                // Add the runtime dlls to the build receipt
                foreach (string Dll in Dlls)
                {
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/" + Dll));
                }
                // We also need the icu translations table required by CEF
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/icudtl.dat"));

                // Add the V8 binary data files as well
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/natives_blob.bin"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/snapshot_blob.bin"));

                // And the entire Resources folder. Enumerate the entire directory instead of mentioning each file manually here.
                foreach (string FileName in Directory.EnumerateFiles(Path.Combine(RuntimePath, "Resources"), "*", SearchOption.AllDirectories))
                {
                    string DependencyName = FileName.Substring(Target.UEThirdPartyBinariesDirectory.Length).Replace('\\', '/');
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/" + DependencyName));
                }
            }
            // TODO: Ensure these are filled out correctly when adding other platforms
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string WrapperPath   = LibraryPath + "/libcef_dll_wrapper.a";
                string FrameworkPath = Target.UEThirdPartyBinariesDirectory + "CEF3/Mac/Chromium Embedded Framework.framework";

                PublicAdditionalLibraries.Add(WrapperPath);
                PublicFrameworks.Add(FrameworkPath);

                if (Directory.Exists(LibraryPath + "/locale"))
                {
                    var LocaleFolders = Directory.GetFileSystemEntries(LibraryPath + "/locale", "*.lproj");
                    foreach (var FolderName in LocaleFolders)
                    {
                        AdditionalBundleResources.Add(new UEBuildBundleResource(FolderName, bInShouldLog: false));
                    }
                }

                // Add contents of framework directory as runtime dependencies
                foreach (string FilePath in Directory.EnumerateFiles(FrameworkPath, "*", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(new RuntimeDependency(FilePath));
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                // link against runtime library since this produces correct RPATH
                string RuntimeLibCEFPath = Path.Combine(RuntimePath, "libcef.so");
                PublicAdditionalLibraries.Add(RuntimeLibCEFPath);

                string Configuration;
                if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
                {
                    Configuration = "build_debug";
                }
                else
                {
                    Configuration = "build_release";
                }
                string WrapperLibraryPath = Path.Combine(PlatformPath, Configuration, "libcef_dll");

                PublicAdditionalLibraries.Add(Path.Combine(WrapperLibraryPath, "libcef_dll_wrapper.a"));

                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/libcef.so"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/icudtl.dat"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/natives_blob.bin"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/snapshot_blob.bin"));

                // And the entire Resources folder. Enunerate the entire directory instead of mentioning each file manually here.
                foreach (string FileName in Directory.EnumerateFiles(Path.Combine(RuntimePath, "Resources"), "*", SearchOption.AllDirectories))
                {
                    string DependencyName = FileName.Substring(Target.UEThirdPartyBinariesDirectory.Length).Replace('\\', '/');
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/" + DependencyName));
                }
            }
        }
    }
        public FMODStudio(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;
            PrivatePCHHeaderFile = "Private/FMODStudioPrivatePCH.h";

            bUseUnity = false;

            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 linkExtension = "";
            string dllExtension  = "";
            string libPrefix     = "";
            string libPath       = FMODLibDir;

            bool bCopyToOutput           = false;
            bool bAddRuntimeDependencies = true;
            bool bAddDelayLoad           = false;
            bool bLinkDebugFiles         = false;

            if (libPath == null)
            {
                string platformName = Target.Platform.ToString();

                libPath = System.IO.Path.Combine(LibRootDirectory, platformName);

                // 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.IsInPlatformGroup(UnrealPlatformGroup.Windows))
                {
                    linkExtension = "_vc.lib";
                    dllExtension  = ".dll";
                    bAddDelayLoad = true;
                }
                else if (Target.Platform == UnrealTargetPlatform.Mac)
                {
                    linkExtension = dllExtension = ".dylib";
                    libPrefix     = "lib";

                    libPath = System.IO.Path.Combine(ModuleDirectory, "../../Libs/Mac/");
                }
                else if (Target.Platform == UnrealTargetPlatform.XboxOne)
                {
                    linkExtension           = "_vc.lib";
                    dllExtension            = ".dll";
                    bCopyToOutput           = true;
                    bAddRuntimeDependencies = false;
                }
                else if (Target.Platform == UnrealTargetPlatform.PS4)
                {
                    linkExtension = "_stub.a";
                    dllExtension  = ".prx";
                    libPrefix     = "lib";
                    bAddDelayLoad = true;
                }
                else if (Target.Platform == UnrealTargetPlatform.Android)
                {
                    bAddRuntimeDependencies = false; // Don't use this system
                    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)
                {
                    libPath       = System.IO.Path.Combine(libPath, "x86_64");
                    linkExtension = ".so";
                    dllExtension  = ".so";
                    libPrefix     = "lib";
                }
            }
            else
            {
                linkExtension = ConsoleLinkExt;
                dllExtension  = ConsoleDllExt;
                libPrefix     = ConsoleLibPrefix;

                bAddRuntimeDependencies = ConsoleRuntimeDependencies;
                bAddDelayLoad           = ConsoleDelayLoad;
                bLinkDebugFiles         = LinkDebugFiles;
            }

            // Collapse the directory path, otherwise MacOS has issues with plugin paths.
            libPath = Utils.CleanDirectorySeparators(libPath);

            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(libPath, fmodLibName);
            string fmodStudioLibPath = System.IO.Path.Combine(libPath, fmodStudioLibName);

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

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

            if (Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
            {
                string[] archs = new string[] { "armeabi-v7a", "arm64-v8a", "x86_64" };
                foreach (string arch in archs)
                {
                    string LibPath = System.IO.Path.Combine(libPath, arch);
                    PublicAdditionalLibraries.Add(System.String.Format("{0}/{1}", LibPath, fmodLibName));
                    PublicAdditionalLibraries.Add(System.String.Format("{0}/{1}", LibPath, fmodStudioLibName));
                }
            }
            else
            {
                PublicAdditionalLibraries.Add(fmodLibPath);
                PublicAdditionalLibraries.Add(fmodStudioLibPath);
            }

            if (bCopyToOutput)
            {
                RuntimeDependencies.Add("$(TargetOutputDir)/" + fmodDllName, fmodDllPath);
                RuntimeDependencies.Add("$(TargetOutputDir)/" + fmodStudioDllName, fmodStudioDllPath);
            }
            else if (bAddRuntimeDependencies)
            {
                RuntimeDependencies.Add(fmodDllPath);
                RuntimeDependencies.Add(fmodStudioDllPath);
                foreach (string plugin in plugins)
                {
                    string pluginPath = System.IO.Path.Combine(libPath, plugin + dllExtension);
                    System.Console.WriteLine("Adding reference to FMOD plugin: " + pluginPath);
                    RuntimeDependencies.Add(pluginPath);
                }
            }

            if (bLinkDebugFiles)
            {
                RuntimeDependencies.Add(fmodDllPath + ".debug", StagedFileType.DebugNonUFS);
                RuntimeDependencies.Add(fmodStudioDllPath + ".debug", StagedFileType.DebugNonUFS);
            }

            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(libPath))
                {
                    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);
                    }
                }
            }
        }
    public CEF3(TargetInfo Target)
    {
        /** Mark the current version of the library */
        string CEFVersion  = "3.2357.1291.g47e6d4b";
        string CEFPlatform = "";

        Type = ModuleType.External;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            CEFPlatform = "windows64";
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            CEFPlatform = "windows32";
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            CEFPlatform = "macosx64";
        }

        if (CEFPlatform.Length > 0 && UEBuildConfiguration.bCompileCEF3)
        {
            Definitions.Add("WITH_CEF3=1");

            string PlatformPath = Path.Combine(UEBuildConfiguration.UEThirdPartySourceDirectory, "CEF3", "cef_binary_" + CEFVersion + "_" + CEFPlatform);

            PublicSystemIncludePaths.Add(PlatformPath);

            string LibraryPath = Path.Combine(PlatformPath, "Release");
            string RuntimePath = Path.Combine(UEBuildConfiguration.UEThirdPartyBinariesDirectory, "CEF3", Target.Platform.ToString());

            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicLibraryPaths.Add(LibraryPath);
                PublicAdditionalLibraries.Add("libcef.lib");

                // There are different versions of the C++ wrapper lib depending on the version of VS we're using
                string VSVersionFolderName = "VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
                string WrapperLibraryPath  = Path.Combine(PlatformPath, VSVersionFolderName, "libcef_dll");

                if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                {
                    WrapperLibraryPath += "/Debug";
                }
                else
                {
                    WrapperLibraryPath += "/Release";
                }

                PublicLibraryPaths.Add(WrapperLibraryPath);
                PublicAdditionalLibraries.Add("libcef_dll_wrapper.lib");

                string[] Dlls =
                {
                    "d3dcompiler_43.dll",
                    "d3dcompiler_47.dll",
                    "ffmpegsumo.dll",
                    "libcef.dll",
                    "libEGL.dll",
                    "libGLESv2.dll",
                };

                PublicDelayLoadDLLs.AddRange(Dlls);

                // Add the runtime dlls to the build receipt
                foreach (string Dll in Dlls)
                {
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/" + Dll));
                }
                // We also need the icu translations table required by CEF
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/icudtl.dat"));

                // Add the V8 binary data files as well
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/natives_blob.bin"));
                RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/" + Target.Platform.ToString() + "/snapshot_blob.bin"));

                // For Win32 builds, we need a helper executable when running under WOW (32 bit apps under 64 bit windows)
                if (Target.Platform == UnrealTargetPlatform.Win32)
                {
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/CEF3/Win32/wow_helper.exe"));
                }

                // And the entire Resources folder. Enunerate the entire directory instead of mentioning each file manually here.
                foreach (string FileName in Directory.EnumerateFiles(Path.Combine(RuntimePath, "Resources"), "*", SearchOption.AllDirectories))
                {
                    string DependencyName = FileName.Substring(UEBuildConfiguration.UEThirdPartyBinariesDirectory.Length).Replace('\\', '/');
                    RuntimeDependencies.Add(new RuntimeDependency("$(EngineDir)/Binaries/ThirdParty/" + DependencyName));
                }
            }
            // TODO: Ensure these are filled out correctly when adding other platforms
            else if (Target.Platform == UnrealTargetPlatform.Mac)
            {
                string WrapperPath   = LibraryPath + "/libcef_dll_wrapper.a";
                string FrameworkPath = UEBuildConfiguration.UEThirdPartyBinariesDirectory + "CEF3/Mac/Chromium Embedded Framework.framework";

                PublicAdditionalLibraries.Add(WrapperPath);
                PublicFrameworks.Add(FrameworkPath);

                var LocaleFolders = Directory.GetFileSystemEntries(LibraryPath + "/locale", "*.lproj");
                foreach (var FolderName in LocaleFolders)
                {
                    AdditionalBundleResources.Add(new UEBuildBundleResource(FolderName, bInShouldLog: false));
                }

                // Add contents of framework directory as runtime dependencies
                foreach (string FilePath in Directory.EnumerateFiles(FrameworkPath, "*", SearchOption.AllDirectories))
                {
                    RuntimeDependencies.Add(new RuntimeDependency(FilePath));
                }
            }
            else if (Target.Platform == UnrealTargetPlatform.Linux)
            {
                if (Target.IsMonolithic)
                {
                    PublicAdditionalLibraries.Add(LibraryPath + "/libcef.a");
                }
                else
                {
                    PublicLibraryPaths.Add(LibraryPath);
                    PublicAdditionalLibraries.Add("libcef");
                }
            }
        }
    }
Beispiel #28
0
    public KinectVCLA(TargetInfo Target)
    {
        //Type = ModuleType.External;

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

        PrivateIncludePaths.AddRange(
            new string[] {
            "KinectVCLA/Private",

            // ... add other private include paths required here ...
        }
            );

        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Core",
            "Engine",
            "InputDevice",
            //"MSSpeech",
            "InputCore"
            // ... add other public dependencies that you statically link with here ...
        }
            );

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Core",
            "Engine",
            "InputDevice"
            // ... add private dependencies that you statically link with here ...
        }
            );

        string SDKDIR = Utils.ResolveEnvironmentVariable("%KINECTSDK20_DIR%");

        SDKDIR = SDKDIR.Replace("\\", "/");

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            string BaseDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", ".."));


            string ShortPlatform = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
            PublicIncludePaths.Add(SDKDIR + "inc/");

            string PlatformPath = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64/" : "x86/";

            string LibPath = SDKDIR + "Lib/" + PlatformPath;

            PublicLibraryPaths.Add(LibPath);
            PublicAdditionalLibraries.AddRange(new string[] { "Kinect20.lib" });

            PublicDelayLoadDLLs.AddRange(new string[] { "Kinect20.dll" });
        }
    }
Beispiel #29
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");
            }

            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.ToString() == "Switch")
            {
                linkExtension           = ".a";
                dllExtension            = ".a";
                libPrefix               = "lib";
                bAddRuntimeDependencies = false;
            }
            else if (Target.Platform.ToString() == "UWP64")
            {
                linkExtension = ".lib";
                dllExtension  = ".dll";
                bAddDelayLoad = true;
            }
            else
            {
                switch (Target.Platform)
                {
                case UnrealTargetPlatform.Win32:
                    linkExtension = "_vc.lib";
                    dllExtension  = ".dll";
                    bAddDelayLoad = true;
                    break;

                case UnrealTargetPlatform.Win64:
                    linkExtension = "_vc.lib";
                    dllExtension  = ".dll";
                    bAddDelayLoad = true;
                    break;

                case UnrealTargetPlatform.Mac:
                    linkExtension     = dllExtension = ".dylib";
                    libPrefix         = "lib";
                    bLinkFromBinaries = false;
                    break;

                case UnrealTargetPlatform.XboxOne:
                    linkExtension      = "_vc.lib";
                    dllExtension       = ".dll";
                    copyThirdPartyPath = "../XBoxOne";     // XBoxOne still doesn't seem to support plugins with .dlls
                    bAddDelayLoad      = false;
                    break;

                case UnrealTargetPlatform.PS4:
                    linkExtension = "_stub.a";
                    dllExtension  = ".prx";
                    libPrefix     = "lib";
                    bAddDelayLoad = true;
                    break;

                case 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";
                    break;

                case UnrealTargetPlatform.IOS:
                    linkExtension           = "_iphoneos.a";
                    libPrefix               = "lib";
                    bAddRuntimeDependencies = false;
                    break;

                case UnrealTargetPlatform.TVOS:
                    linkExtension           = "_appletvos.a";
                    libPrefix               = "lib";
                    bAddRuntimeDependencies = false;
                    break;

                case UnrealTargetPlatform.Linux:
                    BasePath      = System.IO.Path.Combine(BasePath, "x86_64");
                    linkExtension = ".so";
                    dllExtension  = ".so";
                    libPrefix     = "lib";
                    break;

                default:
                    //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);
                    }
                }
            }
        }
Beispiel #30
0
    public DX12(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string DirectXSDKDir = "";

        if (Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            DirectXSDKDir = Target.WindowsPlatform.bUseWindowsSDK10 ?
                            Target.UEThirdPartySourceDirectory + "Windows/DirectXLegacy" :
                            Target.UEThirdPartySourceDirectory + "Windows/DirectX";
        }
        else
        {
            DirectXSDKDir = Target.UEThirdPartySourceDirectory + "Windows/DirectX";
        }
        PublicSystemIncludePaths.Add(DirectXSDKDir + "/include");

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x64");

            PublicDelayLoadDLLs.Add("WinPixEventRuntime.dll");
            PublicAdditionalLibraries.Add("WinPixEventRuntime.lib");
            RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Windows/DirectX/x64/WinPixEventRuntime.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win32)
        {
            PublicLibraryPaths.Add(DirectXSDKDir + "/Lib/x86");
        }
        else if (Target.Platform == UnrealTargetPlatform.HoloLens)
        {
            bool PixAvalable = (Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM64);
            if (PixAvalable &&
                //Target.WindowsPlatform.bUseWindowsSDK10 &&
                Target.WindowsPlatform.bPixProfilingEnabled &&
                Target.Configuration != UnrealTargetConfiguration.Shipping &&
                Target.Configuration != UnrealTargetConfiguration.Test)
            {
                string Arch = Target.WindowsPlatform.GetArchitectureSubpath();
                PublicSystemIncludePaths.Add(Target.UEThirdPartySourceDirectory + "/Windows/Pix/Include");
                PublicLibraryPaths.Add(Target.UEThirdPartySourceDirectory + "/Windows/Pix/Lib/" + Arch);
                PublicDelayLoadDLLs.Add("WinPixEventRuntime.dll");
                PublicAdditionalLibraries.Add("WinPixEventRuntime.lib");
                RuntimeDependencies.Add(System.String.Format("$(EngineDir)/Binaries/ThirdParty/Windows/DirectX/{0}/WinPixEventRuntime.dll", Arch));
                PublicDefinitions.Add("D3D12_PROFILING_ENABLED=1");
                PublicDefinitions.Add("PROFILE");
            }
            else
            {
                PublicDefinitions.Add("D3D12_PROFILING_ENABLED=0");
            }
        }

        // Always delay-load D3D12
        PublicDelayLoadDLLs.AddRange(new string[] {
            "d3d12.dll"
        });

        PublicAdditionalLibraries.AddRange(
            new string[] {
            "d3d12.lib"
        }
            );
    }