Files
UnrealEngineUWP/Engine/Build/BatchFiles/RunUAT.bat
Ben Marsh 878ea7019e 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

151 lines
4.6 KiB
Batchfile

@echo off
setlocal
echo Running AutomationTool...
rem ## Unreal Engine 4 AutomationTool setup script
rem ## Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
rem ## This script is expecting to exist in the UE4/Engine/Build/BatchFiles directory. It will not work correctly
rem ## if you copy it to a different location and run it.
set UATExecutable=AutomationToolLauncher.exe
set UATDirectory=Binaries\DotNET\
set UATCompileArg=-compile
rem ## Change the CWD to /Engine.
pushd %~dp0..\..\
if not exist Build\BatchFiles\RunUAT.bat goto Error_BatchFileInWrongLocation
rem ## Use the pre-compiled UAT scripts if -nocompile is specified in the command line
for %%P in (%*) do if /I "%%P" == "-nocompile" goto RunPrecompiled
rem ## check for force precompiled
if not "%ForcePrecompiledUAT%"=="" goto RunPrecompiled
if not exist Source\Programs\AutomationTool\AutomationTool.csproj goto RunPrecompiled
if not exist Source\Programs\AutomationToolLauncher\AutomationToolLauncher.csproj goto RunPrecompiled
rem ## Check to see if we're already running under a Visual Studio environment shell
if not "%INCLUDE%" == "" if not "%LIB%" == "" goto ReadyToCompile
rem ## Check for Visual Studio 2017
for %%P in (%*) do if "%%P" == "-2015" goto NoVisualStudio2017Environment
for %%P in (%*) do if "%%P" == "-2013" goto NoVisualStudio2017Environment
pushd %~dp0
call GetVSComnToolsPath 15
popd
if "%VsComnToolsPath%" == "" goto NoVisualStudio2017Environment
rem ## Check if the C++ toolchain is not installed
if not exist "%VsComnToolsPath%/../IDE/VC/bin/x86_amd64/vcvarsx86_amd64.bat" goto NoVisualStudio2017Environment
call "%VsComnToolsPath%/../IDE/VC/bin/x86_amd64/vcvarsx86_amd64.bat" >NUL
goto ReadyToCompile
rem ## Check for Visual Studio 2015
:NoVisualStudio2017Environment
for %%P in (%*) do if "%%P" == "-2013" goto NoVisualStudio2015Environment
pushd %~dp0
call GetVSComnToolsPath 14
popd
if "%VsComnToolsPath%" == "" goto NoVisualStudio2015Environment
rem ## Check if the C++ toolchain is not installed
if not exist "%VsComnToolsPath%/../../VC/bin/x86_amd64/vcvarsx86_amd64.bat" goto NoVisualStudio2015Environment
call "%VsComnToolsPath%/../../VC/bin/x86_amd64/vcvarsx86_amd64.bat" >NUL
goto ReadyToCompile
rem ## Check for Visual Studio 2013
:NoVisualStudio2015Environment
pushd %~dp0
call GetVSComnToolsPath 12
popd
if "%VsComnToolsPath%" == "" goto NoVisualStudio2013Environment
call "%VsComnToolsPath%/../../VC/bin/x86_amd64/vcvarsx86_amd64.bat" >NUL
goto ReadyToCompile
rem ## Check for Visual Studio 2013
pushd %~dp0
call GetVSComnToolsPath 12
popd
if "%VsComnToolsPath%" == "" goto NoVisualStudio2013Environment
call "%VsComnToolsPath%/../../VC/bin/x86_amd64/vcvarsx86_amd64.bat" >NUL
goto ReadyToCompile
:NoVisualStudio2013Environment
rem ## ok, well it doesn't look like visual studio is installed, let's try running the precompiled one.
:RunPrecompiled
if not exist Binaries\DotNET\AutomationTool.exe goto Error_NoFallbackExecutable
set UATCompileArg=
if not exist Binaries\DotNET\AutomationToolLauncher.exe set UATExecutable=AutomationTool.exe
goto DoRunUAT
:ReadyToCompile
msbuild /nologo /verbosity:quiet Source\Programs\AutomationToolLauncher\AutomationToolLauncher.csproj /property:Configuration=Development /property:Platform=AnyCPU
if not %ERRORLEVEL% == 0 goto Error_UATCompileFailed
msbuild /nologo /verbosity:quiet Source\Programs\AutomationTool\AutomationTool.csproj /property:Configuration=Development /property:Platform=AnyCPU /property:AutomationToolProjectOnly=true
if not %ERRORLEVEL% == 0 goto Error_UATCompileFailed
rem ## Run AutomationTool
:DoRunUAT
pushd %UATDirectory%
%UATExecutable% %* %UATCompileArg%
if not %ERRORLEVEL% == 0 goto Error_UATFailed
popd
rem ## Success!
goto Exit
:Error_BatchFileInWrongLocation
echo RunUAT.bat ERROR: The batch file does not appear to be located in the /Engine/Build/BatchFiles directory. This script must be run from within that directory.
set RUNUAT_EXITCODE=1
goto Exit_Failure
:Error_NoVisualStudioEnvironment
echo RunUAT.bat ERROR: A valid version of Visual Studio 2015 does not appear to be installed.
set RUNUAT_EXITCODE=1
goto Exit_Failure
:Error_NoFallbackExecutable
echo RunUAT.bat ERROR: Visual studio and/or AutomationTool.csproj was not found, nor was Engine\Binaries\DotNET\AutomationTool.exe. Can't run the automation tool.
set RUNUAT_EXITCODE=1
goto Exit_Failure
:Error_UATCompileFailed
echo RunUAT.bat ERROR: AutomationTool failed to compile.
set RUNUAT_EXITCODE=1
goto Exit_Failure
:Error_UATFailed
set RUNUAT_EXITCODE=%ERRORLEVEL%
goto Exit_Failure
:Exit_Failure
echo BUILD FAILED
popd
exit /B %RUNUAT_EXITCODE%
:Exit
rem ## Restore original CWD in case we change it
popd
exit /B 0