当前位置: 首页>>代码示例>>C#>>正文


C# CPPEnvironment.CompileRCFiles方法代码示例

本文整理汇总了C#中UnrealBuildTool.CPPEnvironment.CompileRCFiles方法的典型用法代码示例。如果您正苦于以下问题:C# CPPEnvironment.CompileRCFiles方法的具体用法?C# CPPEnvironment.CompileRCFiles怎么用?C# CPPEnvironment.CompileRCFiles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnrealBuildTool.CPPEnvironment的用法示例。


在下文中一共展示了CPPEnvironment.CompileRCFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Compile


//.........这里部分代码省略.........
                    LinkInputFiles.AddRange( ModuleCompileEnvironment.CompileFiles( CPPFilesToCompile, Name ).ObjectFiles );
                }
            }

            // Compile C files directly.
            LinkInputFiles.AddRange(ModuleCompileEnvironment.CompileFiles(CFiles, Name).ObjectFiles);

            // Compile CC files directly.
            LinkInputFiles.AddRange(ModuleCompileEnvironment.CompileFiles(CCFiles, Name).ObjectFiles);

            // Compile MM files directly.
            LinkInputFiles.AddRange(ModuleCompileEnvironment.CompileFiles(MMFiles, Name).ObjectFiles);

            // If we're building Rocket, generate a static library for this module
            if(RedistStaticLibraryPath != null)
            {
                // Create a link environment for it
                LinkEnvironment RedistLinkEnvironment = new LinkEnvironment();
                RedistLinkEnvironment.InputFiles.AddRange(LinkInputFiles);
                RedistLinkEnvironment.Config.TargetArchitecture = CompileEnvironment.Config.TargetArchitecture;
                RedistLinkEnvironment.Config.TargetConfiguration = CompileEnvironment.Config.TargetConfiguration;
                RedistLinkEnvironment.Config.TargetPlatform = CompileEnvironment.Config.TargetPlatform;
                RedistLinkEnvironment.Config.bIsBuildingDLL = false;
                RedistLinkEnvironment.Config.bIsBuildingLibrary = true;
                RedistLinkEnvironment.Config.IntermediateDirectory = Binary.Config.IntermediateDirectory;
                RedistLinkEnvironment.Config.OutputFilePath = RedistStaticLibraryPath;

                // Replace the items built so far with the library
                FileItem RedistLibrary = RedistLinkEnvironment.LinkExecutable(false);
                LinkInputFiles.Clear();
            }

            // Compile RC files.
            LinkInputFiles.AddRange(ModuleCompileEnvironment.CompileRCFiles(RCFiles).ObjectFiles);

            // Keep track of this module's public and private UObject source files, so that we can pass those off to UHT if needed
            {
                string ModuleSourceFolder = Path.GetFullPath( this.ModuleDirectory );
                var ModuleClassesSourceFolder = Path.Combine( ModuleSourceFolder, "Classes" );	// @todo uht: Want to deprecate this eventually
                foreach( var SourceFile in SourceFiles )
                {
                    // Will always be a cache hit (we did this earlier during Compile())
                    var IncludedFiles = ModuleCompileEnvironment.GetIncludeDependencies( SourceFile );

                    // Also check for intrinsic classes like "Object.h", which are special cases because they are never included in compiled code and exist only for UHT to parse
                    {
                        // Runtime/CoreUObject/Classes/Object.h
                        {
                            var IntrinsicFileItem = FileItem.GetExistingItemByPath( Path.Combine( ProjectFileGenerator.EngineRelativePath, "Source", "Runtime", Path.Combine( "CoreUObject", "Classes", "Object.h" ) ) );	// @todo uht: In Classes folder right now
                            if( !IntrinsicFileItem.bExists )
                            {
                                throw new BuildException( "Expecting " + IntrinsicFileItem.AbsolutePath + " to exist" );
                            }
                            IntrinsicFileItem.HasUObjects = true;
                            IncludedFiles.Add( IntrinsicFileItem );
                        }

                        // Runtime/Engine/Classes/Model.h
                        {
                            var IntrinsicFileItem = FileItem.GetExistingItemByPath( Path.Combine( ProjectFileGenerator.EngineRelativePath, "Source", "Runtime", Path.Combine( "Engine", "Classes", "Intrinsic", "Model.h" ) ) );	// @todo uht: In Classes folder right now
                            if( !IntrinsicFileItem.bExists )
                            {
                                throw new BuildException( "Expecting " + IntrinsicFileItem.AbsolutePath + " to exist" );
                            }
                            IntrinsicFileItem.HasUObjects = true;
                            IncludedFiles.Add( IntrinsicFileItem );
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:67,代码来源:UEBuildModule.cs


注:本文中的UnrealBuildTool.CPPEnvironment.CompileRCFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。