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
[CL 5304722 by Ben Marsh in 4.22 branch]
72 lines
1.9 KiB
C++
72 lines
1.9 KiB
C++
// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreTypes.h"
|
|
#include "LC_RelocationPatcher.h"
|
|
#include "LC_FunctionPatcher.h"
|
|
#include "LC_ExecutablePatcher.h"
|
|
|
|
|
|
class ModulePatch
|
|
{
|
|
public:
|
|
struct Data
|
|
{
|
|
uint8_t entryPointCode[ExecutablePatcher::INJECTED_CODE_SIZE];
|
|
|
|
uint16_t prePatchHookModuleIndex;
|
|
uint32_t firstPrePatchHook;
|
|
uint32_t lastPrePatchHook;
|
|
|
|
uint16_t postPatchHookModuleIndex;
|
|
uint32_t firstPostPatchHook;
|
|
uint32_t lastPostPatchHook;
|
|
|
|
uint32_t originalCookieRva;
|
|
uint32_t patchCookieRva;
|
|
|
|
uint32_t dllMainRva;
|
|
|
|
types::vector<relocations::Record> preEntryPointRelocations;
|
|
types::vector<relocations::Record> postEntryPointRelocations;
|
|
|
|
types::vector<uint32_t> patchedInitializers;
|
|
|
|
types::vector<functions::Record> functionPatches;
|
|
types::vector<functions::LibraryRecord> libraryFunctionPatches;
|
|
};
|
|
|
|
ModulePatch(const std::wstring& exePath, const std::wstring& pdbPath, size_t token);
|
|
|
|
void RegisterEntryPointCode(const uint8_t* code);
|
|
|
|
void RegisterPrePatchHooks(uint16_t moduleIndex, uint32_t firstRva, uint32_t lastRva);
|
|
void RegisterPostPatchHooks(uint16_t moduleIndex, uint32_t firstRva, uint32_t lastRva);
|
|
|
|
void RegisterSecurityCookie(uint32_t originalRva, uint32_t patchRva);
|
|
|
|
void RegisterDllMain(uint32_t rva);
|
|
|
|
void RegisterPreEntryPointRelocation(const relocations::Record& record);
|
|
void RegisterPostEntryPointRelocation(const relocations::Record& record);
|
|
|
|
void RegisterPatchedDynamicInitializer(uint32_t rva);
|
|
|
|
void RegisterFunctionPatch(const functions::Record& record);
|
|
void RegisterLibraryFunctionPatch(const functions::LibraryRecord& record);
|
|
|
|
const std::wstring& GetExePath(void) const;
|
|
const std::wstring& GetPdbPath(void) const;
|
|
size_t GetToken(void) const;
|
|
|
|
const Data& GetData(void) const;
|
|
|
|
private:
|
|
std::wstring m_exePath;
|
|
std::wstring m_pdbPath;
|
|
size_t m_token;
|
|
|
|
Data m_data;
|
|
};
|