You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
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]
104 lines
3.0 KiB
C++
104 lines
3.0 KiB
C++
// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreTypes.h"
|
|
#include "LC_Thread.h"
|
|
#include "LC_Process.h"
|
|
#include "LC_RunMode.h"
|
|
|
|
class NamedSharedMemory;
|
|
class ClientCommandThread;
|
|
class ClientUserCommandThread;
|
|
class DuplexPipeClient;
|
|
class CriticalSection;
|
|
class Event;
|
|
|
|
|
|
class ClientStartupThread
|
|
{
|
|
public:
|
|
explicit ClientStartupThread(HINSTANCE instance);
|
|
~ClientStartupThread(void);
|
|
|
|
// Spawns a thread that runs client initialization
|
|
void Start(const char* const groupName, RunMode::Enum runMode);
|
|
|
|
// Joins the thread, waiting for initialization to finish
|
|
void Join(void);
|
|
|
|
void* EnableModule(const wchar_t* const nameOfExeOrDll);
|
|
void* EnableAllModules(const wchar_t* const nameOfExeOrDll);
|
|
|
|
void* DisableModule(const wchar_t* const nameOfExeOrDll);
|
|
void* DisableAllModules(const wchar_t* const nameOfExeOrDll);
|
|
|
|
void WaitForToken(void* token);
|
|
void TriggerRecompile(void);
|
|
void BuildPatch(const wchar_t* moduleNames[], const wchar_t* objPaths[], unsigned int count);
|
|
|
|
void InstallExceptionHandler(void);
|
|
|
|
void ApplySettingBool(const char* const settingName, int value);
|
|
void ApplySettingInt(const char* const settingName, int value);
|
|
void ApplySettingString(const char* const settingName, const wchar_t* const value);
|
|
|
|
// BEGIN EPIC MOD - Adding ShowConsole command
|
|
void ShowConsole();
|
|
// END EPIC MOD
|
|
|
|
// BEGIN EPIC MOD - Adding SetVisible command
|
|
void SetVisible(bool visible);
|
|
// END EPIC MOD
|
|
|
|
// BEGIN EPIC MOD - Adding SetActive command
|
|
void SetActive(bool active);
|
|
// END EPIC MOD
|
|
|
|
// BEGIN EPIC MOD - Adding SetBuildArguments command
|
|
void SetBuildArguments(const wchar_t* arguments);
|
|
// END EPIC MOD
|
|
|
|
private:
|
|
struct ThreadContext
|
|
{
|
|
ClientStartupThread* thisInstance;
|
|
std::wstring processGroupName;
|
|
RunMode::Enum runMode;
|
|
};
|
|
|
|
static unsigned int __stdcall ThreadProxy(void* context);
|
|
unsigned int ThreadFunction(const std::wstring& groupName, RunMode::Enum runMode);
|
|
|
|
HINSTANCE m_instance;
|
|
|
|
thread::Handle m_thread;
|
|
|
|
// job object for associating spawned processes with main process the DLL is loaded into
|
|
HANDLE m_job;
|
|
|
|
// named shared memory for sharing the Live++ process ID between processes
|
|
NamedSharedMemory* m_sharedMemory;
|
|
|
|
// main Live++ process. context may be empty in case we connected to an existing Live++ process
|
|
process::Context* m_mainProcessContext;
|
|
process::Handle m_processHandle;
|
|
|
|
bool m_successfulInit;
|
|
|
|
// pipe used for interprocess communication
|
|
DuplexPipeClient* m_pipeClient;
|
|
DuplexPipeClient* m_exceptionPipeClient;
|
|
CriticalSection* m_pipeClientCS;
|
|
|
|
// helper threads taking care of communication with the Live++ server and user code
|
|
ClientCommandThread* m_commandThread;
|
|
ClientUserCommandThread* m_userCommandThread;
|
|
|
|
// manual-reset start event that signals to the helper threads that they can start talking to the pipe
|
|
Event* m_startEvent;
|
|
|
|
// process-wide event that is signaled by the Live++ server when compilation is about to begin
|
|
Event* m_compilationEvent;
|
|
};
|