Commit Graph

12 Commits

Author SHA1 Message Date
Ben Marsh
7ad04edd54 Live Coding: Fix crashes when patching adaptive non-unity files in game modules containing static global variables.
Live++ reads object files at startup for game modules, and assigns unique ids to each compiland (used to disambiguate static variables). When compiling the patch, these compilands are modified to reference a unique id for the unity blob, causing the variables to be reconstructed.

Solution is to generate a JSON file to each output directory containing object files containing the mapping, and to use that to assign compiland ids at startup.

#rb none
#jira UE-74036

[CL 6455253 by Ben Marsh in 4.22 branch]
2019-05-14 18:11:40 -04:00
Ben Marsh
9fb2236941 LiveCoding: Fix asserts/crashes due to variables being reconstructed when files are split out of a unity blob.
These variables (and their dynamic initializers) were being treated as new, rather than being linked back to their original instances. UBT now outputs a mapping of object files to their original unity object file during a live coding compile, which allows Live++ to disambiguate between new and reconstructed instances.

#rb none
#jira UE-72002

[CL 6455178 by Ben Marsh in 4.22 branch]
2019-05-14 18:09:57 -04:00
Ben Marsh
035e70e10b Merging early Live++ 1.4.3 changes.
#rb none
#jira

[CL 6455128 by Ben Marsh in 4.22 branch]
2019-05-14 18:08:51 -04:00
Ben Marsh
4b7042f3f4 Integrating changes from Live++ 1.4.1.
#rb none
#rnx
#jira

[CL 6455074 by Ben Marsh in 4.22 branch]
2019-05-14 18:08:06 -04:00
Ben Marsh
0b8abb31d2 Live Coding: Fixes issue linking patch DLLs with Visual Studio Express, due to PATH environment variable not including path to mspdb140.dll.
Now stores the linker environment block in the live coding manifest, and adds it to the cache before executing the linker.

#rb none
#jira UE-72324

[CL 5740602 by Ben Marsh in 4.22 branch]
2019-04-04 11:55:49 -04:00
Ben Marsh
339de68518 LiveCoding: Add support for lazy loading modules. This lets us enable live coding for the entire engine without a large startup penalty. Project modules are still preloaded by default.
#rb none
#jira

[CL 5437980 by Ben Marsh in 4.22 branch]
2019-03-18 18:06:51 -04:00
Ben Marsh
dc8826b233 LiveCoding: Tidy up console output.
#rb none
#jira

[CL 5350764 by Ben Marsh in 4.22 branch]
2019-03-08 13:05:17 -05:00
Ben Marsh
f37e65e262 LiveCoding: Suppress dev channel log messages from console. Add a new server log channel that they are written to instead.
#rb none
#jira UE-71257

[CL 5350628 by Ben Marsh in 4.22 branch]
2019-03-08 12:56:01 -05:00
Ben Marsh
1a67f46834 Better handling of window focus when compiling for live code.
* Console window is made visible and brought to the front when a compile is triggered.
* Patched application window is brought to the front once patching is complete.

#rb none
#jira UE-71128

[CL 5337696 by Ben Marsh in 4.22 branch]
2019-03-07 11:25:01 -05:00
Ben Marsh
86aaa79393 Fix copyright notices.
#rb none
#jira
#rnx

[CL 5307349 by Ben Marsh in 4.22 branch]
2019-03-05 17:54:55 -05:00
Ben Marsh
a4484f70be Fixes for static analysis warnings.
#rb none
#jira

[CL 5307320 by Ben Marsh in 4.22 branch]
2019-03-05 17:51:38 -05:00
Ben Marsh
e1fe0cc030 Integrating live coding feature (aka Live++) into UE4.
Allows fast iteration of C++ changes without restarting the application. To use, select the "Live Coding (Experimental)" mode from the drop down menu next to the editor's compile button, or type "LiveCoding" into the console for a monolithic build. Press Ctrl+Alt+F11 to find changes and compile.

Changes vs standalone Live++ version:

* UBT is used to execute builds. This allows standard UE4 adaptive unity mode, allows us to reuse object files when we do regular builds, supports using any build executor allowed by UBT (XGE, SNDBS, etc..).
* Adding new source files is supported.
* Custom visualizer for FNames is supported via a weakly linked symbol in a static library (Engine/Extras/NatvisHelpers).
* Settings are exposed in the editor's project settings dialog.
* Standalone application has been rewritten as a Slate app ("LiveCodingConsole"). There is an additional option to start the program as hidden, where it will not be visible until Ctrl+Alt+F11 is hit. Similarly, closing the window will hide it instead of closing the application.
* Does not require a standalone licensed version of Live++.

Known issues:

* Does not currently support class layout changes / object reinstancing

#rb none
#fyi Marc.Audy, Stefan.Boberg, Nick.Penwarden
#jira

[CL 5304722 by Ben Marsh in 4.22 branch]
2019-03-05 15:54:02 -05:00