Skip to content

Commit 17e8cf0

Browse files
committed
Merge pull request #99044 from Sticksman/bug-fix-98873
Remove deprecated worker.js file
2 parents ea3154a + 1768a1b commit 17e8cf0

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

platform/web/SCsub

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ for ext in sys_env["JS_EXTERNS"]:
6161
sys_env["ENV"]["EMCC_CLOSURE_ARGS"] += " --externs " + ext.abspath
6262

6363
build = []
64-
build_targets = ["#bin/godot${PROGSUFFIX}.js", "#bin/godot${PROGSUFFIX}.wasm", "#bin/godot${PROGSUFFIX}.worker.js"]
64+
build_targets = ["#bin/godot${PROGSUFFIX}.js", "#bin/godot${PROGSUFFIX}.wasm"]
6565
if env["dlink_enabled"]:
6666
# Reset libraries. The main runtime will only link emscripten libraries, not godot ones.
6767
sys_env["LIBS"] = []
@@ -110,6 +110,5 @@ js_wrapped = env.Textfile("#bin/godot", [env.File(f) for f in wrap_list], TEXTFI
110110

111111
# 0 - unwrapped js file (use wrapped one instead)
112112
# 1 - wasm file
113-
# 2 - worker file
114-
# 3 - wasm side (when dlink is enabled).
115-
env.CreateTemplateZip(js_wrapped, build[1], build[2], build[3] if len(build) > 3 else None)
113+
# 2 - wasm side (when dlink is enabled).
114+
env.CreateTemplateZip(js_wrapped, build[1], build[2] if len(build) > 2 else None)

platform/web/emscripten_helpers.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def create_engine_file(env, target, source, externs, threads_enabled):
3030
return env.Substfile(target=target, source=[env.File(s) for s in source], SUBST_DICT=subst_dict)
3131

3232

33-
def create_template_zip(env, js, wasm, worker, side):
33+
def create_template_zip(env, js, wasm, side):
3434
binary_name = "godot.editor" if env.editor_build else "godot"
3535
zip_dir = env.Dir(env.GetTemplateZipPath())
3636
in_files = [
@@ -45,9 +45,6 @@ def create_template_zip(env, js, wasm, worker, side):
4545
zip_dir.File(binary_name + ".audio.worklet.js"),
4646
zip_dir.File(binary_name + ".audio.position.worklet.js"),
4747
]
48-
if env["threads"]:
49-
in_files.append(worker)
50-
out_files.append(zip_dir.File(binary_name + ".worker.js"))
5148
# Dynamic linking (extensions) specific.
5249
if env["dlink_enabled"]:
5350
in_files.append(side) # Side wasm (contains the actual Godot code).
@@ -66,8 +63,6 @@ def create_template_zip(env, js, wasm, worker, side):
6663
"logo.svg",
6764
"favicon.png",
6865
]
69-
if env["threads"]:
70-
cache.append("godot.editor.worker.js")
7166
opt_cache = ["godot.editor.wasm"]
7267
subst_dict = {
7368
"___GODOT_VERSION___": get_build_version(False),

platform/web/export/export_plugin.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,6 @@ Error EditorExportPlatformWeb::_add_manifest_icon(const String &p_path, const St
215215
}
216216

217217
Error EditorExportPlatformWeb::_build_pwa(const Ref<EditorExportPreset> &p_preset, const String p_path, const Vector<SharedObject> &p_shared_objects) {
218-
List<String> preset_features;
219-
get_preset_features(p_preset, &preset_features);
220-
221218
String proj_name = GLOBAL_GET("application/config/name");
222219
if (proj_name.is_empty()) {
223220
proj_name = "Godot Game";
@@ -244,9 +241,6 @@ Error EditorExportPlatformWeb::_build_pwa(const Ref<EditorExportPreset> &p_prese
244241
cache_files.push_back(name + ".apple-touch-icon.png");
245242
}
246243

247-
if (preset_features.find("threads")) {
248-
cache_files.push_back(name + ".worker.js");
249-
}
250244
cache_files.push_back(name + ".audio.worklet.js");
251245
cache_files.push_back(name + ".audio.position.worklet.js");
252246
replaces["___GODOT_CACHE___"] = Variant(cache_files).to_json_string();
@@ -840,7 +834,6 @@ Error EditorExportPlatformWeb::_export_project(const Ref<EditorExportPreset> &p_
840834
DirAccess::remove_file_or_error(basepath + ".html");
841835
DirAccess::remove_file_or_error(basepath + ".offline.html");
842836
DirAccess::remove_file_or_error(basepath + ".js");
843-
DirAccess::remove_file_or_error(basepath + ".worker.js");
844837
DirAccess::remove_file_or_error(basepath + ".audio.worklet.js");
845838
DirAccess::remove_file_or_error(basepath + ".audio.position.worklet.js");
846839
DirAccess::remove_file_or_error(basepath + ".service.worker.js");

platform/web/js/engine/config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
295295
'locateFile': function (path) {
296296
if (!path.startsWith('godot.')) {
297297
return path;
298-
} else if (path.endsWith('.worker.js')) {
299-
return `${loadPath}.worker.js`;
300298
} else if (path.endsWith('.audio.worklet.js')) {
301299
return `${loadPath}.audio.worklet.js`;
302300
} else if (path.endsWith('.audio.position.worklet.js')) {

0 commit comments

Comments
 (0)