@@ -51,7 +51,7 @@ def generate_minimal_runtime_load_statement(target_basename):
51
51
download_wasm = f"binary('{ target_basename } .wasm')"
52
52
53
53
# Main JS file always in first entry
54
- files_to_load = [f"script('{ target_basename } .js ')" ]
54
+ files_to_load = [f"script('{ settings . TARGET_JS_NAME } ')" ]
55
55
56
56
# Download .wasm file
57
57
if (settings .WASM == 1 and settings .WASM2JS == 0 ) or not download_wasm :
@@ -73,7 +73,7 @@ def generate_minimal_runtime_load_statement(target_basename):
73
73
then_statements += ["%s.$wb = URL.createObjectURL(new Blob([r[%d]], { type: 'application/javascript' }));" % (settings .EXPORT_NAME , len (files_to_load ))]
74
74
75
75
if download_wasm and settings .WASM_WORKERS == 1 :
76
- files_to_load += [f"binary('{ target_basename } .ww.js ')" ]
76
+ files_to_load += [f"binary('{ settings . WASM_WORKER_FILE } ')" ]
77
77
78
78
# Download Wasm2JS code if target browser does not support WebAssembly
79
79
if settings .WASM == 2 :
@@ -164,7 +164,7 @@ def generate_minimal_runtime_load_statement(target_basename):
164
164
else :
165
165
save_js = ''
166
166
167
- files_to_load [0 ] = f"binary('{ target_basename } .js ')"
167
+ files_to_load [0 ] = f"binary('{ settings . TARGET_JS_NAME } ')"
168
168
if not settings .MODULARIZE :
169
169
then_statements += ["var url = %sURL.createObjectURL(new Blob([r[0]], { type: 'application/javascript' }));" % save_js ,
170
170
script_load ]
@@ -200,7 +200,7 @@ def generate_minimal_runtime_html(target, options, js_target, target_basename):
200
200
if re .search (r'{{{\s*SCRIPT\s*}}}' , shell ):
201
201
shared .exit_with_error ('--shell-file "' + options .shell_path + '": MINIMAL_RUNTIME uses a different kind of HTML page shell file than the traditional runtime! Please see $EMSCRIPTEN/src/shell_minimal_runtime.html for a template to use as a basis.' )
202
202
203
- shell = shell .replace ('{{{ TARGET_BASENAME }}}' , target_basename )
203
+ shell = shell .replace ('{{{ TARGET_BASENAME }}}' , settings . TARGET_BASENAME )
204
204
shell = shell .replace ('{{{ EXPORT_NAME }}}' , settings .EXPORT_NAME )
205
205
shell = shell .replace ('{{{ TARGET_JS_NAME }}}' , settings .TARGET_JS_NAME )
206
206
0 commit comments