From b7a59447a324eb0320fa61a1e27f073d48339bc3 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 28 May 2026 11:32:24 +0200 Subject: [PATCH] Fix Web build files location to properly exist in final package https://forum.flaxengine.com/t/web-build-issue-with-c-script/2590 --- .../Web/Binaries/{Data => }/check_browser_version.js | 0 Source/Platforms/Web/Binaries/{Data => }/check_jspi.js | 0 Source/Platforms/Web/Binaries/{Data => }/shell.html | 0 Source/Tools/Flax.Build/Platforms/Web/WebToolchain.cs | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename Source/Platforms/Web/Binaries/{Data => }/check_browser_version.js (100%) rename Source/Platforms/Web/Binaries/{Data => }/check_jspi.js (100%) rename Source/Platforms/Web/Binaries/{Data => }/shell.html (100%) diff --git a/Source/Platforms/Web/Binaries/Data/check_browser_version.js b/Source/Platforms/Web/Binaries/check_browser_version.js similarity index 100% rename from Source/Platforms/Web/Binaries/Data/check_browser_version.js rename to Source/Platforms/Web/Binaries/check_browser_version.js diff --git a/Source/Platforms/Web/Binaries/Data/check_jspi.js b/Source/Platforms/Web/Binaries/check_jspi.js similarity index 100% rename from Source/Platforms/Web/Binaries/Data/check_jspi.js rename to Source/Platforms/Web/Binaries/check_jspi.js diff --git a/Source/Platforms/Web/Binaries/Data/shell.html b/Source/Platforms/Web/Binaries/shell.html similarity index 100% rename from Source/Platforms/Web/Binaries/Data/shell.html rename to Source/Platforms/Web/Binaries/shell.html diff --git a/Source/Tools/Flax.Build/Platforms/Web/WebToolchain.cs b/Source/Tools/Flax.Build/Platforms/Web/WebToolchain.cs index a465ccac0..6551e3625 100644 --- a/Source/Tools/Flax.Build/Platforms/Web/WebToolchain.cs +++ b/Source/Tools/Flax.Build/Platforms/Web/WebToolchain.cs @@ -367,7 +367,7 @@ namespace Flax.Build.Platforms if (args.All(arg => !arg.Contains("-sASSERTIONS"))) { // minimum_runtime_check.js from Emscripten checks min browser versions only with ASSERTIONS enabled so use custom check - var checkBrowserVersion = File.ReadAllText(Path.Combine(Globals.EngineRoot, "Source/Platforms/Web/Binaries/Data/check_browser_version.js")); + var checkBrowserVersion = File.ReadAllText(Path.Combine(Globals.EngineRoot, "Source/Platforms/Web/Binaries/check_browser_version.js")); checkBrowserVersion = checkBrowserVersion.Replace("TARGET_NOT_SUPPORTED", "0x7fffffff"); checkBrowserVersion = checkBrowserVersion.Replace("MIN_CHROME_VERSION", minChrome.ToString()); checkBrowserVersion = checkBrowserVersion.Replace("MIN_FIREFOX_VERSION", minFirefox.ToString()); @@ -377,11 +377,11 @@ namespace Flax.Build.Platforms args.Add($"--pre-js \"{path}\""); } if (addJSPI) - args.Add($"--pre-js \"{Globals.EngineRoot}/Source/Platforms/Web/Binaries/Data/check_jspi.js\""); + args.Add($"--pre-js \"{Globals.EngineRoot}/Source/Platforms/Web/Binaries/check_jspi.js\""); // Customize output HTML shell if (options.LinkEnv.Output == LinkerOutput.Executable) - args.Add($"--shell-file \"{Globals.EngineRoot}/Source/Platforms/Web/Binaries/Data/shell.html\""); + args.Add($"--shell-file \"{Globals.EngineRoot}/Source/Platforms/Web/Binaries/shell.html\""); } args.Add("-Wl,--start-group");