@@ -51,7 +51,7 @@ def generate_minimal_runtime_load_statement(target_basename):
5151 download_wasm = f"binary('{ target_basename } .wasm')"
5252
5353 # 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 } ')" ]
5555
5656 # Download .wasm file
5757 if (settings .WASM == 1 and settings .WASM2JS == 0 ) or not download_wasm :
@@ -73,7 +73,7 @@ def generate_minimal_runtime_load_statement(target_basename):
7373 then_statements += ["%s.$wb = URL.createObjectURL(new Blob([r[%d]], { type: 'application/javascript' }));" % (settings .EXPORT_NAME , len (files_to_load ))]
7474
7575 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 } ')" ]
7777
7878 # Download Wasm2JS code if target browser does not support WebAssembly
7979 if settings .WASM == 2 :
@@ -164,7 +164,7 @@ def generate_minimal_runtime_load_statement(target_basename):
164164 else :
165165 save_js = ''
166166
167- files_to_load [0 ] = f"binary('{ target_basename } .js ')"
167+ files_to_load [0 ] = f"binary('{ settings . TARGET_JS_NAME } ')"
168168 if not settings .MODULARIZE :
169169 then_statements += ["var url = %sURL.createObjectURL(new Blob([r[0]], { type: 'application/javascript' }));" % save_js ,
170170 script_load ]
@@ -200,7 +200,7 @@ def generate_minimal_runtime_html(target, options, js_target, target_basename):
200200 if re .search (r'{{{\s*SCRIPT\s*}}}' , shell ):
201201 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.' )
202202
203- shell = shell .replace ('{{{ TARGET_BASENAME }}}' , target_basename )
203+ shell = shell .replace ('{{{ TARGET_BASENAME }}}' , settings . TARGET_BASENAME )
204204 shell = shell .replace ('{{{ EXPORT_NAME }}}' , settings .EXPORT_NAME )
205205 shell = shell .replace ('{{{ TARGET_JS_NAME }}}' , settings .TARGET_JS_NAME )
206206
0 commit comments