Commit Graph

43 Commits

Author SHA1 Message Date
James Hopkin
1edd7720d5 UBT: allow multiple -SingleFile arguments. Now stores SpecifcFilesToCompile list rather than single file reference.
#rb Ben.Marsh

#ROBOMERGE-OWNER: james.hopkin
#ROBOMERGE-AUTHOR: james.hopkin
#ROBOMERGE-SOURCE: CL 12779149 via CL 12779152 via CL 12779160
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12782243 by James Hopkin in Main branch]
2020-04-14 13:31:51 -04:00
Ben Marsh
d6d7c939e5 Copying //UE4/Dev-Build to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 12726184 by Ben Marsh in Main branch]
2020-04-10 11:30:32 -04:00
Ryan Durand
9ef3748747 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870955 by Ryan Durand in Main branch]
2019-12-26 23:01:54 -05:00
Ben Marsh
9f80abb1ce Merging LiveCoding fix from Dev-Build.
#rb none
#rnx

[CL 8974597 by Ben Marsh in Main branch]
2019-09-23 09:33:21 -04:00
ben marsh
d0a8039487 LiveCoding: Prevent object files being overwritten during a live coding compile. Object files are now built with a .lc suffix, leaving the original files intact. This ensures it can gather COFF data from the correct executables on relaunch, and means that any existing changes will be patched in as soon as the first Live Coding compile is initiated. Should fix several issues.
#rb none
#jira UE-76940, UE-76993, UE-76943

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 7321451 in //UE4/Release-4.23/... via CL 7321452
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v371-7306989)

[CL 7370113 by ben marsh in Dev-Build branch]
2019-07-17 03:40:33 -04:00
ben marsh
c291a7c37c Store the executable for each target in the makefile, so binary builds can construct the correct mutex name for detecting whether Live Coding is active.
#rb none
#rnx
#jira UE-77082

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 7309692 in //UE4/Release-4.23/... via CL 7309695
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v371-7306989)

[CL 7359309 by ben marsh in Dev-Build branch]
2019-07-17 02:07:54 -04:00
ben marsh
ef3c866b47 LiveCoding: Prevent object files being overwritten during a live coding compile. Object files are now built with a .lc suffix, leaving the original files intact. This ensures it can gather COFF data from the correct executables on relaunch, and means that any existing changes will be patched in as soon as the first Live Coding compile is initiated. Should fix several issues.
#rb none
#jira UE-76940, UE-76993, UE-76943

#ROBOMERGE-SOURCE: CL 7321451 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v371-7306989)

[CL 7321452 by ben marsh in Main branch]
2019-07-16 08:51:35 -04:00
ben marsh
b096b9db91 Store the executable for each target in the makefile, so binary builds can construct the correct mutex name for detecting whether Live Coding is active.
#rb none
#rnx
#jira UE-77082

#ROBOMERGE-SOURCE: CL 7309692 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v371-7306989)

[CL 7309695 by ben marsh in Main branch]
2019-07-15 12:57:45 -04:00
ben marsh
33467b6bf5 UBT: Fix exception when checking for live coding session for non-windows targets.
#rb none
#rnx
#jira

#ROBOMERGE-SOURCE: CL 6957120 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v366-6836689)

[CL 6966780 by ben marsh in Main branch]
2019-06-12 23:22:14 -04:00
ben marsh
4e1e602670 Live Coding: Prevent compiling from the IDE while a Live Coding session is active. Engine runtime creates a global mutex with the executable path in the a name and leaks the handle, then UBT checks for it existing before allowing a build to start.
#rb none
#jira UE-74438

#ROBOMERGE-SOURCE: CL 6957113 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v366-6836689)

[CL 6966779 by ben marsh in Main branch]
2019-06-12 23:22:12 -04:00
Ben Marsh
4dec6e9376 UBT: Fix exception when checking for live coding session for non-windows targets.
#rb none
#rnx

[CL 6953528 by Ben Marsh in Dev-Build branch]
2019-06-12 07:57:50 -04:00
Ben Marsh
ae2ee9b54a Live Coding: Prevent compiling from the IDE while a Live Coding session is active. Engine runtime creates a global mutex with the executable path in the a name and leaks the handle, then UBT checks for it existing before allowing a build to start.
#rb none
#jira UE-74438

[CL 6942240 by Ben Marsh in Dev-Build branch]
2019-06-11 16:51:23 -04:00
ben marsh
c3e532b195 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

#ROBOMERGE-SOURCE: CL 6455253 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 6455273 by ben marsh in Main branch]
2019-05-14 18:12:06 -04:00
Ben Marsh
ba077509fe 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 6453851 by Ben Marsh in Dev-Build branch]
2019-05-14 17:48:05 -04:00
ben marsh
a289f6681e LiveCoding: Merging fixes to resolve issues with global symbols being reconstructed when loading patch DLLs. Was causing asserts when log channels were re-registered etc...
#jira
#rb none

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 5993252 via CL 5993257 via CL 5995286

[CL 5995562 by ben marsh in Main branch]
2019-04-18 17:51:25 -04:00
Ben Marsh
3a5790fdae 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

[CL 5988834 by Ben Marsh in Dev-Build branch]
2019-04-18 13:54:03 -04:00
ben marsh
0512599b96 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

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 5740602 in //UE4/Release-4.22/... via CL 5740765
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build)

[CL 5743848 by ben marsh in Dev-Build branch]
2019-04-04 13:06:55 -04:00
ben marsh
566e59e1e6 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

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 5740602 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5740765 by ben marsh in Main branch]
2019-04-04 12:02:05 -04:00
ben marsh
1503920bc7 Fix problems with HotReload on Mac.
* Linker arguments for each hot-reloaded module where only being patched with that module's new name (and not *all* the new module names). Windows was unaffected by this, since it uses response files (which were being handled correctly).
* Loop to rename modules in the manifest was terminating after the first modified module was found. This prevented other modules from being renamed.

#rb none
[FYI] Steve.Robb, Michael.Trepka
#jira UE-62612

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 5503573 in //UE4/Release-4.22/... via CL 5503574
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build)

[CL 5515605 by ben marsh in Dev-Build branch]
2019-03-22 18:03:18 -04:00
ben marsh
cd0577dc24 Fix problems with HotReload on Mac.
* Linker arguments for each hot-reloaded module where only being patched with that module's new name (and not *all* the new module names). Windows was unaffected by this, since it uses response files (which were being handled correctly).
* Loop to rename modules in the manifest was terminating after the first modified module was found. This prevented other modules from being renamed.

#rb none
[FYI] Steve.Robb, Michael.Trepka
#jira UE-62612

#ROBOMERGE-SOURCE: CL 5503573 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5503574 by ben marsh in Main branch]
2019-03-22 14:05:08 -04:00
Ben Marsh
07e535411b Merging //UE4/Dev-Main to Dev-Build (//UE4/Dev-Build)
#rb none
#rnx

[CL 5435186 by Ben Marsh in Dev-Build branch]
2019-03-18 16:38:36 -04:00
ben marsh
4b0b806b71 Fix issues related to hot-reload and LiveCoding co-existing.
* Removed code to invalidate makefiles when adding new source files. UBT should be reliable enough to make this determination itself nowadays, and ignored -invalidatemakefilesonly argument was causing modules to be recompiled.
* Fixed incorrect config section name when determining whether to allow hot reload from IDE. Now prevents hot reload from IDE when live coding is enabled.
* Added error message when trying to add a new class with Live Coding enabled.
* Added error messages when trying to start Live Coding after a hot reload has taken place.
* Added error messages when trying to hot reload with Live Coding enabled.

#jira UE-71253
#rb none

#ROBOMERGE-SOURCE: CL 5403464 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5403485 by ben marsh in Main branch]
2019-03-14 17:52:18 -04:00
ben marsh
49a498e69e 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

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 5304722 in //UE4/Release-4.22/... via CL 5309051
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build)

[CL 5325555 by ben marsh in Dev-Build branch]
2019-03-06 18:16:41 -05:00
ben marsh
14877685ec Fix exception when trying to get path for main module for hot reload.
#rb none
#rnx
#jira

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 5290983 in //UE4/Release-4.22/... via CL 5308917
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build)

[CL 5325152 by ben marsh in Dev-Build branch]
2019-03-06 18:14:42 -05:00
ben marsh
cf183af67c 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

#ROBOMERGE-SOURCE: CL 5304722 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5309051 by ben marsh in Main branch]
2019-03-05 18:49:25 -05:00