Skip to content

Commit 1768a1b

Browse files
committed
Remove deprecated worker.js file
1 parent 0f5f3bc commit 1768a1b

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
@@ -59,7 +59,7 @@ for ext in sys_env["JS_EXTERNS"]:
5959
sys_env["ENV"]["EMCC_CLOSURE_ARGS"] += " --externs " + ext.abspath
6060

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

109109
# 0 - unwrapped js file (use wrapped one instead)
110110
# 1 - wasm file
111-
# 2 - worker file
112-
# 3 - wasm side (when dlink is enabled).
113-
env.CreateTemplateZip(js_wrapped, build[1], build[2], build[3] if len(build) > 3 else None)
111+
# 2 - wasm side (when dlink is enabled).
112+
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
@@ -214,9 +214,6 @@ Error EditorExportPlatformWeb::_add_manifest_icon(const String &p_path, const St
214214
}
215215

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

246-
if (preset_features.find("threads")) {
247-
cache_files.push_back(name + ".worker.js");
248-
}
249243
cache_files.push_back(name + ".audio.worklet.js");
250244
cache_files.push_back(name + ".audio.position.worklet.js");
251245
replaces["___GODOT_CACHE___"] = Variant(cache_files).to_json_string();
@@ -839,7 +833,6 @@ Error EditorExportPlatformWeb::_export_project(const Ref<EditorExportPreset> &p_
839833
DirAccess::remove_file_or_error(basepath + ".html");
840834
DirAccess::remove_file_or_error(basepath + ".offline.html");
841835
DirAccess::remove_file_or_error(basepath + ".js");
842-
DirAccess::remove_file_or_error(basepath + ".worker.js");
843836
DirAccess::remove_file_or_error(basepath + ".audio.worklet.js");
844837
DirAccess::remove_file_or_error(basepath + ".audio.position.worklet.js");
845838
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)