You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden Change 3063869 on 2016/07/25 by Michael.Noland@mnoland_T2801_OrionStream Engine: Added a cvar (t.FPSChart.OpenFolderOnDump) to control whether or not FPS charts automatically open the profiling folder when stopfpschart is executed, which can be useful to avoid a bunch of open windows while doing automated testing #rb marcus.wassmer #tests Tested startfpschart + stopfpschart with t.FPSChart.OpenFolderOnDump set to 1 and 0 #codereview david.nikdel Change 3063829 on 2016/07/25 by Michael.Noland@mnoland_T2801_OrionStream Core: Added an optional size to MallocLeak Stop and made the default filter size 128 KB for both MallocLeak Dump and MallocLeak Stop if no size was specified #rb marcus.wassmer #tests Tested using MallocLeak Stop and MallocLeak Dump Change 3063825 on 2016/07/25 by Michael.Noland@mnoland_T2801_OrionStream Engine: Exposed GPU revision ID as GRHIDeviceRevision and added it to the FPS chart analytics (gathered on D3D11 and D3D12 only) #rb marcus.wassmer #tests Tested on my desktop and compared to dxdiag output Change 3063702 on 2016/07/25 by Ryan.Gerleve@Ryan.Gerleve_T3703_Orion Collect garbage when scrubbing in a replay. Scrubbing generates a lot of garbage, and can lead to running out of memory. Can be disabled with the cvar demo.LoadCheckpointGarbageCollect. #jira OR-25964 #tests bug repro #rb john.pollard Change 3063426 on 2016/07/25 by Michael.Trepka@Michael.Trepka_T3244_Orion-Dev Borderless window support improvements: - the cursor changes to resize when hovering over the window edge - added a way for widgets to register a delegate that's called when window actions occur (maximize, restore, etc.) - used he window action notification for WindowTitleBarArea to improve how toggling fullscreen on double click is handled #rb Jeff.Campeau #tests Tested in editor build on PC Change 3063358 on 2016/07/25 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 29.2 @ CL 3063307 #RB:none #tests:none #ROBOMERGE-SOURCE: CL 3063345 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3063353 on 2016/07/25 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ben.marsh Merging CL 3037547 and CL 3037552 from //UE4/Dev-Build to support BuildPatchTool analytics. #rb none #tests none #ROBOMERGE-SOURCE: CL3063156in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3063198 on 2016/07/25 by Matt.Kuhlenschmidt@matt.kuhlenschmidt_orion_dev Temp fix for broken post process volumes #rb none #tests none Change 3063166 on 2016/07/25 by Daniel.Lamb@daniel.lamb_T3905_6612 Added check to Redirect collector resolve string asset references. #rb none #test cook paragon Change 3063057 on 2016/07/25 by Michael.Trepka@Michael.Trepka_T3244_Orion-Dev Use round corners for windows with no system title bar and border only in windowed mode. #rb Peter.Sauerbrei #tests Tested in editor build on PC Change 3063015 on 2016/07/25 by Andrew.Rodham@Andrew.Rodham_Orion Sequencer: Fixed anim notifies not working when playing animation on blueprint-driven skeletal meshes We now inject a new animation position into the animation system, rather than trying to 'fake' events outside of the system. This allows for much more robust event triggering when playing back through sequencer. Previously, anim notifies for trail particles would be reset every frame due to TriggerAnimNotifies being called by the animation system, and sequencer. We now defer this responsibility to the animation system entirely during playback. #tests Tested sequencer driven animation with animation assets and (compatible) animation blueprints. Tested some non-sequencer animation. #rb Benn.Gallagher Change 3062774 on 2016/07/24 by Ben.Marsh@Ben.Marsh_T3245_Orion BuildGraph: Fix <Cook> tasks failing when multiple platforms are specified, due to not scanning the output directories separately. #rb none #tests preflight Change 3062761 on 2016/07/24 by Andrew.Grant@andrew.grant.T6730.orion.floating Non-unity fix #rb none #tests compiled Change 3062324 on 2016/07/22 by Marcus.Wassmer@Marcus.Wassmer_Orion_DevGeneral Skipped a file #rb none #test none Change 3062315 on 2016/07/22 by Marcus.Wassmer@Marcus.Wassmer_Orion_DevGeneral Allow r.SSR.MaxRoughness in shipping builds. Art has been tweaking with this value, but it's not being honored in shipping. #rb none #tests adjusted settings in agora_p Change 3062306 on 2016/07/22 by Marcus.Wassmer@Marcus.Wassmer_Orion_DevGeneral HLOD distance scalability option (r.HLOD.DistanceScale) Higher values make HLODS transition further away. #rb Michael.Noland #tests Tested in agora_p Change 3061861 on 2016/07/22 by Lina.Halper@Lina.Halper_Orion Fix Compression - Reduce functions to be editoronly #rb: Martin.Wilson #tests: PIE/compile editor build/noneditor Change 3061714 on 2016/07/22 by Andrew.Rodham@Andrew.Rodham_Orion Sequencer: Fixed anim trails not playing in full, sequencer-driven animation. There were 2 issues here. Firstly, we were force-handling events and anim notifies in non-preview animation which caused undefined behaviour when the animation was also updated on tick. Secondly, On the very first frame of a game, sequencer can sometimes use the PreviewSetMatineeAnimPositionInner method because the actor it is referencing has not begun play yet. Unfortunately this function left the animation in a state where the 'real' animation update function wouldn't trigger any anim notifies properly. #tests Tested animation with and without anim trails to verify they work in editor, PIE and standalone game with and without sequencer open. Rendered out the announce trailer before and after my changes to verify there was no change in behaviour. #jira OR-25967 #review-3061494 @Max.Chen #rb Benn.Gallagher Change 3061393 on 2016/07/22 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: sam.zamani compile errors #rb none #tests compile #ROBOMERGE-SOURCE: CL 3061392 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3061384 on 2016/07/22 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: andrew.grant Fixed build breakage #rb none #tests compiled PS4 client #ROBOMERGE-SOURCE: CL 3061383 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3060894 on 2016/07/21 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ian.fox #Orion, #OnlineSubsystem, #OnlineGameplayFramework - Game catalog supports Price Engine sales on real-money offers #rb Sam.Zamani #tests Real-money offers that are on sale show the correct sale price / discount display #jira OR-21659 #ROBOMERGE-SOURCE: CL 3060891 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3060272 on 2016/07/21 by Lina.Halper@Lina.Halper_Orion Fix compile issue of non editor build #rb: none #tests: compile Change 3060161 on 2016/07/21 by Marcus.Wassmer@Marcus.Wassmer_Orion_DevGeneral Duplicate 3046845 CVAR threading crash fix. #rb none #tests compiled, ran ps4 Change 3060012 on 2016/07/21 by Lina.Halper@Lina.Halper_Orion - Back out changelist 3056611 - Fix additive issue and built the new animation DDC #rb: Martin.Wilson #tests: Jump_Recovery_Additive, PIE Change 3060009 on 2016/07/21 by Rob.Cannaday@rob.cannaday_orion-stream When receiving NotLeader party join rejection, include the new leader id and re-attempt the join to the new leader #jira OR-25648 #rb bart.bressler #tests frontend parties with promotions, coop matchmaking Change 3059989 on 2016/07/21 by Andrew.Grant@andrew.grant.T6730.orion.floating Fixes for applocal redist #rb none #test built locally Change 3059832 on 2016/07/21 by Martin.Wilson@MartinWilsonOrionStream Fix graph linked external object saving error on re-compressed animations (dup from dev-framework CL ) #jira UE-33567 #rb Thomas.Sarkanen #tests In editor testing that animations can be recompressed and saved Change 3059803 on 2016/07/21 by Andrew.Grant@andrew.grant.T6730.orion.floating Switching Orion, UnrealCEFSubProcess, and CrashReporterClient to build with VS2015 Added AppLocalPrerequisitesDirectory editor setting that is passed in -applocaldir during staging WinPlatformAutomation now stages applocaldir to project and engine binaries Updated OrionBuild.xml to specify -applocaldir #codereview Jeff.Campeau, Ben.Marsh #rb none #tests build client locally and verified DLLs are local to executables Change 3059707 on 2016/07/21 by David.Ratti@David.Ratti_G6218_Orion.Dev-General fix case where DefaultGameplayTags.ini fails to update if not checked out from source control #rb none #tests add tags without source control Change 3059679 on 2016/07/21 by Rob.Cannaday@rob.cannaday_orion-stream Fix nonunity compile error due to OnlinePresenceInterface.h requiring enum defined in OnlineSubsystemTypes.h #rb paul.moore #tests compile with OrionFriendItem.cpp modified Change 3059518 on 2016/07/21 by Andrew.Grant@andrew.grant.T6730.orion.floating AppLcoalDependencies required by VS2015 Change 3059477 on 2016/07/21 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 29.2 @ CL 3059419 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 3059476 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3059455 on 2016/07/21 by Graeme.Thornton@GThornton_Orion_DevGeneral Linux build fix (bad case on #include filename) #rb robert.manuszewski #tests compiled Paragon on a linux machine Change 3059258 on 2016/07/21 by Simon.Tovey@Simon.Tovey_OrionDev Implementing 3050352 in Dev-General. #rb none #tests Editor #codereview Marcus.Wassmer Change 3058989 on 2016/07/21 by Michael.Noland@mnoland_T2801_OrionStream Audio: Disabling the audio thread to prevent a crash in async line trace code (it is already disabled in UE4 main) #rb none #codereview andrew.grant, ori.cohen Change 3058773 on 2016/07/20 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ian.fox #Orion - Remove QoS* from junk manifest #review-3058772 @Rob.Cannaday #rb none #tests QoS module doesn't get nuked every build #ROBOMERGE-SOURCE: CL 3058771 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3058717 on 2016/07/20 by Daniel.Lamb@daniel.lamb_T3905_6612 Added submitted CL to success email for rebuild lighting commandlet. Removed nosimplygon from resave lighting commandlet commandline. #rb Daniel.Wright #test rebuildlighting paragon devgeneral. Change 3058565 on 2016/07/20 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ian.fox #Orion - Fix debug/non-development builds #rb Rob.Cannaday #tests it builds (and doesn't crash on login) on Debug Editor -debug -game! #ROBOMERGE-SOURCE: CL 3058563 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3058082 on 2016/07/20 by Daniel.Lamb@daniel.lamb_T3905_6612 Added error to the lighting build whent it fails to build. #test Rebuild lighting commandlet #rb Daniel.Wright Change 3057945 on 2016/07/20 by Andrew.Grant@andrew.grant.T6730.orion.floating Fix for NAN issue introduced in 3032847 #rb Jeff.Farris #tests none Change 3057840 on 2016/07/20 by David.Ratti@David.Ratti_G6218_Orion.Dev-General fix developer tags not properly adding to perforce when creating a new file #rb none #tests developer tags Change 3057553 on 2016/07/20 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 29.2 @ CL 3057330 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 3057549 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change3057313on 2016/07/20 by bruce.nesbit@BNesbit_Orion_Stream_1 Fixed shadowvariable in FAnalyticsEventEntry #rb none #tests compiled #codereview Wes.Hunt Change 3056802 on 2016/07/19 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ryan.gerleve Fix issue where replicated map-placed actors with ability system components would cache an incorrect Role value. This could cause predicted gameplay effects in the fast TArray to have MarkItemDirty called on them, which in turn increments the item's ReplicationID, potentially causing a conflict with the server's ReplicationID. Since the Role may not be correct during OnRegister for these components, also cache it BeginPlay. #jira OR-25234 #rb david.ratti #tests golden path, bug repro #ROBOMERGE-SOURCE: CL 3056801 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3056797 on 2016/07/19 by Wes.Hunt@WHUNT-ORION-STREAM OrionAnalytics updates. * Added IAnalyticsProviderET::SetDefaultEventAttributes to use to set the GameSessionID on all Orion Analytics events. * Removed OrionAnalyticsProvider as it was no longer necessary. * Updated all Orion code to use IAnalyticsProviderET directly in the code to be able to access all the new APIs. #rb sam.zamani, jason.bestimt #tests run dedicated server with 10 bot clients, observe analytics events sending correctly. Ran PIE. #jira UE-30980 Change 3056611 on 2016/07/19 by Lina.Halper@Lina.Halper_Orion Fix for additive broken with remove linear key - DDC key has been changed, so it will require to build DDC from this #rb: Martin.Wilson #tests: Jump_Recovery_Additive in editor, and PIE Change 3056226 on 2016/07/19 by Lukasz.Furman@Lukasz.Furman_T7320_OrionStream extended gameplay debugger's ability category to show locally owned gameplay tags #orion #rb none #tests PIE Change 3056204 on 2016/07/19 by Jeff.Campeau@jeff.campeau_3753_Orion Fix offset rendering of maximized borderless game window on Windows. #review-3055205 @michael.trepka #rb Michael.Trepka #tests Tested in editor build on PC (editor window normal and maximized, game window borderless normal and maximized, game window bordered normal and maximized). Change 3056028 on 2016/07/19 by Rob.Cannaday@rob.cannaday_orion-stream Add moved modules to JunkManifest.txt Change 3055650 on 2016/07/19 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - ACTUAL Merge 29.2 @ CL 3055553 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 3055647 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3055620 on 2016/07/19 by Dmitry.Rekman@RCL_Win_Stream-ORMAIN Attempts to fix rare server crashes (OR-24947, OR-24952). - Rearranging to avoid AddDefaulted(), that might be triggering a compiler bug (conjecture). #rb Steve.Robb #codereview Steve.Robb #tests Compiled Windows client and Linux server, played a match. Change 3054587 on 2016/07/18 by Andrew.Grant@andrew.grant.T6730.orion.floating Merging from //UE4/Main @ 3043787 through //UE4/Orion-Staging #rb none #tests Smoked by engine and dev QA Change 3054491 on 2016/07/18 by Frank.Gigliotti@Frank.Gig_T4217_Orion_Stream Removed warning when client miss-predicts ability activation. * It is valid for the client to miss-predict. Warning was only added to track down a bug. #CodeReview David.Ratti #RB None #Tests None Change 3053850 on 2016/07/18 by David.Ratti@David.Ratti_G6218_Orion.Dev-General Missed checkins on ability system engine work: -Register debug delegate on module startup for easier debugging -Fallback to actor location if no hit impact is specified in default engine GC notify class #rb none #tests ability system sample project Change 3053825 on 2016/07/18 by David.Ratti@David.Ratti_G6218_Orion.Dev-General Fix issue where config file not actually flushed at right time when adding new tags Fix issue where orion projecetile tags that are auto generated was generating tags for non gameplay tag properties #rb DanY #codereview Dan.Youhon #tests pie Change 3053438 on 2016/07/18 by David.Ratti@David.Ratti_G6218_Orion.Dev-General -Remove developer tags from master tag list before saving to ini file -inline some stuff (wip for gc tag translator system) #rb none #test adding tags Change 3053414 on 2016/07/18 by Robert.Manuszewski@Robert_Manuszewski_NCL_Orion Fixing rare crash when async loading objects caused by linker being detached too early (before other package's import has been fully processed) #jira OR-24955 #jira OR-25183 #rb Graeme.Thornton #tests Win64 cooked client golden path (solo vs AI) Change 3052009 on 2016/07/15 by Dmitry.Rekman@RCL_Win_Stream-ORMAIN Overhaul of behavior of headless applications (server, client) (OR-23529). - Removed FApp::ShouldUseNullRHI(). Rationale: FApp::CanEverRender() answers a higher level question and the code shouldn't predicate on the type of RHI used. - Multiple code paths updated to prevent code execution on headless clients (some of this is optimization, some was causing crashes). - Most of these changes originated from a shelved CL by BradA. #rb Michael.Noland #codereview Michael.Noland, Brad.Angelcyk, Andrew.Grant, Chris.Wood, Matt.Schembari #tests Cooked Windows client and server, Linux client and server. Ran Windows client and server, played a match, ran Linux bot (headless client, requires local changes not in this CL), ran the Windows editor (tried PIE). Change 3051926 on 2016/07/15 by Marcus.Wassmer@Marcus.Wassmer_Orion_DevGeneral Reinstate color grading changes. Fix broken config file. #rb none #tests Agora_p color grading and warning check Change 3051759 on 2016/07/15 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ryan.gerleve Don't record predicted elements of fast TArrays into client replays. Fixes issue where the client was incrementing the ReplicationID of predicted elements, potentially conflicting with the IDs of elements received by the server. #jira OR-25234, OR-25413, OR-25403 #tests golden path, bug repo using 'net pktlag', replays #rb john.pollard, david.ratti #ROBOMERGE-SOURCE: CL 3051758 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3051702 on 2016/07/15 by Daniel.Lamb@daniel.lamb_T3905_6612 Added jordan walker to rebuild lighting emails. Removed peter.sauerbrei. #rb Peter.Sauerbrei #test none Change 3051661 on 2016/07/15 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ben.marsh Merging support for precompiled binaries in CIS from Release-29. #rb none #tests none #ROBOMERGE-SOURCE: CL 3051660 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3051466 on 2016/07/15 by Marcus.Wassmer@Marcus.Wassmer_Orion_DevGeneral Allow seamless upgrade from FVector -> FVector4 for UProperties. #rb Robert.Manuszewski #tests Color grading property changes. Change 3050680 on 2016/07/14 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ian.fox #Mcp, #Orion - Fix initalization values of CatalogServiceMcp #rb none #tests Real money offers show in the store again #ROBOMERGE-SOURCE: CL 3050563 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3050520 on 2016/07/14 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - MERGING DUI @ CL 3047139 #RB:none #Tests:none [CodeReviewed]: kerrington.smith, dan.hertzka, matt.schembari, benjamin.crocker, jaymee.stanford, alex.conner #ROBOMERGE-SOURCE: CL 3050519 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3050465 on 2016/07/14 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: ryan.gerleve Don't check IsClientOnly() to detemine whether a player controller is local or not. For client replay recording, the replay spectator controller should not return true from IsLocallyControlled(). This change fixes that case in client builds. Fixes issue where the SignificanceManager was using the replay spectator to influence significance values, causing them to be incorrect for the game player controller. #jira OR-25258 #tests bug repro, golden path, replays #rb john.pollard [CodeReviewed] zak.middleton, josh.markiewicz #ROBOMERGE-SOURCE: CL 3050462 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3050326 on 2016/07/14 by Dan.Youhon@Dan.Youhon.Paragon Set CameraLensEffects position before activation so that initial significance values are correct, specifically to fix quick camera lens effects being culled out due to incorrect significance #OR-18321 - Moves location determination code from AEmitterCameraLensEffectBase::UpdateLocation into a separate static GetAttachedEmitterTransform function, which is now called both from UpdateLocation and in APlayerCameraManager::AddCameraLensEffect to determine SpawnTransform for the LensEffect SpawnActor call - Unshelved from Jeff.Farris. Thanks Jeff! #rb Dan.Youhon #tests MultiPIE #codereview Jeff.Farris Change 3049749 on 2016/07/14 by Daniel.Lamb@daniel.lamb_T3905_6612 Added skipskin verify to rebuild lighting commandlet. #rb None #test Rebuild lighting commandlet Change 3049728 on 2016/07/14 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: buildmachine Remove simplygon from rebuild lighting commandlet #rb none #test rebuild lighting #ROBOMERGE-SOURCE: CL 3049727 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3049721 on 2016/07/14 by buildmachine@buildmachine_Z4560_OrionDevGeneral Remove simplygon from rebuild lighting commandlet #rb none #test rebuild lighting Change 3049325 on 2016/07/13 by Andrew.Grant@andrew.grant.T6730.orion.floating Back out changelist 3049037 due to incompatibility with current assets #rb none #tests Cooked content and verified warnings & errors are gone. #codereview Marcus.Wasmer, Brian.Karis, HaarmPieter.Duiker Change 3049319 on 2016/07/13 by Andrew.Grant@andrew.grant.T6730.orion.floating More work on content filtering (still disabled) #rb none #tests cooked content and verified filtered content is not found. Change 3049298 on 2016/07/13 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 28.2/29 @ CL 3049113 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 3049296 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 3049269 on 2016/07/13 by Mieszko.Zielinski@mieszko.zielinski_T4675_Orion Constified FObjectFinder::Succeeded because why not #UE4 #rb none #test golden path Change 3049104 on 2016/07/13 by Andrew.Grant@andrew.grant.T6730.orion.floating Created delegate for object name resolution and moved existing package localization code to use it. Orion code to filter out unreleased heroes and other data, but correnty disabled due to a cooking bug. #rb none #tests ran editor, ran cooker, verified object resolution is equivalent to before. Change 3049037 on 2016/07/13 by HaarmPieter.Duiker@HPD-Dev-General Adding shadows, midtones and highlights color correction controls #rb brian.karis, marcus.wassmer #tests "postprocess color correction" Change 3048457 on 2016/07/13 by Cody.Haskell@OrionStream #UE4 - Adding a delegate that fires off when LastUserInteractionTime is updated #codereview Matt.Kuhlenschmidt #rb none #tests PIE Change 3048420 on 2016/07/13 by Dmitry.Rekman@RCL_Lnx_CaseIns_Stream-ORMAIN Fix double #undef LOCTEXT_NAMESPACE in editor case. #rb none #codereview Nick.Darnell, Andrew.Grant #tests Compiled Linux editor (for running -server). Change 3047891 on 2016/07/13 by Michael.Trepka@Michael.Trepka_T3244_Orion-Dev Rollback //Orion/Dev-General/Engine/Source/Runtime/Core/Private/Windows/WindowsWindow.cpp to revision 12 #rb none #tests Tested in editor on PC Change 3047216 on 2016/07/12 by Dmitry.Rekman@RCL_Lnx_CaseIns_Stream-ORMAIN Changes to Linux application specific to Linux client. #rb none #codereview Brad.Angelcyk #tests Ran Paragon Linux client (headless) locally. Change 3047140 on 2016/07/12 by Andrew.Grant@andrew.grant.T6730.orion.floating Fix for PS4 #rb #tests na Change 3047107 on 2016/07/12 by Andrew.Grant@andrew.grant.T6730.orion.floating Moved timeguards out of stats.h #rb none #tests compiled editor & shipping client Change 3046996 on 2016/07/12 by Ryan.Gerleve@Ryan.Gerleve_T3703_Orion Don't check bTearOff when deciding whether to swap roles for client replay recording and improve the comment. Fixes an assert that could occur if a torn-off actor happened to get recorded into a checkpoint of a client replay. #tests golden path #rb john.pollard Change 3046975 on 2016/07/12 by Michael.Trepka@Michael.Trepka_T3244_Orion-Dev Support for making the game window borderless (no system border or title bar). Disabled by default. Enabling requires adding bUseBorderlessWindow=True to [/Script/EngineSettings.GeneralProjectSettings] in DefaultGame.ini. The game using this is responsible for adding WindowTitleBarArea widget to its UI, as well as window minimize/maximize/close buttons. #codereview Dan.Hertzka #rb Jeff.Campeau #tests Tested in editor build on PC Change 3046812 on 2016/07/12 by Michael.Trepka@Michael.Trepka_T3244_Orion-Dev New UI for selecting fullscreen mode in Paragon video settings #rb Dan.Hertzka #tests Tested in editor build on PC Change 3046803 on 2016/07/12 by Michael.Trepka@Michael.Trepka_T3244_Orion-Dev Added an option to WindowTitleBarArea widget to make it toggle fullscreen mode instead of maximizing the window. #rb Dan.Hertzka #tests Tested in editor build on PC Change 3045374 on 2016/07/11 by John.Pollard@John.Pollard_T2802_Orion_DevGeneral Fix assert in channel cleanup code that could occur if the connection was cleaned up, and there were KeepProcessingActorChannelBunchesMap in-flight still #rb RyanG #tests Replays Change 3044696 on 2016/07/11 by Daniel.Lamb@daniel.lamb_T3905_6612 Added additional checks to ResavePackagesCommandlet so people don't miss the required allowcommandletrendering flag when using buildlighting option. #test rebuild lighting using resave packages paragon #rb None Change3044690on 2016/07/11 by Daniel.Lamb@daniel.lamb_T3905_6612 Changed MBWritten cooker stats to report mb instead of bytes... #rb Wes.Hunt. #test cook paragon. Change 3044439 on 2016/07/11 by Jason.Bestimt@Robomerge_Orion_DevGeneral #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 28.2 @ CL 3043960 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 3044428 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) [CL 3070724 by Andrew Grant in Main branch]
707 lines
28 KiB
C#
707 lines
28 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnrealBuildTool;
|
|
using BuildGraph;
|
|
using System.Reflection;
|
|
using System.Collections;
|
|
using System.IO;
|
|
|
|
namespace AutomationTool
|
|
{
|
|
/// <summary>
|
|
/// Tool to execute build processes for UE4 projects, which can be run locally or in parallel across a build farm (assuming synchronization and resource allocation implemented by a separate system).
|
|
///
|
|
/// Build graphs are declared using an XML script using syntax similar to MSBuild, ANT or NAnt, and consist of the following components:
|
|
///
|
|
/// - Tasks: Building blocks which can be executed as part of the build process. Many predefined tasks are provided ('Cook', 'Compile', 'Copy', 'Stage', 'Log', 'PakFile', etc...), and additional tasks may be
|
|
/// added be declaring classes derived from AutomationTool.CustomTask in other UAT modules.
|
|
/// - Nodes: A named sequence of tasks which are executed in order to produce outputs. Nodes may have dependencies on other nodes for their outputs before they can be executed. Declared with the 'Node' element.
|
|
/// - Agents: A machine which can execute a sequence of nodes, if running as part of a build system. Has no effect when building locally. Declared with the 'Agent' element.
|
|
/// - Triggers: Container for agents which should only be executed when explicitly triggered (using the -Trigger=... or -SkipTriggers command line argument). Declared with the 'Trigger' element.
|
|
/// - Notifiers: Specifies email recipients for failures in one or more nodes, whether they should receive notifications on warnings, and so on.
|
|
///
|
|
/// Properties can be passed in to a script on the command line, or set procedurally with the <Property Name="Foo" Value="Bar"/> syntax. Properties referenced with the $(Property Name) notation are valid within
|
|
/// all strings, and will be expanded as macros when the script is read. If a property name is not set explicitly, it defaults to the contents of an environment variable with the same name.
|
|
/// Local properties, which only affect the scope of the containing XML element (node, agent, etc...) are declared with the <Local Name="Foo" Value="Bar"/> element, and will override a similarly named global
|
|
/// property for the local property's scope.
|
|
///
|
|
/// Any elements can be conditionally defined via the "If" attribute, which follows a syntax similar to MSBuild. Literals in conditions may be quoted with single (') or double (") quotes, or an unquoted sequence of
|
|
/// letters, digits and underscore characters. All literals are considered identical regardless of how they are declared, and are considered case-insensitive for comparisons (so true equals 'True', equals "TRUE").
|
|
/// Available operators are "==", "!=", "And", "Or", "!", "(...)", "Exists(...)" and "HasTrailingSlash(...)". A full grammar is written up in Condition.cs.
|
|
///
|
|
/// File manipulation is done using wildcards and tags. Any attribute that accepts a list of files may consist of: a Perforce-style wildcard (matching any number of "...", "*" and "?" patterns in any location), a
|
|
/// full path name, or a reference to a tagged collection of files, denoted by prefixing with a '#' character. Files may be added to a tag set using the <Tag> Task, which also allows performing set union/difference
|
|
/// style operations. Each node can declare multiple outputs in the form of a list of named tags, which other nodes can then depend on.
|
|
///
|
|
/// Build graphs may be executed in parallel as part build system. To do so, the initial graph configuration is generated by running with the -Export=... argument (producing a JSON file listing the nodes
|
|
/// and dependencies to execute). Each participating agent should be synced to the same changelist, and UAT should be re-run with the appropriate -Node=... argument. Outputs from different nodes are transferred between
|
|
/// agents via shared storage, typically a network share, the path to which can be specified on the command line using the -SharedStorageDir=... argument. Note that the allocation of machines, and coordination between
|
|
/// them, is assumed to be managed by an external system based on the contents of the script generated by -Export=....
|
|
///
|
|
/// A schema for the known set of tasks can be generated by running UAT with the -Schema=... option. Generating a schema and referencing it from a BuildGraph script allows Visual Studio to validate and auto-complete
|
|
/// elements as you type.
|
|
/// </summary>
|
|
[Help("Tool for creating extensible build processes in UE4 which can be run locally or in parallel across a build farm.")]
|
|
[Help("Script=<FileName>", "Path to the script describing the graph")]
|
|
[Help("Target=<Name>", "Name of the node or output tag to be built")]
|
|
[Help("Schema=<FileName>", "Generate a schema describing valid script documents, including all the known tasks")]
|
|
[Help("Set:<Property>=<Value>", "Sets a named property to the given value")]
|
|
[Help("Clean", "Cleans all cached state of completed build nodes before running")]
|
|
[Help("CleanNode=<Name>[+<Name>...]", "Cleans just the given nodes before running")]
|
|
[Help("ListOnly", "Shows the contents of the preprocessed graph, but does not execute it")]
|
|
[Help("ShowDeps", "Show node dependencies in the graph output")]
|
|
[Help("ShowNotifications", "Show notifications that will be sent for each node in the output")]
|
|
[Help("Trigger=<Name>[+<Name>...]", "Activates the given triggers, including all the nodes behind them in the graph")]
|
|
[Help("SkipTriggers", "Activate all triggers")]
|
|
[Help("TokenSignature=<Name>", "Specifies the signature identifying the current job, to be written to tokens for nodes that require them. Tokens are ignored if this parameter is not specified.")]
|
|
[Help("SkipTargetsWithoutTokens", "Excludes targets which we can't acquire tokens for, rather than failing")]
|
|
[Help("Preprocess=<FileName>", "Writes the preprocessed graph to the given file")]
|
|
[Help("Export=<FileName>", "Exports a JSON file containing the preprocessed build graph, for use as part of a build system")]
|
|
[Help("PublicTasksOnly", "Only include built-in tasks in the schema, excluding any other UAT modules")]
|
|
[Help("SharedStorageDir=<DirName>", "Sets the directory to use to transfer build products between agents in a build farm")]
|
|
[Help("SingleNode=<Name>", "Run only the given node. Intended for use on a build system after running with -Export.")]
|
|
[Help("WriteToSharedStorage", "Allow writing to shared storage. If not set, but -SharedStorageDir is specified, build products will read but not written")]
|
|
public class BuildGraph : BuildCommand
|
|
{
|
|
/// <summary>
|
|
/// Main entry point for the BuildGraph command
|
|
/// </summary>
|
|
public override ExitCode Execute()
|
|
{
|
|
// Parse the command line parameters
|
|
string ScriptFileName = ParseParamValue("Script", null);
|
|
if(ScriptFileName == null)
|
|
{
|
|
LogError("Missing -Script= parameter for BuildGraph");
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
|
|
string TargetNames = ParseParamValue("Target", null);
|
|
string SchemaFileName = ParseParamValue("Schema", null);
|
|
string ExportFileName = ParseParamValue("Export", null);
|
|
string PreprocessedFileName = ParseParamValue("Preprocess", null);
|
|
string SharedStorageDir = ParseParamValue("SharedStorageDir", null);
|
|
string SingleNodeName = ParseParamValue("SingleNode", null);
|
|
string[] TriggerNames = ParseParamValue("Trigger", "").Split(new char[]{ '+', ';' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
|
|
bool bSkipTriggers = ParseParam("SkipTriggers");
|
|
string TokenSignature = ParseParamValue("TokenSignature", null);
|
|
bool bSkipTargetsWithoutTokens = ParseParam("SkipTargetsWithoutTokens");
|
|
bool bClearHistory = ParseParam("Clean") || ParseParam("ClearHistory");
|
|
bool bListOnly = ParseParam("ListOnly");
|
|
bool bWriteToSharedStorage = ParseParam("WriteToSharedStorage") || CommandUtils.IsBuildMachine;
|
|
bool bPublicTasksOnly = ParseParam("PublicTasksOnly");
|
|
string ReportName = ParseParamValue("ReportName", null);
|
|
|
|
GraphPrintOptions PrintOptions = GraphPrintOptions.ShowCommandLineOptions;
|
|
if(ParseParam("ShowDeps"))
|
|
{
|
|
PrintOptions |= GraphPrintOptions.ShowDependencies;
|
|
}
|
|
if(ParseParam("ShowNotifications"))
|
|
{
|
|
PrintOptions |= GraphPrintOptions.ShowNotifications;
|
|
}
|
|
|
|
// Parse any specific nodes to clean
|
|
List<string> CleanNodes = new List<string>();
|
|
foreach(string NodeList in ParseParamValues("CleanNode"))
|
|
{
|
|
foreach(string NodeName in NodeList.Split('+', ';'))
|
|
{
|
|
CleanNodes.Add(NodeName);
|
|
}
|
|
}
|
|
|
|
// Set up the standard properties which build scripts might need
|
|
Dictionary<string, string> DefaultProperties = new Dictionary<string,string>(StringComparer.InvariantCultureIgnoreCase);
|
|
DefaultProperties["Branch"] = P4Enabled ? P4Env.BuildRootP4 : "Unknown";
|
|
DefaultProperties["EscapedBranch"] = P4Enabled ? P4Env.BuildRootEscaped : "Unknown";
|
|
DefaultProperties["Change"] = P4Enabled ? P4Env.Changelist.ToString() : "0";
|
|
DefaultProperties["CodeChange"] = P4Enabled ? P4Env.CodeChangelist.ToString() : "0";
|
|
DefaultProperties["RootDir"] = CommandUtils.RootDirectory.FullName;
|
|
DefaultProperties["IsBuildMachine"] = IsBuildMachine ? "true" : "false";
|
|
DefaultProperties["HostPlatform"] = HostPlatform.Current.HostEditorPlatform.ToString();
|
|
|
|
// Attempt to read existing Build Version information
|
|
BuildVersion Version;
|
|
if (BuildVersion.TryRead(FileReference.Combine(CommandUtils.RootDirectory, "Engine", "Build", "Build.version").FullName, out Version))
|
|
{
|
|
DefaultProperties["EngineMajorVersion"] = Version.MajorVersion.ToString();
|
|
DefaultProperties["EngineMinorVersion"] = Version.MinorVersion.ToString();
|
|
DefaultProperties["EnginePatchVersion"] = Version.PatchVersion.ToString();
|
|
}
|
|
|
|
// Add any additional custom arguments from the command line (of the form -Set:X=Y)
|
|
Dictionary<string, string> Arguments = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
|
|
foreach (string Param in Params)
|
|
{
|
|
const string Prefix = "set:";
|
|
if(Param.StartsWith(Prefix, StringComparison.InvariantCultureIgnoreCase))
|
|
{
|
|
int EqualsIdx = Param.IndexOf('=');
|
|
if(EqualsIdx >= 0)
|
|
{
|
|
Arguments[Param.Substring(Prefix.Length, EqualsIdx - Prefix.Length)] = Param.Substring(EqualsIdx + 1);
|
|
}
|
|
else
|
|
{
|
|
LogWarning("Missing value for '{0}'", Param.Substring(Prefix.Length));
|
|
}
|
|
}
|
|
}
|
|
|
|
// Find all the tasks from the loaded assemblies
|
|
Dictionary<string, ScriptTask> NameToTask = new Dictionary<string,ScriptTask>();
|
|
if(!FindAvailableTasks(NameToTask, bPublicTasksOnly))
|
|
{
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
|
|
// Create a schema for the given tasks
|
|
ScriptSchema Schema = new ScriptSchema(NameToTask);
|
|
if(SchemaFileName != null)
|
|
{
|
|
Schema.Export(new FileReference(SchemaFileName));
|
|
}
|
|
|
|
// Read the script from disk
|
|
Graph Graph;
|
|
if(!ScriptReader.TryRead(new FileReference(ScriptFileName), Arguments, DefaultProperties, Schema, out Graph))
|
|
{
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
|
|
// Create the temp storage handler
|
|
DirectoryReference RootDir = new DirectoryReference(CommandUtils.CmdEnv.LocalRoot);
|
|
TempStorage Storage = new TempStorage(RootDir, DirectoryReference.Combine(RootDir, "Engine", "Saved", "BuildGraph"), (SharedStorageDir == null)? null : new DirectoryReference(SharedStorageDir), bWriteToSharedStorage);
|
|
if(bClearHistory)
|
|
{
|
|
Storage.CleanLocal();
|
|
}
|
|
foreach(string CleanNode in CleanNodes)
|
|
{
|
|
Storage.CleanLocalNode(CleanNode);
|
|
}
|
|
|
|
// Convert the supplied target references into nodes
|
|
HashSet<Node> TargetNodes = new HashSet<Node>();
|
|
if(TargetNames == null)
|
|
{
|
|
if(!bListOnly)
|
|
{
|
|
LogError("Missing -Target= parameter for BuildGraph");
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
TargetNodes.UnionWith(Graph.Agents.SelectMany(x => x.Nodes));
|
|
}
|
|
else
|
|
{
|
|
foreach(string TargetName in TargetNames.Split(new char[]{ '+', ';' }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()))
|
|
{
|
|
Node[] Nodes;
|
|
if(!Graph.TryResolveReference(TargetName, out Nodes))
|
|
{
|
|
LogError("Target '{0}' is not in graph", TargetName);
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
TargetNodes.UnionWith(Nodes);
|
|
}
|
|
}
|
|
|
|
// Try to acquire tokens for all the target nodes we want to build
|
|
if(TokenSignature != null)
|
|
{
|
|
// Find all the lock files
|
|
HashSet<FileReference> RequiredTokens = new HashSet<FileReference>(TargetNodes.SelectMany(x => x.RequiredTokens));
|
|
|
|
// Try to create all the lock files
|
|
List<FileReference> CreatedTokens = new List<FileReference>();
|
|
if(!bListOnly)
|
|
{
|
|
CreatedTokens.AddRange(RequiredTokens.Where(x => WriteTokenFile(x, TokenSignature)));
|
|
}
|
|
|
|
// Find all the tokens that we don't have
|
|
Dictionary<FileReference, string> MissingTokens = new Dictionary<FileReference, string>();
|
|
foreach(FileReference RequiredToken in RequiredTokens)
|
|
{
|
|
string CurrentOwner = ReadTokenFile(RequiredToken);
|
|
if(CurrentOwner != null && CurrentOwner != TokenSignature)
|
|
{
|
|
MissingTokens.Add(RequiredToken, CurrentOwner);
|
|
}
|
|
}
|
|
|
|
// If we want to skip all the nodes with missing locks, adjust the target nodes to account for it
|
|
if(MissingTokens.Count > 0)
|
|
{
|
|
if(bSkipTargetsWithoutTokens)
|
|
{
|
|
foreach(KeyValuePair<FileReference, string> Pair in MissingTokens)
|
|
{
|
|
List<Node> SkipNodes = TargetNodes.Where(x => x.RequiredTokens.Contains(Pair.Key)).ToList();
|
|
Log("Skipping {0} due to previous build: {1}", String.Join(", ", SkipNodes), Pair.Value);
|
|
TargetNodes.ExceptWith(SkipNodes);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
foreach(KeyValuePair<FileReference, string> Pair in MissingTokens)
|
|
{
|
|
List<Node> SkipNodes = TargetNodes.Where(x => x.RequiredTokens.Contains(Pair.Key)).ToList();
|
|
LogError("Cannot run {0} due to previous build: {1}", String.Join(", ", SkipNodes), Pair.Value);
|
|
}
|
|
foreach(FileReference CreatedToken in CreatedTokens)
|
|
{
|
|
CreatedToken.Delete();
|
|
}
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Cull the graph to include only those nodes
|
|
Graph.Select(TargetNodes);
|
|
|
|
// If a report for the whole build was requested, insert it into the graph
|
|
if (ReportName != null)
|
|
{
|
|
Report NewReport = new Report(ReportName);
|
|
NewReport.Nodes.UnionWith(Graph.Agents.SelectMany(x => x.Nodes));
|
|
Graph.NameToReport.Add(ReportName, NewReport);
|
|
}
|
|
|
|
// Write out the preprocessed script
|
|
if (PreprocessedFileName != null)
|
|
{
|
|
Graph.Write(new FileReference(PreprocessedFileName), (SchemaFileName != null)? new FileReference(SchemaFileName) : null);
|
|
}
|
|
|
|
// Find the triggers which are explicitly activated, and all of its upstream triggers.
|
|
HashSet<ManualTrigger> Triggers = new HashSet<ManualTrigger>();
|
|
foreach(string TriggerName in TriggerNames)
|
|
{
|
|
ManualTrigger Trigger;
|
|
if(!Graph.NameToTrigger.TryGetValue(TriggerName, out Trigger))
|
|
{
|
|
LogError("Couldn't find trigger '{0}'", TriggerName);
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
while(Trigger != null)
|
|
{
|
|
Triggers.Add(Trigger);
|
|
Trigger = Trigger.Parent;
|
|
}
|
|
}
|
|
if(bSkipTriggers)
|
|
{
|
|
Triggers.UnionWith(Graph.NameToTrigger.Values);
|
|
}
|
|
|
|
// If we're just building a single node, find it
|
|
Node SingleNode = null;
|
|
if(SingleNodeName != null && !Graph.NameToNode.TryGetValue(SingleNodeName, out SingleNode))
|
|
{
|
|
LogError("Node '{0}' is not in the trimmed graph", SingleNodeName);
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
|
|
// If we just want to show the contents of the graph, do so and exit.
|
|
if(bListOnly)
|
|
{
|
|
HashSet<Node> CompletedNodes = FindCompletedNodes(Graph, Storage);
|
|
Graph.Print(CompletedNodes, PrintOptions);
|
|
return ExitCode.Success;
|
|
}
|
|
|
|
// Print out all the diagnostic messages which still apply, unless we're running a step as part of a build system or just listing the contents of the file.
|
|
if(SingleNode == null)
|
|
{
|
|
IEnumerable<GraphDiagnostic> Diagnostics = Graph.Diagnostics.Where(x => x.EnclosingTrigger == null || Triggers.Contains(x.EnclosingTrigger));
|
|
foreach(GraphDiagnostic Diagnostic in Diagnostics)
|
|
{
|
|
if(Diagnostic.EventType == LogEventType.Warning)
|
|
{
|
|
CommandUtils.LogWarning(Diagnostic.Message);
|
|
}
|
|
else
|
|
{
|
|
CommandUtils.LogError(Diagnostic.Message);
|
|
}
|
|
}
|
|
if(Diagnostics.Any(x => x.EventType == LogEventType.Error))
|
|
{
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
}
|
|
|
|
// Execute the command
|
|
if(ExportFileName != null)
|
|
{
|
|
HashSet<Node> CompletedNodes = FindCompletedNodes(Graph, Storage);
|
|
Graph.Print(CompletedNodes, PrintOptions);
|
|
Graph.Export(new FileReference(ExportFileName), Triggers, CompletedNodes);
|
|
}
|
|
else if(SingleNode != null)
|
|
{
|
|
if(!BuildNode(new JobContext(this), Graph, SingleNode, Storage, bWithBanner: true))
|
|
{
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if(!BuildAllNodes(new JobContext(this), Graph, Storage))
|
|
{
|
|
return ExitCode.Error_Unknown;
|
|
}
|
|
}
|
|
return ExitCode.Success;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Find all the tasks which are available from the loaded assemblies
|
|
/// </summary>
|
|
/// <param name="TaskNameToReflectionInfo">Mapping from task name to information about how to serialize it</param>
|
|
/// <param name="bPublicTasksOnly">Whether to include just public tasks, or all the tasks in any loaded assemblies</param>
|
|
static bool FindAvailableTasks(Dictionary<string, ScriptTask> NameToTask, bool bPublicTasksOnly)
|
|
{
|
|
Assembly[] LoadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
|
|
if(bPublicTasksOnly)
|
|
{
|
|
LoadedAssemblies = LoadedAssemblies.Where(x => IsPublicAssembly(new FileReference(x.Location))).ToArray();
|
|
}
|
|
foreach (Assembly LoadedAssembly in LoadedAssemblies)
|
|
{
|
|
Type[] Types = LoadedAssembly.GetTypes();
|
|
foreach(Type Type in Types)
|
|
{
|
|
foreach(TaskElementAttribute ElementAttribute in Type.GetCustomAttributes<TaskElementAttribute>())
|
|
{
|
|
if(!Type.IsSubclassOf(typeof(CustomTask)))
|
|
{
|
|
CommandUtils.LogError("Class '{0}' has TaskElementAttribute, but is not derived from 'Task'", Type.Name);
|
|
return false;
|
|
}
|
|
if(NameToTask.ContainsKey(ElementAttribute.Name))
|
|
{
|
|
CommandUtils.LogError("Found multiple handlers for task elements called '{0}'", ElementAttribute.Name);
|
|
return false;
|
|
}
|
|
NameToTask.Add(ElementAttribute.Name, new ScriptTask(ElementAttribute.Name, Type, ElementAttribute.ParametersType));
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Reads the contents of the given token
|
|
/// </summary>
|
|
/// <returns>Contents of the token, or null if it does not exist</returns>
|
|
public string ReadTokenFile(FileReference Location)
|
|
{
|
|
return Location.Exists()? File.ReadAllText(Location.FullName) : null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Attempts to write an owner to a token file transactionally
|
|
/// </summary>
|
|
/// <returns>True if the lock was acquired, false otherwise</returns>
|
|
public bool WriteTokenFile(FileReference Location, string Signature)
|
|
{
|
|
// Check it doesn't already exist
|
|
if(Location.Exists())
|
|
{
|
|
return false;
|
|
}
|
|
|
|
// Make sure the directory exists
|
|
Location.Directory.CreateDirectory();
|
|
|
|
// Create a temp file containing the owner name
|
|
string TempFileName;
|
|
for(int Idx = 0;;Idx++)
|
|
{
|
|
TempFileName = String.Format("{0}.{1}.tmp", Location.FullName, Idx);
|
|
try
|
|
{
|
|
byte[] Bytes = Encoding.UTF8.GetBytes(Signature);
|
|
using (FileStream Stream = File.Open(TempFileName, FileMode.CreateNew, FileAccess.Write, FileShare.None))
|
|
{
|
|
Stream.Write(Bytes, 0, Bytes.Length);
|
|
}
|
|
break;
|
|
}
|
|
catch(IOException)
|
|
{
|
|
if(!File.Exists(TempFileName))
|
|
{
|
|
throw;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Try to move the temporary file into place.
|
|
try
|
|
{
|
|
File.Move(TempFileName, Location.FullName);
|
|
return true;
|
|
}
|
|
catch
|
|
{
|
|
if(!File.Exists(TempFileName))
|
|
{
|
|
throw;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Checks whether the given assembly is a publically distributed engine assembly.
|
|
/// </summary>
|
|
/// <param name="File">Assembly location</param>
|
|
/// <returns>True if the assembly is distributed publically</returns>
|
|
static bool IsPublicAssembly(FileReference File)
|
|
{
|
|
DirectoryReference EngineDirectory = UnrealBuildTool.UnrealBuildTool.EngineDirectory;
|
|
if(File.IsUnderDirectory(EngineDirectory))
|
|
{
|
|
string[] PathFragments = File.MakeRelativeTo(EngineDirectory).Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
|
if(PathFragments.All(x => !x.Equals("NotForLicensees", StringComparison.InvariantCultureIgnoreCase) && !x.Equals("NoRedist", StringComparison.InvariantCultureIgnoreCase)))
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Find all the nodes in the graph which are already completed
|
|
/// </summary>
|
|
/// <param name="Graph">The graph instance</param>
|
|
/// <param name="Storage">The temp storage backend which stores the shared state</param>
|
|
HashSet<Node> FindCompletedNodes(Graph Graph, TempStorage Storage)
|
|
{
|
|
HashSet<Node> CompletedNodes = new HashSet<Node>();
|
|
foreach(Node Node in Graph.Agents.SelectMany(x => x.Nodes))
|
|
{
|
|
if(Storage.IsComplete(Node.Name))
|
|
{
|
|
CompletedNodes.Add(Node);
|
|
}
|
|
}
|
|
return CompletedNodes;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Builds all the nodes in the graph
|
|
/// </summary>
|
|
/// <param name="Job">Information about the current job</param>
|
|
/// <param name="Graph">The graph instance</param>
|
|
/// <returns>True if everything built successfully</returns>
|
|
bool BuildAllNodes(JobContext Job, Graph Graph, TempStorage Storage)
|
|
{
|
|
// Build a flat list of nodes to execute, in order
|
|
Node[] NodesToExecute = Graph.Agents.SelectMany(x => x.Nodes).ToArray();
|
|
|
|
// Check the integrity of any local nodes that have been completed. It's common to run formal builds locally between regular development builds, so we may have
|
|
// stale local state. Rather than failing later, detect and clean them up now.
|
|
HashSet<Node> CleanedNodes = new HashSet<Node>();
|
|
foreach(Node NodeToExecute in NodesToExecute)
|
|
{
|
|
if(NodeToExecute.InputDependencies.Any(x => CleanedNodes.Contains(x)) || !Storage.CheckLocalIntegrity(NodeToExecute.Name, NodeToExecute.Outputs.Select(x => x.TagName)))
|
|
{
|
|
Storage.CleanLocalNode(NodeToExecute.Name);
|
|
CleanedNodes.Add(NodeToExecute);
|
|
}
|
|
}
|
|
|
|
// Execute them in order
|
|
int NodeIdx = 0;
|
|
foreach(Node NodeToExecute in NodesToExecute)
|
|
{
|
|
Log("****** [{0}/{1}] {2}", ++NodeIdx, NodesToExecute.Length, NodeToExecute.Name);
|
|
if(!Storage.IsComplete(NodeToExecute.Name))
|
|
{
|
|
Log("");
|
|
if(!BuildNode(Job, Graph, NodeToExecute, Storage, false))
|
|
{
|
|
return false;
|
|
}
|
|
Log("");
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Build a node
|
|
/// </summary>
|
|
/// <param name="Job">Information about the current job</param>
|
|
/// <param name="Graph">The graph to which the node belongs. Used to determine which outputs need to be transferred to temp storage.</param>
|
|
/// <param name="Node">The node to build</param>
|
|
/// <returns>True if the node built successfully, false otherwise.</returns>
|
|
bool BuildNode(JobContext Job, Graph Graph, Node Node, TempStorage Storage, bool bWithBanner)
|
|
{
|
|
DirectoryReference RootDir = new DirectoryReference(CommandUtils.CmdEnv.LocalRoot);
|
|
|
|
// Create the mapping of tag names to file sets
|
|
Dictionary<string, HashSet<FileReference>> TagNameToFileSet = new Dictionary<string,HashSet<FileReference>>();
|
|
|
|
// Read all the input tags for this node, and build a list of referenced input storage blocks
|
|
HashSet<TempStorageBlock> InputStorageBlocks = new HashSet<TempStorageBlock>();
|
|
foreach(NodeOutput Input in Node.Inputs)
|
|
{
|
|
TempStorageFileList FileList = Storage.ReadFileList(Input.ProducingNode.Name, Input.TagName);
|
|
TagNameToFileSet[Input.TagName] = FileList.ToFileSet(RootDir);
|
|
InputStorageBlocks.UnionWith(FileList.Blocks);
|
|
}
|
|
|
|
// Read all the input storage blocks, keeping track of which block each file came from
|
|
Dictionary<FileReference, TempStorageBlock> FileToStorageBlock = new Dictionary<FileReference, TempStorageBlock>();
|
|
foreach(TempStorageBlock InputStorageBlock in InputStorageBlocks)
|
|
{
|
|
TempStorageManifest Manifest = Storage.Retreive(InputStorageBlock.NodeName, InputStorageBlock.OutputName);
|
|
foreach(FileReference File in Manifest.Files.Select(x => x.ToFileReference(RootDir)))
|
|
{
|
|
TempStorageBlock CurrentStorageBlock;
|
|
if(FileToStorageBlock.TryGetValue(File, out CurrentStorageBlock))
|
|
{
|
|
LogError("File '{0}' was produced by {1} and {2}", InputStorageBlock, CurrentStorageBlock);
|
|
}
|
|
FileToStorageBlock[File] = InputStorageBlock;
|
|
}
|
|
}
|
|
|
|
// Add placeholder outputs for the current node
|
|
foreach(NodeOutput Output in Node.Outputs)
|
|
{
|
|
TagNameToFileSet.Add(Output.TagName, new HashSet<FileReference>());
|
|
}
|
|
|
|
// Execute the node
|
|
if(bWithBanner)
|
|
{
|
|
Console.WriteLine();
|
|
CommandUtils.Log("========== Starting: {0} ==========", Node.Name);
|
|
}
|
|
if(!Node.Build(Job, TagNameToFileSet))
|
|
{
|
|
return false;
|
|
}
|
|
if(bWithBanner)
|
|
{
|
|
CommandUtils.Log("========== Finished: {0} ==========", Node.Name);
|
|
Console.WriteLine();
|
|
}
|
|
|
|
// Determine all the output files which are required to be copied to temp storage (because they're referenced by nodes in another agent)
|
|
HashSet<FileReference> ReferencedOutputFiles = new HashSet<FileReference>();
|
|
foreach(Agent Agent in Graph.Agents)
|
|
{
|
|
bool bSameAgent = Agent.Nodes.Contains(Node);
|
|
foreach(Node OtherNode in Agent.Nodes)
|
|
{
|
|
if(!bSameAgent || Node.ControllingTrigger != OtherNode.ControllingTrigger)
|
|
{
|
|
foreach(NodeOutput Input in OtherNode.Inputs.Where(x => x.ProducingNode == Node))
|
|
{
|
|
ReferencedOutputFiles.UnionWith(TagNameToFileSet[Input.TagName]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Find a block name for all new outputs
|
|
Dictionary<FileReference, string> FileToOutputName = new Dictionary<FileReference, string>();
|
|
foreach(NodeOutput Output in Node.Outputs)
|
|
{
|
|
HashSet<FileReference> Files = TagNameToFileSet[Output.TagName];
|
|
foreach(FileReference File in Files)
|
|
{
|
|
if(!FileToStorageBlock.ContainsKey(File) && File.IsUnderDirectory(RootDir))
|
|
{
|
|
if(Output == Node.DefaultOutput)
|
|
{
|
|
if(!FileToOutputName.ContainsKey(File))
|
|
{
|
|
FileToOutputName[File] = "";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
string OutputName;
|
|
if(FileToOutputName.TryGetValue(File, out OutputName) && OutputName.Length > 0)
|
|
{
|
|
FileToOutputName[File] = String.Format("{0}+{1}", OutputName, Output.TagName.Substring(1));
|
|
}
|
|
else
|
|
{
|
|
FileToOutputName[File] = Output.TagName.Substring(1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Invert the dictionary to make a mapping of storage block to the files each contains
|
|
Dictionary<string, HashSet<FileReference>> OutputStorageBlockToFiles = new Dictionary<string, HashSet<FileReference>>();
|
|
foreach(KeyValuePair<FileReference, string> Pair in FileToOutputName)
|
|
{
|
|
HashSet<FileReference> Files;
|
|
if(!OutputStorageBlockToFiles.TryGetValue(Pair.Value, out Files))
|
|
{
|
|
Files = new HashSet<FileReference>();
|
|
OutputStorageBlockToFiles.Add(Pair.Value, Files);
|
|
}
|
|
Files.Add(Pair.Key);
|
|
}
|
|
|
|
// Write all the storage blocks, and update the mapping from file to storage block
|
|
foreach(KeyValuePair<string, HashSet<FileReference>> Pair in OutputStorageBlockToFiles)
|
|
{
|
|
TempStorageBlock OutputBlock = new TempStorageBlock(Node.Name, Pair.Key);
|
|
foreach(FileReference File in Pair.Value)
|
|
{
|
|
FileToStorageBlock.Add(File, OutputBlock);
|
|
}
|
|
Storage.Archive(Node.Name, Pair.Key, Pair.Value.ToArray(), Pair.Value.Any(x => ReferencedOutputFiles.Contains(x)));
|
|
}
|
|
|
|
// Publish all the output tags
|
|
foreach(NodeOutput Output in Node.Outputs)
|
|
{
|
|
HashSet<FileReference> Files = TagNameToFileSet[Output.TagName];
|
|
|
|
HashSet<TempStorageBlock> StorageBlocks = new HashSet<TempStorageBlock>();
|
|
foreach(FileReference File in Files)
|
|
{
|
|
TempStorageBlock StorageBlock;
|
|
if(FileToStorageBlock.TryGetValue(File, out StorageBlock))
|
|
{
|
|
StorageBlocks.Add(StorageBlock);
|
|
}
|
|
}
|
|
|
|
Storage.WriteFileList(Node.Name, Output.TagName, Files, StorageBlocks.ToArray());
|
|
}
|
|
|
|
// Mark the node as succeeded
|
|
Storage.MarkAsComplete(Node.Name);
|
|
return true;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Legacy command name for compatibility.
|
|
/// </summary>
|
|
public class Build : BuildGraph
|
|
{
|
|
}
|
|
}
|