Пример #1
0
    public libdraco_ue4(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string        DracoPath    = System.IO.Path.Combine(ModuleDirectory, "libdraco-1.3.0");
        string        IncludePath  = System.IO.Path.Combine(DracoPath, "include");
        List <string> LibPaths     = new List <string>();
        List <string> LibFilePaths = new List <string>();

        if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
        {
            string PlatformName = "";
#if UE_4_23_OR_LATER
            if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                PlatformName = "win32";
            }
            else if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PlatformName = "win64";
            }
#else
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win32:
                PlatformName = "win32";
                break;

            case UnrealTargetPlatform.Win64:
                PlatformName = "win64";
                break;
            }
#endif

            string LibPath = System.IO.Path.Combine(DracoPath, "lib", PlatformName, "vs2019", "Release");
            LibPaths.Add(LibPath);

            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracodec.lib"));
            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracoenc.lib"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string LibPath = System.IO.Path.Combine(DracoPath, "lib", "macos");
            LibPaths.Add(LibPath);

            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracodec.a"));
            LibFilePaths.Add(System.IO.Path.Combine(LibPath, "dracoenc.a"));
        }

        PublicIncludePaths.Add(IncludePath);
#if UE_4_24_OR_LATER
        PublicSystemLibraryPaths.AddRange(LibPaths);
#else
        PublicLibraryPaths.AddRange(LibPaths);
#endif
        PublicAdditionalLibraries.AddRange(LibFilePaths);
    }
Пример #2
0
    public libgltf_ue4(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        string        glTFPath    = System.IO.Path.Combine(ModuleDirectory, "libgltf-0.1.8");
        string        IncludePath = System.IO.Path.Combine(glTFPath, "include");
        List <string> LibPaths    = new List <string>();
        string        LibFilePath = "";

        if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
        {
            string PlatformName = "";
#if UE_4_23_OR_LATER
            if (Target.Platform == UnrealTargetPlatform.Win32)
            {
                PlatformName = "win32";
            }
            else if (Target.Platform == UnrealTargetPlatform.Win64)
            {
                PlatformName = "win64";
            }
#else
            switch (Target.Platform)
            {
            case UnrealTargetPlatform.Win32:
                PlatformName = "win32";
                break;

            case UnrealTargetPlatform.Win64:
                PlatformName = "win64";
                break;
            }
#endif

            string LibPath = System.IO.Path.Combine(glTFPath, "lib", PlatformName, "vs2019", "Release");
            LibPaths.Add(LibPath);

            LibFilePath = System.IO.Path.Combine(LibPath, "libgltf.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            string LibPath = System.IO.Path.Combine(glTFPath, "lib", "macos");
            LibPaths.Add(LibPath);

            LibFilePath = System.IO.Path.Combine(LibPath, "libgltf.a");
        }

        PublicIncludePaths.Add(IncludePath);
#if UE_4_24_OR_LATER
        PublicSystemLibraryPaths.AddRange(LibPaths);
#else
        PublicLibraryPaths.AddRange(LibPaths);
#endif
        PublicAdditionalLibraries.Add(LibFilePath);
        PublicDefinitions.Add("LIBGLTF_CHARACTOR_ENCODING_IS_UTF8");
    }
Пример #3
0
    //Processes the JSON data produced by Conan that describes our dependencies
    private void ProcessDependencies(string depsJson, ReadOnlyTargetRules target, string stagingDir)
    {
        //We need to ensure libraries end with ".lib" under Windows
        string libSuffix = ((this.IsWindows(target)) ? ".lib" : "");

        //Attempt to parse the JSON file
        JsonObject deps = JsonObject.Read(new FileReference(depsJson));

        //Process the list of dependencies
        foreach (JsonObject dep in deps.GetObjectArrayField("dependencies"))
        {
            //Add the header and library paths for the dependency package
            PublicIncludePaths.AddRange(dep.GetStringArrayField("include_paths"));
            PublicSystemLibraryPaths.AddRange(dep.GetStringArrayField("lib_paths"));

            //Add the preprocessor definitions from the dependency package
            PublicDefinitions.AddRange(dep.GetStringArrayField("defines"));

            //Link against the libraries from the package
            string[] libs = dep.GetStringArrayField("libs");
            foreach (string lib in libs)
            {
                string libFull = lib + ((libSuffix.Length == 0 || lib.EndsWith(libSuffix)) ? "" : libSuffix);
                PublicAdditionalLibraries.Add(libFull);
            }

            //Ensure any shared libraries are staged alongside the binaries for the plugin
            List <string> searchDirs = new List <string>();
            searchDirs.AddRange(dep.GetStringArrayField("bin_paths"));
            searchDirs.AddRange(dep.GetStringArrayField("lib_paths"));
            foreach (string dir in searchDirs)
            {
                List <string> binaries = new List <string>();
                binaries.AddRange(Directory.GetFiles(dir, "*.dll"));
                binaries.AddRange(Directory.GetFiles(dir, "*.dylib"));
                binaries.AddRange(Directory.GetFiles(dir, "*.so"));
                foreach (string binary in binaries)
                {
                    RuntimeDependencies.Add(Path.Combine("$(BinaryOutputDir)", Path.GetFileName(binary)), binary, StagedFileType.NonUFS);
                }
            }

            //Copy any data files needed by the package into our staging directory
            string[] dataDirs = dep.GetStringArrayField("res_paths");
            foreach (string dir in dataDirs)
            {
                string[] files = Directory.GetFiles(dir, "*", SearchOption.AllDirectories);
                foreach (string file in files)
                {
                    RuntimeDependencies.Add(Path.Combine(stagingDir, Path.GetFileName(file)), file, StagedFileType.NonUFS);
                }
            }
        }
    }
Пример #4
0
    public IntelTBB(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        if ((Target.Platform == UnrealTargetPlatform.Win64) ||
            (Target.Platform == UnrealTargetPlatform.Win32) ||
            (Target.Platform == UnrealTargetPlatform.HoloLens))
        {
            string IntelTBBPath;
            string PlatformSubpath = Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM32 || Target.WindowsPlatform.Architecture == WindowsArchitecture.x86 ? "Win32" : "Win64";
            string LibDir;
            if (Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM32 || Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM64)
            {
                // Could be switched to 2019u8 once it has been properly compiled and tested on ARM
                IntelTBBPath = Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.4u3/";
                LibDir       = System.String.Format("{0}lib/{1}/vc14/{2}/", IntelTBBPath, PlatformSubpath, Target.WindowsPlatform.GetArchitectureSubpath());
            }
            else
            {
                IntelTBBPath = Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-2019u8/";
                LibDir       = System.String.Format("{0}lib/{1}/vc14/", IntelTBBPath, PlatformSubpath);
            }
            PublicSystemLibraryPaths.Add(LibDir);

            PublicSystemIncludePaths.Add(IntelTBBPath + "Include");

            // Disable the #pragma comment(lib, ...) used by default in MallocTBB...
            // We want to explicitly include the library.
            PublicDefinitions.Add("__TBBMALLOC_BUILD=1");

            string LibName = "tbbmalloc";
            if (Target.Configuration == UnrealTargetConfiguration.Debug && Target.bDebugBuildsActuallyUseDebugCRT)
            {
                LibName += "_debug";
            }
            LibName += ".lib";
            PublicAdditionalLibraries.Add(LibDir + LibName);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicSystemIncludePaths.AddRange(
                new string[] {
                Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.0/include",
            }
                );

            PublicAdditionalLibraries.AddRange(
                new string[] {
                Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.0/lib/Mac/libtbb.a",
                Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-4.0/lib/Mac/libtbbmalloc.a",
            }
                );
        }
    }
Пример #5
0
    private void HandleAndroid(ReadOnlyTargetRules Target)
    {
        string libsPath = Path.Combine(CommonSharedLibsPath, "android");

        PublicSystemLibraryPaths.Add(Path.Combine(libsPath, "arm64-v8a"));
        PublicSystemLibraryPaths.Add(Path.Combine(libsPath, "armeabi-v7a"));
        PublicSystemLibraryPaths.Add(Path.Combine(libsPath, "x86"));
        PublicSystemLibraryPaths.Add(Path.Combine(libsPath, "x86_64"));

        PublicSystemLibraries.Add("nakama-cpp");

        string relAPLPath = Utils.MakePathRelativeTo(Path.Combine(ModulePath, "Nakama_APL.xml"), Target.RelativeEnginePath);

        AdditionalPropertiesForReceipt.Add("AndroidPlugin", relAPLPath);
    }
Пример #6
0
 public zmqLibrary(ReadOnlyTargetRules Target) : base(Target)
 {
   Type = ModuleType.External;
   if (Target.Platform == UnrealTargetPlatform.Win64)
   {
     // Add the import library
     String LibName = "libzmq-mt-4_3_1";
     PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "x64", "Release",LibName+".lib"));
     // Delay-load the DLL, so we can load it from the right place first
     PublicDelayLoadDLLs.Add(LibName+".dll");
     RuntimeDependencies.Add("$(TargetOutputDir)/"+LibName+".dll",Path.Combine(ModuleDirectory,"x64","Release",LibName+".dll"));
   }
   else if(Target.Platform == UnrealTargetPlatform.Linux){
     PublicSystemLibraries.Add("zmq");
     PublicSystemLibraryPaths.Add("/usr/lib/x86_64-linux-gnu/");
   }
 }
Пример #7
0
    public GStreamer(ReadOnlyTargetRules Target) : base(Target)
    {
        DefaultBuildSettings = BuildSettingsVersion.V2;
        PCHUsage             = PCHUsageMode.NoPCHs; // UseExplicitOrSharedPCHs;
        bUseUnity            = false;
        bEnableUndefinedIdentifierWarnings = false;

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

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            const string GStreamerRoot = @"C:\dev\gstreamer_dev\1.0\msvc_x86_64"; // path to gstreamer development package

            PrivateIncludePaths.Add(Path.Combine(GStreamerRoot, "include"));
            PrivateIncludePaths.Add(Path.Combine(GStreamerRoot, "include", "gstreamer-1.0"));
            PrivateIncludePaths.Add(Path.Combine(GStreamerRoot, "include", "glib-2.0"));
            PrivateIncludePaths.Add(Path.Combine(GStreamerRoot, "lib", "glib-2.0", "include"));

            var GStreamerLibPath = Path.Combine(GStreamerRoot, "lib");
            PublicSystemLibraryPaths.Add(GStreamerLibPath);

            PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "glib-2.0.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gobject-2.0.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gstreamer-1.0.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gstvideo-1.0.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(GStreamerLibPath, "gstapp-1.0.lib"));

            PublicDelayLoadDLLs.Add("glib-2.0-0.dll");
            PublicDelayLoadDLLs.Add("gobject-2.0-0.dll");
            PublicDelayLoadDLLs.Add("gstreamer-1.0-0.dll");
            PublicDelayLoadDLLs.Add("gstvideo-1.0-0.dll");
            PublicDelayLoadDLLs.Add("gstapp-1.0-0.dll");
        }
    }
    public Agora(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            // Add the import library
            PublicSystemLibraryPaths.Add(Path.Combine(ModuleDirectory, "x64", "Release"));
            PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "x64", "Release", "agora_rtc_sdk.lib"));

            // Delay-load the DLL, so we can load it from the right place first
            PublicDelayLoadDLLs.Add("agora_rtc_sdk.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicFrameworks.Add(Path.Combine(ModuleDirectory, "Mac", "Release", "AgoraRtcEngineKit.framework"));
        }
    }
Пример #9
0
        public bool LoadFMRTTSLib(ReadOnlyTargetRules Target)
        {
            if (Target.Platform != UnrealTargetPlatform.Win64 && Target.Platform != UnrealTargetPlatform.Win32)
            {
                PublicDefinitions.Add("WITH_FMRTTSLIB=0");
                return(false);
            }

            var FMRTTSLibFolder = Path.Combine(ModuleDirectory, @"..\ThirdParty", "FMRTTSLib");
            var LibraryPath     = Path.Combine(FMRTTSLibFolder, Target.Platform == UnrealTargetPlatform.Win64 ? "x64" : "x86");

            PublicSystemLibraryPaths.Add(LibraryPath);

            PublicAdditionalLibraries.Add(Path.Combine(LibraryPath, "FMRTTSLib.lib"));
            PrivateIncludePaths.Add(Path.Combine(FMRTTSLibFolder, "include"));

            PublicDefinitions.Add("WITH_FMRTTSLIB=1");

            return(true);
        }
Пример #10
0
    public Agora(ReadOnlyTargetRules Target) : base(Target)
    {
        Type = ModuleType.External;

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            // Add the import library
            PublicSystemLibraryPaths.Add(Path.Combine(ModuleDirectory, "x64", "Release"));
            PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "x64", "Release", "agora_rtc_sdk.lib"));

            // Delay-load the DLL, so we can load it from the right place first
            PublicDelayLoadDLLs.Add("agora_rtc_sdk.dll");
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicFrameworks.Add(Path.Combine(ModuleDirectory, "Mac", "Release", "AgoraRtcKit.framework"));
            AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AgoraPlugin", Path.Combine(ModuleDirectory, "copy.xml")));
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "iOS", "libcrypto.a"));

            PublicAdditionalFrameworks.Add(new Framework("AgoraRtcKit", Path.Combine(ModuleDirectory, "iOS", "AgoraRtcKit.framework.zip"), ""));

            PublicAdditionalFrameworks.Add(new Framework("AgoraRtcCryptoLoader", Path.Combine(ModuleDirectory, "iOS", "AgoraRtcCryptoLoader.framework.zip"), ""));

            PublicAdditionalLibraries.Add("resolv");

            PublicFrameworks.AddRange(
                new string[] {
                "CoreML",
                "VideoToolbox",
                "Accelerate",
                "CFNetwork",
                "OpenGLES",
                "CoreTelephony"
            }
                );
        }
    }
    public OVRLipSync(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        string BaseDirectory           = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", ".."));
        string ThirdPartyDirectory     = Path.Combine(BaseDirectory, "ThirdParty");
        string PlatformString          = Target.Platform.ToString();
        string LibraryDirectory        = Path.Combine(ThirdPartyDirectory, "Lib", PlatformString);
        string TargetBinariesDirectory = Path.Combine(BaseDirectory, "Binaries", PlatformString);

        PublicIncludePaths.Add(Path.Combine(ThirdPartyDirectory, "Include"));
        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "Voice" });

        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicAdditionalLibraries.Add(Path.Combine(LibraryDirectory, "OVRLipSyncShim.lib"));
            PublicDelayLoadDLLs.Add("OVRLipSync.dll");
            RuntimeDependencies.Add(Path.Combine(LibraryDirectory, "OVRLipSync.dll"), StagedFileType.NonUFS);
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.Add(Path.Combine(LibraryDirectory, "libOVRLipSyncShim.a"));
            RuntimeDependencies.Add(Path.Combine(LibraryDirectory, "libOVRLipSync.dylib"), StagedFileType.NonUFS);
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            string Android64Directory = Path.Combine(ThirdPartyDirectory, "Lib", "Android", "arm64-v8a");
            string Android32Directory = Path.Combine(ThirdPartyDirectory, "Lib", "Android", "armeabi-v7a");
            PublicSystemLibraryPaths.Add(LibraryDirectory);
            PublicSystemLibraryPaths.Add(Android32Directory);
            PublicSystemLibraryPaths.Add(Android64Directory);
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "OVRLipSync_APL.xml"));
            PublicAdditionalLibraries.Add(Path.Combine(Android32Directory, "libOVRLipSyncShim.a"));
            PublicAdditionalLibraries.Add(Path.Combine(Android64Directory, "libOVRLipSyncShim.a"));
        }
    }
Пример #12
0
    void WindowPlatformTargetRules(ReadOnlyTargetRules Target)
    {
        Console.WriteLine("Target.Platform is {0}", Target.Platform);
        bool IsWindows = false;

        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            IsWindows = true;
            Console.WriteLine("Target.Platform is Windows {0}", IsWindows);
        }
        if (!IsWindows)
        {
            return;
        }
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "QtCore"));
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "QtGui"));
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "QtWidgets"));
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "QtNetwork"));
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "QtSql"));
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "QtTextToSpeech"));
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include", "QtXml"));
        PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include"));

        Console.WriteLine("ThirdPartyPath is {0}", ThirdPartyPath);
        PublicSystemLibraryPaths.Add(Path.Combine(ThirdPartyPath, "lib"));

        DirectoryInfo dir = new DirectoryInfo(Path.Combine(ThirdPartyPath, "lib"));

        foreach (FileInfo dChild in dir.GetFiles("*.lib"))
        {
            //Console.WriteLine(dChild.Name);//打印文件名
            //PublicDelayLoadDLLs.Add(dChild.Name);
            //Console.WriteLine(dChild.FullName);//打印路径和文件名
            PublicSystemLibraries.Add(dChild.Name);
        }
        if (Target.Type == TargetType.Editor)
        {
            Console.WriteLine("Editor CopyBin File To ProjectBinariesPath = {0}", ProjectBinariesPath);
            Console.WriteLine("RelativeEnginePath is {0}", Assembly.GetExecutingAssembly());
            CopyDirectory(Path.Combine(ThirdPartyPath, "bin"), ProjectBinariesPath);
            //CopyDirectory(Path.Combine(ThirdPartyPath, "plugins"), ProjectBinariesPath);
        }
        if (Target.Type == TargetType.Game)
        {
            dir = new DirectoryInfo(Path.Combine(ThirdPartyPath, "bin"));
            foreach (FileInfo dChild in dir.GetFiles("*.dll"))
            {
                //Console.WriteLine("$(TargetOutputDir)/" + dChild.Name);//打印文件名
                //PublicDelayLoadDLLs.Add(dChild.Name);
                //Console.WriteLine(dChild.FullName);//打印路径和文件名
                RuntimeDependencies.Add("$(TargetOutputDir)/" + dChild.Name, "$(PluginDir)/ThirdParty/bin/" + dChild.Name);
            }
            string[] dirs = Directory.GetDirectories(Path.Combine(ThirdPartyPath, "plugins"));
            foreach (string dChildDir in dirs)
            {
                dir = new DirectoryInfo(dChildDir);
                Console.WriteLine(dir.Name);//打印文件名
                foreach (FileInfo dChild in dir.GetFiles("*.dll"))
                {
                    //Console.WriteLine("$(TargetOutputDir)/" + dir.Name + "/" + dChild.Name);//打印文件名
                    //RuntimeDependencies.Add("$(PluginDir)/ThirdParty/plugins/" + dir.Name + "/" + dChild.Name);
                    RuntimeDependencies.Add("$(TargetOutputDir)/" + dir.Name + "/" + dChild.Name, "$(PluginDir)/ThirdParty/plugins/" + dir.Name + "/" + dChild.Name);
                }
            }
        }
    }
Пример #13
0
    public AocePlugins(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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


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


        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core", "CoreUObject", "Projects", "Engine", "RHI", "RenderCore", "UMG", "SlateCore", "OpenGLDrv", "Json", "JsonUtilities",
            // ... add other public dependencies that you statically link with here ...
        }
            );


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


        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );
        CppStandard = CppStandardVersion.Cpp14;
        // 头文件
        PublicSystemIncludePaths.AddRange(new string[] { Path.Combine(ThirdPartyPath, "Aoce/win/include") });
        if (Target.Platform == UnrealTargetPlatform.Win64)
        {
            PublicDefinitions.Add("__ANDROID__=0");
            PublicDefinitions.Add("WIN32=1");
            string aocePath = Path.Combine(ThirdPartyPath, "Aoce/win");
            string libPath  = Path.Combine(aocePath, "lib");
            string binPath  = Path.Combine(aocePath, "bin");
            // 链接库
            PublicSystemLibraryPaths.Add(libPath);
            string[] runLibs = { "aoce", "aoce_talkto_cuda", "aoce_talkto", "aoce_vulkan_extra" };
            foreach (var runLib in runLibs)
            {
                PublicSystemLibraries.Add(runLib + ".lib");
                // 需要延迟加载的dll,不加的话,需把相应dll拷贝到工程的Binaries,否则编辑器到75%就因加载不了dll crash.
                PublicDelayLoadDLLs.Add(runLib + ".dll");
            }
            foreach (string path in Directory.GetFiles(binPath, "*.*", SearchOption.AllDirectories))
            {
                RuntimeDependencies.Add(path);
            }
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // PublicDependencyModuleNames.Add("OpenGLDrv");
            suffix = ".so";
            Definitions.Add("__ANDROID__=1");
            Definitions.Add("WIN32=0");
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "AocePlugins_APL.xml"));
            string aocePath = Path.Combine(ThirdPartyPath, "Aoce/android");
            // armeabi-v7a / arm64-v8a  Architecture
            string[] runAbis = { "arm64-v8a" };
            foreach (var runAbi in runAbis)
            {
                string libPath = Path.Combine(aocePath, runAbi);
                // 链接库
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "libaoce.so"));
                PublicAdditionalLibraries.Add(Path.Combine(libPath, "libaoce_talkto.so"));
            }
        }
    }
Пример #14
0
        public UnrealUSDWrapper(ReadOnlyTargetRules Target) : base(Target)
        {
            bUseRTTI = true;

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

            if (EnableUsdSdk(Target))
            {
                PublicDependencyModuleNames.Add("Python3");

                PublicDefinitions.Add("USE_USD_SDK=1");
                PublicDefinitions.Add("BOOST_LIB_TOOLSET=\"vc141\"");

                PublicIncludePaths.AddRange(
                    new string[] {
                    ModuleDirectory + "/../ThirdParty/USD/include",
                });

                var USDLibsDir = "";

                var EngineDir          = Path.GetFullPath(Target.RelativeEnginePath);
                var PythonSourceTPSDir = Path.Combine(EngineDir, "Source", "ThirdParty", "Python3");
                var PythonBinaryTPSDir = Path.Combine(EngineDir, "Binaries", "ThirdParty", "Python3");

                // Always use the official version of IntelTBB
                string IntelTBBLibs     = Target.UEThirdPartySourceDirectory + "Intel/TBB/IntelTBB-2019u8/lib/";
                string IntelTBBIncludes = Target.UEThirdPartySourceDirectory + "Intel/TBB/IntelTBB-2019u8/include/";

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

                    USDLibsDir = Path.Combine(ModuleDirectory, "../ThirdParty/USD/lib/");

                    var USDLibs = new string[]
                    {
                        "ar",
                        "arch",
                        "gf",
                        "js",
                        "kind",
                        "pcp",
                        "plug",
                        "sdf",
                        "tf",
                        "usd",
                        "usdGeom",
                        "usdLux",
                        "usdShade",
                        "usdSkel",
                        "usdUtils",
                        "vt",
                        "work",
                    };

                    foreach (string UsdLib in USDLibs)
                    {
                        PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib + ".lib"));
                    }
                    PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Win64/vc14/tbb.lib"));

                    PublicIncludePaths.Add(PythonSourceTPSDir + "/Win64/include");
                    PublicSystemLibraryPaths.Add(Path.Combine(EngineDir, "Source/ThirdParty/Python3/" + Target.Platform.ToString() + "/libs"));
                }
                else if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=0");                     // USD uses tbb malloc on Linux

                    USDLibsDir = Path.Combine(ModuleDirectory, "../../Binaries/Linux/", Target.Architecture);

                    var USDLibs = new string[]
                    {
                        "libar.so",
                        "libarch.so",
                        "libboost_python37.so",
                        "libgf.so",
                        "libjs.so",
                        "libkind.so",
                        "libndr.so",
                        "libpcp.so",
                        "libplug.so",
                        "libsdf.so",
                        "libsdr.so",
                        "libtf.so",
                        "libtrace.so",
                        "libusd.so",
                        "libusdGeom.so",
                        "libusdLux.so",
                        "libusdShade.so",
                        "libusdSkel.so",
                        "libusdUtils.so",
                        "libusdVol.so",
                        "libvt.so",
                        "libwork.so",
                    };

                    PublicSystemIncludePaths.Add(IntelTBBIncludes);
                    PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Linux/libtbb.so"));
                    RuntimeDependencies.Add("$(EngineDir)/Binaries/Linux/libtbb.so.2", Path.Combine(IntelTBBLibs, "Linux/libtbb.so.2"));
                    PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Linux/libtbbmalloc.so"));

                    foreach (string UsdLib in USDLibs)
                    {
                        PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib));
                    }

                    PublicSystemLibraryPaths.Add(Path.Combine(EngineDir, "Source/ThirdParty/Python3/" + Target.Platform.ToString() + "/lib"));
                }
                else if (Target.Platform == UnrealTargetPlatform.Mac)
                {
                    PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=0");

                    USDLibsDir = Path.Combine(ModuleDirectory, "../../Binaries/Mac/");

                    var USDLibs = new string[]
                    {
                        "libar",
                        "libarch",
                        "libboost_python37",
                        "libgf",
                        "libjs",
                        "libkind",
                        "libndr",
                        "libpcp",
                        "libplug",
                        "libsdf",
                        "libsdr",
                        "libtf",
                        "libusd",
                        "libusdGeom",
                        "libusdLux",
                        "libusdShade",
                        "libusdSkel",
                        "libusdUtils",
                        "libvt",
                        "libwork",
                    };

                    foreach (string UsdLib in USDLibs)
                    {
                        PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib + ".dylib"));
                    }

                    PublicAdditionalLibraries.Add(Path.Combine(PythonBinaryTPSDir, "Mac", "lib", "libpython3.7.dylib"));
                    PublicIncludePaths.Add(Path.Combine(PythonSourceTPSDir, "Mac", "include"));
                    PublicSystemLibraryPaths.Add(Path.Combine(PythonBinaryTPSDir, "Mac", "lib"));
                }

                PublicSystemLibraryPaths.Add(USDLibsDir);
            }
            else
            {
                PublicDefinitions.Add("USE_USD_SDK=0");
                PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=0");
            }
        }
Пример #15
0
    public VRPNLiveLink(ReadOnlyTargetRules Target) : base(Target)
    {
        bEnableExceptions = true;

        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicIncludePaths.AddRange
        (
            new string[]
        {
            "D:\\projects\\VRPN-Free-d.git\\submodules\\vrpn\\"
        }
        );


        PrivateIncludePaths.AddRange
        (
            new string[]
        {
            "D:\\projects\\VRPN-Free-d.git\\submodules\\vrpn\\"
        }
        );

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

        PrivateDependencyModuleNames.AddRange
        (
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            "InputCore",
            "Json",
            "JsonUtilities",
            "Networking",
            "Sockets",
        }
        );

        PublicSystemLibraryPaths.AddRange
        (
            new string[]
        {
            "D:\\projects\\VRPN-Free-d.git\\install\\Release-x64\\"
        }
        );

        PublicAdditionalLibraries.AddRange
        (
            new string[]
        {
            "quatlib.lib",
            "vrpn.lib"
        }
        );

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );
    }
Пример #16
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", "win64");
            string DLLPath       = Path.Combine(ThirdPartyPath, modio_directory, "bin", "win64");

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

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

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

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

            isLibrarySupported = true;

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

            PublicSystemLibraryPaths.Add(LibrariesPath);
            PublicSystemLibraryPaths.Add("modio");

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

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

            isLibrarySupported = true;

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

            PublicSystemLibraryPaths.Add(LibrariesPath);
            PublicSystemLibraryPaths.Add("modio");

            string ProjectBinariesDirectory = Path.Combine(ProjectPath, "Binaries", "Mac");
            if (!Directory.Exists(ProjectBinariesDirectory))
            {
                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 MuxyUnrealPlugin(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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


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


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


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

        System.Console.WriteLine(Path.Combine(ModuleDirectory, "Private/ThirdParty"));

        string BasePath = Path.Combine(ModuleDirectory, "Private/ThirdParty");

        PublicSystemLibraryPaths.Add(Path.Combine(ModuleDirectory, "Private/ThirdParty"));
        PublicAdditionalLibraries.Add(Path.Combine(BasePath, "Experimental.lib"));
        PublicAdditionalLibraries.Add(Path.Combine(BasePath, "websockets.lib"));
        PublicAdditionalLibraries.Add(Path.Combine(BasePath, "zlib.lib"));
        PublicAdditionalLibraries.Add(Path.Combine(BasePath, "libcrypto.lib"));
        PublicAdditionalLibraries.Add(Path.Combine(BasePath, "libssl.lib"));
        PublicAdditionalLibraries.Add(Path.Combine(BasePath, "libuv.lib"));
        PublicAdditionalLibraries.Add("crypt32.lib");
        PublicAdditionalLibraries.Add("Psapi.lib");
        PublicAdditionalLibraries.Add("Userenv.lib");

        DynamicallyLoadedModuleNames.AddRange(
            new string[]
        {
            // ... add any modules that your module loads dynamically here ...
        }
            );
    }
Пример #18
0
    public IJKPlayerUE(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);

        PublicIncludePaths.AddRange(
            new string[] {
            //"IJKPlayerUE/Public",
            Path.GetFullPath(Path.Combine(ModuleDirectory, "Public"))
        }
            );


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


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


        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "CoreUObject",
            "Engine",
            "Slate",
            "SlateCore",
            // ... 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.Android)
        {
            PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });

            string ArchDir = "armeabi-v7a";

            string LibDir = Path.GetFullPath(Path.Combine(ModuleDirectory, "../ThirdParty/IJKPlayerUELibrary/IJKPlayerLib/Android"));

            string LibPath = Path.Combine(LibDir, ArchDir);
            System.Console.WriteLine("--------------Android LibPath = " + LibPath);
            PublicSystemLibraryPaths.Add(LibPath);

            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "IJKPlayerUE_APL.xml"));
        }
    }
Пример #19
0
        public UnrealUSDWrapper(ReadOnlyTargetRules Target) : base(Target)
        {
            bEnableExceptions = false;
            bUseRTTI          = true;

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

            var EngineDir          = Path.GetFullPath(Target.RelativeEnginePath);
            var PythonSourceTPSDir = Path.Combine(EngineDir, "Source", "ThirdParty", "Python");

            if (Target.WindowsPlatform.Compiler != WindowsCompiler.Clang && Target.WindowsPlatform.StaticAnalyzer == WindowsStaticAnalyzer.None &&
                Target.CppStandard < CppStandardVersion.Cpp17 &&                            // Not currently compatible with C++17 due to old version of Boost
                Target.LinkType != TargetLinkType.Monolithic &&                             // If you want to use USD in a monolithic target, you'll have to use the ANSI allocator and remove this condition
                (Target.Platform != UnrealTargetPlatform.Linux || Target.bForceEnableRTTI)) // USD on Linux needs RTTI enabled for the whole editor
            {
                PublicDefinitions.Add("USE_USD_SDK=1");

                PublicIncludePaths.AddRange(
                    new string[] {
                    ModuleDirectory + "/../ThirdParty/USD/include",
                });

                var USDLibsDir = "";

                // Always use the official version of IntelTBB
                string IntelTBBLibs = Target.UEThirdPartySourceDirectory + "IntelTBB/IntelTBB-2019u8/lib/";

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

                    USDLibsDir = Path.Combine(ModuleDirectory, "../ThirdParty/USD/lib/");

                    var USDLibs = new string[]
                    {
                        "ar",
                        "arch",
                        "gf",
                        "js",
                        "kind",
                        "pcp",
                        "plug",
                        "sdf",
                        "tf",
                        "usd",
                        "usdGeom",
                        "usdLux",
                        "usdShade",
                        "usdSkel",
                        "usdUtils",
                        "vt",
                        "work",
                    };

                    foreach (string UsdLib in USDLibs)
                    {
                        PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib + ".lib"));
                    }
                    PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Win64/vc14/tbb.lib"));

                    PublicIncludePaths.Add(PythonSourceTPSDir + "/Win64/include");
                    PublicSystemLibraryPaths.Add(Path.Combine(EngineDir, "Source/ThirdParty/Python/" + Target.Platform.ToString() + "/libs"));
                }
                else if (Target.Platform == UnrealTargetPlatform.Linux)
                {
                    PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=0");                     // USD uses tbb malloc on Linux

                    USDLibsDir = Path.Combine(ModuleDirectory, "../../Binaries/Linux/", Target.Architecture);

                    var USDLibs = new string[]
                    {
                        "libar.so",
                        "libarch.so",
                        "libboost_python.so",
                        "libgf.so",
                        "libjs.so",
                        "libkind.so",
                        "libndr.so",
                        "libpcp.so",
                        "libplug.so",
                        "libsdf.so",
                        "libsdr.so",
                        "libtf.so",
                        "libtrace.so",
                        "libusd.so",
                        "libusdGeom.so",
                        "libusdLux.so",
                        "libusdShade.so",
                        "libusdSkel.so",
                        "libusdUtils.so",
                        "libusdVol.so",
                        "libvt.so",
                        "libwork.so",
                    };

                    PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Linux/libtbb.so"));
                    RuntimeDependencies.Add("$(EngineDir)/Binaries/Linux/libtbb.so.2", Path.Combine(IntelTBBLibs, "Linux/libtbb.so.2"));
                    PublicAdditionalLibraries.Add(Path.Combine(IntelTBBLibs, "Linux/libtbbmalloc.so"));

                    foreach (string UsdLib in USDLibs)
                    {
                        PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib));
                    }

                    PublicIncludePaths.Add(PythonSourceTPSDir + "/Linux/include/" + Target.Architecture);
                    PublicSystemLibraryPaths.Add(Path.Combine(EngineDir, "Source/ThirdParty/Python/" + Target.Platform.ToString() + "/lib"));
                }

                if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Linux)
                {
                    PublicSystemLibraryPaths.Add(USDLibsDir);
                }
                else
                {
                    System.Console.WriteLine("UnrealUSDWrapper does not support this platform");
                }
            }
            else
            {
                PublicDefinitions.Add("USE_USD_SDK=0");
                PublicDefinitions.Add("USD_USES_SYSTEM_MALLOC=0");                 // USD uses tbb malloc on Linux
            }
        }
Пример #20
0
        public UnrealUSDWrapper(ReadOnlyTargetRules Target) : base(Target)
        {
            bEnableExceptions = true;
            bUseRTTI          = true;

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

            var EngineDir          = Path.GetFullPath(Target.RelativeEnginePath);
            var PythonSourceTPSDir = Path.Combine(EngineDir, "Source", "ThirdParty", "Python");

            if (Target.WindowsPlatform.Compiler != WindowsCompiler.Clang && Target.WindowsPlatform.StaticAnalyzer == WindowsStaticAnalyzer.None &&
                Target.LinkType != TargetLinkType.Monolithic)                 // If you want to use USD in a monolithic target, you'll have to use the ANSI allocator and remove this condition
            {
                PublicDefinitions.Add("USE_USD_SDK=1");

                var USDLibsDir = Path.Combine(ModuleDirectory, "../ThirdParty/USD/lib/");
                var USDLibs    = new string[]
                {
                    "arch",
                    "gf",
                    "tf",
                    "kind",
                    "sdf",
                    "plug",
                    "js",
                    "work",
                    "vt",
                    "pcp",
                    "usd",
                    "usdShade",
                    "usdGeom",
                    "usdLux",
                    "usdSkel",
                    "usdUtils",
                };

                PublicIncludePaths.AddRange(
                    new string[] {
                    ModuleDirectory + "/../ThirdParty/USD/include",
                    PythonSourceTPSDir + "/Win64/include",
                });

                if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    foreach (string UsdLib in USDLibs)
                    {
                        PublicAdditionalLibraries.Add(Path.Combine(USDLibsDir, UsdLib + ".lib"));
                    }

                    PublicSystemLibraryPaths.Add(Path.Combine(EngineDir, "Source/ThirdParty/Python/Win64/libs"));
                    PublicSystemLibraryPaths.Add(USDLibsDir);
                }
                else
                {
                    System.Console.WriteLine("UnrealUSDWrapper does not support this platform");
                }
            }
            else
            {
                PublicDefinitions.Add("USE_USD_SDK=0");
            }
        }
    public UnrealEnginePython(TargetInfo Target)
#endif
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        PublicDefinitions.Add("WITH_UNREALENGINEPYTHON=1"); // fixed
        string enableUnityBuild = System.Environment.GetEnvironmentVariable("UEP_ENABLE_UNITY_BUILD");

        bUseUnity = string.IsNullOrEmpty(enableUnityBuild);

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


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


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


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


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


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

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

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

            string APLName    = "UnrealEnginePython_APL.xml";
            string RelAPLPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
            AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(RelAPLPath, APLName));
        }
#endif
    }
Пример #22
0
    public GoogleSTT(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

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


        PrivateIncludePaths.AddRange(
            new string[] {
            // ... add other private include paths required here ...
            Path.GetFullPath(Path.Combine(EngineDirectory, "Source/Runtime/AudioCaptureImplementations/AudioCaptureRtAudio/Private")),
        }
            );

        PublicSystemIncludePaths.AddRange(
            new string[] {
            SystemPath + "Include/10.0.18362.0/um",
            SystemPath + "Include/10.0.18362.0/shared",
        }
            );

        PublicSystemLibraryPaths.AddRange(
            new string[] {
            SystemPath + "Lib/10.0.18362.0/um/x64",
        }
            );

        PublicSystemLibraries.AddRange(
            new string[] {
            "Crypt32.Lib",
            "bcrypt.lib",
            "Winhttp.lib",
        }
            );

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


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


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

        PublicDefinitions.AddRange(
            new string[] {
            "CPPREST_FORCE_PPLX=0",
            "_WIN32_WINNT_VISTA=0",
        }
            );

        LoadThirdParty(Target);
    }
Пример #23
0
    public GameLiftServerSDK(ReadOnlyTargetRules Target) : base(Target)
    {
        PublicDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "Projects"
        }
            );


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


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

        // This is required to fix a warning for Unreal Engine 4.21 and later
        PrivatePCHHeaderFile = "Private/GameLiftServerSDKPrivatePCH.h";

        bEnableExceptions = true;

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

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

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

                    PublicSystemLibraryPaths.Add(SDKDirectory);
                    PublicAdditionalLibraries.Add(SDKLib);
                    RuntimeDependencies.Add(SDKLib);
                }
                else if (Target.Platform == UnrealTargetPlatform.Win64)
                {
                    PublicSystemLibraryPaths.Add(SDKDirectory);
                    PublicAdditionalLibraries.Add(System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.lib"));
                    PublicDelayLoadDLLs.Add("aws-cpp-sdk-gamelift-server.dll");
                    string SDKLibWindows = System.IO.Path.Combine(SDKDirectory, "aws-cpp-sdk-gamelift-server.dll");
                    RuntimeDependencies.Add(SDKLibWindows);
                }
            }
            else
            {
                PublicDefinitions.Add("WITH_GAMELIFT=0");
            }
        }
        else
        {
            PublicDefinitions.Add("WITH_GAMELIFT=0");
        }
    }