You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
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 [CL 7321451 by Ben Marsh in 4.23 branch]
This commit is contained in:
@@ -397,6 +397,16 @@ namespace
|
||||
}
|
||||
|
||||
// BEGIN EPIC MOD - Allow mapping from object files to their unity object file
|
||||
static void AddCompilandId(types::StringMap<uint32_t>& objFileToCompilandId, const std::wstring& objFile, uint32_t compilandId)
|
||||
{
|
||||
std::wstring WideObjectFile = file::NormalizePath(objFile.c_str());
|
||||
ImmutableString ObjectFile = string::ToUtf8String(WideObjectFile);
|
||||
if (objFileToCompilandId.find(ObjectFile) == objFileToCompilandId.end())
|
||||
{
|
||||
objFileToCompilandId.insert(std::make_pair(ObjectFile, compilandId));
|
||||
}
|
||||
}
|
||||
|
||||
static bool ReadLiveCodingInfo(const wchar_t* manifestFile, types::StringMap<uint32_t>& objFileToCompilandId)
|
||||
{
|
||||
// Read the file to a string
|
||||
@@ -441,12 +451,11 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
std::wstring WideObjectFile = file::NormalizePath((BaseDir + L"\\" + *SourceFileValue->AsString()).c_str());
|
||||
ImmutableString ObjectFile = string::ToUtf8String(WideObjectFile);
|
||||
if (objFileToCompilandId.find(ObjectFile) == objFileToCompilandId.end())
|
||||
{
|
||||
objFileToCompilandId.insert(std::make_pair(ObjectFile, UnityCompilandId));
|
||||
}
|
||||
std::wstring objFile = BaseDir + L"\\" + *SourceFileValue->AsString();
|
||||
AddCompilandId(objFileToCompilandId, objFile, UnityCompilandId);
|
||||
|
||||
std::wstring patchedObjFile = file::RemoveExtension(objFile) + L".lc.obj";
|
||||
AddCompilandId(objFileToCompilandId, patchedObjFile, UnityCompilandId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user