diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-12 11:24:16 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-12 11:24:16 -0800 |
commit | a5bd3ed73db5f3d499eab532034bb9f6960df28f (patch) | |
tree | aab395631955f7359389f344b75432a784886799 /emcc | |
parent | ae02feec361db8a69d51a69d51b02ea742212a94 (diff) |
support for generating html in emcc, and a test for that that also tests SDL, and some fixes for SDL
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -290,8 +290,14 @@ elif use_compiler: shared.Building.emscripten(target_basename + '.bc', append_ext=False) shutil.move(target_basename + '.bc.o.js', target_basename + '.js') - ## TODO: If we were asked to also generate HTML, do that - #if final_suffix == 'html': + # If we were asked to also generate HTML, do that + if final_suffix == 'html': + shell = open(shared.path_from_root('src', 'shell.html')).read() + html = open(target_basename + '.html', 'w') + html.write(shell.replace('{{{ SCRIPT_CODE }}}', open(target_basename + '.js').read())) + html.close() + temp_files.note(target_basename + '.js') + finally: temp_files.clean() |