public TobiiInteractions(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

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

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

            PrivateIncludePaths.AddRange(new string[]
            {
                "TobiiInteractions/Public"
                , "TobiiInteractions/Public/Common"
                , "TobiiInteractions/Public/Desktop"
            });

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

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

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

                //Includes
                PrivateIncludePaths.Add(Path.Combine(PluginsPath, TobiiRelativeIncludePath));
            }
        }
        public TobiiCore(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

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

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

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

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

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

            //Platform specific
            if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
            {
                PublicDefinitions.Add("TOBII_EYETRACKING_ACTIVE=" + (IsEyetrackingActive ? 1 : 0));

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

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

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

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

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

                PublicDefinitions.Add("TOBII_GIC_RELATIVE_DLL_PATH=R\"(" + RelativeGICDllPath + ")\"");
                PublicDelayLoadDLLs.Add(GICDllName);
            }
            else
            {
                PublicDefinitions.Add("TOBII_EYETRACKING_ACTIVE=0");
            }
        }
Exemplo n.º 3
0
        public TobiiGTOM(ReadOnlyTargetRules Target) : base(Target)
        {
            PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

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

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

            PrivateIncludePaths.AddRange(new string[]
            {
                "TobiiGTOM/Public"
                , "TobiiGTOM/Public/GTOMAwareUI"
            });

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

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

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

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

                //Add libraries
                AddLibrary(Path.Combine(PluginsPath, TobiiRelativeLibraryBasePath, PlatformString, "tobii_g2om.lib"));

                //Add DLL
                string       RelativeG2OMDllPath = "";
                const string G2OMDllName         = "tobii_g2om.dll";

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

                PublicDefinitions.Add("TOBII_G2OM_RELATIVE_DLL_PATH=R\"(" + RelativeG2OMDllPath + ")\"");
                PublicDelayLoadDLLs.Add(G2OMDllName);

                PublicDefinitions.Add("TOBII_EYETRACKING_ACTIVE=1");
            }
            else
            {
                PublicDefinitions.Add("TOBII_EYETRACKING_ACTIVE=0");
            }
        }