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 ========================== MAJOR FEATURES + CHANGES ========================== Change 2976484 on 2016/05/12 by Jason.Bestimt #ROBOMERGE-AUTHOR: nick.atamas Added queueing to HUD Alerts so they don't clobber each other. Added input visualization so that keys show up in game. SRichTextBlock/UOrionRichTextBlock now have a MinDesiredWidth #test PIE #ROBOMERGE-SOURCE: CL 2976474 in //Orion/Release-0.26/... via CL 2976481 via CL 2976482 via CL 2976483 #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2976256 on 2016/05/12 by Zak.Middleton #ue4 - Fix for shipping build. #tests compiled Change 2976205 on 2016/05/12 by Zak.Middleton #ue4 - (Merge2957866) Add MaxDepenetration for characters against geometry and pawns. #tests MP PIE PlayGo (Merging CL2957866using Framework->DevGeneral) Change 2976166 on 2016/05/12 by Daniel.Lamb Cooking optimziation to unsolicited markup saves 150 seconds paragon cook time. #test Cook paragon Change 2976161 on 2016/05/12 by Zak.Middleton #ue4 - Make sure LastUpdateLocation, Rotation, and Velocity are updated on client and server error corrections. ForcePositionUpdate should call PerformMovement regardless of velocity (there may be root motion or gravity effects). #tests PIE MP w/ real-world networking Change 2976092 on 2016/05/12 by Mieszko.Zielinski Modified adding dynamic subtrees to BT component so that we get a log info if it fails #UE4 #test golden path Change 2976001 on 2016/05/12 by Robert.Manuszewski Don't log to memory on dedicated servers #jira UE-30693 #test Cooked dedicated server and client Change 2975855 on 2016/05/12 by Lukasz.Furman fixed behavior tree serialization spawning duplicates of task services #tests BT editor Change 2975706 on 2016/05/12 by Daniel.Lamb Fixed redirect collector stats. #test Compile Change 2975636 on 2016/05/12 by Jason.Bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge DUI @ CL 2975557 #RB:none #Tests:none [CodeReviewed]: matt.schembari, kerrington.smith, tony.oliva, jaymee.stanford, mona.huang, alex.conner, jacob.lawyer, paul.shank #ROBOMERGE-SOURCE: CL 2975635 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change2975592on 2016/05/12 by Zak.Middleton #ue4 - Add stat for SetHitResultFromShapeAndFaceIndex(). #tests PIE Change 2975589 on 2016/05/12 by Zak.Middleton #ue4 - Avoid filling temp variable unless in Editor builds. It's only used later in the function in Editor builds. #tests PIE Change 2975588 on 2016/05/12 by Zak.Middleton #ue4 - Minor tweak to avoid array read each loop iteration. #tests PIE Change 2975587 on 2016/05/12 by Zak.Middleton #ue4 - Add "IsPlayerController()" function to AController. Variable already existed, just wasn't exposed. #tests PIE Change 2975504 on 2016/05/12 by Daniel.Lamb Remove new stats system because it broke build. #test cook paragon Change 2975500 on 2016/05/12 by Daniel.Lamb Enable redirect timers so I can get stats from build machines. #test cook paragon. Change 2975367 on 2016/05/12 by Jason.Bestimt #ROBOMERGE-AUTHOR: david.nikdel #OGF #CatalogService #OSS #Localization - Flush the cached offers/items in CatalogServiceMcp when the culture changes since they contain localized text - Flush the cached virtual catalog offers/items in McpCatalogHelper when the culture changes since they contain localized text - Replaced SetForceCatalogRefresh with ClearCache per CR with SamZ (will require Launcher fixup) [CodeReviewed]: Sam.Zamani, Matt.Kuhlenschmidt #RB: Sam.Zamani #TESTS: storefront w/ language change #ROBOMERGE-SOURCE: CL 2975366 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2975209 on 2016/05/12 by Simon.Tovey Fixed initialization order warning. #tests none Change 2975200 on 2016/05/12 by Simon.Tovey Translucency GPU time stats for automation. Refactored separate translucency gpu timer to more general helper class and used it to also time regular translucency. Feeding both of these into a stat to help art identify poorly performing VFX for more detailed investigation. There are occasional spikes when the GPU is starved but overall the data out seems good. #tests GoldenPath, Editor, Auto downsampling works, new stat produces reasonable data. Change 2974984 on 2016/05/11 by Mieszko.Zielinski Fixed a bug in graph-a-star heuristics' calculation #UE4 #test golden path Change 2974916 on 2016/05/11 by Jason.Bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 26 @ CL 2974578 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2974915 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2974869 on 2016/05/11 by Ben.Marsh BuildGraph: Add a MergeTelemetryWithPrefix="..." parameter to the <Command> task which allows merging the telemetry data from a child UAT run, adding a given prefix to all the key names. #tests none Change 2974673 on 2016/05/11 by Mieszko.Zielinski Fix to BT not stopping if "StopTree" called while BT was waiting for a task to latently abort #UE4 (change by ?ukasz.Furman) #test golden path Change 2974581 on 2016/05/11 by Jason.Bestimt #ROBOMERGE-AUTHOR: matt.kuhlenschmidt Merged CL 2974565 from Release-.26 -> Main: Fixed loc region not saving in shipping builds Partially fixed store not refreshing when changing regions. Real money currency items are pending additional fixes #ROBOMERGE-SOURCE: CL 2974578 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2974444 on 2016/05/11 by Jason.Bestimt #ROBOMERGE-AUTHOR: richard.fawcett Reimplement support for specifying BuildPatchTool version used in chunking This is now possible after Ben Marsh's fix to BuildGraph with CL 2974407. #tests none #ROBOMERGE-SOURCE: CL 2974441 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2974408 on 2016/05/11 by Jason.Bestimt #ROBOMERGE-AUTHOR: ben.marsh BuildGraph: Fix support for variable expansion in user-defined enum types. Enums in the schema are now represented as the union of valid values and a regex matching a balanced property expansion string, which still validates/autocompletes cleanly in Visual Studio. #tests none [CodeReviewed] Richard.Fawcett #ROBOMERGE-SOURCE: CL 2974407 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2974392 on 2016/05/11 by Daniel.Lamb Optimizing resolve string asset reference resolution. Added timing stats (disabled by default). #test Cook paragon. Change 2974349 on 2016/05/11 by Jason.Bestimt #ROBOMERGE-AUTHOR: richard.fawcett Back out changelist 2974298. An issue with the BuildGraph system has prevented this change from working on the build farm. #tests none #ROBOMERGE-SOURCE: CL 2974347 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2974299 on 2016/05/11 by Jason.Bestimt #ROBOMERGE-AUTHOR: richard.fawcett Add support for chunking builds with the pre-release version of BuildPatchTool. #tests None. This code will be tested by creating a build on the build farm immediately after submission. #ROBOMERGE-SOURCE: CL 2974298 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2974277 on 2016/05/11 by Lina.Halper Fix up of retargeting when it skips replacing nested reference #tests: retargeting anim BP Change 2974210 on 2016/05/11 by Bart.Bressler Merging Oodle changes from Dev-Networking Change 2939167 on 2016/04/10 by John.Barrett Updated packet bit termination code, so that both UNetConnection's and the PacketHandler use a termination bit (required for both PacketHandler/UNetconnection, as HandlerComponent's such as Oodle, are byte-aligned and do not preserve packet bit size). Added new 'stat packet' stats group, for tracking reserved packet bits. Added '-NoPacketHandler' commandline parameter, for disabling the PacketHandler and all HandlerComponent's (including stateless handshake) - restoring netcode to pre-PacketHandler state. Removed PacketHandler 'packet overhead' method of packet bit size calculation - replaced with termination bit. Still partially used for reserving bits within packets (but renamed to avoid conflict with other 'PacketOverhead' variable). Refactored/consolidated some PacketHandler code. Added more stringent bounds checking on packet sizes. Change 2939168 on 2016/04/10 by John.Barrett Updated Oodle to support new packet bit-termination code. Added Oodle protocol support for selective packet compression (packets can now be sent uncompressed - game code will require a hook for this) - required for new bit-based netcode (Oodle outputs byte-aligned data, allowing compressed data to exceed size of uncompressed data - and thus, maximum packet size if not sent uncompressed - in rare edge cases). Added '-CompressionTest' commandline parameter to Oodle dictionary generation commandlet, which reserves a portion of captured packets, for determining the compression savings percentage. Added '-OodleDebugDump' commandline parameter, which disables normal dictionary generation, and converts packet captures into a .bin file, which is compatible with the Oodle 'example_packet.cpp' code. Added temporary security bandaids to Oodle code, based on report that Luigi Auriemma put together, which deals with potential weaknesses in the Oodle API Added 'stat oodle' stats for tracking failed attempts at compressing packets. Change 2942964 on 2016/04/10 by Ryan.Gerleve Fix broken indentation/formatting Change 2958260 on 2016/04/27 by Bart.bRessler Add branch name and changelist to oodle packet capture filenames. Change 2964360 on 2016/05/03 by John.Barrett Updated Oodle to support using a dictionary and capturing packets at the same time. The dictionary is now always loaded, if specified, and whenever -OodleCapturing is on the commandline, packets are captured alongside the active dictionary. Added several debug commands, to aid with testing compression performance (not QA-ready; only works with 1 player on a server): "Oodle Compression On/Off" - enables/disables packet compression (but still decompresses received compressed packets) "Oodle Dictionary Unload/Load" - unloads/loads the dictionary files, to allow releasing the files for dictionary generation, and reloading the new dictionary. "Oodle Capture On/Off" - Enables/Disables packet capturing at runtime - requires '-OodleCapturing' on commandline. "Oodle ResetStats" - resets the 'stat oodle' stat counters. The NetcodeUnitTest plugin should be enabled, so that these commands can automatically execute on the server as well, as needed. Change 2964553 on 2016/05/03 by Bart.Bressler Add process ID to oodle capture filenames Change 2966247 on 2016/05/04 by John.Pollard Oodle 2.1.5 SDK Change 2968761 on 2016/05/06 by Bart.Bressler - Added changelist number as parameter to most command line tasks to filter captures by their changelist number (use "all" to get everything) - Moved a bunch of the file searching/processing code outside of the tasks themselves so that the tasks all just operate to an array of capture files, this makes it easier to create new command line options - When looking for capture files, we will now recursively search subdirectories Change 2970529 on 2016/05/09 by Bart.Bressler Add an optional "CapturePercentage" command line parameter that has a percentage chance of generating capture files per connection Change 2970874 on 2016/05/09 by Bart.Bressler - Turn on OODLE_DEV_SHIPPING in the Orion server shipping config so that captures can be generated in shipping builds - Link to version 215 of oodle Change 2971233 on 2016/05/09 by Bart.Bressler Update Oodle DLLs in Orion Change 2971362 on 2016/05/09 by Bart.Bressler Create script for building an oodle dictionary out of capture files in an arbitrary location Change 2972176 on 2016/05/10 by Bart.Bressler Update oodle references to version 215 in OodleHandlerComponent.Build.cs #tests used solo vs. ai to test oodle captures and using them Change 2974035 on 2016/05/11 by Simon.Tovey Adding fx.ParticleCollisionIgnoreInvisibleTime to replace hard coded time. This is the time a PSC needs to be invisible for to have all it's collisions ignored. This is potentially the cause of a bug Tim et al are seeing. #tests Editor, Can be used to repro/fix the issue. Change 2973985 on 2016/05/11 by Lina.Halper Retargeting fix with editor saving issue #tests: retargeting Change 2973695 on 2016/05/11 by Jason.Bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 26 @ CL 2973469 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2973694 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2973679 on 2016/05/11 by Graeme.Thornton UAT parameter -signedpak now no longer implies -pak #tests win64 cooked client. checked that pak generation works as expected through project launcher Change 2973588 on 2016/05/11 by Simon.Tovey OR-21033 - Get physical material from particle collision event exposed in Cascade / Blueprint Particles can now receive collision events selectively based upon the phyisics material of the hit. Physics material is passed through the event and can be accessed in BPs. The Event Receiver Spawn node also now has an array of Allowed and Banned phys materials. #tests Editor and game. Coudln't test cooked as having unrelated crashes in cooked games. Shouldn't be any cooked/uncooked issues here. Change 2973394 on 2016/05/11 by bruce.nesbit Fixed couple of shadow vars #tests compiled Change 2973335 on 2016/05/11 by Andrew.Grant Warning fix #tests compiled Change 2973308 on 2016/05/10 by Dmitry.Rekman Add "unplayable condition" reporting. - The server will report an unplayable condition by creating a local file (under Saved). - An external script can possibly notice this and, applying its own logic on % of servers reporting it, profile or shutdown the whole machine. - Report file is to be deleted by an external script. #tests Compiled and ran Linux server, subjected it to various hitches. Change 2973235 on 2016/05/10 by Zak.Middleton #ue4 - Removed allocs after initial spawn from client saved move processing in character movement. #tests PIE multiplayer w/ Bots Change 2973157 on 2016/05/10 by Olaf.Piesche Merging CL 2973112 from //UE4/Dev-Rendering->//Orion/Dev-General Providing particle source and target for beam emitters #tests editor game PC Change 2972715 on 2016/05/10 by Jason.Bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 26 @ CL 2972681 #RB: none #Tests:none #ROBOMERGE-SOURCE: CL 2972712 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2972678 on 2016/05/10 by Mieszko.Zielinski Fixed babysitter bot not avoiding enemy towers when pathfinding back to base #Orion #jira OR-18590 #test golden path Change 2972595 on 2016/05/10 by Lina.Halper Animation Retargeting fix for blendspaces #code review: Benn.Gallagher, Martin.Wilson #tests: retargeting anim BP Change 2972282 on 2016/05/10 by Daniel.Lamb Optimized string asset reference resolution slightly to help get back missing 10 minutes from paragon cook. #test cook paragon. Change 2972260 on 2016/05/10 by Laurent.Delayen Fixed crash in UCharacterMovementComponent::HasRootMotionSources(). #tests Chains pull not crashing anymore. Change 2972241 on 2016/05/10 by Frank.Fella UMG - Fixes for material animation copied from 4.12. #RB Matt K. #TESTS Struct materials can now be animated and animated materials are named nicely. Change 2971643 on 2016/05/09 by Dmitry.Rekman Add reporting of "zero load" frame times (OR-21035). - Added a thread that does nothing but sleeps and counts how often it missed the target FPS. - Added an analytics event ServerZeroLoadFrameTimeDistribution that is sent at the end of the match. - Server only. #tests Compiled and ran Linux server on a compatible content, played few matches in a row. Change 2971544 on 2016/05/09 by Ben.Marsh EC: Use a full path to the telemetry file, to account for UAT switching directories. Change 2971532 on 2016/05/09 by Wes.Hunt Alter the cook stats hierarchical profile data to reflect the latest cook changes. #tests none Change 2971527 on 2016/05/09 by Ben.Marsh UAT: Move telemetry object into CommandUtils, so we can add stats from anywhere. #tests none Change 2971461 on 2016/05/09 by David.Ratti Fix issues with mesh swap skins: -Front end intro animations not playing -In game spawn animations not playing -Some attachment weirdness (twinblast) #tests golden path Change 2971460 on 2016/05/09 by David.Ratti Fallback to Target actor if there is no instigating actor in the GAmeplayCue parameters when determining if we should play "local only" effects #tests pie Change 2971364 on 2016/05/09 by Ben.Marsh EC: Add support for adding custom telemetry data from UAT scripts, which gets piped through to the trends panel in EC. #tests none Change 2971245 on 2016/05/09 by Dmitry.Rekman Add a "hitchhunter" log message to catch hitches while sleeping. #tests Compiled and ran Linux server on a compatible content. Change 2971196 on 2016/05/09 by jason.bestimt #ORION_MAIN - Merge 25.2 @ CL 2971139 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2971168 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) #ROBOMERGE-SAYS: Beep boop! I couldn't merge this change. Please do it yourself, human. //Orion/Dev-General/OrionGame/Content/Characters/Heroes/Coil/Audio/Body/Pixie_Cranking_Loop_Cue.uasset - can't branch exclusive file already opened #CodeReview: david.nikdel, jason.bestimt Change 2971113 on 2016/05/09 by Dmitry.Rekman UdpMessaging: Fixed broken filters for when to enable UDP transport. - Redoing MaxP's change from Dev-Sequencer (CL 2963357). - Reduces number of threads spawned by the server. #tests Compiled Linux server, ran it on a compatible content. Change 2971040 on 2016/05/09 by jason.bestimt #ORION_MAIN - Merge 25.2 @ CL 2970990 #RB:none #Tests:none [CodeReviewed]: jon.lietz #ROBOMERGE-SOURCE: CL 2971027 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) #ROBOMERGE-SAYS: Beep boop! I couldn't merge this change. Please do it yourself, human. #CodeReview: david.nikdel, jason.bestimt Change 2970555 on 2016/05/09 by Ben.Marsh BuildGraph: Only show warnings and errors for the SavePackage log during cooks. Prevents redundant display of information that's already in the Cook log. #tests preflight here: https://ec-01.epicgames.net/commander/link/jobDetails/jobs/6443796 Change 2970507 on 2016/05/09 by David.Ratti Support for linking passive abilities to a key binded ability. E.g., allow a passive ability to be unlocked and leveled up in step with a key binded ability. Cleaned up the TryLevel/CanLevelUp code a bit: moved to Orion Ability System Component #tests pie Change 2970414 on 2016/05/09 by Graeme.Thornton Don't take a copy of the child tags array when doing UGameplayTagsManager::FindTagNode, just take a const& #tests win64 client golden path Change 2969729 on 2016/05/06 by Mieszko.Zielinski Fixed a dumb mistake in a conditional expresion in UNavigationQueryFilter::GetQueryFilter #UE4 #test golden path Change 2969675 on 2016/05/06 by Mieszko.Zielinski Implemented "meta navigation filter" that can fetch a filter class based on given agent #UE4 Added NavFilter_AIControllerDefault that fetched DefaultNavigationFilter from AIController Reverted hack-feature that supplied same functionality to EQS #test golden path Change 2969652 on 2016/05/06 by Michael.Noland HLOD: Changed UI gating code so that whether or not a LOD Actor is valid is based on the presence of at least two static mesh components, rather than at least two actors (to improve handling when including BPs) - Repurposed HasValidSubActors for this check, and introduced HasAnySubActors() for the existing uses as this better matches the intent of how the function was used #tests Added a single BP containing 7 mesh components to a new ALODActor and verified that it allowed a proxy to be generated Change 2969651 on 2016/05/06 by Michael.Noland Simplygon: Added time taken for simplygon mesh reduction to the log message #tests Simplified a LOD cluster and inspected the log Change 2969604 on 2016/05/06 by Uriel.Doyon Changed default value to true for UParticleModuleVectorFieldLocal::bUseFixDT. #tests confirmed that default value has changed for old assets, while allowing override. Change 2969418 on 2016/05/06 by jason.bestimt #ROBOMERGE-AUTHOR: andrew.grant Fixed unconverted char string being passed as part of build info #tests ran & verified patch check passes #ROBOMERGE-SOURCE: CL 2969417 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2968817 on 2016/05/06 by jason.bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 25.2 @ CL 2968572 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2968813 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2968383 on 2016/05/05 by Mieszko.Zielinski Added "default navigation filter" to AIController #UE4 Also, made EQS take advantage of that #test golden path Change 2968225 on 2016/05/05 by John.Pollard Add sanity checks and more info to help track down possible memory corruption #tests Networking, replication Change 2967903 on 2016/05/05 by jason.bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 25.2 @ CL 2967827 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2967902 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2967899 on 2016/05/05 by Lina.Halper Merged change of 2956152 Remove invalid ensure - this didn't work if you have composite inside. #tests: none Change 2967870 on 2016/05/05 by Andrew.Grant Fix for OR-20731 (gamever crashes client) #tests gamever at console with -game Change 2967606 on 2016/05/05 by Wes.Hunt Tweaked output log message for HTTP module shutdown. #tests none Change 2967359 on 2016/05/05 by Wes.Hunt HttpManager will log outstanding requests on shutdown so people can debug shutdown issues and ensure their requests get flushed properly. Also changed default LogHttp logging level to display so these messages can be shown by default without using warning level. #tests ran editor build and queued up an event using the console command, then quit immediately. the log indeed showed that HttpManager had to wait at least 0.5 seconds for the request to complete. Change 2966987 on 2016/05/05 by Dmitry.Rekman Fix editor build. #tests Compiled Win64 editor. Change 2966977 on 2016/05/05 by Dmitry.Rekman Added collecting and reporting periodic server frame time distribution. - Added generic FHistogram class and necessary analytic events. - Also added reporting hostname (OR-20842). #tests Built Linux server and ran a few matches on a compatible content. Change 2966920 on 2016/05/04 by jason.bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 25.2 @ CL 2966805 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2966919 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2966778 on 2016/05/04 by Michael.Noland Rendering: Fixed shadow variable warning in GPUProfiler #tests Compiled and tested GPUProfiler command Change 2966769 on 2016/05/04 by Mieszko.Zielinski Fixed GraphAStar not resetting the output path before fillinf it with results #UE4 #test golden path Change 2966704 on 2016/05/04 by Michael.Noland Rendering: Added triangle and draw call summaries to ProfileGPU output, broken up by asset and material - This is controlled by r.ProfileGPU.PrintAssetSummary, which defaults to 1, but you really need r.ShowMaterialDrawEvents 1 enabled as well for a complete picture - It can also output a summary line for speciifc asset names using a comma separated list in r.ProfileGPU.AssetSummaryCallOuts (e.g., "LOD,HeroName") #tests Used ProfileGPU a number of times Change 2966696 on 2016/05/04 by Michael.Noland Engine: Embedded FPS chart preamble/postamble/row .html files into ChartCreation.cpp to permanently solve packaging woes #tests Tested FPS charts in an uncooked and cooked build #jira OR-19713 Change2966336on 2016/05/04 by Lukasz.Furman fixed jungle minions unable to reach spawn locations when camp resets #jira OR-20700 #tests jungle camp POC Change 2965948 on 2016/05/04 by David.Ratti Changes to how passive abilities activate -Passives now continually try to activate by default rather than only on spawn Support for Status.Immortal -Prevents death, fies AbilityTriggerEvent.ImmortalProc when this happens. -Clamps health to 1. Fixed bug in muriel passive where ShieldHealthRegen would be left in the world where muriel died. Fixed bunch of crap in GA_OnSpawn that was causing desync on client at start of match #tests multi pie Change 2965870 on 2016/05/04 by Ryan.Gerleve Duplicated fix from Release-4.12 by marc.audy, CL 2960819: Owned components are once again referenced by their Owning actor for GC purposes #jira UE-29131 #tests golden path Change 2965798 on 2016/05/04 by jason.bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 25.2 @ CL 2965789 #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2965796 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2965220 on 2016/05/03 by Dmitry.Rekman Log instance id and system id (OR-20782). - These ids get reported in multiple analytics events, having them logged is helpful for quickly mapping events to the log file. #tests Compiled Linux server, ran on compatible client. Change 2964907 on 2016/05/03 by Jason.Bestimt #ORION_DG - Merge MAIN @ CL 2964858 #RB:none #Tests:none Change 2964530 on 2016/05/03 by Laurent.Delayen Renamed GetSlotRootMotionWeight to GetSlotNodeGlobalWeight and made it double buffered to it's safe to access anytime. Added GetSlotMontageGlobalWeight() to get the Global Weight of a montage being played on a Slot. (Also double buffered). Added GetInstanceMachineWeight() to get Global Weight of a State Machine in the AnimGraph. (Also double buffered) Added FAnimInstanceProxy::GetStateMachineIndexAndDescription to avoid searching through the AnimNodeProperties twice. #tests Chains full feature system in PIE. Change 2964498 on 2016/05/03 by Frank.Fella DecalComponent - Fix visibility so that it behaves like other scene components with regard to the editor visibility, component visibility, and actor hidden in game flags. #RB Andrew Rodham #TESTS Visibility for decals works like other scene components in the editor, and their visibility can now be animated properly by sequencer. Change 2964428 on 2016/05/03 by Benn.Gallagher Fixed stale clothing chunk/section references after container realloc in editor #tests editor Change 2964316 on 2016/05/03 by bruce.nesbit Banner revisions Banners now use components for various banner items Banners can now be enabled when killing a hero. #tests PIE+Game Change 2964187 on 2016/05/03 by Jon.Lietz Speeding up the tag count check in UAbilitySystemComponent::RegisterAndCallGameplayTagEvent() - Remove the call to GetAggregatedStackCount and creating a FGameplayEffectQuery every time we call RegisterAndCallGameplayTagEvent - Added GetTagCount to the UAbilitySystemComponent that will call GetTagCount on the GameplayTagCountContainer #RB DanY #tests JIP shadow pad still works. Change 2964136 on 2016/05/03 by Laurent.Delayen Fix crash while switching tabs using Persona. #tests not crashing anymore. Change 2964083 on 2016/05/03 by jason.bestimt #ROBOMERGE-AUTHOR: jason.bestimt #ORION_MAIN - Merge 25.2 @ CL 2963929 [CodeReviewed]: andrew.grant HTTP Manager has larger stack size (1024) #RB:none #Tests:none #ROBOMERGE-SOURCE: CL 2964080 in //Orion/Main/... #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2963771 on 2016/05/02 by Nick.Atamas Setting a desired size scale invalidates layout and volatility. #test none Change 2963555 on 2016/05/02 by Rob.Cannaday Fix PS4 Orion players being able to whisper chat with non-Orion players #jira OR-20626 #tests chat with launcher, fortnite Change 2963387 on 2016/05/02 by Laurent.Delayen Added GatherDebugData to FABRIK node. #tests showdebug animation works on Chains now. Change 2963331 on 2016/05/02 by Jon.Lietz fixing compile error, dont need the clamp just the ternary on the EventType and pass down the tag count or 1. #RB none #tests compiles Change2963106on 2016/05/02 by Rob.Cannaday Increase HTTP thread's stack size to 128k We discovered a stack overflow when the stack size was 64kb in LavasoftTcpService64.dll (Ad-Aware's Lavasoft Web Companion) #tests log in Change 2963047 on 2016/05/02 by Jon.Lietz OR-20206 for JIP we need to call the bound function if we already have the tag on reconnect. - adding a new function in UAbilitySystemComponent, RegisterAndCallGameplayTagEvent this will bind the passed in delegate and if the ability system has that tag already will execute the delegate. #RB Dave.Ratti #test shadow pad, slow, stun and root still trigger and trigger for JIP players. Change 2962836 on 2016/05/02 by jason.bestimt #ROBOMERGE-AUTHOR: andrew.grant [NULL MERGE] Duplicating 2961899 - Fix minimal code builds for Linux not overwriting files [CodeReviewed] Ben.Marsh #ROBOMERGE-SOURCE: CL 2962812 in //Orion/Release-0.24.2/... via CL 2962830 via CL 2962833 via CL 2962834 via CL 2962835 #ROBOMERGE-BOT: ORION (Main -> Dev-General) Change 2962570 on 2016/05/02 by Jason.Bestimt #ORION_MAIN - Merge MAIN @ CL 2962544 #RB:none #Tests:none Change 2962552 on 2016/05/02 by Ben.Marsh Avoid output of warnings containing the string "error:" (and causing the EC post processor to fail the build) if posting build info has a human-readable error message instead. Output should probably be changed to parse out/sanitize the actual failure message if it's meant to retry and succeed, but this will stop failures caused by multiple builds being posted with the same build version. #tests none Change 2962506 on 2016/05/02 by Ben.Marsh Add a version string to identify a given build (FApp::GetBuildVersion()/BUILD_VERSION) which is distinct from the engine version. Defaults to <Escaped Branch Name>-CL-<Changelist>, but can be overriden by specifying a -Build=... argument to UpdateLocalVersion or the "Build" attribute to the SetVersion BuildGraph task. #tests Preflighted Win64 client/server build (P:\Builds\Orion\++Orion+Dev-General-CL-2962228-PF-2945494-6398155-PF-2945494-6398155) and loaded into Agora. Checked that version strings appear correctly in generated executables. Change 2962228 on 2016/04/30 by Dmitry.Rekman Move processing HTTP requests into separate thread (OR-20723). - First iteration of the implementation, pending implementing feedback. - Adds a separate thread for CurlHttp where actual processing is performed. - Coded by RobC, post-processed by me. #tests Compiled Linux server and Windows client, ran them on compatible content, played a match. Change 2961899 on 2016/04/29 by Ben.Marsh BuildGraph: Fix minimal Linux server builds not overwriting the existing executables, by adding an "Overwrite" parameter into the staging task. Windows exe-only patches already happen to bypass this bug by deleting the Binaries/Win64 directory (designed to remove any configurations that weren't built this time), but could still fail if changes had been made to some other staged binaries. #tests preflighted code-only build against DG CL 2960870 and compared output (P:\Builds\Orion\++Orion+Dev-General-CL-2961878-PF-2961895-6393603) Change 2961587 on 2016/04/29 by Daniel.Lamb Redirector doesn't fire callback if it fails to be loaded. #test Cook orion. Change 2961458 on 2016/04/29 by Wes.Hunt Cooker Stats improvements. Also removed some old UBT telemetry that was not being used. #tests many cooks of orion Change 2961136 on 2016/04/29 by Daniel.Lamb Readded caching of platform data into postload of materials. #test Cook paragon. [CL 2979220 by Ben Marsh in Main branch]
1077 lines
33 KiB
C#
1077 lines
33 KiB
C#
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Text.RegularExpressions;
|
|
using System.Threading;
|
|
using System.Reflection;
|
|
using System.Linq;
|
|
using System.Net.NetworkInformation;
|
|
using System.Collections;
|
|
using AutomationTool;
|
|
using UnrealBuildTool;
|
|
|
|
/// <summary>
|
|
/// Helper command to run a game.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Uses the following command line params:
|
|
/// -cooked
|
|
/// -cookonthefly
|
|
/// -dedicatedserver
|
|
/// -win32
|
|
/// -noclient
|
|
/// -logwindow
|
|
/// </remarks>
|
|
public partial class Project : CommandUtils
|
|
{
|
|
#region Fields
|
|
|
|
/// <summary>
|
|
/// Thread used to read client log file.
|
|
/// </summary>
|
|
private static Thread ClientLogReaderThread = null;
|
|
|
|
/// <summary>
|
|
/// Process for the server, can be set by the cook command when a cook on the fly server is used
|
|
/// </summary>
|
|
public static ProcessResult ServerProcess;
|
|
|
|
#endregion
|
|
|
|
#region Run Command
|
|
|
|
// debug commands for the engine to crash
|
|
public static string[] CrashCommands =
|
|
{
|
|
"crash",
|
|
"CHECK",
|
|
"GPF",
|
|
"ASSERT",
|
|
"ENSURE",
|
|
"RENDERCRASH",
|
|
"RENDERCHECK",
|
|
"RENDERGPF",
|
|
"THREADCRASH",
|
|
"THREADCHECK",
|
|
"THREADGPF",
|
|
};
|
|
|
|
/// <summary>
|
|
/// For not-installed runs, returns a temp log folder to make sure it doesn't fall into sandbox paths
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
private static string GetLogFolderOutsideOfSandbox()
|
|
{
|
|
return GlobalCommandLine.Installed ?
|
|
CmdEnv.LogFolder :
|
|
CombinePaths(Path.GetTempPath(), CommandUtils.EscapePath(CmdEnv.LocalRoot), "Logs");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fot not-installed runs, copies all logs from the temp log folder back to the UAT log folder.
|
|
/// </summary>
|
|
private static void CopyLogsBackToLogFolder()
|
|
{
|
|
if (!GlobalCommandLine.Installed)
|
|
{
|
|
var LogFolderOutsideOfSandbox = GetLogFolderOutsideOfSandbox();
|
|
var TempLogFiles = FindFiles_NoExceptions("*", false, LogFolderOutsideOfSandbox);
|
|
foreach (var LogFilename in TempLogFiles)
|
|
{
|
|
var DestFilename = CombinePaths(CmdEnv.LogFolder, Path.GetFileName(LogFilename));
|
|
CopyFile_NoExceptions(LogFilename, DestFilename);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void Run(ProjectParams Params)
|
|
{
|
|
Params.ValidateAndLog();
|
|
if (!Params.Run)
|
|
{
|
|
return;
|
|
}
|
|
|
|
Log("********** RUN COMMAND STARTED **********");
|
|
|
|
var LogFolderOutsideOfSandbox = GetLogFolderOutsideOfSandbox();
|
|
if (!GlobalCommandLine.Installed && ServerProcess == null)
|
|
{
|
|
// In the installed runs, this is the same folder as CmdEnv.LogFolder so delete only in not-installed
|
|
DeleteDirectory(LogFolderOutsideOfSandbox);
|
|
CreateDirectory(LogFolderOutsideOfSandbox);
|
|
}
|
|
var ServerLogFile = CombinePaths(LogFolderOutsideOfSandbox, "Server.log");
|
|
var ClientLogFile = CombinePaths(LogFolderOutsideOfSandbox, Params.EditorTest ? "Editor.log" : "Client.log");
|
|
|
|
try
|
|
{
|
|
RunInternal(Params, ServerLogFile, ClientLogFile);
|
|
}
|
|
catch
|
|
{
|
|
throw;
|
|
}
|
|
finally
|
|
{
|
|
CopyLogsBackToLogFolder();
|
|
}
|
|
|
|
Log("********** RUN COMMAND COMPLETED **********");
|
|
}
|
|
|
|
private static void RunInternal(ProjectParams Params, string ServerLogFile, string ClientLogFile)
|
|
{
|
|
// Setup server process if required.
|
|
if (Params.DedicatedServer && !Params.SkipServer)
|
|
{
|
|
if (Params.ServerTargetPlatforms.Count > 0)
|
|
{
|
|
UnrealTargetPlatform ServerPlatform = Params.ServerTargetPlatforms[0];
|
|
ServerProcess = RunDedicatedServer(Params, ServerLogFile, Params.RunCommandline);
|
|
// With dedicated server, the client connects to local host to load a map.
|
|
if (ServerPlatform == UnrealTargetPlatform.Linux)
|
|
{
|
|
Params.MapToRun = Params.ServerDeviceAddress;
|
|
}
|
|
else
|
|
{
|
|
Params.MapToRun = "127.0.0.1";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
throw new AutomationException("Failed to run, server target platform not specified");
|
|
}
|
|
}
|
|
else if (Params.FileServer && !Params.SkipServer)
|
|
{
|
|
ServerProcess = RunFileServer(Params, ServerLogFile, Params.RunCommandline);
|
|
}
|
|
|
|
if (ServerProcess != null)
|
|
{
|
|
Log("Waiting a few seconds for the server to start...");
|
|
Thread.Sleep(5000);
|
|
}
|
|
|
|
if (!Params.NoClient)
|
|
{
|
|
Log("Starting Client....");
|
|
|
|
var SC = CreateDeploymentContext(Params, false);
|
|
|
|
ERunOptions ClientRunFlags;
|
|
string ClientApp;
|
|
string ClientCmdLine;
|
|
SetupClientParams(SC, Params, ClientLogFile, out ClientRunFlags, out ClientApp, out ClientCmdLine);
|
|
|
|
// Run the client.
|
|
if (ServerProcess != null)
|
|
{
|
|
RunClientWithServer(SC, ServerLogFile, ServerProcess, ClientApp, ClientCmdLine, ClientRunFlags, ClientLogFile, Params);
|
|
}
|
|
else
|
|
{
|
|
RunStandaloneClient(SC, ClientLogFile, ClientRunFlags, ClientApp, ClientCmdLine, Params);
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Client
|
|
|
|
private static void RunStandaloneClient(List<DeploymentContext> DeployContextList, string ClientLogFile, ERunOptions ClientRunFlags, string ClientApp, string ClientCmdLine, ProjectParams Params)
|
|
{
|
|
if (Params.Unattended)
|
|
{
|
|
string LookFor = "Bringing up level for play took";
|
|
bool bCommandlet = false;
|
|
|
|
if (Params.RunAutomationTest != "")
|
|
{
|
|
LookFor = "Automation Test Succeeded";
|
|
}
|
|
else if (Params.RunAutomationTests)
|
|
{
|
|
LookFor = "Automation Test Queue Empty";
|
|
}
|
|
else if (Params.EditorTest)
|
|
{
|
|
LookFor = "Asset discovery search completed in";
|
|
}
|
|
// If running a commandlet, just detect a normal exit
|
|
else if (ClientCmdLine.IndexOf("-run=", StringComparison.InvariantCultureIgnoreCase) >= 0)
|
|
{
|
|
LookFor = "Game engine shut down";
|
|
bCommandlet = true;
|
|
}
|
|
|
|
{
|
|
|
|
string AllClientOutput = "";
|
|
int LastAutoFailIndex = -1;
|
|
ProcessResult ClientProcess = null;
|
|
FileStream ClientProcessLog = null;
|
|
StreamReader ClientLogReader = null;
|
|
Log("Starting Client for unattended test....");
|
|
ClientProcess = Run(ClientApp, ClientCmdLine + " -FORCELOGFLUSH -testexit=\"" + LookFor + "\"", null, ClientRunFlags | ERunOptions.NoWaitForExit);
|
|
while (!FileExists(ClientLogFile) && !ClientProcess.HasExited)
|
|
{
|
|
Log("Waiting for client logging process to start...{0}", ClientLogFile);
|
|
Thread.Sleep(2000);
|
|
}
|
|
if (FileExists(ClientLogFile))
|
|
{
|
|
Thread.Sleep(2000);
|
|
Log("Client logging process started...{0}", ClientLogFile);
|
|
ClientProcessLog = File.Open(ClientLogFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
|
ClientLogReader = new StreamReader(ClientProcessLog);
|
|
}
|
|
if (ClientLogReader == null)
|
|
{
|
|
throw new AutomationException("Client exited without creating a log file.");
|
|
}
|
|
bool bKeepReading = true;
|
|
bool WelcomedCorrectly = false;
|
|
bool bClientExited = false;
|
|
DateTime ExitTime = DateTime.UtcNow;
|
|
|
|
while (bKeepReading)
|
|
{
|
|
if (!bClientExited && ClientProcess.HasExited)
|
|
{
|
|
ExitTime = DateTime.UtcNow;
|
|
bClientExited = true;
|
|
}
|
|
string ClientOutput = ClientLogReader.ReadToEnd();
|
|
if (!String.IsNullOrEmpty(ClientOutput))
|
|
{
|
|
if (bClientExited)
|
|
{
|
|
ExitTime = DateTime.UtcNow; // as long as it is spewing, we reset the timer
|
|
}
|
|
AllClientOutput += ClientOutput;
|
|
Console.Write(ClientOutput);
|
|
|
|
if (AllClientOutput.LastIndexOf(LookFor) > AllClientOutput.IndexOf(LookFor))
|
|
{
|
|
WelcomedCorrectly = true;
|
|
Log("Test complete...");
|
|
bKeepReading = false;
|
|
}
|
|
else if (Params.RunAutomationTests)
|
|
{
|
|
int FailIndex = AllClientOutput.LastIndexOf("Automation Test Failed");
|
|
int ParenIndex = AllClientOutput.LastIndexOf(")");
|
|
if (FailIndex >= 0 && ParenIndex > FailIndex && FailIndex > LastAutoFailIndex)
|
|
{
|
|
string Tail = AllClientOutput.Substring(FailIndex);
|
|
int CloseParenIndex = Tail.IndexOf(")");
|
|
int OpenParenIndex = Tail.IndexOf("(");
|
|
string Test = "";
|
|
if (OpenParenIndex >= 0 && CloseParenIndex > OpenParenIndex)
|
|
{
|
|
Test = Tail.Substring(OpenParenIndex + 1, CloseParenIndex - OpenParenIndex - 1);
|
|
LogError("Automated test failed ({0}).", Test);
|
|
LastAutoFailIndex = FailIndex;
|
|
}
|
|
}
|
|
}
|
|
// Detect commandlet failure
|
|
else if (bCommandlet)
|
|
{
|
|
const string ResultLog = "Commandlet->Main return this error code: ";
|
|
|
|
int ResultStart = AllClientOutput.LastIndexOf(ResultLog);
|
|
int ResultValIdx = ResultStart + ResultLog.Length;
|
|
|
|
if (ResultStart >= 0 && ResultValIdx < AllClientOutput.Length &&
|
|
AllClientOutput.Substring(ResultValIdx, 1) == "1")
|
|
{
|
|
// Parse the full commandlet warning/error summary
|
|
string FullSummary = "";
|
|
int SummaryStart = AllClientOutput.LastIndexOf("Warning/Error Summary");
|
|
|
|
if (SummaryStart >= 0 && SummaryStart < ResultStart)
|
|
{
|
|
FullSummary = AllClientOutput.Substring(SummaryStart, ResultStart - SummaryStart);
|
|
}
|
|
|
|
|
|
if (FullSummary.Length > 0)
|
|
{
|
|
LogError("Commandlet failed, summary:" + Environment.NewLine +
|
|
FullSummary);
|
|
}
|
|
else
|
|
{
|
|
LogError("Commandlet failed.");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (bClientExited && (DateTime.UtcNow - ExitTime).TotalSeconds > 30)
|
|
{
|
|
Log("Client exited and has been quiet for 30 seconds...exiting");
|
|
bKeepReading = false;
|
|
}
|
|
}
|
|
if (ClientProcess != null && !ClientProcess.HasExited)
|
|
{
|
|
Log("Client is supposed to exit, lets wait a while for it to exit naturally...");
|
|
for (int i = 0; i < 120 && !ClientProcess.HasExited; i++)
|
|
{
|
|
Thread.Sleep(1000);
|
|
}
|
|
}
|
|
if (ClientProcess != null && !ClientProcess.HasExited)
|
|
{
|
|
Log("Stopping client...");
|
|
ClientProcess.StopProcess();
|
|
Thread.Sleep(10000);
|
|
}
|
|
while (ClientLogReader != null && !ClientLogReader.EndOfStream)
|
|
{
|
|
string ClientOutput = ClientLogReader.ReadToEnd();
|
|
if (!String.IsNullOrEmpty(ClientOutput))
|
|
{
|
|
Console.Write(ClientOutput);
|
|
}
|
|
}
|
|
|
|
if (!WelcomedCorrectly)
|
|
{
|
|
throw new AutomationException("Client exited before we asked it to.");
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
var SC = DeployContextList[0];
|
|
ProcessResult ClientProcess = SC.StageTargetPlatform.RunClient(ClientRunFlags, ClientApp, ClientCmdLine, Params);
|
|
if (ClientProcess != null)
|
|
{
|
|
// If the client runs without StdOut redirect we're going to read the log output directly from log file on
|
|
// a separate thread.
|
|
if ((ClientRunFlags & ERunOptions.NoStdOutRedirect) == ERunOptions.NoStdOutRedirect)
|
|
{
|
|
ClientLogReaderThread = new System.Threading.Thread(ClientLogReaderProc);
|
|
ClientLogReaderThread.Start(new object[] { ClientLogFile, ClientProcess });
|
|
}
|
|
|
|
do
|
|
{
|
|
Thread.Sleep(100);
|
|
}
|
|
while (ClientProcess.HasExited == false);
|
|
|
|
SC.StageTargetPlatform.PostRunClient(ClientProcess, Params);
|
|
|
|
// any non-zero exit code should propagate an exception. The Virtual function above may have
|
|
// already thrown a more specific exception or given a more specific ErrorCode, but this catches the rest.
|
|
if (ClientProcess.ExitCode != 0)
|
|
{
|
|
throw new AutomationException("Client exited with error code: " + ClientProcess.ExitCode);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private static void RunClientWithServer(List<DeploymentContext> DeployContextList, string ServerLogFile, ProcessResult ServerProcess, string ClientApp, string ClientCmdLine, ERunOptions ClientRunFlags, string ClientLogFile, ProjectParams Params)
|
|
{
|
|
ProcessResult ClientProcess = null;
|
|
var OtherClients = new List<ProcessResult>();
|
|
|
|
bool WelcomedCorrectly = false;
|
|
int NumClients = Params.NumClients;
|
|
string AllClientOutput = "";
|
|
int LastAutoFailIndex = -1;
|
|
|
|
if (Params.Unattended)
|
|
{
|
|
string LookFor = "Bringing up level for play took";
|
|
if (Params.DedicatedServer)
|
|
{
|
|
LookFor = "Welcomed by server";
|
|
}
|
|
else if (Params.RunAutomationTest != "")
|
|
{
|
|
LookFor = "Automation Test Succeeded";
|
|
}
|
|
else if (Params.RunAutomationTests)
|
|
{
|
|
LookFor = "Automation Test Queue Empty";
|
|
}
|
|
{
|
|
while (!FileExists(ServerLogFile) && !ServerProcess.HasExited)
|
|
{
|
|
Log("Waiting for logging process to start...");
|
|
Thread.Sleep(2000);
|
|
}
|
|
Thread.Sleep(1000);
|
|
|
|
string AllServerOutput = "";
|
|
using (FileStream ProcessLog = File.Open(ServerLogFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
|
{
|
|
StreamReader LogReader = new StreamReader(ProcessLog);
|
|
bool bKeepReading = true;
|
|
|
|
FileStream ClientProcessLog = null;
|
|
StreamReader ClientLogReader = null;
|
|
|
|
// Read until the process has exited.
|
|
while (!ServerProcess.HasExited && bKeepReading)
|
|
{
|
|
while (!LogReader.EndOfStream && bKeepReading && ClientProcess == null)
|
|
{
|
|
string Output = LogReader.ReadToEnd();
|
|
if (!String.IsNullOrEmpty(Output))
|
|
{
|
|
AllServerOutput += Output;
|
|
if (ClientProcess == null &&
|
|
(AllServerOutput.Contains("Game Engine Initialized") || AllServerOutput.Contains("Unreal Network File Server is ready")))
|
|
{
|
|
Log("Starting Client for unattended test....");
|
|
ClientProcess = Run(ClientApp, ClientCmdLine + " -FORCELOGFLUSH -testexit=\"" + LookFor + "\"", null, ClientRunFlags | ERunOptions.NoWaitForExit);
|
|
//@todo no testing is done on these
|
|
if (NumClients > 1 && NumClients < 9)
|
|
{
|
|
for (int i = 1; i < NumClients; i++)
|
|
{
|
|
Log("Starting Extra Client....");
|
|
OtherClients.Add(Run(ClientApp, ClientCmdLine, null, ClientRunFlags | ERunOptions.NoWaitForExit));
|
|
}
|
|
}
|
|
while (!FileExists(ClientLogFile) && !ClientProcess.HasExited)
|
|
{
|
|
Log("Waiting for client logging process to start...{0}", ClientLogFile);
|
|
Thread.Sleep(2000);
|
|
}
|
|
if (!ClientProcess.HasExited)
|
|
{
|
|
Thread.Sleep(2000);
|
|
Log("Client logging process started...{0}", ClientLogFile);
|
|
ClientProcessLog = File.Open(ClientLogFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
|
ClientLogReader = new StreamReader(ClientProcessLog);
|
|
}
|
|
}
|
|
else if (ClientProcess == null && !ServerProcess.HasExited)
|
|
{
|
|
Log("Waiting for server to start....");
|
|
Thread.Sleep(2000);
|
|
}
|
|
if (ClientProcess != null && ClientProcess.HasExited)
|
|
{
|
|
ServerProcess.StopProcess();
|
|
throw new AutomationException("Client exited before we asked it to.");
|
|
}
|
|
}
|
|
}
|
|
if (ClientLogReader != null)
|
|
{
|
|
if (ClientProcess.HasExited)
|
|
{
|
|
ServerProcess.StopProcess();
|
|
throw new AutomationException("Client exited or closed the log before we asked it to.");
|
|
}
|
|
while (!ClientProcess.HasExited && !ServerProcess.HasExited && bKeepReading)
|
|
{
|
|
while (!ClientLogReader.EndOfStream && bKeepReading && !ServerProcess.HasExited && !ClientProcess.HasExited)
|
|
{
|
|
string ClientOutput = ClientLogReader.ReadToEnd();
|
|
if (!String.IsNullOrEmpty(ClientOutput))
|
|
{
|
|
AllClientOutput += ClientOutput;
|
|
Console.Write(ClientOutput);
|
|
|
|
if (AllClientOutput.LastIndexOf(LookFor) > AllClientOutput.IndexOf(LookFor))
|
|
{
|
|
if (Params.FakeClient)
|
|
{
|
|
Log("Welcomed by server or client loaded, lets wait ten minutes...");
|
|
Thread.Sleep(60000 * 10);
|
|
}
|
|
else
|
|
{
|
|
Log("Welcomed by server or client loaded, lets wait 30 seconds...");
|
|
Thread.Sleep(30000);
|
|
}
|
|
WelcomedCorrectly = true;
|
|
bKeepReading = false;
|
|
}
|
|
else if (Params.RunAutomationTests)
|
|
{
|
|
int FailIndex = AllClientOutput.LastIndexOf("Automation Test Failed");
|
|
int ParenIndex = AllClientOutput.LastIndexOf(")");
|
|
if (FailIndex >= 0 && ParenIndex > FailIndex && FailIndex > LastAutoFailIndex)
|
|
{
|
|
string Tail = AllClientOutput.Substring(FailIndex);
|
|
int CloseParenIndex = Tail.IndexOf(")");
|
|
int OpenParenIndex = Tail.IndexOf("(");
|
|
string Test = "";
|
|
if (OpenParenIndex >= 0 && CloseParenIndex > OpenParenIndex)
|
|
{
|
|
Test = Tail.Substring(OpenParenIndex + 1, CloseParenIndex - OpenParenIndex - 1);
|
|
LogError("Automated test failed ({0}).", Test);
|
|
LastAutoFailIndex = FailIndex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
LogFileReaderProcess(ServerLogFile, ServerProcess, (string Output) =>
|
|
{
|
|
bool bKeepReading = true;
|
|
if (ClientProcess == null && !String.IsNullOrEmpty(Output))
|
|
{
|
|
AllClientOutput += Output;
|
|
if (ClientProcess == null && (AllClientOutput.Contains("Game Engine Initialized") || AllClientOutput.Contains("Unreal Network File Server is ready")))
|
|
{
|
|
Log("Starting Client....");
|
|
var SC = DeployContextList[0];
|
|
ClientProcess = SC.StageTargetPlatform.RunClient(ClientRunFlags | ERunOptions.NoWaitForExit, ClientApp, ClientCmdLine, Params);
|
|
// ClientProcess = Run(ClientApp, ClientCmdLine, null, ClientRunFlags | ERunOptions.NoWaitForExit);
|
|
if (NumClients > 1 && NumClients < 9)
|
|
{
|
|
for (int i = 1; i < NumClients; i++)
|
|
{
|
|
Log("Starting Extra Client....");
|
|
ProcessResult NewClient = SC.StageTargetPlatform.RunClient(ClientRunFlags | ERunOptions.NoWaitForExit, ClientApp, ClientCmdLine, Params);
|
|
OtherClients.Add(NewClient);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (ClientProcess == null && !ServerProcess.HasExited)
|
|
{
|
|
Log("Waiting for server to start....");
|
|
Thread.Sleep(2000);
|
|
}
|
|
|
|
if (String.IsNullOrEmpty(Output) == false)
|
|
{
|
|
Console.Write(Output);
|
|
}
|
|
|
|
if (ClientProcess != null && ClientProcess.HasExited)
|
|
{
|
|
|
|
Log("Client exited, stopping server....");
|
|
if (!GlobalCommandLine.NoKill)
|
|
{
|
|
ServerProcess.StopProcess();
|
|
}
|
|
bKeepReading = false;
|
|
}
|
|
|
|
return bKeepReading; // Keep reading
|
|
});
|
|
}
|
|
Log("Server exited....");
|
|
if (ClientProcess != null && !ClientProcess.HasExited)
|
|
{
|
|
ClientProcess.StopProcess();
|
|
}
|
|
foreach (var OtherClient in OtherClients)
|
|
{
|
|
if (OtherClient != null && !OtherClient.HasExited)
|
|
{
|
|
OtherClient.StopProcess();
|
|
}
|
|
}
|
|
if (Params.Unattended)
|
|
{
|
|
if (!WelcomedCorrectly)
|
|
{
|
|
throw new AutomationException("Server or client exited before we asked it to.");
|
|
}
|
|
}
|
|
}
|
|
|
|
private static void SetupClientParams(List<DeploymentContext> DeployContextList, ProjectParams Params, string ClientLogFile, out ERunOptions ClientRunFlags, out string ClientApp, out string ClientCmdLine)
|
|
{
|
|
if (Params.ClientTargetPlatforms.Count == 0)
|
|
{
|
|
throw new AutomationException("No ClientTargetPlatform set for SetupClientParams.");
|
|
}
|
|
|
|
// var DeployContextList = CreateDeploymentContext(Params, false);
|
|
|
|
if (DeployContextList.Count == 0)
|
|
{
|
|
throw new AutomationException("No DeployContextList for SetupClientParams.");
|
|
}
|
|
|
|
var SC = DeployContextList[0];
|
|
|
|
// Get client app name and command line.
|
|
ClientRunFlags = ERunOptions.AllowSpew | ERunOptions.AppMustExist;
|
|
ClientApp = "";
|
|
ClientCmdLine = "";
|
|
string TempCmdLine = "";
|
|
var PlatformName = Params.ClientTargetPlatforms[0].ToString();
|
|
if (Params.Cook || Params.CookOnTheFly)
|
|
{
|
|
List<string> Exes = SC.StageTargetPlatform.GetExecutableNames(SC, true);
|
|
ClientApp = Exes[0];
|
|
if (SC.StageTargetPlatform.PlatformType != UnrealTargetPlatform.IOS)
|
|
{
|
|
TempCmdLine += SC.ProjectArgForCommandLines + " ";
|
|
}
|
|
TempCmdLine += Params.MapToRun + " ";
|
|
|
|
if (Params.CookOnTheFly || Params.FileServer)
|
|
{
|
|
TempCmdLine += "-filehostip=";
|
|
bool FirstParam = true;
|
|
if (UnrealBuildTool.BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Mac)
|
|
{
|
|
NetworkInterface[] Interfaces = NetworkInterface.GetAllNetworkInterfaces();
|
|
foreach (NetworkInterface adapter in Interfaces)
|
|
{
|
|
if (adapter.NetworkInterfaceType != NetworkInterfaceType.Loopback)
|
|
{
|
|
IPInterfaceProperties IP = adapter.GetIPProperties();
|
|
for (int Index = 0; Index < IP.UnicastAddresses.Count; ++Index)
|
|
{
|
|
if (IP.UnicastAddresses[Index].IsDnsEligible && IP.UnicastAddresses[Index].Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
|
{
|
|
if (!IsNullOrEmpty(Params.Port))
|
|
{
|
|
foreach (var Port in Params.Port)
|
|
{
|
|
if (!FirstParam)
|
|
{
|
|
TempCmdLine += "+";
|
|
}
|
|
FirstParam = false;
|
|
string[] PortProtocol = Port.Split(new char[] { ':' });
|
|
if (PortProtocol.Length > 1)
|
|
{
|
|
TempCmdLine += String.Format("{0}://{1}:{2}", PortProtocol[0], IP.UnicastAddresses[Index].Address.ToString(), PortProtocol[1]);
|
|
}
|
|
else
|
|
{
|
|
TempCmdLine += IP.UnicastAddresses[Index].Address.ToString();
|
|
TempCmdLine += ":";
|
|
TempCmdLine += Params.Port;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!FirstParam)
|
|
{
|
|
TempCmdLine += "+";
|
|
}
|
|
FirstParam = false;
|
|
|
|
// use default port
|
|
TempCmdLine += IP.UnicastAddresses[Index].Address.ToString();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
NetworkInterface[] Interfaces = NetworkInterface.GetAllNetworkInterfaces();
|
|
foreach (NetworkInterface adapter in Interfaces)
|
|
{
|
|
if (adapter.OperationalStatus == OperationalStatus.Up)
|
|
{
|
|
IPInterfaceProperties IP = adapter.GetIPProperties();
|
|
for (int Index = 0; Index < IP.UnicastAddresses.Count; ++Index)
|
|
{
|
|
if (IP.UnicastAddresses[Index].IsDnsEligible)
|
|
{
|
|
if (!IsNullOrEmpty(Params.Port))
|
|
{
|
|
foreach (var Port in Params.Port)
|
|
{
|
|
if (!FirstParam)
|
|
{
|
|
TempCmdLine += "+";
|
|
}
|
|
FirstParam = false;
|
|
string[] PortProtocol = Port.Split(new char[] { ':' });
|
|
if (PortProtocol.Length > 1)
|
|
{
|
|
TempCmdLine += String.Format("{0}://{1}:{2}", PortProtocol[0], IP.UnicastAddresses[Index].Address.ToString(), PortProtocol[1]);
|
|
}
|
|
else
|
|
{
|
|
TempCmdLine += IP.UnicastAddresses[Index].Address.ToString();
|
|
TempCmdLine += ":";
|
|
TempCmdLine += Params.Port;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!FirstParam)
|
|
{
|
|
TempCmdLine += "+";
|
|
}
|
|
FirstParam = false;
|
|
|
|
// use default port
|
|
TempCmdLine += IP.UnicastAddresses[Index].Address.ToString();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
const string LocalHost = "127.0.0.1";
|
|
|
|
if (!IsNullOrEmpty(Params.Port))
|
|
{
|
|
foreach (var Port in Params.Port)
|
|
{
|
|
if (!FirstParam)
|
|
{
|
|
TempCmdLine += "+";
|
|
}
|
|
FirstParam = false;
|
|
string[] PortProtocol = Port.Split(new char[] { ':' });
|
|
if (PortProtocol.Length > 1)
|
|
{
|
|
TempCmdLine += String.Format("{0}://{1}:{2}", PortProtocol[0], LocalHost, PortProtocol[1]);
|
|
}
|
|
else
|
|
{
|
|
TempCmdLine += LocalHost;
|
|
TempCmdLine += ":";
|
|
TempCmdLine += Params.Port;
|
|
}
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!FirstParam)
|
|
{
|
|
TempCmdLine += "+";
|
|
}
|
|
FirstParam = false;
|
|
|
|
// use default port
|
|
TempCmdLine += LocalHost;
|
|
}
|
|
TempCmdLine += " ";
|
|
|
|
if (Params.CookOnTheFlyStreaming)
|
|
{
|
|
TempCmdLine += "-streaming ";
|
|
}
|
|
else if (SC.StageTargetPlatform.PlatformType != UnrealTargetPlatform.IOS)
|
|
{
|
|
// per josh, allowcaching is deprecated/doesn't make sense for iOS.
|
|
TempCmdLine += "-allowcaching ";
|
|
}
|
|
}
|
|
else if (Params.UsePak(SC.StageTargetPlatform))
|
|
{
|
|
if (Params.SignedPak)
|
|
{
|
|
TempCmdLine += "-signedpak ";
|
|
}
|
|
else
|
|
{
|
|
TempCmdLine += "-pak ";
|
|
}
|
|
}
|
|
else if (!Params.Stage)
|
|
{
|
|
var SandboxPath = CombinePaths(SC.RuntimeProjectRootDir, "Saved", "Cooked", SC.CookPlatform);
|
|
if (!SC.StageTargetPlatform.LaunchViaUFE)
|
|
{
|
|
TempCmdLine += "-sandbox=" + CommandUtils.MakePathSafeToUseWithCommandLine(SandboxPath) + " ";
|
|
}
|
|
else
|
|
{
|
|
TempCmdLine += "-sandbox=\'" + SandboxPath + "\' ";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
ClientApp = CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries", PlatformName, "UE4Editor.exe");
|
|
TempCmdLine += SC.ProjectArgForCommandLines + " ";
|
|
if (!Params.EditorTest)
|
|
{
|
|
TempCmdLine += "-game " + Params.MapToRun + " ";
|
|
}
|
|
else
|
|
{
|
|
TempCmdLine += Params.MapToRun + " ";
|
|
}
|
|
}
|
|
if (Params.LogWindow)
|
|
{
|
|
// Without NoStdOutRedirect '-log' doesn't log anything to the window
|
|
ClientRunFlags |= ERunOptions.NoStdOutRedirect;
|
|
TempCmdLine += "-log ";
|
|
}
|
|
else
|
|
{
|
|
TempCmdLine += "-stdout ";
|
|
}
|
|
if (Params.Unattended)
|
|
{
|
|
TempCmdLine += "-unattended ";
|
|
}
|
|
if (IsBuildMachine || Params.Unattended)
|
|
{
|
|
TempCmdLine += "-buildmachine ";
|
|
}
|
|
if (Params.CrashIndex > 0)
|
|
{
|
|
int RealIndex = Params.CrashIndex - 1;
|
|
if (RealIndex < 0 || RealIndex >= CrashCommands.Count())
|
|
{
|
|
throw new AutomationException("CrashIndex {0} is out of range...max={1}", Params.CrashIndex, CrashCommands.Count());
|
|
}
|
|
TempCmdLine += String.Format("-execcmds=\"debug {0}\" ", CrashCommands[RealIndex]);
|
|
}
|
|
else if (Params.RunAutomationTest != "")
|
|
{
|
|
TempCmdLine += "-execcmds=\"automation list;runtests " + Params.RunAutomationTest + "\" ";
|
|
}
|
|
else if (Params.RunAutomationTests)
|
|
{
|
|
TempCmdLine += "-execcmds=\"automation list;runall\" ";
|
|
}
|
|
if (SC.StageTargetPlatform.UseAbsLog)
|
|
{
|
|
TempCmdLine += "-abslog=" + CommandUtils.MakePathSafeToUseWithCommandLine(ClientLogFile) + " ";
|
|
}
|
|
if (SC.StageTargetPlatform.PlatformType != UnrealTargetPlatform.IOS)
|
|
{
|
|
TempCmdLine += "-Messaging -nomcp -Windowed ";
|
|
}
|
|
else
|
|
{
|
|
// skip arguments which don't make sense for iOS
|
|
TempCmdLine += "-Messaging -nomcp ";
|
|
}
|
|
if (Params.NullRHI && SC.StageTargetPlatform.PlatformType != UnrealTargetPlatform.Mac) // all macs have GPUs, and currently the mac dies with nullrhi
|
|
{
|
|
TempCmdLine += "-nullrhi ";
|
|
}
|
|
if (Params.Deploy && !Params.CookOnTheFly && (SC.StageTargetPlatform.PlatformType == UnrealTargetPlatform.PS4))
|
|
{
|
|
TempCmdLine += "-deployedbuild ";
|
|
}
|
|
|
|
TempCmdLine += "-CrashForUAT ";
|
|
TempCmdLine += Params.RunCommandline;
|
|
|
|
// todo: move this into the platform
|
|
if (SC.StageTargetPlatform.LaunchViaUFE)
|
|
{
|
|
ClientCmdLine = "-run=Launch ";
|
|
ClientCmdLine += "-Device=" + Params.Device + " ";
|
|
ClientCmdLine += "-Exe=\"" + ClientApp + "\" ";
|
|
ClientCmdLine += "-Targetplatform=" + Params.ClientTargetPlatforms[0].ToString() + " ";
|
|
ClientCmdLine += "-Params=\"" + TempCmdLine + "\"";
|
|
ClientApp = CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries/Win64/UnrealFrontend.exe");
|
|
|
|
Log("Launching via UFE:");
|
|
Log("\tClientCmdLine: " + ClientCmdLine + "");
|
|
}
|
|
else
|
|
{
|
|
ClientCmdLine = TempCmdLine;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Client Thread
|
|
|
|
private static void ClientLogReaderProc(object ArgsContainer)
|
|
{
|
|
var Args = ArgsContainer as object[];
|
|
var ClientLogFile = (string)Args[0];
|
|
var ClientProcess = (ProcessResult)Args[1];
|
|
LogFileReaderProcess(ClientLogFile, ClientProcess, (string Output) =>
|
|
{
|
|
if (String.IsNullOrEmpty(Output) == false)
|
|
{
|
|
Log(Output);
|
|
}
|
|
return true;
|
|
});
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Servers
|
|
|
|
private static ProcessResult RunDedicatedServer(ProjectParams Params, string ServerLogFile, string AdditionalCommandLine)
|
|
{
|
|
ProjectParams ServerParams = new ProjectParams(Params);
|
|
ServerParams.Device = Params.ServerDevice;
|
|
|
|
if (ServerParams.ServerTargetPlatforms.Count == 0)
|
|
{
|
|
throw new AutomationException("No ServerTargetPlatform set for RunDedicatedServer.");
|
|
}
|
|
|
|
var DeployContextList = CreateDeploymentContext(ServerParams, true);
|
|
|
|
if (DeployContextList.Count == 0)
|
|
{
|
|
throw new AutomationException("No DeployContextList for RunDedicatedServer.");
|
|
}
|
|
|
|
var SC = DeployContextList[0];
|
|
|
|
var ServerApp = CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries/Win64/UE4Editor.exe");
|
|
if (ServerParams.Cook)
|
|
{
|
|
List<string> Exes = SC.StageTargetPlatform.GetExecutableNames(SC);
|
|
ServerApp = Exes[0];
|
|
}
|
|
var Args = ServerParams.Cook ? "" : (SC.ProjectArgForCommandLines + " ");
|
|
Console.WriteLine(Params.ServerDeviceAddress);
|
|
UnrealTargetPlatform ServerPlatform = ServerParams.ServerTargetPlatforms[0];
|
|
if (ServerParams.Cook && ServerPlatform == UnrealTargetPlatform.Linux && !String.IsNullOrEmpty(ServerParams.ServerDeviceAddress))
|
|
{
|
|
ServerApp = @"C:\Windows\system32\cmd.exe";
|
|
|
|
string plinkPath = CombinePaths(Environment.GetEnvironmentVariable("LINUX_ROOT"), "bin/PLINK.exe ");
|
|
string exePath = CombinePaths(SC.ShortProjectName, "Binaries", ServerPlatform.ToString(), SC.ShortProjectName + "Server");
|
|
if (ServerParams.ServerConfigsToBuild[0] != UnrealTargetConfiguration.Development)
|
|
{
|
|
exePath += "-" + ServerPlatform.ToString() + "-" + ServerParams.ServerConfigsToBuild[0].ToString();
|
|
}
|
|
exePath = CombinePaths("LinuxServer", exePath.ToLower()).Replace("\\", "/");
|
|
Args = String.Format("/k {0} -batch -ssh -t -i {1} {2}@{3} {4} {5} {6} -server -Messaging", plinkPath, ServerParams.DevicePassword, ServerParams.DeviceUsername, ServerParams.ServerDeviceAddress, exePath, Args, ServerParams.MapToRun);
|
|
}
|
|
else
|
|
{
|
|
var Map = ServerParams.MapToRun;
|
|
if (!String.IsNullOrEmpty(ServerParams.AdditionalServerMapParams))
|
|
{
|
|
Map += ServerParams.AdditionalServerMapParams;
|
|
}
|
|
if (Params.FakeClient)
|
|
{
|
|
Map += "?fake";
|
|
}
|
|
Args += String.Format("{0} -server -abslog={1} -unattended -FORCELOGFLUSH -log -Messaging -nomcp", Map, CommandUtils.MakePathSafeToUseWithCommandLine(ServerLogFile));
|
|
}
|
|
|
|
if (ServerParams.UsePak(SC.StageTargetPlatform))
|
|
{
|
|
if (ServerParams.SignedPak)
|
|
{
|
|
Args += " -signedpak";
|
|
}
|
|
else
|
|
{
|
|
Args += " -pak";
|
|
}
|
|
}
|
|
if (IsBuildMachine || Params.Unattended)
|
|
{
|
|
Args += " -buildmachine";
|
|
}
|
|
Args += " -CrashForUAT";
|
|
Args += " " + AdditionalCommandLine;
|
|
|
|
|
|
if (ServerParams.Cook && ServerPlatform == UnrealTargetPlatform.Linux && !String.IsNullOrEmpty(ServerParams.ServerDeviceAddress))
|
|
{
|
|
Args += String.Format(" 2>&1 > {0}", ServerLogFile);
|
|
}
|
|
|
|
PushDir(Path.GetDirectoryName(ServerApp));
|
|
var Result = Run(ServerApp, Args, null, ERunOptions.AllowSpew | ERunOptions.NoWaitForExit | ERunOptions.AppMustExist | ERunOptions.NoStdOutRedirect);
|
|
PopDir();
|
|
|
|
return Result;
|
|
}
|
|
|
|
private static ProcessResult RunCookOnTheFlyServer(FileReference ProjectName, string ServerLogFile, string TargetPlatform, string AdditionalCommandLine)
|
|
{
|
|
var ServerApp = HostPlatform.Current.GetUE4ExePath("UE4Editor.exe");
|
|
var Args = String.Format("{0} -run=cook -cookonthefly -unattended -CrashForUAT -FORCELOGFLUSH -log",
|
|
CommandUtils.MakePathSafeToUseWithCommandLine(ProjectName.FullName));
|
|
if (!String.IsNullOrEmpty(ServerLogFile))
|
|
{
|
|
Args += " -abslog=" + CommandUtils.MakePathSafeToUseWithCommandLine(ServerLogFile);
|
|
}
|
|
if (IsBuildMachine)
|
|
{
|
|
Args += " -buildmachine";
|
|
}
|
|
Args += " " + AdditionalCommandLine;
|
|
|
|
// Run the server (Without NoStdOutRedirect -log doesn't log anything to the window)
|
|
PushDir(Path.GetDirectoryName(ServerApp));
|
|
var Result = Run(ServerApp, Args, null, ERunOptions.AllowSpew | ERunOptions.NoWaitForExit | ERunOptions.AppMustExist | ERunOptions.NoStdOutRedirect);
|
|
PopDir();
|
|
return Result;
|
|
}
|
|
|
|
private static ProcessResult RunFileServer(ProjectParams Params, string ServerLogFile, string AdditionalCommandLine)
|
|
{
|
|
#if false
|
|
// this section of code would provide UFS with a more accurate file mapping
|
|
var SC = new StagingContext(Params, false);
|
|
CreateStagingManifest(SC);
|
|
MaybeConvertToLowerCase(Params, SC);
|
|
var UnrealFileServerResponseFile = new List<string>();
|
|
|
|
foreach (var Pair in SC.UFSStagingFiles)
|
|
{
|
|
string Src = Pair.Key;
|
|
string Dest = Pair.Value;
|
|
|
|
Dest = CombinePaths(PathSeparator.Slash, SC.UnrealFileServerInternalRoot, Dest);
|
|
|
|
UnrealFileServerResponseFile.Add("\"" + Src + "\" \"" + Dest + "\"");
|
|
}
|
|
|
|
|
|
string UnrealFileServerResponseFileName = CombinePaths(CmdEnv.LogFolder, "UnrealFileServerList.txt");
|
|
File.WriteAllLines(UnrealFileServerResponseFileName, UnrealFileServerResponseFile);
|
|
#endif
|
|
var UnrealFileServerExe = HostPlatform.Current.GetUE4ExePath("UnrealFileServer.exe");
|
|
|
|
Log("Running UnrealFileServer *******");
|
|
var Args = String.Format("{0} -abslog={1} -unattended -CrashForUAT -FORCELOGFLUSH -log {2}",
|
|
CommandUtils.MakePathSafeToUseWithCommandLine(Params.RawProjectPath.FullName),
|
|
CommandUtils.MakePathSafeToUseWithCommandLine(ServerLogFile),
|
|
AdditionalCommandLine);
|
|
if (IsBuildMachine)
|
|
{
|
|
Args += " -buildmachine";
|
|
}
|
|
PushDir(Path.GetDirectoryName(UnrealFileServerExe));
|
|
var Result = Run(UnrealFileServerExe, Args, null, ERunOptions.AllowSpew | ERunOptions.NoWaitForExit | ERunOptions.AppMustExist | ERunOptions.NoStdOutRedirect);
|
|
PopDir();
|
|
return Result;
|
|
}
|
|
|
|
#endregion
|
|
}
|