• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UnrealTargetConfiguration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: UEBuildServer

		public UEBuildServer(
			string InGameName, 
			UnrealTargetPlatform InPlatform, 
			UnrealTargetConfiguration InConfiguration,
			TargetRules InRulesObject,
			List<string> InAdditionalDefinitions, 
			string InRemoteRoot, 
			List<OnlyModule> InOnlyModules,
			bool bInEditorRecompile)
			// NOTE: If we're building a monolithic binary, then the game and engine code are linked together into one
			//       program executable, so we want the application name to be the game name.  In the case of a modular
			//       binary, we use 'UnrealEngine' for our application name
			: base(
				InAppName:UEBuildTarget.GetBinaryBaseName(InGameName, InRulesObject, InPlatform, InConfiguration, "Server"),
				InGameName:InGameName,
				InPlatform:InPlatform,
				InConfiguration:InConfiguration,
				InRulesObject: InRulesObject, 
				InAdditionalDefinitions:InAdditionalDefinitions,
				InRemoteRoot:InRemoteRoot,
				InOnlyModules:InOnlyModules,
				bInEditorRecompile: bInEditorRecompile
			)
		{
		}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:25,代码来源:UEBuildServer.cs


示例2: AddPluginToAgenda

    static void AddPluginToAgenda(UE4Build.BuildAgenda Agenda, string PluginFileName, PluginDescriptor Plugin, string TargetName, TargetRules.TargetType TargetType, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, List<string> ReceiptFileNames, string InAdditionalArgs)
    {
        // Find a list of modules that need to be built for this plugin
        List<string> ModuleNames = new List<string>();
        foreach(ModuleDescriptor Module in Plugin.Modules)
        {
            bool bBuildDeveloperTools = (TargetType == TargetRules.TargetType.Editor || TargetType == TargetRules.TargetType.Program);
            bool bBuildEditor = (TargetType == TargetRules.TargetType.Editor);
            if(Module.IsCompiledInConfiguration(Platform, TargetType, bBuildDeveloperTools, bBuildEditor))
            {
                ModuleNames.Add(Module.Name);
            }
        }

        // Add these modules to the build agenda
        if(ModuleNames.Count > 0)
        {
            string Arguments = String.Format("-plugin {0}", CommandUtils.MakePathSafeToUseWithCommandLine(PluginFileName));
            foreach(string ModuleName in ModuleNames)
            {
                Arguments += String.Format(" -module {0}", ModuleName);
            }

            string ReceiptFileName = BuildReceipt.GetDefaultPath(Path.GetDirectoryName(PluginFileName), TargetName, Platform, Configuration, "");
            Arguments += String.Format(" -receipt {0}", CommandUtils.MakePathSafeToUseWithCommandLine(ReceiptFileName));
            ReceiptFileNames.Add(ReceiptFileName);

            if(!String.IsNullOrEmpty(InAdditionalArgs))
            {
                Arguments += InAdditionalArgs;
            }

            Agenda.AddTarget(TargetName, Platform, Configuration, InAddArgs: Arguments);
        }
    }
开发者ID:mymei,项目名称:UE4,代码行数:35,代码来源:BuildPluginCommand.Automation.cs


示例3: UEBuildClient

        // NOTE: If we're building a monolithic binary, then the game and engine code are linked together into one
        //       program executable, so we want the application name to be the game name.  In the case of a modular
        //       binary, we use 'UnrealEngine' for our application name
        public UEBuildClient(
			string InGameName, 
			UnrealTargetPlatform InPlatform, 
			UnrealTargetConfiguration InConfiguration,
			TargetRules InRulesObject,
			List<string> InAdditionalDefinitions, 
			string InRemoteRoot, 
			List<OnlyModule> InOnlyModules)
            : base(InAppName: UEBuildTarget.GetBinaryBaseName(InGameName, InRulesObject, InPlatform, InConfiguration, "Client"),
                InGameName: InGameName,
                InPlatform: InPlatform,
                InConfiguration: InConfiguration,
                InRulesObject: InRulesObject,
                InAdditionalDefinitions: InAdditionalDefinitions,
                InRemoteRoot: InRemoteRoot,
                InOnlyModules: InOnlyModules)
        {
            if (ShouldCompileMonolithic())
            {
                if ((UnrealBuildTool.IsDesktopPlatform(Platform) == false) ||
                    (Platform == UnrealTargetPlatform.WinRT) ||
                    (Platform == UnrealTargetPlatform.WinRT_ARM))
                {
                    // We are compiling for a console...
                    // We want the output to go into the <GAME>\Binaries folder
                    if (InRulesObject.bOutputToEngineBinaries == false)
                    {
                        OutputPath = OutputPath.Replace("Engine\\Binaries", InGameName + "\\Binaries");
                    }
                }
            }
        }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:35,代码来源:UEBuildClient.cs


示例4: UEBuildEditor

        // NOTE: If we're building a monolithic binary, then the game and engine code are linked together into one
        //       program executable, so we want the application name to be the game name.  In the case of a modular
        //       binary, we use 'UnrealEngine' for our application name
        public UEBuildEditor(
			string InGameName, 
			UnrealTargetPlatform InPlatform, 
			UnrealTargetConfiguration InConfiguration,
			TargetRules InRulesObject,
			List<string> InAdditionalDefinitions, 
			string InRemoteRoot, 
			List<OnlyModule> InOnlyModules,
			bool bInEditorRecompile)
            : base(InAppName:UEBuildTarget.GetBinaryBaseName(
					InGameName, 
					InRulesObject, 
					InPlatform, 
					InConfiguration, 
					(InRulesObject.Type == TargetRules.TargetType.Editor) ? "Editor" : ""
					),
				InGameName:InGameName, 
				InPlatform:InPlatform, 
				InConfiguration:InConfiguration,
				InRulesObject: InRulesObject, 
				InAdditionalDefinitions:InAdditionalDefinitions, 
				InRemoteRoot:InRemoteRoot, 
				InOnlyModules:InOnlyModules,
				bInEditorRecompile: bInEditorRecompile)
        {
        }
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:29,代码来源:UEBuildEditor.cs


示例5: GetAPEXLibraryMode

	static APEXLibraryMode GetAPEXLibraryMode(UnrealTargetConfiguration Config)
	{
		switch (Config)
		{
			case UnrealTargetConfiguration.Debug:
                if (BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
                {
                    return APEXLibraryMode.Debug;
                }
                else
                {
                    return APEXLibraryMode.Checked;
                }
			case UnrealTargetConfiguration.Shipping:
			case UnrealTargetConfiguration.Test:
				return APEXLibraryMode.Shipping;
			case UnrealTargetConfiguration.Development:
			case UnrealTargetConfiguration.DebugGame:
			case UnrealTargetConfiguration.Unknown:
			default:
                if(BuildConfiguration.bUseShippingPhysXLibraries)
                {
                    return APEXLibraryMode.Shipping;
                }
                else if (BuildConfiguration.bUseCheckedPhysXLibraries)
                {
                    return APEXLibraryMode.Checked;
                }
                else
                {
                    return APEXLibraryMode.Profile;
                }
		}
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:34,代码来源:APEX.Build.cs


示例6: GetVisualStudioPlatformName

		/**
		 *	Return the VisualStudio platform name for this build platform
		 *	
		 *	@param	InPlatform			The UnrealTargetPlatform being built
		 *	@param	InConfiguration		The UnrealTargetConfiguration being built
		 *	
		 *	@return	string				The name of the platform that VisualStudio recognizes
		 */
		public override string GetVisualStudioPlatformName(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
		{
			if (InPlatform == UnrealTargetPlatform.WinRT)
			{
				return "WinRT";
			}
			return InPlatform.ToString();
		}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:16,代码来源:WinRTProjectGenerator.cs


示例7: ShouldCompileMonolithic

	public override bool ShouldCompileMonolithic(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
	{
		if (UnrealBuildTool.UnrealBuildTool.CommandLineContains("-monolithic") == true)
		{
			return true;
		}
		return false;
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:8,代码来源:ShaderCompileWorker.Target.cs


示例8: GenerateGamePlatformSpecificProperties

 /// <summary>
 /// Allow various platform project generators to generate any special project properties if required
 /// </summary>
 /// <param name="InPlatform"></param>
 /// <returns></returns>
 public static bool GenerateGamePlatformSpecificProperties(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration Configuration, TargetRules.TargetType TargetType, StringBuilder VCProjectFileContent, string RootDirectory, string TargetFilePath)
 {
     if (ProjectGeneratorDictionary.ContainsKey(InPlatform) == true)
     {
         ProjectGeneratorDictionary[InPlatform].GenerateGameProperties(Configuration, VCProjectFileContent, TargetType, RootDirectory, TargetFilePath); ;
     }
     return true;
 }
开发者ID:colwalder,项目名称:unrealengine,代码行数:13,代码来源:UEPlatformProjectGenerator.cs


示例9: GetStandardFileName

		/// <summary>
		/// Gets the standard path for an manifest
		/// </summary>
		/// <param name="DirectoryName">The directory containing this manifest</param>
		/// <param name="AppName">The modular app name being built</param>
		/// <param name="Configuration">The target configuration</param>
		/// <param name="Platform">The target platform</param>
		/// <param name="BuildArchitecture">The architecture of the target platform</param>
		/// <returns>Filename for the app receipt</returns>
		public static string GetStandardFileName(string AppName, UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, string BuildArchitecture, bool bIsGameDirectory)
		{
			string BaseName = AppName;
			if(Configuration != UnrealTargetConfiguration.Development && !(Configuration == UnrealTargetConfiguration.DebugGame && !bIsGameDirectory))
			{
				BaseName += String.Format("-{0}-{1}", Platform.ToString(), Configuration.ToString());
			}
			return String.Format("{0}{1}.modules", BaseName, BuildArchitecture);
		}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:18,代码来源:VersionManifest.cs


示例10: TargetInfo

		/// <summary>
		/// Constructs a TargetInfo
		/// </summary>
		/// <param name="InitPlatform">Target platform</param>
		/// <param name="InitConfiguration">Target build configuration</param>
		public TargetInfo( UnrealTargetPlatform InitPlatform, UnrealTargetConfiguration InitConfiguration )
		{
			Platform = InitPlatform;
			Configuration = InitConfiguration;

			// get the platform's architecture
			var BuildPlatform = UEBuildPlatform.GetBuildPlatform(Platform);
			Architecture = BuildPlatform.GetActiveArchitecture();
		}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:14,代码来源:RulesCompiler.cs


示例11: InstalledPlatformConfiguration

			public InstalledPlatformConfiguration(UnrealTargetConfiguration InConfiguration, UnrealTargetPlatform InPlatform, TargetRules.TargetType InPlatformType, string InArchitecture, string InRequiredFile, EProjectType InProjectType, bool bInCanBeDisplayed)
			{
				Configuration = InConfiguration;
				Platform = InPlatform;
				PlatformType = InPlatformType;
				Architecture = InArchitecture;
				RequiredFile = InRequiredFile;
				ProjectType = InProjectType;
				bCanBeDisplayed = bInCanBeDisplayed;
			}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:10,代码来源:InstalledPlatformInfo.cs


示例12: TargetInfo

		/// <summary>
		/// Constructs a TargetInfo
		/// </summary>
		/// <param name="InitPlatform">Target platform</param>
		/// <param name="InitConfiguration">Target build configuration</param>
		public TargetInfo( UnrealTargetPlatform InitPlatform, UnrealTargetConfiguration InitConfiguration, TargetRules.TargetType? InitType = null )
		{
			Platform = InitPlatform;
			Configuration = InitConfiguration;
			Type = InitType;

			// get the platform's architecture
			var BuildPlatform = UEBuildPlatform.GetBuildPlatform(Platform);
			Architecture = BuildPlatform.GetActiveArchitecture();
		}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:15,代码来源:RulesCompiler.cs


示例13: GetVisualStudioPathsEntries

        /**
         * Return any custom paths for VisualStudio this platform requires
         * This include ReferencePath, LibraryPath, LibraryWPath, IncludePath and ExecutablePath.
         *
         *	@param	InPlatform			The UnrealTargetPlatform being built
         *	@param	TargetType			The type of target (game or program)
         *
         *	@return	string				The custom path lines for the project file; Empty string if it doesn't require one
         */
        public override string GetVisualStudioPathsEntries(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration, TargetRules.TargetType TargetType, string TargetRulesPath, string ProjectFilePath, string NMakeOutputPath)
        {
            if (!IsNsightInstalled())
            {
                return base.GetVisualStudioPathsEntries(InPlatform, InConfiguration, TargetType, TargetRulesPath, ProjectFilePath, NMakeOutputPath);
            }

            // NOTE: We are intentionally overriding defaults for these paths with empty strings.  We never want Visual Studio's
            //       defaults for these fields to be propagated, since they are version-sensitive paths that may not reflect
            //       the environment that UBT is building in.  We'll set these environment variables ourselves!
            // NOTE: We don't touch 'ExecutablePath' because that would result in Visual Studio clobbering the system "Path"
            //       environment variable

            //@todo android: clean up debug path generation
            string GameName = Path.GetFileNameWithoutExtension(TargetRulesPath);
            GameName = Path.GetFileNameWithoutExtension(GameName);

            // intermediate path for Engine or Game's intermediate
            string IntermediateDirectoryPath;
            IntermediateDirectoryPath = Path.GetDirectoryName(NMakeOutputPath) + "/../../Intermediate/Android/APK";

            // string for <OverrideAPKPath>
            string APKPath = Path.Combine(
                Path.GetDirectoryName(NMakeOutputPath),
                Path.GetFileNameWithoutExtension(NMakeOutputPath) + "-armv7-es2.apk");

            // string for <BuildXmlPath> and <AndroidManifestPath>
            string BuildXmlPath = IntermediateDirectoryPath;
            string AndroidManifestPath = Path.Combine(IntermediateDirectoryPath, "AndroidManifest.xml");

            // string for <AdditionalLibraryDirectories>
            string AdditionalLibDirs = "";
            AdditionalLibDirs += IntermediateDirectoryPath + @"\obj\local\armeabi-v7a";
            AdditionalLibDirs += ";" + IntermediateDirectoryPath + @"\obj\local\x86";
            AdditionalLibDirs += @";$(AdditionalLibraryDirectories)";

            string PathsLines =
                "		<IncludePath />" + ProjectFileGenerator.NewLine +
                "		<ReferencePath />" + ProjectFileGenerator.NewLine +
                "		<LibraryPath />" + ProjectFileGenerator.NewLine +
                "		<LibraryWPath />" + ProjectFileGenerator.NewLine +
                "		<SourcePath />" + ProjectFileGenerator.NewLine +
                "		<ExcludePath />" + ProjectFileGenerator.NewLine +
                "		<AndroidAttach>False</AndroidAttach>" + ProjectFileGenerator.NewLine +
                "		<DebuggerFlavor>AndroidDebugger</DebuggerFlavor>" + ProjectFileGenerator.NewLine +
                "		<OverrideAPKPath>" + APKPath + "</OverrideAPKPath>" + ProjectFileGenerator.NewLine +
                "		<AdditionalLibraryDirectories>" + AdditionalLibDirs + "</AdditionalLibraryDirectories>" + ProjectFileGenerator.NewLine +
                "		<BuildXmlPath>" + BuildXmlPath + "</BuildXmlPath>" + ProjectFileGenerator.NewLine +
                "		<AndroidManifestPath>" + AndroidManifestPath + "</AndroidManifestPath>" + ProjectFileGenerator.NewLine;

            return PathsLines;
        }
开发者ID:colwalder,项目名称:unrealengine,代码行数:61,代码来源:AndroidProjectGenerator.cs


示例14: TargetInfo

		public TargetInfo(SerializationInfo Info, StreamingContext Context)
		{
			Platform = (UnrealTargetPlatform)Info.GetInt32("pl");
			Architecture = Info.GetString("ar");
			Configuration = (UnrealTargetConfiguration)Info.GetInt32("co");
			if (Info.GetBoolean("t?"))
			{
				Type = (TargetRules.TargetType)Info.GetInt32("tt");
			}
			if (Info.GetBoolean("m?"))
			{
				bIsMonolithic = Info.GetBoolean("mo");
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:14,代码来源:RulesCompiler.cs


示例15: GetPhysXLibraryMode

	static PhysXLibraryMode GetPhysXLibraryMode(UnrealTargetConfiguration Config)
	{
		switch (Config)
		{
			case UnrealTargetConfiguration.Debug:
				return PhysXLibraryMode.Debug;
			case UnrealTargetConfiguration.Shipping:
			case UnrealTargetConfiguration.Test:
				return PhysXLibraryMode.Shipping;
			case UnrealTargetConfiguration.Development:
			case UnrealTargetConfiguration.DebugGame:
			case UnrealTargetConfiguration.Unknown:
			default:
				return PhysXLibraryMode.Profile;
		}
	}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:16,代码来源:PhysX.Build.cs


示例16: UEBuildServer

        // NOTE: If we're building a monolithic binary, then the game and engine code are linked together into one
        //       program executable, so we want the application name to be the game name.  In the case of a modular
        //       binary, we use 'UnrealEngine' for our application name
        public UEBuildServer(
			string InGameName, 
			UnrealTargetPlatform InPlatform, 
			UnrealTargetConfiguration InConfiguration,
			TargetRules InRulesObject,
			List<string> InAdditionalDefinitions, 
			string InRemoteRoot, 
			List<OnlyModule> InOnlyModules)
            : base(InAppName:UEBuildTarget.GetBinaryBaseName(InGameName, InRulesObject, InPlatform, InConfiguration, "Server"),
				InGameName:InGameName,
				InPlatform:InPlatform,
				InConfiguration:InConfiguration,
				InRulesObject: InRulesObject, 
				InAdditionalDefinitions:InAdditionalDefinitions,
				InRemoteRoot:InRemoteRoot,
				InOnlyModules:InOnlyModules)
        {
        }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:21,代码来源:UEBuildServer.cs


示例17: UEBuildGame

		public UEBuildGame(
			string InGameName, 
			UnrealTargetPlatform InPlatform, 
			UnrealTargetConfiguration InConfiguration,
			TargetRules InRulesObject,
			List<string> InAdditionalDefinitions, 
			string InRemoteRoot, 
			List<OnlyModule> InOnlyModules,
			bool bInEditorRecompile)
			// NOTE: If we're building a monolithic binary, then the game and engine code are linked together into one
			//       program executable, so we want the application name to be the game name.  In the case of a modular
			//       binary, we use 'UnrealEngine' for our application name
			: base(
				InAppName: UEBuildTarget.GetBinaryBaseName(InGameName, InRulesObject, InPlatform, InConfiguration, ""),
				InGameName:InGameName,
				InPlatform:InPlatform,
				InConfiguration:InConfiguration,
				InRulesObject: InRulesObject, 
				InAdditionalDefinitions:InAdditionalDefinitions,
				InRemoteRoot:InRemoteRoot,
				InOnlyModules:InOnlyModules,
				bInEditorRecompile: bInEditorRecompile
			)
		{
			if (ShouldCompileMonolithic())
			{
				if ((UnrealBuildTool.IsDesktopPlatform(Platform) == false) ||
					(Platform == UnrealTargetPlatform.WinRT) ||
					(Platform == UnrealTargetPlatform.WinRT_ARM))
				{
					// We are compiling for a console...
					// We want the output to go into the <GAME>\Binaries folder
					if (InRulesObject.bOutputToEngineBinaries == false)
					{
						for (int Index = 0; Index < OutputPaths.Length; Index++)
						{
							OutputPaths[Index] = OutputPaths[Index].Replace("Engine\\Binaries", InGameName + "\\Binaries");
						}
					}
				}
			}
		}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:42,代码来源:UEBuildGame.cs


示例18: ShouldCompileMonolithic

 public override bool ShouldCompileMonolithic(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
 {
     return true;
 }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:4,代码来源:UnrealFileServer.Target.cs


示例19: WriteConfiguration

        // Anonymous function that writes project configuration data
        private void WriteConfiguration(string ProjectName, UnrealTargetConfiguration Configuration, UnrealTargetPlatform Platform, string TargetFilePath, TargetRules TargetRulesObject, StringBuilder VCProjectFileContent, StringBuilder VCUserFileContent)
        {
            UEPlatformProjectGenerator ProjGenerator = UEPlatformProjectGenerator.GetPlatformProjectGenerator(Platform, true);
            if (((ProjGenerator == null) && (Platform != UnrealTargetPlatform.Unknown)))
            {
                return;
            }

            string UProjectPath = "";
            bool bIsProjectTarget = UnrealBuildTool.HasUProjectFile() && Utils.IsFileUnderDirectory(TargetFilePath, UnrealBuildTool.GetUProjectPath());

            // @todo Rocket: HACK: Only use long project names on the UBT command-line for out-of-root projects for now.  We need to revisit all uses of HasUProjectFile and short names in general to fix this.
            if (bIsProjectTarget && !UnrealBuildTool.RunningRocket() && Utils.IsFileUnderDirectory(UnrealBuildTool.GetUProjectFile(), ProjectFileGenerator.RootRelativePath))
            {
                bIsProjectTarget = false;
            }

            if (bIsProjectTarget)
            {
                UProjectPath = "\"$(SolutionDir)$(SolutionName).uproject\"";
            }

            string ProjectConfigName = StubProjectConfigurationName;
            string ProjectPlatformName = StubProjectPlatformName;
            MakeProjectPlatformAndConfigurationNames(Platform, Configuration, TargetRulesObject.ConfigurationName, out ProjectPlatformName, out ProjectConfigName);
            var ConfigAndPlatformName = ProjectConfigName + "|" + ProjectPlatformName;
            string ConditionString = "Condition=\"'$(Configuration)|$(Platform)'=='" + ConfigAndPlatformName + "'\"";

            {
                VCProjectFileContent.Append(
                    "	<ImportGroup " + ConditionString + " Label=\"PropertySheets\">" + ProjectFileGenerator.NewLine +
                    "		<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />" + ProjectFileGenerator.NewLine +
                    "	</ImportGroup>" + ProjectFileGenerator.NewLine);

                VCProjectFileContent.Append(
                    "	<PropertyGroup " + ConditionString + ">" + ProjectFileGenerator.NewLine);

                if (IsStubProject)
                {
                    string ProjectRelativeUnusedDirectory = NormalizeProjectPath(Path.Combine(ProjectFileGenerator.EngineRelativePath, BuildConfiguration.BaseIntermediateFolder, "Unused"));

                    VCProjectFileContent.Append(
                        "		<OutDir></OutDir>" + ProjectFileGenerator.NewLine +
                        "		<IntDir>" + ProjectRelativeUnusedDirectory + Path.DirectorySeparatorChar + "</IntDir>" + ProjectFileGenerator.NewLine +
                        "		<NMakeBuildCommandLine/>" + ProjectFileGenerator.NewLine +
                        "		<NMakeReBuildCommandLine/>" + ProjectFileGenerator.NewLine +
                        "		<NMakeCleanCommandLine/>" + ProjectFileGenerator.NewLine +
                        "		<NMakeOutput/>" + ProjectFileGenerator.NewLine);
                }
                else
                {
                    string TargetName = Utils.GetFilenameWithoutAnyExtensions(TargetFilePath);
                    var UBTPlatformName = IsStubProject ? StubProjectPlatformName : Platform.ToString();
                    var UBTConfigurationName = IsStubProject ? StubProjectConfigurationName : Configuration.ToString();

                    // Setup output path
                    UEBuildPlatform BuildPlatform = UEBuildPlatform.GetBuildPlatform(Platform);

                    // Figure out if this is a monolithic build
                    bool bShouldCompileMonolithic = BuildPlatform.ShouldCompileMonolithicBinary(Platform);
                    bShouldCompileMonolithic |= TargetRulesObject.ShouldCompileMonolithic(Platform, Configuration);

                    // Get the output directory
                    string RootDirectory = Path.GetFullPath(ProjectFileGenerator.EngineRelativePath);
                    if ((TargetRules.IsAGame(TargetRulesObject.Type) || TargetRulesObject.Type == TargetRules.TargetType.Server) && bShouldCompileMonolithic && !TargetRulesObject.bOutputToEngineBinaries)
                    {
                        if (UnrealBuildTool.HasUProjectFile() && Utils.IsFileUnderDirectory(TargetFilePath, UnrealBuildTool.GetUProjectPath()))
                        {
                            RootDirectory = Path.GetFullPath(UnrealBuildTool.GetUProjectPath());
                        }
                        else
                        {
                            string UnrealProjectPath = UProjectInfo.GetProjectFilePath(ProjectName);
                            if (!String.IsNullOrEmpty(UnrealProjectPath))
                            {
                                RootDirectory = Path.GetDirectoryName(Path.GetFullPath(UnrealProjectPath));
                            }
                        }
                    }

                    // Get the output directory
                    string OutputDirectory = Path.Combine(RootDirectory, "Binaries", UBTPlatformName);

                    // Get the executable name (minus any platform or config suffixes)
                    string BaseExeName = TargetName;
                    if (!bShouldCompileMonolithic && TargetRulesObject.Type != TargetRules.TargetType.Program)
                    {
                        // Figure out what the compiled binary will be called so that we can point the IDE to the correct file
                        string TargetConfigurationName = TargetRulesObject.ConfigurationName;
                        if (TargetConfigurationName != TargetRules.TargetType.Game.ToString() && TargetConfigurationName != TargetRules.TargetType.RocketGame.ToString() && TargetConfigurationName != TargetRules.TargetType.Program.ToString())
                        {
                            BaseExeName = "UE4" + TargetConfigurationName;
                        }
                    }

                    // Make the output file path
                    string NMakePath = Path.Combine(OutputDirectory, BaseExeName);
                    if (Configuration != UnrealTargetConfiguration.Development && (Configuration != UnrealTargetConfiguration.DebugGame || bShouldCompileMonolithic))
                    {
//.........这里部分代码省略.........
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:101,代码来源:VCProject.cs


示例20: MakeProjectPlatformAndConfigurationNames

        /// <summary>
        /// Given a target platform and configuration, generates a platform and configuration name string to use in Visual Studio projects.
        /// Unlike with solution configurations, Visual Studio project configurations only support certain types of platforms, so we'll
        /// generate a configuration name that has the platform "built in", and use a default platform type
        /// </summary>
        /// <param name="Platform">Actual platform</param>
        /// <param name="Configuration">Actual configuration</param>
        /// <param name="TargetConfigurationName">The configuration name from the target rules, or null if we don't have one</param>
        /// <param name="ProjectPlatformName">Name of platform string to use for Visual Studio project</param>
        /// <param name="ProjectConfigurationName">Name of configuration string to use for Visual Studio project</param>
        public void MakeProjectPlatformAndConfigurationNames(UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration, string TargetConfigurationName, out string ProjectPlatformName, out string ProjectConfigurationName)
        {
            if (IsStubProject)
            {
                if (Platform != UnrealTargetPlatform.Unknown || Configuration != UnrealTargetConfiguration.Unknown)
                {
                    throw new BuildException("Stub project was expecting platform and configuration type to be set to Unknown");
                }
                ProjectPlatformName = StubProjectPlatformName;
                ProjectConfigurationName = StubProjectConfigurationName;
            }
            else
            {
                // If this is a C# project, then the project platform name must always be "Any CPU"
                if (this is VCSharpProjectFile)
                {
                    ProjectConfigurationName = Configuration.ToString();
                    ProjectPlatformName = VCProjectFileGenerator.DotNetPlatformName;
                }
                else
                {
                    var PlatformProjectGenerator = UEPlatformProjectGenerator.GetPlatformProjectGenerator(Platform, bInAllowFailure: true);

                    // Check to see if this platform is supported directly by Visual Studio projects.
                    bool HasActualVSPlatform = (PlatformProjectGenerator != null) ? PlatformProjectGenerator.HasVisualStudioSupport(Platform, Configuration) : false;

                    if (HasActualVSPlatform)
                    {
                        // Great!  Visual Studio supports this platform natively, so we don't need to make up
                        // a fake project configuration name.

                        // Allow the platform to specify the name used in VisualStudio.
                        // Note that the actual name of the platform on the Visual Studio side may be different than what
                        // UnrealBuildTool calls it (e.g. "Win64" -> "x64".) GetVisualStudioPlatformName() will figure this out.
                        ProjectConfigurationName = Configuration.ToString();
                        ProjectPlatformName = PlatformProjectGenerator.GetVisualStudioPlatformName(Platform, Configuration);
                    }
                    else
                    {
                        // Visual Studio doesn't natively support this platform, so we fake it by mapping it to
                        // a project configuration that has the platform name in that configuration as a suffix,
                        // and then using "Win32" as the actual VS platform name
                        ProjectConfigurationName = ProjectConfigurationNameOverride == "" ? Platform.ToString() + "_" + Configuration.ToString() : ProjectConfigurationNameOverride;
                        ProjectPlatformName = ProjectPlatformNameOverride == "" ? VCProjectFileGenerator.DefaultPlatformName : ProjectPlatformNameOverride;
                    }

                    if( !String.IsNullOrEmpty( TargetConfigurationName ) )
                    {
                        ProjectConfigurationName += "_" + TargetConfigurationName;
                    }
                }
            }
        }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:63,代码来源:VCProject.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UnrealTargetPlatform类代码示例发布时间:2022-05-24
下一篇:
C# Unpacker类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap