/** * Whether the required external SDKs are installed for this platform */ protected override SDKStatus HasRequiredManualSDKInternal() { // if any autosdk setup has been done then the local process environment is suspect if (HasSetupAutoSDK()) { return(SDKStatus.Invalid); } if (!HTML5SDKInfo.IsSDKInstalled()) { return(SDKStatus.Invalid); } try { int InstalledVersion = Convert.ToInt32(HTML5SDKInfo.EmscriptenVersion().Replace(".", "")); int RequiredVersion = Convert.ToInt32(GetRequiredSDKString().Replace(".", "")); if (InstalledVersion >= RequiredVersion) { return(SDKStatus.Valid); } else { Console.WriteLine("EMSCRIPTEN sdk " + HTML5SDKInfo.EmscriptenVersion() + " found which is older than " + RequiredVersion + " Please install the latest emscripten SDK"); return(SDKStatus.Invalid); } } catch (Exception /*ex*/) { return(SDKStatus.Invalid); } }
// cache the location of SDK tools public override void RegisterToolChain() { if (HTML5SDKInfo.IsSDKInstalled() && HTML5SDKInfo.IsPythonInstalled()) { EMCCPath = "\"" + HTML5SDKInfo.EmscriptenCompiler() + "\""; PythonPath = HTML5SDKInfo.PythonPath(); EMSDKVersionString = HTML5SDKInfo.EmscriptenVersion().Replace(".", ""); // set some environment variable we'll need //Environment.SetEnvironmentVariable("EMCC_DEBUG", "cache"); Environment.SetEnvironmentVariable("EMCC_CORES", "8"); Environment.SetEnvironmentVariable("EMCC_FORCE_STDLIBS", "1"); Environment.SetEnvironmentVariable("EMCC_OPTIMIZE_NORMALLY", "1"); // finally register the toolchain that is now ready to go Log.TraceVerbose(" Registered for {0}", CPPTargetPlatform.HTML5.ToString()); UEToolChain.RegisterPlatformToolChain(CPPTargetPlatform.HTML5, this); } }
/** * Whether the required external SDKs are installed for this platform */ protected override SDKStatus HasRequiredManualSDKInternal() { // if any autosdk setup has been done then the local process environment is suspect if (HasSetupAutoSDK()) { return(SDKStatus.Invalid); } try { if (HTML5SDKInfo.EmscriptenVersion().Contains(ExpectedSDKVersion)) { return(SDKStatus.Valid); } else { Console.WriteLine("EMSCRIPTEN sdk " + HTML5SDKInfo.EmscriptenVersion() + " found which is unsupported, Please install version " + ExpectedSDKVersion); return(SDKStatus.Invalid); } } catch (Exception /*ex*/) { return(SDKStatus.Invalid); } }
/// <summary> /// Returns SDK string as required by the platform /// </summary> /// <returns>Valid SDK string</returns> protected override string GetRequiredSDKString() { return(HTML5SDKInfo.EmscriptenVersion()); }