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


C# UnrealBuildTool.UEBuildTarget类代码示例

本文整理汇总了C#中UnrealBuildTool.UEBuildTarget的典型用法代码示例。如果您正苦于以下问题:C# UEBuildTarget类的具体用法?C# UEBuildTarget怎么用?C# UEBuildTarget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UEBuildTarget类属于UnrealBuildTool命名空间,在下文中一共展示了UEBuildTarget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Create

        /// <summary>
        /// Creates the cache object
        /// </summary>
        /// <param name="Target">The target to create the cache for</param>
        /// <returns>The new instance</returns>
        public static FlatCPPIncludeDependencyCache Create( UEBuildTarget Target )
        {
            string CachePath = FlatCPPIncludeDependencyCache.GetDependencyCachePathForTarget( Target );;

            // See whether the cache file exists.
            FileItem Cache = FileItem.GetItemByPath(CachePath);
            if (Cache.bExists)
            {
                if (BuildConfiguration.bPrintPerformanceInfo)
                {
                    Log.TraceInformation("Loading existing FlatCPPIncludeDependencyCache: " + Cache.AbsolutePath);
                }

                var TimerStartTime = DateTime.UtcNow;

                // Deserialize cache from disk if there is one.
                FlatCPPIncludeDependencyCache Result = Load(Cache);
                if (Result != null)
                {
                    var TimerDuration = DateTime.UtcNow - TimerStartTime;
                    if (BuildConfiguration.bPrintPerformanceInfo)
                    {
                        Log.TraceInformation("Loading FlatCPPIncludeDependencyCache took " + TimerDuration.TotalSeconds + "s");
                    }
                    return Result;
                }
            }

            // Fall back to a clean cache on error or non-existence.
            return new FlatCPPIncludeDependencyCache( Cache );
        }
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:36,代码来源:FlatCPPIncludeDepencencyCache.cs

示例2: SetUpEnvironment

		/// <summary>
		/// Setup the target environment for building
		/// </summary>
		/// <param name="InBuildTarget"> The target being built</param>
		public override void SetUpEnvironment(UEBuildTarget InBuildTarget)
		{
			if (GetActiveArchitecture() == "-win32")
				InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCMT");

			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_HTML5=1");
			if (InBuildTarget.GlobalCompileEnvironment.Config.Target.Architecture == "-win32")
			{
				InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_HTML5_WIN32=1");
				InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("delayimp.lib");
			}
			else
			{
				InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_HTML5_BROWSER=1");
			}

			// @todo needed?
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("UNICODE");
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("_UNICODE");
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_AUTOMATION_WORKER=0");
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("REQUIRES_ALIGNED_INT_ACCESS");
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_OGGVORBIS=1");
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("USE_SCENE_LOCK=0");
			BuildConfiguration.bDeployAfterCompile = true;

		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:30,代码来源:UEBuildHTML5.cs

示例3: PrepTargetForDeployment

        public override bool PrepTargetForDeployment(UEBuildTarget InTarget)
        {
            string InAppName = InTarget.AppName;
            Log.TraceInformation("Prepping {0} for deployment to {1}", InAppName, InTarget.Platform.ToString());
            System.DateTime PrepDeployStartTime = DateTime.UtcNow;

            string TargetFilename = RulesCompiler.GetTargetFilename(InAppName);
            string ProjectSourceFolder = new FileInfo(TargetFilename).DirectoryName + "/";

            string RelativeTargetDirectory;
            string EngineSourceRelativeBinaryPath;
            UWPProjectGenerator.GetTargetUWPPaths(InAppName, InTarget.Rules, out EngineSourceRelativeBinaryPath, out RelativeTargetDirectory);

            PrepForUATPackageOrDeploy(InAppName, InTarget.ProjectDirectory, InTarget.OutputPath, BuildConfiguration.RelativeEnginePath, false, "");

            // TODO - richiem - restore this if we find that it's needed.
            //Log.TraceInformation("...copying the CELL dll...");
            //string CELLPath = "../../../Engine/Source/" + UEBuildConfiguration.UEThirdPartySourceDirectory + "CELL/lib/win64/";
            //string CELLPathRelease = CELLPath + "Release/";
            //string CELLDllRelease = "CommonEventLoggingLibrary.dll";
            //string CELLPathDebug = CELLPath + "Debug/";
            //string CELLDllDebug = "CommonEventLoggingLibraryd.dll";

            //CopyFile(EngineSourceRelativeBinaryPath + CELLPathRelease + CELLDllRelease, EngineSourceRelativeBinaryPath + CELLDllRelease, true);
            //CopyFile(EngineSourceRelativeBinaryPath + CELLPathDebug + CELLDllDebug, EngineSourceRelativeBinaryPath + CELLDllDebug, true);

            //string XSAPIPath            = EngineSourceRelativeBinaryPath + "../../../Engine/Source/ThirdParty/XSAPI/lib/";
            //string XboxServicesConfig   = "xboxservices.config";
            //string DesktopLogin         = "DesktopLogin.exe";

            //Log.TraceInformation("...copying xboxservices.config");
            //CopyFile(XSAPIPath + XboxServicesConfig, EngineSourceRelativeBinaryPath + XboxServicesConfig, true);
            //Log.TraceInformation("...copying DesktopLogin.exe...");
            //CopyFile(XSAPIPath + DesktopLogin, EngineSourceRelativeBinaryPath + DesktopLogin, true);

            // TODO - richiem - restore this if we find that it's needed.
            //if (InTarget.Configuration == UnrealTargetConfiguration.Development)
            //{
            //    Log.TraceInformation("...copying AutoLogin...");
            //    string AutoLoginPath    = EngineSourceRelativeBinaryPath + "../../../Engine/Source/Tools/AutoLogin/";
            //    string AutoLoginDLL     = "AutoLogin.dll";
            //    string AutoLoginBat     = "AutoLogin.bat";
            //    CopyFile(AutoLoginPath + "bin/Debug/" + AutoLoginDLL, EngineSourceRelativeBinaryPath + AutoLoginDLL, true);
            //    CopyFile(AutoLoginPath + AutoLoginBat, EngineSourceRelativeBinaryPath + AutoLoginBat, true);
            //}

            // Log out the time taken to deploy...
            double PrepDeployDuration = (DateTime.UtcNow - PrepDeployStartTime).TotalSeconds;
            Log.TraceInformation("UWP deployment preparation took {0:0.00} seconds", PrepDeployDuration);

            return true;
        }
开发者ID:colwalder,项目名称:unrealengine,代码行数:52,代码来源:UWPDeploy.cs

示例4: SetUpEnvironment

        public override void SetUpEnvironment(UEBuildTarget InBuildTarget)
		{
			base.SetUpEnvironment(InBuildTarget);
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_TVOS=1");
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("__IPHONE_OS_VERSION_MIN_REQUIRED=__APPLETV_OS_VERSION_MIN_REQUIRED");

			// make sure we add Metal, in case base class got it wrong

			if (InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Contains("HAS_METAL=0"))
			{
				InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Remove("HAS_METAL=0");
				InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("HAS_METAL=1");
				InBuildTarget.ExtraModuleNames.Add("MetalRHI");
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:15,代码来源:UEBuildTVOS.cs

示例5: PrepTargetForDeployment

		public override bool PrepTargetForDeployment(UEBuildTarget InTarget)
		{
			if ((InTarget.TargetType != TargetRules.TargetType.Editor && InTarget.TargetType != TargetRules.TargetType.Program) && (BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Win32 || BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Win64))
			{
				string InAppName = InTarget.AppName;
				Log.TraceInformation("Prepping {0} for deployment to {1}", InAppName, InTarget.Platform.ToString());
				System.DateTime PrepDeployStartTime = DateTime.UtcNow;

				string TargetFilename = InTarget.RulesAssembly.GetTargetFileName(InAppName).FullName;
				string ProjectSourceFolder = new FileInfo(TargetFilename).DirectoryName + "/";

                PrepForUATPackageOrDeploy(InTarget.ProjectFile, InAppName, InTarget.ProjectDirectory.FullName, InTarget.OutputPath.FullName, BuildConfiguration.RelativeEnginePath, false, "", false);
			}
			return true;
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:15,代码来源:WindowsDeploy.cs

示例6: UHTManifest

        public bool UseRelativePaths; // Generate relative paths or absolute paths

        #endregion Fields

        #region Constructors

        public UHTManifest(bool InUseRelativePaths, UEBuildTarget Target, string InRootLocalPath, string InRootBuildPath, IEnumerable<UHTModuleInfo> ModuleInfo)
        {
            UseRelativePaths = InUseRelativePaths;
            RootLocalPath    = InRootLocalPath;
            RootBuildPath    = InRootBuildPath;

            Modules = ModuleInfo.Select(Info => new Module{
                Name                = Info.ModuleName,
                BaseDirectory       = Info.ModuleDirectory,
                OutputDirectory     = UEBuildModuleCPP.GetGeneratedCodeDirectoryForModule(Target, Info.ModuleDirectory, Info.ModuleName),
                ClassesHeaders      = Info.PublicUObjectClassesHeaders.Select((Header) => Header.AbsolutePath).ToList(),
                PublicHeaders       = Info.PublicUObjectHeaders       .Select((Header) => Header.AbsolutePath).ToList(),
                PrivateHeaders      = Info.PrivateUObjectHeaders      .Select((Header) => Header.AbsolutePath).ToList(),
                //@todo.Rocket: This assumes Engine/Source is a 'safe' folder name to check for
                SaveExportedHeaders = !UnrealBuildTool.RunningRocket() || !Info.ModuleDirectory.Contains("Engine\\Source\\")

            }).ToList();
        }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:24,代码来源:ExternalExecution.cs

示例7: Create

		/// <summary>
		/// Creates the cache object
		/// </summary>
		/// <param name="Target">The target to create the cache for</param>
		/// <returns>The new instance</returns>
		public static FlatCPPIncludeDependencyCache Create( UEBuildTarget Target )
		{
			string CachePath = FlatCPPIncludeDependencyCache.GetDependencyCachePathForTarget( Target );;

			// See whether the cache file exists.
			FileItem Cache = FileItem.GetItemByPath(CachePath);
			if (Cache.bExists)
			{
				if (BuildConfiguration.bPrintPerformanceInfo)
				{
					Log.TraceInformation("Loading existing FlatCPPIncludeDependencyCache: " + Cache.AbsolutePath);
				}

				var TimerStartTime = DateTime.UtcNow;

				// Deserialize cache from disk if there is one.
				FlatCPPIncludeDependencyCache Result = Load(Cache);
				if (Result != null)
				{
					var TimerDuration = DateTime.UtcNow - TimerStartTime;
					if (BuildConfiguration.bPrintPerformanceInfo)
					{
						Log.TraceInformation("Loading FlatCPPIncludeDependencyCache took " + TimerDuration.TotalSeconds + "s");
					}
					return Result;
				}
			}

			bool bIsBuilding = (ProjectFileGenerator.bGenerateProjectFiles == false ) && (BuildConfiguration.bXGEExport == false) && (UEBuildConfiguration.bGenerateManifest == false) && (UEBuildConfiguration.bGenerateExternalFileList == false) && (UEBuildConfiguration.bCleanProject == false);
			if( bIsBuilding && !UnrealBuildTool.bNeedsFullCPPIncludeRescan )
			{ 
				UnrealBuildTool.bNeedsFullCPPIncludeRescan = true;
				Log.TraceInformation( "Performing full C++ include scan (no include cache file)" );
			}

			// Fall back to a clean cache on error or non-existence.
			return new FlatCPPIncludeDependencyCache( Cache );
		}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:43,代码来源:FlatCPPIncludeDepencencyCache.cs

示例8: GeneratePathForTarget

 /// <summary>
 /// Generates a full path to action history file for the specified target.
 /// </summary>
 public static string GeneratePathForTarget(UEBuildTarget Target)
 {
     string Folder = null;
     if (Target.ShouldCompileMonolithic() || Target.Rules.Type == TargetRules.TargetType.Program)
     {
         // Monolithic configs and programs have their Action History stored in their respective project folders
         // or under engine intermediate folder + program name folder
         string RootDirectory = UnrealBuildTool.GetUProjectPath();
         if (String.IsNullOrEmpty(RootDirectory))
         {
             RootDirectory = Path.GetFullPath(BuildConfiguration.RelativeEnginePath);
         }
         Folder = Path.Combine(RootDirectory, BuildConfiguration.PlatformIntermediateFolder, Target.GetTargetName());
     }
     else
     {
         // Shared action history (unless this is a rocket target)
         Folder = UnrealBuildTool.RunningRocket() ?
             Path.Combine(UnrealBuildTool.GetUProjectPath(), BuildConfiguration.BaseIntermediateFolder) :
             BuildConfiguration.BaseIntermediatePath;
     }
     return Path.Combine(Folder, "ActionHistory.bin").Replace("\\", "/");
 }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:26,代码来源:ActionHistory.cs

示例9: UHTManifest

        public string TargetName; // Name of the target currently being compiled

        #endregion Fields

        #region Constructors

        public UHTManifest(UEBuildTarget Target, string InRootLocalPath, string InRootBuildPath, IEnumerable<UHTModuleInfo> ModuleInfo)
        {
            IsGameTarget  = TargetRules.IsGameType(Target.TargetType);
            RootLocalPath = InRootLocalPath;
            RootBuildPath = InRootBuildPath;
            TargetName    = Target.GetTargetName();

            Modules = ModuleInfo.Select(Info => new Module{
                Name                     = Info.ModuleName,
                ModuleType				 = Info.ModuleType,
                BaseDirectory            = Info.ModuleDirectory,
                IncludeBase              = Info.ModuleDirectory,
                OutputDirectory          = Path.GetDirectoryName( Info.GeneratedCPPFilenameBase ),
                ClassesHeaders           = Info.PublicUObjectClassesHeaders.Select((Header) => Header.AbsolutePath).ToList(),
                PublicHeaders            = Info.PublicUObjectHeaders       .Select((Header) => Header.AbsolutePath).ToList(),
                PrivateHeaders           = Info.PrivateUObjectHeaders      .Select((Header) => Header.AbsolutePath).ToList(),
                PCH                      = Info.PCH,
                GeneratedCPPFilenameBase = Info.GeneratedCPPFilenameBase,
                //@todo.Rocket: This assumes Engine/Source is a 'safe' folder name to check for
                SaveExportedHeaders = !UnrealBuildTool.RunningRocket() || !Info.ModuleDirectory.Contains("Engine\\Source\\")

            }).ToList();
        }
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:29,代码来源:ExternalExecution.cs

示例10: UHTManifest

        public string TargetName; // Name of the target currently being compiled

        #endregion Fields

        #region Constructors

        public UHTManifest(UEBuildTarget Target, string InRootLocalPath, string InRootBuildPath, IEnumerable<UHTModuleInfo> ModuleInfo)
        {
            IsGameTarget  = TargetRules.IsGameType(Target.TargetType);
            RootLocalPath = InRootLocalPath;
            RootBuildPath = InRootBuildPath;
            TargetName    = Target.GetTargetName();

            Modules = ModuleInfo.Select(Info => new Module
            {
                Name                     = Info.ModuleName,
                ModuleType				 = Info.ModuleType,
                BaseDirectory            = Info.ModuleDirectory,
                IncludeBase              = Info.ModuleDirectory,
                OutputDirectory          = Path.GetDirectoryName( Info.GeneratedCPPFilenameBase ),
                ClassesHeaders           = Info.PublicUObjectClassesHeaders.Select((Header) => Header.AbsolutePath).ToList(),
                PublicHeaders            = Info.PublicUObjectHeaders       .Select((Header) => Header.AbsolutePath).ToList(),
                PrivateHeaders           = Info.PrivateUObjectHeaders      .Select((Header) => Header.AbsolutePath).ToList(),
                PCH                      = Info.PCH,
                GeneratedCPPFilenameBase = Info.GeneratedCPPFilenameBase,
                SaveExportedHeaders      = !UnrealBuildTool.IsEngineInstalled() || !Utils.IsFileUnderDirectory(Info.ModuleDirectory, BuildConfiguration.RelativeEnginePath),
                UHTGeneratedCodeVersion = Info.GeneratedCodeVersion,
            }).ToList();
        }
开发者ID:colwalder,项目名称:unrealengine,代码行数:29,代码来源:ExternalExecution.cs

示例11: SetUpConfigurationEnvironment

        /**
         *	Setup the configuration environment for building
         *	
         *	@param	InBuildTarget		The target being built
         */
        public override void SetUpConfigurationEnvironment(UEBuildTarget InBuildTarget)
        {
            // Determine the C++ compile/link configuration based on the Unreal configuration.
            CPPTargetConfiguration CompileConfiguration;
            //@todo SAS: Add a true Debug mode!
            UnrealTargetConfiguration CheckConfig = InBuildTarget.Configuration;
            switch (CheckConfig)
            {
                default:
                case UnrealTargetConfiguration.Debug:
                    CompileConfiguration = CPPTargetConfiguration.Debug;
                    if( BuildConfiguration.bDebugBuildsActuallyUseDebugCRT )
                    { 
                        InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("_DEBUG=1"); // the engine doesn't use this, but lots of 3rd party stuff does
                    }
                    else
                    {
                        InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("NDEBUG=1"); // the engine doesn't use this, but lots of 3rd party stuff does
                    }
                    InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("UE_BUILD_DEBUG=1");
                    break;
                case UnrealTargetConfiguration.DebugGame:
                    // Default to Development; can be overriden by individual modules.
                case UnrealTargetConfiguration.Development:
                    CompileConfiguration = CPPTargetConfiguration.Development;
                    InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("NDEBUG=1"); // the engine doesn't use this, but lots of 3rd party stuff does
                    InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("UE_BUILD_DEVELOPMENT=1");
                    break;
                case UnrealTargetConfiguration.Shipping:
                    CompileConfiguration = CPPTargetConfiguration.Shipping;
                    InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("NDEBUG=1"); // the engine doesn't use this, but lots of 3rd party stuff does
                    InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("UE_BUILD_SHIPPING=1");
                    break;
                case UnrealTargetConfiguration.Test:
                    CompileConfiguration = CPPTargetConfiguration.Shipping;
                    InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("NDEBUG=1"); // the engine doesn't use this, but lots of 3rd party stuff does
                    InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("UE_BUILD_TEST=1");
                    break;
            }

            // Set up the global C++ compilation and link environment.
            InBuildTarget.GlobalCompileEnvironment.Config.Target.Configuration = CompileConfiguration;
            InBuildTarget.GlobalLinkEnvironment.Config.Target.Configuration    = CompileConfiguration;

            // Create debug info based on the heuristics specified by the user.
            InBuildTarget.GlobalCompileEnvironment.Config.bCreateDebugInfo =
                !BuildConfiguration.bDisableDebugInfo && ShouldCreateDebugInfo(InBuildTarget.Platform, CheckConfig);

            // NOTE: Even when debug info is turned off, we currently force the linker to generate debug info
            //       anyway on Visual C++ platforms.  This will cause a PDB file to be generated with symbols
            //       for most of the classes and function/method names, so that crashes still yield somewhat
            //       useful call stacks, even though compiler-generate debug info may be disabled.  This gives
            //       us much of the build-time savings of fully-disabled debug info, without giving up call
            //       data completely.
            InBuildTarget.GlobalLinkEnvironment.Config.bCreateDebugInfo = true;
        }
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:61,代码来源:UEBuildWindows.cs

示例12: AddPrerequisiteSourceFile

		protected void AddPrerequisiteSourceFile(UEBuildTarget Target, UEBuildPlatform BuildPlatform, CPPEnvironment CompileEnvironment, FileItem SourceFile, List<FileItem> PrerequisiteItems)
		{
			PrerequisiteItems.Add(SourceFile);

			RemoteToolChain RemoteThis = this as RemoteToolChain;
			bool bAllowUploading = RemoteThis != null && BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac;	// Don't use remote features when compiling from a Mac
			if (bAllowUploading)
			{
				RemoteThis.QueueFileForBatchUpload(SourceFile);
			}

			if (!BuildConfiguration.bUseUBTMakefiles)	// In fast build iteration mode, we'll gather includes later on
			{
				// @todo ubtmake: What if one of the prerequisite files has become missing since it was updated in our cache? (usually, because a coder eliminated the source file)
				//		-> Two CASES:
				//				1) NOT WORKING: Non-unity file went away (SourceFile in this context).  That seems like an existing old use case.  Compile params or Response file should have changed?
				//				2) WORKING: Indirect file went away (unity'd original source file or include).  This would return a file that no longer exists and adds to the prerequiteitems list
				List<FileItem> IncludedFileList = CPPEnvironment.FindAndCacheAllIncludedFiles(Target, SourceFile, BuildPlatform, CompileEnvironment.Config.CPPIncludeInfo, bOnlyCachedDependencies: BuildConfiguration.bUseUBTMakefiles);
				if (IncludedFileList != null)
				{
					foreach (FileItem IncludedFile in IncludedFileList)
					{
						PrerequisiteItems.Add(IncludedFile);

						if (bAllowUploading &&
							!BuildConfiguration.bUseUBTMakefiles)	// With fast dependency scanning, we will not have an exhaustive list of dependencies here.  We rely on PostCodeGeneration() to upload these files.
						{
							RemoteThis.QueueFileForBatchUpload(IncludedFile);
						}
					}
				}
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:33,代码来源:UEToolChain.cs

示例13: SetUpEnvironment

        /**
         *	Setup the target environment for building
         *	
         *	@param	InBuildTarget		The target being built
         */
        public override void SetUpEnvironment(UEBuildTarget InBuildTarget)
        {
            InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WIN32=1");

			// Should we enable Windows XP support
			if ((InBuildTarget.TargetType == TargetRules.TargetType.Program) && (GetCPPTargetPlatform(InBuildTarget.Platform) == CPPTargetPlatform.Win32))
			{
				// Check if the target has requested XP support.
				if (String.Equals(InBuildTarget.Rules.PreferredSubPlatform, "WindowsXP", StringComparison.InvariantCultureIgnoreCase))
				{
					SupportWindowsXP = true;
				}
			}

			if (WindowsPlatform.bUseWindowsSDK10 && WindowsPlatform.Compiler == WindowsCompiler.VisualStudio2015)
			{
				if (SupportWindowsXP)
				{
					throw new NotSupportedException("Windows XP support is not possible when targeting the Windows 10 SDK");
				}
				// Windows 8 or higher required
				InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("_WIN32_WINNT=0x0602");
				InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WINVER=0x0602");
			}
			else
			{
				if (SupportWindowsXP)
				{
					// Windows XP SP3 or higher required
					InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("_WIN32_WINNT=0x0502");
					InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WINVER=0x0502");
				}
				else
				{
					// Windows Vista or higher required
					InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("_WIN32_WINNT=0x0600");
					InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WINVER=0x0600");
				}
			}
			InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_WINDOWS=1");

            String MorpheusShaderPath = Path.Combine(BuildConfiguration.RelativeEnginePath, "Shaders/PS4/PostProcessHMDMorpheus.usf");
            //@todo: VS2015 currently does not have support for Morpheus
            if (File.Exists(MorpheusShaderPath) && WindowsPlatform.Compiler != WindowsCompiler.VisualStudio2015)
            {
                InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("HAS_MORPHEUS=1");                

				//on PS4 the SDK now handles distortion correction.  On PC we will still have to handle it manually,				
				InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("MORPHEUS_ENGINE_DISTORTION=1");				
            }

            if (InBuildTarget.Rules != null)
            {
                // Explicitly exclude the MS C++ runtime libraries we're not using, to ensure other libraries we link with use the same
                // runtime library as the engine.
				bool bUseDebugCRT = InBuildTarget.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT;
				if(!InBuildTarget.Rules.bUseStaticCRT || bUseDebugCRT)
				{
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCMT");
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCPMT");
				}
				if(!InBuildTarget.Rules.bUseStaticCRT || !bUseDebugCRT)
				{
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCMTD");
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCPMTD");
				}
				if (InBuildTarget.Rules.bUseStaticCRT || bUseDebugCRT)
				{
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("MSVCRT");
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("MSVCPRT");
				}
				if(InBuildTarget.Rules.bUseStaticCRT || !bUseDebugCRT)
				{
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("MSVCRTD");
					InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("MSVCPRTD");
				}
                InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBC");
                InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCP");
                InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCD");
                InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("LIBCPD");

                //@todo ATL: Currently, only VSAccessor requires ATL (which is only used in editor builds)
                // When compiling games, we do not want to include ATL - and we can't when compiling Rocket games
                // due to VS 2012 Express not including ATL.
                // If more modules end up requiring ATL, this should be refactored into a BuildTarget flag (bNeedsATL)
                // that is set by the modules the target includes to allow for easier tracking.
                // Alternatively, if VSAccessor is modified to not require ATL than we should always exclude the libraries.
                if (InBuildTarget.ShouldCompileMonolithic() && (InBuildTarget.Rules != null) &&
                    (TargetRules.IsGameType(InBuildTarget.TargetType)) && (TargetRules.IsEditorType(InBuildTarget.TargetType) == false))
                {
                    InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("atl");
                    InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("atls");
                    InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("atlsd");
                    InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("atlsn");
                    InBuildTarget.GlobalLinkEnvironment.Config.ExcludedLibraries.Add("atlsnd");
//.........这里部分代码省略.........
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:101,代码来源:UEBuildWindows.cs

示例14: CompileCPPFiles

		public override CPPOutput CompileCPPFiles(UEBuildTarget Target, CPPEnvironment CompileEnvironment, List<FileItem> SourceFiles, string ModuleName)
		{
			var Arguments = new StringBuilder();
			var PCHArguments = new StringBuilder();

			Arguments.Append(GetCompileArguments_Global(CompileEnvironment));

			if (CompileEnvironment.Config.PrecompiledHeaderAction == PrecompiledHeaderAction.Include)
			{
				// Add the precompiled header file's path to the include path so GCC can find it.
				// This needs to be before the other include paths to ensure GCC uses it instead of the source header file.
				var PrecompiledFileExtension = UEBuildPlatform.BuildPlatformDictionary[UnrealTargetPlatform.Mac].GetBinaryExtension(UEBuildBinaryType.PrecompiledHeader);
				PCHArguments.Append(" -include \"");
				PCHArguments.Append(CompileEnvironment.PrecompiledHeaderFile.AbsolutePath.Replace(PrecompiledFileExtension, ""));
				PCHArguments.Append("\"");
			}

			// Add include paths to the argument list.
			HashSet<string> AllIncludes = new HashSet<string>(CompileEnvironment.Config.CPPIncludeInfo.IncludePaths);
			AllIncludes.UnionWith(CompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths);
			foreach (string IncludePath in AllIncludes)
			{
				Arguments.Append(" -I\"");

				if (BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac)
				{
					Arguments.Append(ConvertPath(Path.GetFullPath(IncludePath)));

					// sync any third party headers we may need
					if (IncludePath.Contains("ThirdParty"))
					{
						string[] FileList = Directory.GetFiles(IncludePath, "*.h", SearchOption.AllDirectories);
						foreach (string File in FileList)
						{
							FileItem ExternalDependency = FileItem.GetItemByPath(File);
							LocalToRemoteFileItem(ExternalDependency, true);
						}

						FileList = Directory.GetFiles(IncludePath, "*.cpp", SearchOption.AllDirectories);
						foreach (string File in FileList)
						{
							FileItem ExternalDependency = FileItem.GetItemByPath(File);
							LocalToRemoteFileItem(ExternalDependency, true);
						}
					}
				}
				else
				{
					Arguments.Append(IncludePath);
				}

				Arguments.Append("\"");
			}

			foreach (string Definition in CompileEnvironment.Config.Definitions)
			{
				Arguments.Append(" -D\"");
				Arguments.Append(Definition);
				Arguments.Append("\"");
			}

			var BuildPlatform = UEBuildPlatform.GetBuildPlatformForCPPTargetPlatform(CompileEnvironment.Config.Target.Platform);

			CPPOutput Result = new CPPOutput();
			// Create a compile action for each source file.
			foreach (FileItem SourceFile in SourceFiles)
			{
				Action CompileAction = new Action(ActionType.Compile);
				string FileArguments = "";
				string Extension = Path.GetExtension(SourceFile.AbsolutePath).ToUpperInvariant();

				if (CompileEnvironment.Config.PrecompiledHeaderAction == PrecompiledHeaderAction.Create)
				{
					// Compile the file as a C++ PCH.
					FileArguments += GetCompileArguments_PCH();
				}
				else if (Extension == ".C")
				{
					// Compile the file as C code.
					FileArguments += GetCompileArguments_C();
				}
				else if (Extension == ".CC")
				{
					// Compile the file as C++ code.
					FileArguments += GetCompileArguments_CPP();
				}
				else if (Extension == ".MM")
				{
					// Compile the file as Objective-C++ code.
					FileArguments += GetCompileArguments_MM();
				}
				else if (Extension == ".M")
				{
					// Compile the file as Objective-C++ code.
					FileArguments += GetCompileArguments_M();
				}
				else
				{
					// Compile the file as C++ code.
					FileArguments += GetCompileArguments_CPP();
//.........这里部分代码省略.........
开发者ID:unrealengine47,项目名称:UnrealEngine4,代码行数:101,代码来源:MacToolChain.cs

示例15: FixBundleBinariesPaths

		public override void FixBundleBinariesPaths(UEBuildTarget Target, List<UEBuildBinary> Binaries)
		{
			base.FixBundleBinariesPaths(Target, Binaries);

			string BundleContentsPath = Target.OutputPath + ".app/Contents/";
			foreach (UEBuildBinary Binary in Binaries)
			{
				string BinaryFileName = Path.GetFileName(Binary.Config.OutputFilePath);
				if (BinaryFileName.EndsWith(".dylib"))
				{
					// Only dylibs from the same folder as the executable should be moved to the bundle. UE4Editor-*Game* dylibs and plugins will be loaded
					// from their Binaries/Mac folders.
					string DylibDir = Path.GetDirectoryName(Path.GetFullPath(Binary.Config.OutputFilePath));
					string ExeDir = Path.GetDirectoryName(Path.GetFullPath(Target.OutputPath));
					if (DylibDir.StartsWith(ExeDir))
					{
						// get the subdir, which is the DylibDir - ExeDir
						string SubDir = DylibDir.Replace(ExeDir, "");
						Binary.Config.OutputFilePaths[0] = BundleContentsPath + "MacOS" + SubDir + "/" + BinaryFileName;
					}
				}
				else if (!BinaryFileName.EndsWith(".a") && !Binary.Config.OutputFilePath.Contains(".app/Contents/MacOS/")) // Binaries can contain duplicates
				{
					Binary.Config.OutputFilePaths[0] += ".app/Contents/MacOS/" + BinaryFileName;
				}
			}
		}
开发者ID:unrealengine47,项目名称:UnrealEngine4,代码行数:27,代码来源:MacToolChain.cs


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