Commit Graph

29 Commits

Author SHA1 Message Date
Wes Hunt
012e45b913 UBT Utils.cs (New logging system)
* Allows us to use built-in Trace providers (console, file, etc) directly and still use our custom formatting.
* Fat comments explaining why Trace.WriteXXX functions should not be used directly in our system.
* Fixes thread safety by using Trace.WriteXXX under the hood after formatting, which uses a global lock (except on Mono, where a bug appears to be preventing this. Simulating the call on that platform).
* No need for TraceEvent overloads, which saves us the extra parameter cruft.
* Removed non-varargs overloads of Log functions (technically a bit slower, but these are already small messages).
* No longer needed VerbosityFilter and ConsoleListener classes.
* Avoid calling GetSource() if we aren't outputting the source.
* Avoid formatting the string if it won't pass the verbosity level.
* Consolidated all of UAT and UBT options into this class, so they could fully share the implementation.

UBT BuildConfiguration.cs
* Added LogFilename (and --log=<file> arg) that enables logging to a file.
* Added static ctor guard that asserts if someone tries to read a config before we have loaded config files and parsed config-override commandlines. It's a poor man's hack, but better than nothing!

UBT UEBuildConfiguration.cs
* Same static ctor guard as above.

UBT UnrealBuildTools.cs (initialization refactoring)
* In general I tried to de-mystify some of the rationale behind our startup code via fat comments.
* Broke main into 3 stages:
1. "early code" that should not try to read a config value.
  * Very little code here. Mostly setting the current directory.
  * Does an early init of logging to ensure logging is around, but config values won't be ready.
2. "Init Configuration code" that loads config files and parses command lines that may override them.
  * I isolated two locations in startup that parsed long sets of switches and moved ones that trivially affected BuildConfiguration and UEBuildConfiguration in here. Those two locations seemed to have mostly copies of the same switches, indicating serious param parsing issues at some point in time.
  * This allows switches to override config files more easily than the patchwork of re-parsing that was currently used (particularly for -verbose).
  * I did a cursory examination of later code that indicated this double (actually, triple) parsing was no longer necessary with the refactors above. Any insight into why things may have ended up this way would be helpful.
3. "Post Init code" that is actually the meat of UBT.
  * I left this code largely untouched.
  * Removed 2 of 3 different command line logging statements.
  * Removed two redundant parses of config overrides (ParseBuildConfigurationFlags).
* Guarded all of main in a try/catch block to ensure no exceptions can leak from UBT without returning a valid error code. It ALMOST already did this, but only covered the part surrounded by the Mutex.
* There was a perplexing bit that redundantly called XmlConfigLoader.Reset<> (line 683) that I struggled to understand. It turns out UEBuildConfiguration was sensitive to the current directory being set before files were loaded, and the old code called XmlConfigLoader.Init() super early, which required it to be called again after the current directory was set (see UEBuldConfiguration.UEThirdPartySourceDirectory for the cause). After my changes, I verified as best I could that these calls are no longer needed and removed them.

XmlConfigLoader.cs
* Add support for Properties in XmlConfigLoader.

AutomationTool Program.cs
* Guard logging shutdown code in try/finally so it can't be missed.

AutomationTool Log.cs
* Uses new logging system from UBT
* Removed unnecessary classes (VerbosityFilter, AutomationConsoleTraceListener, and AutomationFileTraceListener)
* Console trace logic is handled by UBT code now, moved UTF8Output handling to InitLogging.
* A custom TraceListener for file logging was unnecessary.
  * Logic to handle creating the log file and retry loops was move into InitLogging, and the result passed to a regular TextFileTraceListener.
  * Logic to handle copying the log on shutdown was moved to a ShutdownLogging function.
#codereview:robert.manuszewski,michael.trepka,kellan.carr

[CL 2526245 by Wes Hunt in Main branch]
2015-04-26 18:19:28 -04:00
Bart Bressler
ecdb763c35 Upgrade Steamworks to 1.32
#codereview josh.markiewicz

[CL 2467022 by Bart Bressler in Main branch]
2015-03-02 17:24:21 -05:00
Josh Adams
7231a49511 - Moved OBBInAPK into ProjectSettings, and renamed it [UE-8359]
- Removed all the OBBInAPK hackery in UBT
- Updated the apk install scripts with some more information as to what it's doing [UE-8258]

[CL 2420664 by Josh Adams in Main branch]
2015-01-27 13:05:32 -05:00
Robert Manuszewski
cf31c3d327 UBT: Removing UEBuildConfiguration.bBuildDedicatedServer
[CL 2385516 by Robert Manuszewski in Main branch]
2014-12-11 10:44:54 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Mikolaj Sieluzycki
f893b88f3e Initial implementation of UnrealCodeAnalyzer.
#codereview Robert.Manuszewski

[CL 2375863 by Mikolaj Sieluzycki in Main branch]
2014-12-04 05:35:51 -05:00
Matthew Griffin
715019c240 Adding build option to prevent building CEF3 libraries.
[CL 2361794 by Matthew Griffin in Main branch]
2014-11-17 09:14:44 -05:00
Dmitry Rekman
4e7220ad26 Set ICU on by default.
Most platforms allow override it to true anyway, but some (Linux) don't, allowing targets to set it up in their SetGlobalEnvironment(). Since you cannot do that in game/editor targets though (see UEBuildTarget.SetupGlobalEnvironment()), default value should be true to get the editor compiled with ICU.

#codereview Robert.Manuszewski

[CL 2330785 by Dmitry Rekman in Main branch]
2014-10-15 17:28:51 -04:00
Robert Manuszewski
96071afb2d Hot-reload: performing hot-reload when there's been no code changes will no longer result in producing new DLLs.
#ttp 345522: HotReload: Should not try to link DLLs when target is up to date

#change Added code to handle up-to-date state of modules in hot-reload code.
#change Added ECompilationResult::UpToDate and ECompilationResult::Canceled, ECompilationResult::Failed()
#change UBT: added -canskiplink command line param and support for skipping link actions when there was nothing to compile
#change extended the duration of re-compile notifications (TTP# 346604 NUXF-246 Hot compile fail message fades)
#change Added 'Compile Canceled' notification (instead of 'Compile Failed')

[CL 2302307 by Robert Manuszewski in Main branch]
2014-09-18 08:10:17 -04:00
Ori Cohen
167a797ef8 Add runtime physx cooking
[CL 2291345 by Ori Cohen in Main branch]
2014-09-09 16:30:29 -04:00
Dmitry Rekman
e75a96a05b Belated update of Steamworks to v130.
#codereview Josh.Markiewicz

[CL 2273225 by Dmitry Rekman in Main branch]
2014-08-26 18:26:04 -04:00
Robert Manuszewski
135f9a0c2b Actually exposing UEBuildConfiguration.bAllowHotReloadFromIDE to BuildConfiguration.xml
[CL 2257859 by Robert Manuszewski in Main branch]
2014-08-15 07:16:48 -04:00
Robert Manuszewski
8498aae74f Hot-reload from IDE
#change UBT: Added support for hot-reload when UBT is called from IDE and the current target is curring
#change Added support for hot-reload from VS to the engine
#change Refactored hot-reload functionality to a separarte module
#change Added hot-reload analytics events

[CL 2255801 by Robert Manuszewski in Main branch]
2014-08-14 03:37:01 -04:00
Mike Fricker
0031e06f21 Experimental UnrealBuildTool makefile support
UnrealBuildTool 'Makefiles' allow for very fast iterative builds.
    - New BuildConfiguration.xml setting added: "bUseExperimentalFastBuildIteration"   (disabled by default)
    - Turning this on causes Unreal Build Tool to emit 'UBT Makefiles' for targets when they're built the first time.
    - Subsequent builds will load these Makefiles and begin outdatedness checking and build invocation very quickly.
    - The caveat is that if source files are added or removed to the project, UBT will need to gather information about those in order for your build to complete successfully.
    - Currently, you must run the project file generator after adding/removing source files to tell UBT to re-gather this information.
    - Events that can invalidate the 'UBT Makefile':
           - Adding/removing .cpp files
           - Adding/removing .h files with UObjects
           - Adding new UObject types to a file that didn't previously have any
           - Changing global build settings (most settings in this file qualify.)
           - Changed code that affects how Unreal Header Tool works
    - You can force regeneration of the 'UBT Makefile' by passing the '-Gather' argument, or simply regenerating project files
    - New command-line parameters added:
           - "-Gather": Tells UBT to always perform the gather step (slower but will catch project structural changes)
           - "-NoGather": Disables the gather step, unless UBT detects that it must be done.  This is the default when bUseExperimentalFastBuildIteration is enabled
           - "-GatherOnly": Runs the gather step and saves a UBTMakefile, but doesn't build anything
           - "-Assemble": Tells UBT to also assemble build products.  This always defaults to enabled
           - "-NoAssemble": Tells UBT to skip the assemble step, whether we gathered build products or not
           - "-AssembleOnly": Tells UBT to only assemble build products and not to gather, unless UBT determines it must

Other changes:
- UBT now keeps track of which targets it was building in an intermediate file, to help it invalidate cached includes in subsequent runs when the targets are different
- C++ includes are now stored in a class separate from the C++ compile enviroment (for easier serialization)
- The method that UBT uses to find the CoreUObject module timestamp was rewritten
- Various '@todo ubtmake' comments added to tag possible remaining Makefile tasks
- The 'FileItem' class had some member variable comments and code cleaned up, while making it serializable
- Cleaned up the comments and member variables in the "Action" class, while making it serializable
- Some UBT classes are now "serializable".  This is because we need to store the data in UBTMakefiles.
- Removed support for Actions to tinker with Stdout and Stderror (was not used for anything)
- Moved PrecompileHeaderEnvironment class to the UEBuildModule.cs source file
- Plugin intermediate include directories are now selected on demand rather than cached early
- Toolchain code for gathering prerequisite headers is now shared in a single function (AddPrerequisiteSourceFile)
- Removed Action.StatusDetailedDescription, was not used for anything
- Removed UEBuildConfiguration.bExcludePlugins, was not used for anything
- Removed ECompilationResult.FailedDueToHeaderChange, was not used for anything

[CL 2254472 by Mike Fricker in Main branch]
2014-08-13 08:17:43 -04:00
Ben Marsh
177ffbdb60 Add a parameter to UBT which allows writing a list of ThirdParty files required to build a target. Use that list to distill the correct files for Rocket.
#codereview Mike.Fricker

[CL 2109632 by Ben Marsh in Main branch]
2014-06-18 15:37:35 -04:00
Ben Marsh
36f8ae952f Move SpeedTree headers and libs out of NotForLicensees.
[CL 2109305 by Ben Marsh in Main branch]
2014-06-18 11:01:21 -04:00
Saul Abreu
7d6c6f552f Changes to UBT for third party directories. UEThirdPartyDirectory is now obsolete and should be replaced with UEThirdPartySourceDirectory. An error message will appear when attempting to build if this is not heeded.
[CL 2104963 by Saul Abreu in Main branch]
2014-06-13 16:31:00 -04:00
Jaroslaw Palczynski
a51cded662 UBT: Renamed XmlConfigField to XmlConfig attribute and left only field annotation mechanism. If class has any fields annotated then it's going to be included in the configuration mechanism.
[CL 2097041 by Jaroslaw Palczynski in Main branch]
2014-06-06 07:43:02 -04:00
Jaroslaw Palczynski
32917f05be UBT XML configuration improvements:
- XSD driven IntelliSense
- defaults read from code (default XML file will be regenerated on UBT startup if is different than it should be)
- configurable classes/fields have to be now annotated with XmlConfig and XmlConfigField attributes
#codereview Robert.Manuszewski

[CL 2095741 by Jaroslaw Palczynski in Main branch]
2014-06-05 12:12:32 -04:00
Dmitry Rekman
9f577e4102 Updated Steamworks to 129a.
#codereview Josh.Markiewicz

[CL 2092979 by Dmitry Rekman in Main branch]
2014-06-03 06:40:33 -04:00
Michael Noland
775efd9763 Physics: Move 2D physics support into Engine (WIP)
#codereview ori.cohen

[CL 2089854 by Michael Noland in Main branch]
2014-05-30 13:28:52 -04:00
Peter Sauerbrei
446972d460 [INTEGRATE] Chage 2082198
final changes to make Tappy Chicken for HTML5
#ue4
#html5
#tappy chicken

[CL 2082256 by Peter Sauerbrei in Main branch]
2014-05-22 15:14:51 -04:00
Bob Tellez
ab8c090a38 UE4: Removed bCompileNetworkProfiler. USE_NETWORK_PROFILER is now true whenever STATS is also true. Also, removed some platform-specific code in NetworkProfiler.cpp
[CL 2082160 by Bob Tellez in Main branch]
2014-05-22 14:04:35 -04:00
Daniel Lamb
ebd6c8303d Changes for packing OBB into APK file.
- Added functionality to GameActivity to query for the asset manager and the mode we are using for OBB data
- Added UI element to toggle OBB packing into APK in the project packaging config panel
- Added code to add a command line switch to turn on packing during building
- Changed build system so that it will write out a JavaBuildConfig file so we know at runtime where to find the data
- Change the build system to copy and rename the OBB so that it is in the APK's asset directory uncompressed
- Added IFileHandle implementation to handle reading from an Asset based OBB and changed the OBB locating code so deal with looking for the OBB in the APK
Submitted on behalf of Robert Jones.
#codereview Daniel.Lamb,Robert.Jones

[CL 2071675 by Daniel Lamb in Main branch]
2014-05-13 11:40:41 -04:00
Wes Hunt
7820984d70 change more NoRedist references to NotForLicensees
[CL 2058853 by Wes Hunt in Main branch]
2014-04-29 12:26:27 -04:00