Skip to content

Commit 90ab3a7

Browse files
Optimized emscripten logo in generated html (#20690)
Replaces the huge SVG in the shell with a smaller logo.
1 parent 9429b48 commit 90ab3a7

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

emcc.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -4218,7 +4218,9 @@ def generate_traditional_runtime_html(target, options, js_target, target_basenam
42184218

42194219
shell = do_replace(shell, '{{{ SCRIPT }}}', script.replacement())
42204220
shell = shell.replace('{{{ SHELL_CSS }}}', utils.read_file(utils.path_from_root('src/shell.css')))
4221-
shell = shell.replace('{{{ SHELL_LOGO }}}', utils.read_file(utils.path_from_root('media/powered_by_logo_mini.svg')))
4221+
shell_logo = utils.read_binary(utils.path_from_root('media/powered_by_logo_shell.png'))
4222+
shell_logo_b64 = base64_encode(shell_logo)
4223+
shell = shell.replace('{{{ SHELL_LOGO }}}', f'<img id="emscripten_logo" src="data:image/png;base64,{shell_logo_b64}">')
42224224

42234225
check_output_file(target)
42244226
write_file(target, shell)

media/powered_by_logo_shell.png

11.3 KB
Loading

src/shell.css

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ canvas.emscripten { border: 0px none; background-color: black; }
1313
#emscripten_logo {
1414
display: inline-block;
1515
margin: 0;
16+
padding: 6px;
17+
width: 265px;
1618
}
1719

1820
.spinner {

0 commit comments

Comments
 (0)