예제 #1
0
    public Moneytalks(TargetInfo Target)
    {
        PublicDependencyModuleNames.AddRange(
            new string[] {
            "Core",
            "Engine",
            "CoreUObject"
        }
            );
        //
        PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "../ThirdParty/Include"));
        PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "../ThirdParty/Include"));
        //
        switch (Target.Platform)
        {
        case UnrealTargetPlatform.Win32:
            PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "../ThirdParty/x86/RDFPMathLib.lib"));
            break;

        case UnrealTargetPlatform.Win64:
            PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "../ThirdParty/x64/RDFPMathLib.lib"));
            break;

        case UnrealTargetPlatform.PS4:
        case UnrealTargetPlatform.Mac:
        case UnrealTargetPlatform.IOS:
        case UnrealTargetPlatform.Linux:
        case UnrealTargetPlatform.HTML5:
        case UnrealTargetPlatform.Android:
        case UnrealTargetPlatform.XboxOne:
        default:
            throw new NotImplementedException("RDFPMathLib: Target platform is not supported by this Intel Math Library just yet: " + Target.Platform.ToString());
        }
        //
        if (Definitions.Contains("WITH_ANTI_CHEAT"))
        {
            PublicDependencyModuleNames.Add("SCUE4");
        }
    }
예제 #2
0
        // I/F
        public Screen CreateScreen(string screenName)
        {
            if (screenName == null)
            {
                throw new ArgumentNullException("screenName");
            }
            if (!Definitions.Contains(screenName))
            {
                throw new ArgumentException("Screen definition could not be found.", "screenName");
            }

            // 定義を取得します。
            var definition = Definitions[screenName];
            // Screen をインスタンス化します。
            var screen = CreateScreenInstance(definition);

            // プロパティをインスタンスに設定します。
            PopulateProperties(definition, screen);
            // インスタンスを初期化します。
            InitializeScreenInstance(definition, screen);

            return(screen);
        }
예제 #3
0
        public IToken NextToken()
        {
            IToken token = source.NextToken();

            if (token.Type == InferenceRules_ENLexer.NEWLINE)
            {
                string statement = statementBuffer.ToString();

                if (definitions.Contains(statement))
                {
                    htmlBuffer.Append("<font color='#006600'>");
                }
                else
                {
                    htmlBuffer.Append("<font color='#FF0000'>");
                }

                htmlBuffer.Append(statement).Append("</font>");

                htmlBuffer.Append("<br/>");
                statementBuffer = new StringBuilder();
            }
            else if (token.Type == InferenceRules_ENLexer.TAB)
            {
                htmlBuffer.Append("&nbsp;&nbsp;");
            }
            else
            {
                if ((token.Type == InferenceRules_ENLexer.RULE) ||
                    (token.Type == InferenceRules_ENLexer.FACT) ||
                    (token.Type == InferenceRules_ENLexer.QUERY))
                {
                    htmlBuffer.Append("<br/>");
                }

                if ((token.Type == InferenceRules_ENLexer.QUOTE) && (!inQuote))
                {
                    htmlBuffer.Append("<font color='#0000FF'>");
                    htmlBuffer.Append(token.Text);
                    inQuote = true;
                }
                else if ((token.Type == InferenceRules_ENLexer.QUOTE) && (inQuote))
                {
                    htmlBuffer.Append(token.Text);
                    htmlBuffer.Append("</font>");
                    inQuote = false;
                }
                else if (inQuote)
                {
                    htmlBuffer.Append(token.Text);
                }
                else if ((token.Type == InferenceRules_ENLexer.CHAR) ||
                         (token.Type == InferenceRules_ENLexer.SPACE) ||
                         (token.Type == InferenceRules_ENLexer.NUMERIC))
                {
                    statementBuffer.Append(token.Text);
                }
                else if ((token.Type == InferenceRules_ENLexer.COUNT) ||
                         (token.Type == InferenceRules_ENLexer.DEDUCT) ||
                         (token.Type == InferenceRules_ENLexer.FORGET) ||
                         (token.Type == InferenceRules_ENLexer.MODIFY))
                {
                    htmlBuffer.Append("<font color='#990066'><b>").Append(token.Text).Append(" ").Append("</b></font>");
                }
                else
                {
                    htmlBuffer.Append("<b>").Append(token.Text).Append(" ").Append("</b>");
                }
            }

            return(token);
        }
예제 #4
0
    public AkAudio(TargetInfo Target)
#endif

    {
        PCHUsage = PCHUsageMode.UseSharedPCHs;
        PrivateIncludePathModuleNames.Add("Settings");

        try
        {
            SwitchTargetPlatform = (UnrealTargetPlatform)Enum.Parse(typeof(UnrealTargetPlatform), "Switch");
        }
        catch (Exception)
        {
            SwitchTargetPlatform = UnrealTargetPlatform.Unknown;
        }

        try
        {
            VS2013Compiler = (WindowsCompiler)Enum.Parse(typeof(WindowsCompiler), "VisualStudio2013");
        }
        catch (Exception)
        {
            VS2013Compiler = (WindowsCompiler)(-1);
        }

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

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

        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "SlateCore",
            "NetworkReplayStreaming",
            "Projects",
        });

        string akDir            = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../ThirdParty"));
        string akPlatformLibDir = "";

        Definitions.Add("USE_AKAUDIO");

        PublicIncludePaths.AddRange(
            new string[] {
            // SDK includes
            Path.Combine(akDir, "include"),
            Path.Combine(akDir, "samples" + Path.DirectorySeparatorChar + "SoundEngine" + Path.DirectorySeparatorChar + "Common"),
            Path.Combine(akDir, "samples" + Path.DirectorySeparatorChar + "SoundEngine")
        }
            );

        // These definitions can be set as platform-specific.
        if (UEBuildConfiguration.bBuildEditor == true)
        {
            // Boost the number of IO for the editor, since it uses the old IO system
            Definitions.Add("AK_UNREAL_MAX_CONCURRENT_IO=256");
        }
        else
        {
            Definitions.Add("AK_UNREAL_MAX_CONCURRENT_IO=32");
        }

        Definitions.Add("AK_UNREAL_IO_GRANULARITY=32768");

        string samplesSoundEngineBasePath = Path.Combine(akDir, "samples" + Path.DirectorySeparatorChar + "SoundEngine");

        if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
            string VSVersion;
            if (WindowsPlatform.Compiler == VS2013Compiler)
            {
                VSVersion = "vc120";
            }
            else /*if(WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015)*/
            {
                VSVersion = "vc140";
            }

            akPlatformLibDir  = (Target.Platform == UnrealTargetPlatform.Win32) ? "Win32_" : "x64_";
            akPlatformLibDir += VSVersion;

            string LibFolder = (Target.Platform == UnrealTargetPlatform.Win32) ? "x86" : "x64";
            PublicLibraryPaths.Add("$(DXSDK_DIR)" + Path.DirectorySeparatorChar + "Lib" + Path.DirectorySeparatorChar + LibFolder);
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "Win32"));
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            string VSVersion = "vc140";

            // Use reflection because the GitHub version of UE is missing things.
            Type XboxOnePlatformType = System.Type.GetType("XboxOnePlatform", false);
            if (XboxOnePlatformType != null)
            {
                System.Reflection.FieldInfo XboxOneCompilerField = XboxOnePlatformType.GetField("Compiler");
                if (XboxOneCompilerField != null)
                {
                    var XboxOneCompilerValue = XboxOneCompilerField.GetValue(null);
                    if (XboxOneCompilerValue.ToString() == "VisualStudio2012")
                    {
                        VSVersion = "vc110";
                    }
                }
            }

            akPlatformLibDir = "XboxOne_" + VSVersion;
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "Win32"));
            Definitions.Add("_XBOX_ONE");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            akPlatformLibDir = "Linux_x64";
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "POSIX"));
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "Common"));
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            akPlatformLibDir = "Mac";
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "POSIX"));
        }
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            akPlatformLibDir = "iOS";
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "POSIX"));
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            akPlatformLibDir = "PS4";
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "PS4"));
            Definitions.Add("__ORBIS__");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            akPlatformLibDir = "android-9_armeabi-v7a";
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "Android"));
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "POSIX"));
            Definitions.Add("__ANDROID__");
        }
        else if (Target.Platform == SwitchTargetPlatform)
        {
            akPlatformLibDir = "NX64";
            PublicIncludePaths.Add(Path.Combine(samplesSoundEngineBasePath, "NX"));
            Definitions.Add("NN_NINTENDO_SDK");
        }

        if (Target.Platform == UnrealTargetPlatform.Win32 ||
            Target.Platform == UnrealTargetPlatform.Win64)
        {
            if (UEBuildConfiguration.bBuildEditor == true)
            {
                // Sound frame is required for enabling communication between Wwise Application and the unreal editor.
                // Not to be defined in shipping mode.
                Definitions.Add("AK_SOUNDFRAME");
            }

            PublicAdditionalLibraries.Add("dsound.lib");
            PublicAdditionalLibraries.Add("dxguid.lib");
            PublicAdditionalLibraries.Add("Msacm32.lib");
            PublicAdditionalLibraries.Add("XInput.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
        {
            PublicAdditionalLibraries.Add("AcpHal.lib");
            PublicAdditionalLibraries.Add("MMDevApi.lib");
        }
        else if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            PublicAdditionalLibraries.Add("SceAjm_stub_weak");
            PublicAdditionalLibraries.Add("SceAudio3d_stub_weak");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // We don't seem to need more libs for Android...
        }

        if (Target.Configuration == UnrealTargetConfiguration.Shipping)
        {
            Definitions.Add("AK_OPTIMIZED");
        }

        string akConfigurationDir;

        if (Target.Configuration == UnrealTargetConfiguration.Debug)
        {
            // change bDebugBuildsActuallyUseDebugCRT to true in BuildConfiguration.cs to actually link debug binaries
            if (!BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                akConfigurationDir = "Profile";
            }
            else
            {
                akConfigurationDir = "Debug";
            }
        }
        else if (Target.Configuration == UnrealTargetConfiguration.Development ||
                 Target.Configuration == UnrealTargetConfiguration.Test ||
                 Target.Configuration == UnrealTargetConfiguration.DebugGame)
        {
            akConfigurationDir = "Profile";
        }
        else // if (Target.Configuration == UnrealTargetConfiguration.Shipping)
        {
            akConfigurationDir = "Release";
        }

        if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            akConfigurationDir += "-iphoneos";
        }

        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            // No profiler support in the cross-compile toolchain.
            akConfigurationDir = "Release";
        }

        akLibPath = Path.Combine(Path.Combine(Path.Combine(akDir, akPlatformLibDir), akConfigurationDir), "lib");
        PublicLibraryPaths.Add(akLibPath);

        if (Target.Platform == UnrealTargetPlatform.Android)
        {
            // Toolchain will filter properly, add other Android arches here
            PublicLibraryPaths.Add(Path.Combine(Path.Combine(akDir, "android-9_x86"), akConfigurationDir));
        }

        AddWwiseLib(Target, "AkSoundEngine");
        AddWwiseLib(Target, "AkMemoryMgr");
        AddWwiseLib(Target, "AkStreamMgr");
        AddWwiseLib(Target, "AkMusicEngine");

        AddWwiseLib(Target, "AkVorbisDecoder");
        AddWwiseLib(Target, "AkSilenceSource");
        AddWwiseLib(Target, "AkSineSource");
        AddWwiseLib(Target, "AkToneSource");
        AddWwiseLib(Target, "AkPeakLimiterFX");
        AddWwiseLib(Target, "AkMatrixReverbFX");
        AddWwiseLib(Target, "AkParametricEQFX");
        AddWwiseLib(Target, "AkDelayFX");
        AddWwiseLib(Target, "AkExpanderFX");
        AddWwiseLib(Target, "AkFlangerFX");
        AddWwiseLib(Target, "AkCompressorFX");
        AddWwiseLib(Target, "AkGainFX");
        AddWwiseLib(Target, "AkHarmonizerFX");
        AddWwiseLib(Target, "AkTimeStretchFX");
        AddWwiseLib(Target, "AkPitchShifterFX");
        AddWwiseLib(Target, "AkStereoDelayFX");
        AddWwiseLib(Target, "AkMeterFX");
        AddWwiseLib(Target, "AkGuitarDistortionFX");
        AddWwiseLib(Target, "AkTremoloFX");
        AddWwiseLib(Target, "AkRoomVerbFX");
        AddWwiseLib(Target, "AkAudioInputSource");
        AddWwiseLib(Target, "AkSynthOne");
        AddWwiseLib(Target, "AkConvolutionReverbFX");
        AddWwiseLib(Target, "AkRecorderFX");

        if ((Target.Platform != UnrealTargetPlatform.Android) && (Target.Platform != UnrealTargetPlatform.Linux) && (Target.Platform != UnrealTargetPlatform.Mac) && (Target.Platform != UnrealTargetPlatform.IOS) && (Target.Platform != SwitchTargetPlatform))
        {
            AddWwiseLib(Target, "AkMotionGenerator");
            AddWwiseLib(Target, "AkRumble");
        }

        if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            AddWwiseLib(Target, "SceAudio3dEngine");
        }

        if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalFrameworks.Add(new UEBuildFramework("AudioUnit"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("AudioToolbox"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("CoreAudio"));
            AddWwiseLib(Target, "AkAACDecoder");
        }

        if (Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicAdditionalFrameworks.Add(new UEBuildFramework("AudioToolbox"));
            PublicAdditionalFrameworks.Add(new UEBuildFramework("CoreAudio"));
            AddWwiseLib(Target, "AkAACDecoder");
        }

        // Need to use Enum.Parse because Switch is not present in UE < 4.15
        if (Target.Platform == SwitchTargetPlatform)
        {
            AddWwiseLib(Target, "AkOpusDecoder");
        }

        if (Definitions.Contains("AK_OPTIMIZED") == false && Target.Platform != UnrealTargetPlatform.Linux)
        {
            AddWwiseLib(Target, "CommunicationCentral");
        }

        // SoundFrame libs
        if (Definitions.Contains("AK_SOUNDFRAME") == true)
        {
            PublicAdditionalLibraries.Add("SFLib.lib");
        }

        // If AK_SOUNDFRAME is defined, make UnrealEd a dependency
        if (UEBuildConfiguration.bBuildEditor == true)
        {
            PrivateDependencyModuleNames.Add("SlateCore");
            PrivateDependencyModuleNames.Add("Slate");
            PrivateDependencyModuleNames.Add("UnrealEd");
        }
    }