Fix Release build for Web
This commit is contained in:
@@ -147,10 +147,19 @@ bool WebPlatformTools::OnPostProcess(CookingData& data)
|
||||
}
|
||||
const String insertPrefixLocation = TEXT("// end include: minimum_runtime_check.js");
|
||||
int32 location = gameJsText.Find(insertPrefixLocation);
|
||||
CHECK_RETURN(location != -1, true);
|
||||
location += insertPrefixLocation.Length() + 1;
|
||||
fileJsText = filesIncludeBegin + TEXT("\n") + fileJsText + TEXT("\n") + filesIncludeEnd + TEXT("\n");
|
||||
gameJsText.Insert(location, fileJsText);
|
||||
if (location != -1)
|
||||
{
|
||||
location += insertPrefixLocation.Length() + 1;
|
||||
fileJsText = filesIncludeBegin + TEXT("\n") + fileJsText + TEXT("\n") + filesIncludeEnd + TEXT("\n");
|
||||
gameJsText.Insert(location, fileJsText);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Comments are missing in Release when JS/HTML are minified
|
||||
fileJsText.Insert(0, filesIncludeBegin);
|
||||
fileJsText.Insert(0, TEXT("\n"));
|
||||
gameJsText.Insert(0, fileJsText);
|
||||
}
|
||||
File::WriteAllText(gameJs, gameJsText, Encoding::UTF8);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,16 +6,14 @@
|
||||
#include "WebFileSystem.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Types/String.h"
|
||||
#include "Engine/Core/Types/StringView.h"
|
||||
#include "Engine/Core/Types/Version.h"
|
||||
#include "Engine/Core/Types/Guid.h"
|
||||
#include "Engine/Core/Collections/Dictionary.h"
|
||||
#include "Engine/Platform/CPUInfo.h"
|
||||
#include "Engine/Platform/MemoryStats.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#if !BUILD_RELEASE
|
||||
#include "Engine/Core/Types/StringView.h"
|
||||
#include "Engine/Utilities/StringConverter.h"
|
||||
#endif
|
||||
#include <chrono>
|
||||
#include <dlfcn.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user