You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Change 2783376 on 2015/11/30 by Nick.Shin upgrading emscripten SDK to 1.35.9 following instruction from the README file Change2787414on 2015/12/02 by Nick.Shin upgrading emscripten to 1.35.0 removing old SDK and tools for Mac and Win64 Change 2790218 on 2015/12/04 by Nick.Shin merge (CL: #2790164) from //UE4/Dev-Physics to //UE4/Dev-Platform PhysX HTML5 bc files Change 2794786 on 2015/12/08 by Nick.Shin merge CL #2794757 part 1 of 2 from //UE4/Dev-Physics/PhysX/PhysX_3.3/Lib/html5 to //UE4/Dev-Platform/Engine/Source/ThirdParty/PhysX/PhysX-3.3/lib/HTML5/ Change 2794789 on 2015/12/08 by Nick.Shin merge CL #2794758 part 2 of 2 from //UE4/Dev-Physics/PhysX/PhysX_3.3/Lib/html5 to //UE4/Dev-Platform/Engine/Source/ThirdParty/PhysX/PhysX-3.3/lib/HTML5/ Change 2799151 on 2015/12/10 by Dmitry.Rekman Guarantee XGE.xml sorting order for 10+ builds. - A licensee pointed out the problem that AutomationTool.UE4Build.FindXGEFiles() sorts the files by filename, so e.g. UBTExport.10.xge.xml takes priority over UBTExport.2.xge.xml. #codereview Ben.Marsh Change 2799440 on 2015/12/11 by Mark.Satterthwaite Duplicate CL #2790251: Temporarily revert some of the changes for Mac mouse cursor locking as they were causing more problems than they solved. Change 2799441 on 2015/12/11 by Mark.Satterthwaite Duplicate CL #2796111 & #2796158: Fix cooking shader cache files - it wasn't being enabled despite a cached shader format being listed. Change 2799442 on 2015/12/11 by Mark.Satterthwaite Duplicate CL #2797758: Defer calls to AUGraphUpdate into FCoreAudioDevice::UpdateHardware - this call will synchronise the calling thread with the CoreAudio thread/run-loop so that the CoreAudio graph is safe to modify and this may incur a significant stall. This means it is far more efficient to amortise the cost of all changes to the graph with a single call. To ensure correctness the audio format conversion components are cached and disposed of after the call to AUGraphUpdate so that any existing operations on the CoreAudio thread are completed prior to disposal. Change 2799601 on 2015/12/11 by Mark.Satterthwaite Implement background reading of NSPipe's in Mac ExecProcess to avoid the sub-process blocking trying to write to the meagre 8kb internal buffers. This may fix problems with SVN on Mac. Change 2799657 on 2015/12/11 by Mark.Satterthwaite Remove the hlslcc major version from the Metal and OpenGL shader formats to ensure that there are enough bits to represent the different version components. There's no expectation that the major version of hlslcc will change and it will soon be removed entirely. Change 2799691 on 2015/12/11 by Mark.Satterthwaite Merging final internal-only changes from WWDC. Change 2800182 on 2015/12/11 by Mark.Satterthwaite Capture the system.log contents from the moment we boot to the point we crash to report GPU restarts and other system errors not written into our own logs. Change 2801395 on 2015/12/14 by Mark.Satterthwaite Fix the Metal shader compiler so that it properly reports the number of sampler objects in use, not the number of textures as Metal separates its 16 samplers and up-to 128 textures in a single shader stage, like D3D and unlike OpenGL. This fixes a lot of material compile errors in newer projects which aren't being designed for obsolete OpenGL. Change 2801653 on 2015/12/14 by Daniel.Lamb Load package differ can now diff header part of packages. Changed the way IsChildCooker is handled improves performance of multiprocess cooker. Change 2801655 on 2015/12/14 by Daniel.Lamb Added cooker warning to resave packages if they don't have collision data for their static meshes. Added NavCollision creation on static mesh import so that we save out the NavCollision. Change 2801923 on 2015/12/14 by Daniel.Lamb Fix compilation error with CreateLoader. Change 2802076 on 2015/12/14 by Daniel.Lamb Remove some debugging assistance code. Change 2803207 on 2015/12/15 by Mark.Satterthwaite Add missing Metal formats for PF_R16_SINT/UINT. Change2803254on 2015/12/15 by Mark.Satterthwaite Add additional uint/2/3/4 overrides for SV_Target(x) to MetalUtils and when generating the output variable look for an exact type match before restoring to the first match with the correct number of elements. This ensures that we generate uint/2/3/4 writes when required for CopyStencilToLightingChannelsPS without breaking anything else. Change 2803259 on 2015/12/15 by Mark.Satterthwaite Fix stencil texture swizzle for Metal which uses .x not .g for stencil value. Change 2803262 on 2015/12/15 by Mark.Satterthwaite Fix FMetalRHICommandContext::RHISetScissorRect handling 0 sized rects when RHISetScissorRect is called before RHISetViewport. Change 2803321 on 2015/12/15 by Mark.Satterthwaite Duplicate CL #2786291: Fix Metal validation errors caused by incorrect instance count and also a crash-bug caused by accessing a defunct depth-stencil texture. This should be enough to ensure Metal works even if you've been playing previously with OpenGL. Change 2803413 on 2015/12/15 by Mark.Satterthwaite Workaround the Material Editor's unfortunate habit of rendering tiles without a depth/stencil-buffer attached despite tiles wanting to write to depth - in Metal we have to create a temporary Depth-Stencil texture so that we don't crash the driver because it won't rewrite the shaders for us (unlike D3D/GL). Change 2806247 on 2015/12/16 by Daniel.Lamb Fixed UParticleRequiredModule deterministic cook issue. #codereview Olaf.Piesche Change 2806834 on 2015/12/17 by Mark.Satterthwaite Temporarily work around absence of Checked & Shipping APEX/PhysX binaries on Mac. Change 2807017 on 2015/12/17 by Mark.Satterthwaite Handle the shader cache being initialised for cooking multiple times until I can sort out the implementation properly. Change 2807027 on 2015/12/17 by Daniel.Lamb Enabled DDC stats.
216 lines
5.8 KiB
C#
216 lines
5.8 KiB
C#
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
using System;
|
|
using System.IO;
|
|
using System.Text;
|
|
using UnrealBuildTool;
|
|
using System.Diagnostics;
|
|
using System.Collections.Generic;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
public class HTML5SDKInfo
|
|
{
|
|
// A GUID as a string. Allows updates to flush the emscripten install without bumping
|
|
// the SDK version number. Useful if a programming-error causes a bogus install.
|
|
// NOTE: Change this also when NODE_JS_MAC & NODE_JS_WIN have been updated as well.
|
|
static string SDKInfoGUID = "AC3970B2-7D37-43F1-A83E-3A0BD2C8C89F";
|
|
|
|
static string SDKBase { get { return Path.GetFullPath(Path.Combine(new string[] { BuildConfiguration.RelativeEnginePath, "Source", "ThirdParty", "HTML5", "emsdk" })); } }
|
|
static string SDKVersion = "1.35.0";
|
|
static string EMSCRIPTEN_ROOT { get { return Path.Combine(SDKBase, "emscripten", SDKVersion); } }
|
|
|
|
static string PYTHON_WIN { get { return Path.Combine(SDKBase, "Win64", "python", "2.7.5.3_64bit", "python.exe"); } }
|
|
// python is default installed on mac.
|
|
static string PYTHON_MAC { get { return Path.Combine("/usr/bin/python"); } }
|
|
|
|
static string PYTHON
|
|
{
|
|
get
|
|
{
|
|
switch (BuildHostPlatform.Current.Platform)
|
|
{
|
|
case UnrealTargetPlatform.Win64:
|
|
return PYTHON_WIN;
|
|
case UnrealTargetPlatform.Mac:
|
|
return PYTHON_MAC;
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
|
|
static string LLVM_ROOT_WIN { get { return Path.Combine(SDKBase, "Win64", "clang", "e" + SDKVersion + "_64bit"); } }
|
|
static string LLVM_ROOT_MAC { get { return Path.Combine(SDKBase, "Mac", "clang", "e" + SDKVersion + "_64bit"); } }
|
|
|
|
static string LLVM_ROOT
|
|
{
|
|
get
|
|
{
|
|
switch (BuildHostPlatform.Current.Platform)
|
|
{
|
|
case UnrealTargetPlatform.Win64:
|
|
return LLVM_ROOT_WIN;
|
|
case UnrealTargetPlatform.Mac:
|
|
return LLVM_ROOT_MAC;
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
|
|
static string NODE_JS_WIN { get { return Path.Combine(SDKBase, "Win64", "node", "4.1.1_64bit", "bin", "node.exe"); } }
|
|
static string NODE_JS_MAC { get { return Path.Combine(SDKBase, "Mac", "node", "4.1.1_64bit", "bin", "node"); } }
|
|
|
|
static string NODE_JS
|
|
{
|
|
get
|
|
{
|
|
switch (BuildHostPlatform.Current.Platform)
|
|
{
|
|
case UnrealTargetPlatform.Win64:
|
|
return NODE_JS_WIN;
|
|
case UnrealTargetPlatform.Mac:
|
|
return NODE_JS_MAC;
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
|
|
static string OPTIMIZER_NAME
|
|
{
|
|
get
|
|
{
|
|
switch (BuildHostPlatform.Current.Platform)
|
|
{
|
|
case UnrealTargetPlatform.Win64:
|
|
return "optimizer.exe";
|
|
case UnrealTargetPlatform.Mac:
|
|
return "optimizer";
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
|
|
static public string DOT_EMSCRIPTEN
|
|
{
|
|
get
|
|
{
|
|
var TempPath = Path.GetFullPath(Path.Combine(BuildConfiguration.RelativeEnginePath, BuildConfiguration.BaseIntermediateFolder, "HTML5"));
|
|
if (!Directory.Exists(TempPath))
|
|
{
|
|
Directory.CreateDirectory(TempPath);
|
|
}
|
|
return Path.Combine(TempPath, ".emscripten");
|
|
}
|
|
}
|
|
|
|
static public string EMSCRIPTEN_CACHE
|
|
{
|
|
get
|
|
{
|
|
var TempPath = Path.GetFullPath(Path.Combine(BuildConfiguration.RelativeEnginePath, BuildConfiguration.BaseIntermediateFolder, "HTML5"));
|
|
if (!Directory.Exists(TempPath))
|
|
{
|
|
Directory.CreateDirectory(TempPath);
|
|
}
|
|
return Path.Combine(TempPath, "EmscriptenCache"); ;
|
|
}
|
|
}
|
|
|
|
public static string SetupEmscriptenTemp()
|
|
{
|
|
string HTML5Intermediatory = Path.GetFullPath(Path.Combine(BuildConfiguration.RelativeEnginePath, BuildConfiguration.BaseIntermediateFolder, "HTML5"));
|
|
string TempPath = Path.Combine(HTML5Intermediatory, "EmscriptenTemp");
|
|
try
|
|
{
|
|
if (Directory.Exists(TempPath))
|
|
{
|
|
Directory.Delete(TempPath, true);
|
|
}
|
|
|
|
Directory.CreateDirectory(TempPath);
|
|
}
|
|
catch (Exception Ex)
|
|
{
|
|
Log.TraceErrorOnce(" Recreation of Emscripten Temp folder failed because of " + Ex.ToString());
|
|
}
|
|
|
|
return TempPath;
|
|
}
|
|
|
|
public static string SetUpEmscriptenConfigFile()
|
|
{
|
|
string ConfigFile = DOT_EMSCRIPTEN;
|
|
|
|
if (!File.Exists(ConfigFile) || !File.ReadAllText(ConfigFile).Contains("GENERATEDBYUE4='" + SDKVersion + "+" + SDKInfoGUID + "'"))
|
|
{
|
|
var ConfigString = String.Join(
|
|
Environment.NewLine,
|
|
"import os",
|
|
"SPIDERMONKEY_ENGINE = ''",
|
|
"LLVM_ROOT='" + LLVM_ROOT + "'",
|
|
"NODE_JS= '" + NODE_JS + "'",
|
|
"PYTHON= '" + PYTHON + "'",
|
|
"EMSCRIPTEN_NATIVE_OPTIMIZER='" + Path.Combine(LLVM_ROOT, OPTIMIZER_NAME) + "'",
|
|
"EMSCRIPTEN_ROOT= '" + EMSCRIPTEN_ROOT + "'",
|
|
"TEMP_DIR= '" + SetupEmscriptenTemp() + "'",
|
|
"COMPILER_ENGINE = NODE_JS",
|
|
"JS_ENGINES = [NODE_JS]",
|
|
"V8_ENGINE = ''",
|
|
"GENERATEDBYUE4='" + SDKVersion + "+" + SDKInfoGUID + "'"
|
|
);
|
|
File.WriteAllText(ConfigFile, ConfigString.Replace("\\", "/"));
|
|
}
|
|
return ConfigFile;
|
|
}
|
|
|
|
public static string EmscriptenBase()
|
|
{
|
|
return EMSCRIPTEN_ROOT;
|
|
}
|
|
|
|
public static string EmscriptenVersion()
|
|
{
|
|
return SDKVersion;
|
|
}
|
|
|
|
public static string Python()
|
|
{
|
|
return PYTHON;
|
|
}
|
|
|
|
public static string EmscriptenPackager()
|
|
{
|
|
return Path.Combine(EmscriptenBase(), "tools", "file_packager.py");
|
|
}
|
|
|
|
public static string EmscriptenCompiler()
|
|
{
|
|
return "\"" + Path.Combine(EmscriptenBase(), "emcc") + "\"";
|
|
}
|
|
|
|
public static bool IsSDKInstalled()
|
|
{
|
|
bool SDK = File.Exists(GetVersionInfoPath());
|
|
|
|
switch (BuildHostPlatform.Current.Platform)
|
|
{
|
|
case UnrealTargetPlatform.Win64:
|
|
return SDK && Directory.Exists(Path.Combine(SDKBase, "Win64"));
|
|
case UnrealTargetPlatform.Mac:
|
|
return SDK && Directory.Exists(Path.Combine(SDKBase, "Mac")) && File.Exists(PYTHON);
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
static string GetVersionInfoPath()
|
|
{
|
|
return Path.Combine(EmscriptenBase(), "emscripten-version.txt");
|
|
}
|
|
}
|
|
}
|