2016-12-08 08:52:44 -05:00
|
|
|
|
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3020969)
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2986511 on 2016/05/23 by Ben.Marsh
UdpMessaging: Force references to symbols in the files containing UDP automated tests. Since plugins are compiled into static libraries before being linked into the executable, the linker will exclude any object files which don't have any referenced symbols. In non-unity builds, or adaptive unity builds with modified test files, this results in the tests not being linked in.
Change 2993274 on 2016/05/27 by Ben.Marsh
Fix UGS enumerating deleted .target.cs files when trying to detect editor target name.
Change 2994265 on 2016/05/31 by Ben.Marsh
Add info about setting up CIS integration and zipped editor builds in UGS.
Change 2994275 on 2016/05/31 by Ben.Marsh
PR #2443: [Unreal Game Sync] Added -project so shortcut or script can hint at the project file to open. (Contributed by paulevans)
Change 2994287 on 2016/05/31 by Ben.Marsh
UnrealGameSync: Add information about how UGS self-patches and updates.
Change 2996928 on 2016/06/01 by Ben.Marsh
UnrealGameSync: Fix trying to sync files which are open for branch or move/add. They don't exist on the server yet.
Change 2997619 on 2016/06/02 by Ben.Marsh
UAT: Fix PRX files not being remapped on PS4. All non-UFS should be allowed to be remapped, and UFS files can be if we're not using a PAK file.
Change 2999769 on 2016/06/03 by Ben.Marsh
UBT: Fix codepaths which assume that the current user account has a personal folder. The SYSTEM account (which Jenkins defaults to using) does not.
Change 3004879 on 2016/06/07 by Ben.Marsh
Remove copy of AWSSDK in NotForLicensees folder.
Change 3004902 on 2016/06/07 by Ben.Marsh
UAT: Switch MCP to use version of AWSSDK that's not in a NotForLicensees folder.
Change 3005892 on 2016/06/08 by Ben.Marsh
Add the GitHub promotion to the UE4 binary release build.
Change 3016241 on 2016/06/16 by Ben.Marsh
UGS: Always sync version files at the same changelist as everything else (rather than head revision)
Change 3016446 on 2016/06/16 by Ben.Marsh
PR #2279: Use MSBuild instead of DevEnv for solution builds (Contributed by FineRedMist)
Change 3016472 on 2016/06/16 by Ben.Marsh
PR #2442: pointing to the pull requests page of the repo (Contributed by KrishMunot)
Change 3017694 on 2016/06/17 by Ben.Marsh
EC: Produce an error if trying to sync back to a changelist more than 30 days before the most recent change. Meant to catch errors in entered CL fields from the dashboard. Can be overridden by specifying --allow-old-change in the build arguments.
Change 3017695 on 2016/06/17 by Ben.Marsh
UBT: Use a well defined order for parsing configuration files, rather than ignoring one file if another has a newer timestamp. Prevents confusing behavior where settings can be present, but are completely ignored. Now prioritizes the BuildConfiguration.xml file in the My Documents/Unreal Engine/UnrealBuildTool, followed by the one in AppData/Roaming/Unreal Engine/UnrealBuildTool. Both are added to the Config section of the solution if present, under different folders.
#jira UE-24271
Change 3017698 on 2016/06/17 by Ben.Marsh
Rename the <MsBuild> task to <CsCompile>, highlighting the fact that it only actually works on .csproj files (and not .sln files or other project types).
#jira UEB-664
Change 3017701 on 2016/06/17 by Ben.Marsh
BuildGraph: Relax a lot of the restrictions relating to using output tags from nodes. Output tags may contain an arbitrary set of files, including files which are also in other tags or produced by other nodes, but will not be written to temp storage more than once. The default tagged set of files for a node (eg. #MyNodeName) now includes all build products produced by that node.
Temp storage now separates the storing of build products from the tags which reference them. A TempStorageFileList object is written for each output tag, which includes a list of files as well as a list of the storage blocks referenced by it. When a node depends on a tag, the TempStorageFileList is read first and used to determine which storage blocks to read.
All tasks now have overloaded functions for returning the tags which they modify and/or reference, and errors are produced if an existing tag is modified, or referenced without being added as an input dependency.
Change 3017714 on 2016/06/17 by Ben.Marsh
BuildGraph: Allow specifying multiple tag names in the 'Tag' attribute of build tasks (or 'With' attribute of the 'Tag' task).
Change 3018007 on 2016/06/17 by Ben.Marsh
UBT: Add sections to the target receipt listing files which are required to build using precompiled binaries (as previously generated using -generateexternalfilelist), and runtime dependencies that may be required when using precompiled binaries but aren't actually required for the current target (which previously had to be specified through InstalledEngineFilters.ini). Tested by running UBT with arguments "UE4Game Win64 Development -precompile -xgeexport" and examining target receipt.
#jira UE-28761
Change 3018322 on 2016/06/17 by Ben.Marsh
PR #2518: Improvements for Clang on Windows (Contributed by Mattiwatti)
Change 3018365 on 2016/06/17 by Ben.Marsh
Misc: Fixes for warnings compiling ShaderCompileWorker on Clang
Change 3018397 on 2016/06/17 by Ben.Marsh
UnrealVS: Add an UnrealVS command to run a single-file-compile with UBT
Change 3019421 on 2016/06/20 by Ben.Marsh
Fix compilation of FreeType on Clang for Windows - there's an fttypes.h header already in the Windows SDK, so use a relative include path instead.
Change 3019423 on 2016/06/20 by Ben.Marsh
PR #2518: Improvements for Clang on Windows (Contributed by Mattiwatti)
Change 3020377 on 2016/06/20 by Ben.Marsh
UBT: Fix strings not being escaped before writing to JSON files.
Change 3020378 on 2016/06/20 by Ben.Marsh
UBT: Exclude precompiled files from the target receipt which are outside the engine and project directories. We don't need SDK libs being added to the precompile list.
Change 3020966 on 2016/06/21 by Ben.Marsh
EC: Allow scheduling builds at a certain offset past midnight, using the schedule formatted like "Every 20m from 04:00", and add scheduled builds of target platforms for dev streams every 4 hours. Also make the meaning of "Editor Only" and "Editor, Tools & Monolithics" build names consistent between Dev streams and Main, and add a new "Editor, Tools, Monolithics & DDC" build type includes additional DDC build for //UE4/Main.
#rb none
#lockdown Nick.Penwarden
[CL 3020980 by Ben Marsh in Main branch]
2016-06-21 09:17:49 -04:00
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
using System.ComponentModel.Design;
|
|
|
|
|
|
using Microsoft.VisualStudio;
|
|
|
|
|
|
using Microsoft.VisualStudio.Shell;
|
|
|
|
|
|
using Microsoft.VisualStudio.Shell.Interop;
|
|
|
|
|
|
using Microsoft.VisualStudio.OLE.Interop;
|
|
|
|
|
|
using EnvDTE;
|
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using EnvDTE80;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
|
|
namespace UnrealVS
|
|
|
|
|
|
{
|
|
|
|
|
|
class CompileSingleFile : IDisposable
|
|
|
|
|
|
{
|
|
|
|
|
|
const int CompileSingleFileButtonID = 0x1075;
|
|
|
|
|
|
|
|
|
|
|
|
System.Diagnostics.Process ChildProcess;
|
|
|
|
|
|
|
|
|
|
|
|
public CompileSingleFile()
|
|
|
|
|
|
{
|
|
|
|
|
|
CommandID CommandID = new CommandID( GuidList.UnrealVSCmdSet, CompileSingleFileButtonID );
|
|
|
|
|
|
MenuCommand CompileSingleFileButtonCommand = new MenuCommand( new EventHandler( CompileSingleFileButtonHandler ), CommandID );
|
|
|
|
|
|
UnrealVSPackage.Instance.MenuCommandService.AddCommand( CompileSingleFileButtonCommand );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
|
{
|
|
|
|
|
|
KillChildProcess();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CompileSingleFileButtonHandler( object Sender, EventArgs Args )
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!TryCompileSingleFile())
|
|
|
|
|
|
{
|
|
|
|
|
|
DTE DTE = UnrealVSPackage.Instance.DTE;
|
|
|
|
|
|
DTE.ExecuteCommand("Build.Compile");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KillChildProcess()
|
|
|
|
|
|
{
|
|
|
|
|
|
if(ChildProcess != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!ChildProcess.HasExited)
|
|
|
|
|
|
{
|
|
|
|
|
|
ChildProcess.Kill();
|
|
|
|
|
|
ChildProcess.WaitForExit();
|
|
|
|
|
|
}
|
|
|
|
|
|
ChildProcess.Dispose();
|
|
|
|
|
|
ChildProcess = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool TryCompileSingleFile()
|
|
|
|
|
|
{
|
|
|
|
|
|
DTE DTE = UnrealVSPackage.Instance.DTE;
|
|
|
|
|
|
|
|
|
|
|
|
// Activate the output window
|
|
|
|
|
|
Window Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
|
|
|
|
|
|
Window.Activate();
|
|
|
|
|
|
OutputWindow OutputWindow = Window.Object as OutputWindow;
|
|
|
|
|
|
|
|
|
|
|
|
// Try to find the 'Build' window
|
|
|
|
|
|
OutputWindowPane BuildOutputPane = null;
|
|
|
|
|
|
foreach(OutputWindowPane Pane in OutputWindow.OutputWindowPanes)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(Pane.Guid.ToUpperInvariant() == "{1BD8A850-02D1-11D1-BEE7-00A0C913D1F8}")
|
|
|
|
|
|
{
|
|
|
|
|
|
BuildOutputPane = Pane;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if(BuildOutputPane == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// If there's already a build in progress, offer to cancel it
|
|
|
|
|
|
if(ChildProcess != null && !ChildProcess.HasExited)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(MessageBox.Show("Cancel current compile?", "Compile in progress", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
|
|
|
|
|
{
|
|
|
|
|
|
KillChildProcess();
|
|
|
|
|
|
BuildOutputPane.OutputString("1> Build cancelled.\r\n");
|
|
|
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Check we've got a file open
|
|
|
|
|
|
if(DTE.ActiveDocument == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Grab the current startup project
|
|
|
|
|
|
IVsHierarchy ProjectHierarchy;
|
|
|
|
|
|
UnrealVSPackage.Instance.SolutionBuildManager.get_StartupProject(out ProjectHierarchy);
|
|
|
|
|
|
if (ProjectHierarchy == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
Project StartupProject = Utils.HierarchyObjectToProject(ProjectHierarchy);
|
|
|
|
|
|
if (StartupProject == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
Microsoft.VisualStudio.VCProjectEngine.VCProject VCStartupProject = StartupProject.Object as Microsoft.VisualStudio.VCProjectEngine.VCProject;
|
|
|
|
|
|
if(VCStartupProject == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Get the active configuration for the startup project
|
|
|
|
|
|
Configuration ActiveConfiguration = StartupProject.ConfigurationManager.ActiveConfiguration;
|
|
|
|
|
|
string ActiveConfigurationName = String.Format("{0}|{1}", ActiveConfiguration.ConfigurationName, ActiveConfiguration.PlatformName);
|
|
|
|
|
|
Microsoft.VisualStudio.VCProjectEngine.VCConfiguration ActiveVCConfiguration = VCStartupProject.Configurations.Item(ActiveConfigurationName);
|
|
|
|
|
|
if(ActiveVCConfiguration == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Get the NMake settings for this configuration
|
|
|
|
|
|
Microsoft.VisualStudio.VCProjectEngine.VCNMakeTool ActiveNMakeTool = ActiveVCConfiguration.Tools.Item("VCNMakeTool");
|
|
|
|
|
|
if(ActiveNMakeTool == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3125471)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3105904 on 2016/08/30 by Ben.Marsh
PR #2691: Copy .map-file to staging & cleanup (Contributed by projectgheist)
Change 3105974 on 2016/08/30 by Ben.Marsh
PR #2748: [Bug-Fix] UGS - Ensure older events do not trample newer ones (Contributed by paulevans)
Change 3106035 on 2016/08/30 by Ben.Marsh
PR #2746: [Bug-Fix] UGS - Starting build colour was the same as disabled (Contributed by paulevans)
Change 3106172 on 2016/08/30 by Ben.Marsh
UAT: Do not default to submitting build products from BuildCookRun unless -submit is explicitly specified on the command line.
#codreview Maciej.Mroz
Change 3107642 on 2016/08/31 by Matthew.Griffin
More Monolithic editor fixes
Fixed IMPLEMENT_MODULE macros with incorrect module name
Wrapped some usages of GIsHotReload in WITH_HOT_RELOAD
Fixed NiagaraConstants so that they can be used in multiple modules
Change 3107808 on 2016/08/31 by Matthew.Griffin
Added Node to Compile UAT on Mac to catch any Mono failures which will run as part of monolithics aggregate
Change 3111527 on 2016/09/02 by Matthew.Griffin
Duplicating CL#3111524 from Release-4.13 stream
Including Documentation/Extras in installed build
Change 3117683 on 2016/09/08 by Ben.Marsh
PR #2771: Fix compilation of C# projects on case-sensitive OSes (Contributed by slonopotamus)
Change 3119707 on 2016/09/09 by Ben.Marsh
UBT: Add more explicit methods for querying Visual C++ and Visual Studio installation directories. Now uses the same logic in the Visual Studio batch files.
Change 3120824 on 2016/09/12 by Ben.Marsh
UnrealGameSync: Add a project-wide option which can disable using the last code changelist for version files, and use the sync changelist instead. ("VersionToLastCodeChange" in the "[Options]" section). Update version to 1.80.
Change 3120996 on 2016/09/12 by Ben.Marsh
Core: Fix lines of output text from FMonitoredProcess being truncated at 512 characters, due to pipe buffer size. Accumulate incomplete lines and merge them together again instead. Also remove CR-LF pairs if they occur at the end of a line.
#jira UE-35659
Change 3121353 on 2016/09/12 by Ben.Marsh
Core: Manually enumerate and load dependent DLLs for modules by the editor, to work around limitations in the number of search paths checked by the Windows loader. We previously temporarily modified the PATH environment variable to provide this functionality, but are close to the OS limit for length of that string. This method should not have any such restrictions (though it will not work for circular dependencies).
Change 3121996 on 2016/09/12 by Ben.Marsh
Add support for Visual Studio 2017 (aka "15"; assuming consistent naming with other versions until final name is announced).
* Compiler, STL implementation and CRT are binary compatible with VS2015 (see https://blogs.msdn.microsoft.com/vcblog/2016/08/24/c1417-features-and-stl-fixes-in-vs-15-preview-4/), so no new third-party libraries needed so far. WindowsPlatform.GetVisualStudioCompilerVersionName() returns "2015" as a result.
* Default compiler for compiling and generating project files is still VS 2015 for now. Pass -2017 on the command line to GenerateProjectFiles.bat to generate VS2017 projects. Projects generated for VS2017 will use the 2017 compiler by default.
* Visual Studio source code accessor can talk to VS 2017 instances.
* Added a VS2017 configuration for UnrealVS, and added precompiled vsix package.
* Switched GetVSComnTools to check the SOFTWARE\Microsoft\VisualStudio\SxS\VS7 registry key rather than the individual product install registry key. "15" doesn't seem to have it's own "InstallDir" key, but this system seems to work for all versions of Visual Studio (including previous releases of VS Express).
* Removed ATL dependency from VisualStudioSourceCodeAccessor. It's not installed with VS by default any more, and is only used for a couple of smart pointer classes.
Tested running the editor and packaging TP_Flying for Win64. Packaging from the editor still defaults to using the 2015 compiler, so ConfigureToolchain() needs to be overriden from the .target.cs file if multiple Visual Studio versions are installed.
Change 3123144 on 2016/09/13 by Ben.Marsh
BuildGraph: Fix exception due to mismatched argument lists.
Change 3123160 on 2016/09/13 by Ben.Marsh
Linux: Make PLATFORM_SUPPORTS_JEMALLOC a globally defined macro rather than just defined by the jemalloc module. Core supplies a default value for this macro which is inconsistent unless your module has an explicit dependency on jemalloc.
Change 3123211 on 2016/09/13 by Ben.Marsh
UBT: Fix exception writing a version manifest if the output directory does not exist.
Change 3125300 on 2016/09/14 by Ben.Marsh
UnrealVS: Few fixes to single-file compile command.
* All documents are now saved before compile starts.
* Now gives a useful error when trying to compile non-cpp files, rather than falling back to the invalid default command handler.
* Trying to do a single-file compile while an existing build is running now prompts to stop it, rather than falling back to the default command handler (which gives a "Invalid command" message for makefile projects)
Change 3125437 on 2016/09/14 by Ben.Marsh
UnrealVS: Update version number to 1.43 in order to prevent installer from bailing unless existing version is uninstalled first.
[CL 3126342 by Ben Marsh in Main branch]
2016-09-15 08:33:13 -04:00
|
|
|
|
// Save all the open documents
|
|
|
|
|
|
DTE.ExecuteCommand("File.SaveAll");
|
|
|
|
|
|
|
|
|
|
|
|
// Check it's a cpp file
|
|
|
|
|
|
string FileToCompile = DTE.ActiveDocument.FullName;
|
|
|
|
|
|
if (!FileToCompile.EndsWith(".c", StringComparison.InvariantCultureIgnoreCase) && !FileToCompile.EndsWith(".cpp", StringComparison.InvariantCultureIgnoreCase))
|
|
|
|
|
|
{
|
|
|
|
|
|
MessageBox.Show("Invalid file extension for single-file compile.", "Invalid Extension", MessageBoxButtons.OK);
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// If there's already a build in progress, don't let another one start
|
|
|
|
|
|
if (DTE.Solution.SolutionBuild.BuildState == vsBuildState.vsBuildStateInProgress)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (MessageBox.Show("Cancel current compile?", "Compile in progress", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
|
|
|
|
|
{
|
|
|
|
|
|
DTE.ExecuteCommand("Build.Cancel");
|
|
|
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3020969)
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2986511 on 2016/05/23 by Ben.Marsh
UdpMessaging: Force references to symbols in the files containing UDP automated tests. Since plugins are compiled into static libraries before being linked into the executable, the linker will exclude any object files which don't have any referenced symbols. In non-unity builds, or adaptive unity builds with modified test files, this results in the tests not being linked in.
Change 2993274 on 2016/05/27 by Ben.Marsh
Fix UGS enumerating deleted .target.cs files when trying to detect editor target name.
Change 2994265 on 2016/05/31 by Ben.Marsh
Add info about setting up CIS integration and zipped editor builds in UGS.
Change 2994275 on 2016/05/31 by Ben.Marsh
PR #2443: [Unreal Game Sync] Added -project so shortcut or script can hint at the project file to open. (Contributed by paulevans)
Change 2994287 on 2016/05/31 by Ben.Marsh
UnrealGameSync: Add information about how UGS self-patches and updates.
Change 2996928 on 2016/06/01 by Ben.Marsh
UnrealGameSync: Fix trying to sync files which are open for branch or move/add. They don't exist on the server yet.
Change 2997619 on 2016/06/02 by Ben.Marsh
UAT: Fix PRX files not being remapped on PS4. All non-UFS should be allowed to be remapped, and UFS files can be if we're not using a PAK file.
Change 2999769 on 2016/06/03 by Ben.Marsh
UBT: Fix codepaths which assume that the current user account has a personal folder. The SYSTEM account (which Jenkins defaults to using) does not.
Change 3004879 on 2016/06/07 by Ben.Marsh
Remove copy of AWSSDK in NotForLicensees folder.
Change 3004902 on 2016/06/07 by Ben.Marsh
UAT: Switch MCP to use version of AWSSDK that's not in a NotForLicensees folder.
Change 3005892 on 2016/06/08 by Ben.Marsh
Add the GitHub promotion to the UE4 binary release build.
Change 3016241 on 2016/06/16 by Ben.Marsh
UGS: Always sync version files at the same changelist as everything else (rather than head revision)
Change 3016446 on 2016/06/16 by Ben.Marsh
PR #2279: Use MSBuild instead of DevEnv for solution builds (Contributed by FineRedMist)
Change 3016472 on 2016/06/16 by Ben.Marsh
PR #2442: pointing to the pull requests page of the repo (Contributed by KrishMunot)
Change 3017694 on 2016/06/17 by Ben.Marsh
EC: Produce an error if trying to sync back to a changelist more than 30 days before the most recent change. Meant to catch errors in entered CL fields from the dashboard. Can be overridden by specifying --allow-old-change in the build arguments.
Change 3017695 on 2016/06/17 by Ben.Marsh
UBT: Use a well defined order for parsing configuration files, rather than ignoring one file if another has a newer timestamp. Prevents confusing behavior where settings can be present, but are completely ignored. Now prioritizes the BuildConfiguration.xml file in the My Documents/Unreal Engine/UnrealBuildTool, followed by the one in AppData/Roaming/Unreal Engine/UnrealBuildTool. Both are added to the Config section of the solution if present, under different folders.
#jira UE-24271
Change 3017698 on 2016/06/17 by Ben.Marsh
Rename the <MsBuild> task to <CsCompile>, highlighting the fact that it only actually works on .csproj files (and not .sln files or other project types).
#jira UEB-664
Change 3017701 on 2016/06/17 by Ben.Marsh
BuildGraph: Relax a lot of the restrictions relating to using output tags from nodes. Output tags may contain an arbitrary set of files, including files which are also in other tags or produced by other nodes, but will not be written to temp storage more than once. The default tagged set of files for a node (eg. #MyNodeName) now includes all build products produced by that node.
Temp storage now separates the storing of build products from the tags which reference them. A TempStorageFileList object is written for each output tag, which includes a list of files as well as a list of the storage blocks referenced by it. When a node depends on a tag, the TempStorageFileList is read first and used to determine which storage blocks to read.
All tasks now have overloaded functions for returning the tags which they modify and/or reference, and errors are produced if an existing tag is modified, or referenced without being added as an input dependency.
Change 3017714 on 2016/06/17 by Ben.Marsh
BuildGraph: Allow specifying multiple tag names in the 'Tag' attribute of build tasks (or 'With' attribute of the 'Tag' task).
Change 3018007 on 2016/06/17 by Ben.Marsh
UBT: Add sections to the target receipt listing files which are required to build using precompiled binaries (as previously generated using -generateexternalfilelist), and runtime dependencies that may be required when using precompiled binaries but aren't actually required for the current target (which previously had to be specified through InstalledEngineFilters.ini). Tested by running UBT with arguments "UE4Game Win64 Development -precompile -xgeexport" and examining target receipt.
#jira UE-28761
Change 3018322 on 2016/06/17 by Ben.Marsh
PR #2518: Improvements for Clang on Windows (Contributed by Mattiwatti)
Change 3018365 on 2016/06/17 by Ben.Marsh
Misc: Fixes for warnings compiling ShaderCompileWorker on Clang
Change 3018397 on 2016/06/17 by Ben.Marsh
UnrealVS: Add an UnrealVS command to run a single-file-compile with UBT
Change 3019421 on 2016/06/20 by Ben.Marsh
Fix compilation of FreeType on Clang for Windows - there's an fttypes.h header already in the Windows SDK, so use a relative include path instead.
Change 3019423 on 2016/06/20 by Ben.Marsh
PR #2518: Improvements for Clang on Windows (Contributed by Mattiwatti)
Change 3020377 on 2016/06/20 by Ben.Marsh
UBT: Fix strings not being escaped before writing to JSON files.
Change 3020378 on 2016/06/20 by Ben.Marsh
UBT: Exclude precompiled files from the target receipt which are outside the engine and project directories. We don't need SDK libs being added to the precompile list.
Change 3020966 on 2016/06/21 by Ben.Marsh
EC: Allow scheduling builds at a certain offset past midnight, using the schedule formatted like "Every 20m from 04:00", and add scheduled builds of target platforms for dev streams every 4 hours. Also make the meaning of "Editor Only" and "Editor, Tools & Monolithics" build names consistent between Dev streams and Main, and add a new "Editor, Tools, Monolithics & DDC" build type includes additional DDC build for //UE4/Main.
#rb none
#lockdown Nick.Penwarden
[CL 3020980 by Ben Marsh in Main branch]
2016-06-21 09:17:49 -04:00
|
|
|
|
// Make sure any existing build is stopped
|
|
|
|
|
|
KillChildProcess();
|
|
|
|
|
|
|
|
|
|
|
|
// Set up the output pane
|
|
|
|
|
|
BuildOutputPane.Activate();
|
|
|
|
|
|
BuildOutputPane.Clear();
|
|
|
|
|
|
BuildOutputPane.OutputString(String.Format("1>------ Build started: Project: {0}, Configuration: {1} {2} ------\r\n", StartupProject.Name, ActiveConfiguration.ConfigurationName, ActiveConfiguration.PlatformName));
|
|
|
|
|
|
BuildOutputPane.OutputString(String.Format("1> Compiling {0}\r\n", FileToCompile));
|
|
|
|
|
|
|
|
|
|
|
|
// Set up event handlers
|
|
|
|
|
|
DTE.Events.BuildEvents.OnBuildBegin += BuildEvents_OnBuildBegin;
|
|
|
|
|
|
|
|
|
|
|
|
// Create a delegate for handling output messages
|
|
|
|
|
|
DataReceivedEventHandler OutputHandler = (Sender, Args) => { if(Args.Data != null) BuildOutputPane.OutputString("1> " + Args.Data + "\r\n"); };
|
|
|
|
|
|
|
|
|
|
|
|
// Spawn the new process
|
|
|
|
|
|
ChildProcess = new System.Diagnostics.Process();
|
|
|
|
|
|
ChildProcess.StartInfo.FileName = Path.Combine(Environment.SystemDirectory, "cmd.exe");
|
|
|
|
|
|
ChildProcess.StartInfo.Arguments = String.Format("/C {0} -singlefile=\"{1}\"", ActiveNMakeTool.BuildCommandLine, FileToCompile);
|
|
|
|
|
|
ChildProcess.StartInfo.WorkingDirectory = Path.GetDirectoryName(StartupProject.FullName);
|
|
|
|
|
|
ChildProcess.StartInfo.UseShellExecute = false;
|
|
|
|
|
|
ChildProcess.StartInfo.RedirectStandardOutput = true;
|
|
|
|
|
|
ChildProcess.StartInfo.RedirectStandardError = true;
|
|
|
|
|
|
ChildProcess.StartInfo.CreateNoWindow = true;
|
|
|
|
|
|
ChildProcess.OutputDataReceived += OutputHandler;
|
|
|
|
|
|
ChildProcess.ErrorDataReceived += OutputHandler;
|
|
|
|
|
|
ChildProcess.Start();
|
|
|
|
|
|
ChildProcess.BeginOutputReadLine();
|
|
|
|
|
|
ChildProcess.BeginErrorReadLine();
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void BuildEvents_OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
|
|
|
|
|
|
{
|
|
|
|
|
|
KillChildProcess();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|