/** Copy constructor. */ protected LinkEnvironment(LinkEnvironment InCopyEnvironment) { InputFiles.AddRange(InCopyEnvironment.InputFiles); InputLibraries.AddRange(InCopyEnvironment.InputLibraries); Config = new LinkEnvironmentConfiguration(InCopyEnvironment.Config); }
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. */ public LinkEnvironmentConfiguration(LinkEnvironmentConfiguration InCopyEnvironment) : base(InCopyEnvironment) { OutputDirectory = InCopyEnvironment.OutputDirectory; IntermediateDirectory = InCopyEnvironment.IntermediateDirectory; LocalShadowDirectory = InCopyEnvironment.LocalShadowDirectory; OutputFilePaths = InCopyEnvironment.OutputFilePaths != null ? (string[])InCopyEnvironment.OutputFilePaths.Clone() : null; LibraryPaths.AddRange(InCopyEnvironment.LibraryPaths); ExcludedLibraries.AddRange(InCopyEnvironment.ExcludedLibraries); AdditionalLibraries.AddRange(InCopyEnvironment.AdditionalLibraries); Frameworks.AddRange(InCopyEnvironment.Frameworks); AdditionalShadowFiles.AddRange(InCopyEnvironment.AdditionalShadowFiles); AdditionalFrameworks.AddRange(InCopyEnvironment.AdditionalFrameworks); WeakFrameworks.AddRange(InCopyEnvironment.WeakFrameworks); AdditionalBundleResources.AddRange(InCopyEnvironment.AdditionalBundleResources); DelayLoadDLLs.AddRange(InCopyEnvironment.DelayLoadDLLs); AdditionalArguments = InCopyEnvironment.AdditionalArguments; bCreateDebugInfo = InCopyEnvironment.bCreateDebugInfo; CLRMode = InCopyEnvironment.CLRMode; bIsBuildingLibrary = InCopyEnvironment.bIsBuildingLibrary; bIsBuildingDLL = InCopyEnvironment.bIsBuildingDLL; bIsBuildingConsoleApplication = InCopyEnvironment.bIsBuildingConsoleApplication; bBuildAdditionalConsoleApplication = InCopyEnvironment.bBuildAdditionalConsoleApplication; WindowsEntryPointOverride = InCopyEnvironment.WindowsEntryPointOverride; bIsCrossReferenced = InCopyEnvironment.bIsCrossReferenced; bHasExports = InCopyEnvironment.bHasExports; bIsBuildingDotNetAssembly = InCopyEnvironment.bIsBuildingDotNetAssembly; }
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); } } } } }