Commit Graph

388 Commits

Author SHA1 Message Date
Ben Marsh
78f6199447 Add a separate category for "installed" plugins, and hide categories if they're empty.
[CL 2527764 by Ben Marsh in Main branch]
2015-04-27 20:08:52 -04:00
Peter Sauerbrei
e921bf8cf7 UE-11479 - fix for generating project files when project has a platform name in the directory structure
[CL 2527371 by Peter Sauerbrei in Main branch]
2015-04-27 16:00:30 -04:00
Wes Hunt
f453e6503e Handle Logging that should not have string.Format called on it. If the Arg count is zero, treat it is a raw string and simply use it.
[CL 2526291 by Wes Hunt in Main branch]
2015-04-26 19:34:56 -04:00
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
Wes Hunt
c23521596d Fix some log output to use Environment.Newline
[CL 2525141 by Wes Hunt in Main branch]
2015-04-24 18:35:08 -04:00
Justin Sargent
c82571b217 Changed the xcode scheme generation to respect binary locations for targets not under Engine.
Merging using UE4-To-UE4-LauncherDev

#codereview Michael.Trepka

[CL 2525098 by Justin Sargent in Main branch]
2015-04-24 18:12:09 -04:00
Ben Marsh
9b5828ca1f Fix performance issue when showing progress for large number of items; console I/O becomes a bottleneck.
[CL 2523429 by Ben Marsh in Main branch]
2015-04-23 17:32:21 -04:00
Dmitry Rekman
1fb5df0a6f UBT: better explanation for signal exit codes.
- To reduce confusion regarding UHT failinng with "error code: 139"

#codereview Robert.Manuszewski, Michael.Trepka, Mark.Satterthwaite, Josh.Adams

[CL 2523338 by Dmitry Rekman in Main branch]
2015-04-23 16:58:43 -04:00
Jeff Campeau
69b60e16cb AppxManifest and Resource files for Xbox One generated on the fly.
Settings used to generate these made settable from the editor.

[CL 2521784 by Jeff Campeau in Main branch]
2015-04-22 17:05:11 -04:00
Ben Marsh
1b1e409efd Rename PluginInfo.LoadedFromType to PluginLoadedFrom.
[CL 2521047 by Ben Marsh in Main branch]
2015-04-22 10:28:54 -04:00
Ben Marsh
6c204dde74 Use the plugin filename to derive the plugin name, rather than using the directory name. Using the directory name is not consistent with the engine.
[CL 2521022 by Ben Marsh in Main branch]
2015-04-22 10:14:06 -04:00
Ben Marsh
24f3997488 Remove the global plugins array. Targets can figure out which plugins to enable for themselves, and that list isn't cross-pollenated with other targets.
[CL 2520938 by Ben Marsh in Main branch]
2015-04-22 09:37:04 -04:00
Ben Marsh
57d92dc12b Remove another use of the AllPlugins array in UEBuildTarget, and use a single code path for determining whether a plugin is enabled for a given platform.
[CL 2520897 by Ben Marsh in Main branch]
2015-04-22 09:12:37 -04:00
Ben Marsh
920c062de3 Fix list of enabled plugins in programs that reference plugin modules directly. Previously relying on UBT permitting references to any known modules, even if they weren't supposed to be included in the target.
[CL 2520514 by Ben Marsh in Main branch]
2015-04-21 21:22:15 -04:00
Ben Marsh
a8f46ea87c Add function to enumerate plugins available for a specific project rather than using the global array, and add a function to determine if a plugin is enabled.
#codereview Peter.Sauerbrei

[CL 2520056 by Ben Marsh in Main branch]
2015-04-21 17:20:20 -04:00
Ben Marsh
9416a7c2e3 Remove global map for plugin module names. Each target now uses plugin information only when it's initialized.
[CL 2519785 by Ben Marsh in Main branch]
2015-04-21 15:42:12 -04:00
Ben Marsh
f4646cf08d Add plugins to projects without needing to reference the AllPlugins array.
[CL 2519703 by Ben Marsh in Main branch]
2015-04-21 15:04:41 -04:00
Josh Adams
9fd07ce722 - Made some changes to allow receipt based packaging to work with the Desktop platform. One hacky bit remains that I have entered a JIRA for [UE-14120]
#codereview ben.marsh

[CL 2519643 by Josh Adams in Main branch]
2015-04-21 14:25:42 -04:00
Ben Marsh
94e5326654 Simplify check for whether we can write to the engine directory in installed builds.
[CL 2519169 by Ben Marsh in Main branch]
2015-04-21 09:50:26 -04:00
Ben Marsh
3f5363055c Remove the IsPluginModule() function; use a more explicit check against files in the engine source directory instead.
[CL 2519158 by Ben Marsh in Main branch]
2015-04-21 09:45:07 -04:00
Justin Sargent
f5585eaed8 Added support for programs to specify their own Solution Directory.
#codereview Ben.Marsh
Merging using UE4-To-UE4-LauncherDev

[CL 2517984 by Justin Sargent in Main branch]
2015-04-20 14:30:37 -04:00
Mike Fricker
305f5925be Don't treat VC++ compiler differently than other executables for XGE
- Experimenting with disabling this to see if we notice any drawbacks (seems fine after a few days of testing)

[CL 2517690 by Mike Fricker in Main branch]
2015-04-20 11:35:11 -04:00
Ben Marsh
91e7fd286e Fix "EnabledByDefault" plugins not being compiled as part of targets.
[CL 2517061 by Ben Marsh in Main branch]
2015-04-19 16:09:57 -04:00
Ben Marsh
441d99caca Add null check when getting list of enabled plugins.
[CL 2517039 by Ben Marsh in Main branch]
2015-04-19 12:56:00 -04:00
Ben Marsh
9d2cb9e749 Added implementation of ProjectDescriptor to UBT, which mirrors definition in the engine.
[CL 2517036 by Ben Marsh in Main branch]
2015-04-19 12:46:09 -04:00