public override void SetupDefaultGlobalEnvironment( TargetInfo Target, ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration, ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration ) { STBuildConfiguration.bCompileLeanAndMeanUE = true; // Do not include the editor STBuildConfiguration.bBuildEditor = false; STBuildConfiguration.bBuildWithEditorOnlyData = false; // Require cooked data STBuildConfiguration.bBuildRequiresCookedData = true; // Compile the engine STBuildConfiguration.bCompileAgainstEngine = true; // Tag it as a 'Game' build OutCPPEnvironmentConfiguration.Definitions.Add("UE_GAME=1"); // no exports, so no need to verify that a .lib and .exp file was emitted by the linker. OutLinkEnvironmentConfiguration.bHasExports = false; // Disable server code STBuildConfiguration.bWithServerCode = false; }
public override void SetupDefaultGlobalEnvironment( TargetInfo Target, ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration, ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration ) { STBuildConfiguration.bCompileLeanAndMeanUE = false; // Do not include the editor STBuildConfiguration.bBuildEditor = true; STBuildConfiguration.bBuildWithEditorOnlyData = true; // Require cooked data STBuildConfiguration.bBuildRequiresCookedData = false; // Compile the engine STBuildConfiguration.bCompileAgainstEngine = true; // Tag it as a 'Editor' build OutCPPEnvironmentConfiguration.Definitions.Add("UE_EDITOR=1"); }
public virtual void SetupDefaultGlobalEnvironment( TargetInfo Target, ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration, ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration ) { // Default does nothing }
/** Copy constructor. */ protected CPPEnvironment(CPPEnvironment InCopyEnvironment) { PrecompiledHeaderFile = InCopyEnvironment.PrecompiledHeaderFile; PrivateAssemblyDependencies.AddRange(InCopyEnvironment.PrivateAssemblyDependencies); SharedPCHHeaderFiles.AddRange(InCopyEnvironment.SharedPCHHeaderFiles); SharedPCHEnvironments.AddRange(InCopyEnvironment.SharedPCHEnvironments); bHackHeaderGenerator = InCopyEnvironment.bHackHeaderGenerator; Config = new CPPEnvironmentConfiguration(InCopyEnvironment.Config); }
/** Copy constructor. */ public CPPEnvironmentConfiguration(CPPEnvironmentConfiguration InCopyEnvironment) : base(InCopyEnvironment) { OutputDirectory = InCopyEnvironment.OutputDirectory; LocalShadowDirectory = InCopyEnvironment.LocalShadowDirectory; PCHHeaderNameInCode = InCopyEnvironment.PCHHeaderNameInCode; PrecompiledHeaderIncludeFilename = InCopyEnvironment.PrecompiledHeaderIncludeFilename; PrecompiledHeaderAction = InCopyEnvironment.PrecompiledHeaderAction; bForceIncludePrecompiledHeader = InCopyEnvironment.bForceIncludePrecompiledHeader; bUseRTTI = InCopyEnvironment.bUseRTTI; bFasterWithoutUnity = InCopyEnvironment.bFasterWithoutUnity; MinFilesUsingPrecompiledHeaderOverride = InCopyEnvironment.MinFilesUsingPrecompiledHeaderOverride; bEnableExceptions = InCopyEnvironment.bEnableExceptions; OptimizeCode = InCopyEnvironment.OptimizeCode; bCreateDebugInfo = InCopyEnvironment.bCreateDebugInfo; bIsBuildingLibrary = InCopyEnvironment.bIsBuildingLibrary; bIsBuildingDLL = InCopyEnvironment.bIsBuildingDLL; bUseStaticCRT = InCopyEnvironment.bUseStaticCRT; CLRMode = InCopyEnvironment.CLRMode; CPPIncludeInfo.IncludePaths.UnionWith(InCopyEnvironment.CPPIncludeInfo.IncludePaths); CPPIncludeInfo.SystemIncludePaths.UnionWith(InCopyEnvironment.CPPIncludeInfo.SystemIncludePaths); SystemDotNetAssemblyPaths.AddRange(InCopyEnvironment.SystemDotNetAssemblyPaths); FrameworkAssemblyDependencies.AddRange(InCopyEnvironment.FrameworkAssemblyDependencies); PrivateAssemblyDependencies.AddRange(InCopyEnvironment.PrivateAssemblyDependencies); Definitions.AddRange(InCopyEnvironment.Definitions); AdditionalArguments = InCopyEnvironment.AdditionalArguments; AdditionalFrameworks.AddRange(InCopyEnvironment.AdditionalFrameworks); }
private void PopulateTargets(List<string> GamePaths, List<XcodeProjectTarget> ProjectTargets, List<XcodeContainerItemProxy> ContainerItemProxies, List<XcodeTargetDependency> TargetDependencies, XcodeProjectTarget ProjectTarget, List<XcodeFramework> Frameworks) { foreach (string TargetPath in GamePaths) { string TargetName = Utils.GetFilenameWithoutAnyExtensions(Path.GetFileName(TargetPath)); bool WantProjectFileForTarget = true; bool IsEngineTarget = false; if (bGeneratingGameProjectFiles || bGeneratingRocketProjectFiles) { // Check to see if this is an Engine target. That is, the target is located under the "Engine" folder string TargetFileRelativeToEngineDirectory = Utils.MakePathRelativeTo(TargetPath, Path.Combine(EngineRelativePath), AlwaysTreatSourceAsDirectory: false); if (!TargetFileRelativeToEngineDirectory.StartsWith("..") && !Path.IsPathRooted(TargetFileRelativeToEngineDirectory)) { // This is an engine target IsEngineTarget = true; } if (IsEngineTarget) { if (!IncludeEngineSource) { // We were asked to exclude engine modules from the generated projects WantProjectFileForTarget = false; } if (bGeneratingGameProjectFiles && this.GameProjectName == TargetName) { WantProjectFileForTarget = true; } } } if (WantProjectFileForTarget) { string TargetFilePath; var Target = new TargetInfo(STTargetPlatform.Mac, STTargetConfiguration.Development); var TargetRulesObject = RulesCompiler.CreateTargetRules(TargetName, Target, false, out TargetFilePath); List<STTargetPlatform> SupportedPlatforms = new List<STTargetPlatform>(); TargetRulesObject.GetSupportedPlatforms(ref SupportedPlatforms); LinkEnvironmentConfiguration LinkConfiguration = new LinkEnvironmentConfiguration(); CPPEnvironmentConfiguration CPPConfiguration = new CPPEnvironmentConfiguration(); TargetRulesObject.SetupGlobalEnvironment(Target, ref LinkConfiguration, ref CPPConfiguration); if (!LinkConfiguration.bIsBuildingConsoleApplication) { TargetsThatNeedApp.Add(TargetName); } // if the project is not an engine project check to make sure we have the correct name string DisplayName = TargetName; if (!IsEngineTarget && TargetRulesObject.Type != TargetRules.TargetType.Program && TargetRulesObject.Type != TargetRules.TargetType.Client) { List<UProjectInfo> AllGames = UProjectInfo.FilterGameProjects(true, bGeneratingGameProjectFiles ? GameProjectName : null); UProjectInfo ProjectInfo = FindGameContainingFile(AllGames, TargetFilePath); if (ProjectInfo != null) { DisplayName = ProjectInfo.GameName; if (TargetName.Contains("Editor")) { DisplayName += "Editor"; } else if (TargetName.Contains("Server")) { DisplayName += "Server"; } } } // @todo: Remove target platform param and merge Mac and iOS targets. For now BuildTarget knows how to build iOS, but cannot run iOS apps, so we need separate DeployTarget. bool bIsMacOnly = !SupportedPlatforms.Contains(STTargetPlatform.IOS); XcodeProjectTarget BuildTarget = new XcodeProjectTarget(DisplayName + " - Mac", TargetName, XcodeTargetType.Legacy, TargetFilePath, "", STTargetPlatform.Mac, bIsMacOnly); if (!bGeneratingRunIOSProject) { ProjectTargets.Add(BuildTarget); } if (ProjectFilePlatform.HasFlag(XcodeProjectFilePlatform.iOS) && SupportedPlatforms.Contains(STTargetPlatform.IOS)) { if ((bGeneratingRocketProjectFiles && TargetName == "UE4Game") || bGeneratingRunIOSProject) { // Generate Framework references. List<XcodeFrameworkRef> FrameworkRefs = new List<XcodeFrameworkRef>(); foreach (XcodeFramework Framework in Frameworks) { FrameworkRefs.Add(new XcodeFrameworkRef(Framework)); } XcodeProjectTarget IOSDeployTarget = new XcodeProjectTarget(DisplayName + " - iOS", TargetName, XcodeTargetType.Native, TargetFilePath, TargetName + ".app", STTargetPlatform.IOS, false, null, true, FrameworkRefs); ProjectTargets.Add(IOSDeployTarget); } else { XcodeContainerItemProxy ContainerProxy = new XcodeContainerItemProxy(ProjectTarget.Guid, BuildTarget.Guid, BuildTarget.DisplayName); XcodeTargetDependency TargetDependency = new XcodeTargetDependency(BuildTarget.DisplayName, BuildTarget.Guid, ContainerProxy.Guid); XcodeProjectTarget IOSDeployTarget = new XcodeProjectTarget(DisplayName + " - iOS", TargetName, XcodeTargetType.Native, TargetFilePath, TargetName + ".app", STTargetPlatform.IOS, false, new List<XcodeTargetDependency>() { TargetDependency }, true); ProjectTargets.Add(IOSDeployTarget); ContainerItemProxies.Add(ContainerProxy); TargetDependencies.Add(TargetDependency); } } } } }