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]
133 lines
2.9 KiB
C++
133 lines
2.9 KiB
C++
// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
|
|
|
|
#include "LC_ModulePatch.h"
|
|
#include "LC_AppSettings.h"
|
|
|
|
|
|
ModulePatch::ModulePatch(const std::wstring& exePath, const std::wstring& pdbPath, size_t token)
|
|
: m_exePath(exePath)
|
|
, m_pdbPath(pdbPath)
|
|
, m_token(token)
|
|
, m_data()
|
|
{
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterEntryPointCode(const uint8_t* code)
|
|
{
|
|
memcpy(m_data.entryPointCode, code, sizeof(m_data.entryPointCode));
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterPrePatchHooks(uint16_t moduleIndex, uint32_t firstRva, uint32_t lastRva)
|
|
{
|
|
m_data.prePatchHookModuleIndex = moduleIndex;
|
|
m_data.firstPrePatchHook = firstRva;
|
|
m_data.lastPrePatchHook = lastRva;
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterPostPatchHooks(uint16_t moduleIndex, uint32_t firstRva, uint32_t lastRva)
|
|
{
|
|
m_data.postPatchHookModuleIndex = moduleIndex;
|
|
m_data.firstPostPatchHook = firstRva;
|
|
m_data.lastPostPatchHook = lastRva;
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterSecurityCookie(uint32_t originalRva, uint32_t patchRva)
|
|
{
|
|
m_data.originalCookieRva = originalRva;
|
|
m_data.patchCookieRva = patchRva;
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterDllMain(uint32_t rva)
|
|
{
|
|
m_data.dllMainRva = rva;
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterPreEntryPointRelocation(const relocations::Record& record)
|
|
{
|
|
// this needs additional memory, only store data when the corresponding feature is enabled
|
|
if (!appSettings::g_installCompiledPatchesMultiProcess->GetValue())
|
|
{
|
|
return;
|
|
}
|
|
|
|
m_data.preEntryPointRelocations.emplace_back(record);
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterPostEntryPointRelocation(const relocations::Record& record)
|
|
{
|
|
// this needs additional memory, only store data when the corresponding feature is enabled
|
|
if (!appSettings::g_installCompiledPatchesMultiProcess->GetValue())
|
|
{
|
|
return;
|
|
}
|
|
|
|
m_data.postEntryPointRelocations.emplace_back(record);
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterPatchedDynamicInitializer(uint32_t rva)
|
|
{
|
|
// this needs additional memory, only store data when the corresponding feature is enabled
|
|
if (!appSettings::g_installCompiledPatchesMultiProcess->GetValue())
|
|
{
|
|
return;
|
|
}
|
|
|
|
m_data.patchedInitializers.emplace_back(rva);
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterFunctionPatch(const functions::Record& record)
|
|
{
|
|
// this needs additional memory, only store data when the corresponding feature is enabled
|
|
if (!appSettings::g_installCompiledPatchesMultiProcess->GetValue())
|
|
{
|
|
return;
|
|
}
|
|
|
|
m_data.functionPatches.emplace_back(record);
|
|
}
|
|
|
|
|
|
void ModulePatch::RegisterLibraryFunctionPatch(const functions::LibraryRecord& record)
|
|
{
|
|
// this needs additional memory, only store data when the corresponding feature is enabled
|
|
if (!appSettings::g_installCompiledPatchesMultiProcess->GetValue())
|
|
{
|
|
return;
|
|
}
|
|
|
|
m_data.libraryFunctionPatches.emplace_back(record);
|
|
}
|
|
|
|
|
|
const std::wstring& ModulePatch::GetExePath(void) const
|
|
{
|
|
return m_exePath;
|
|
}
|
|
|
|
|
|
const std::wstring& ModulePatch::GetPdbPath(void) const
|
|
{
|
|
return m_pdbPath;
|
|
}
|
|
|
|
|
|
size_t ModulePatch::GetToken(void) const
|
|
{
|
|
return m_token;
|
|
}
|
|
|
|
|
|
const ModulePatch::Data& ModulePatch::GetData(void) const
|
|
{
|
|
return m_data;
|
|
}
|