aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/file_packager.py2
-rw-r--r--tools/jsrun.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/file_packager.py b/tools/file_packager.py
index 8a1f1ba5..8f0f8be8 100644
--- a/tools/file_packager.py
+++ b/tools/file_packager.py
@@ -360,7 +360,7 @@ if has_preloaded:
},
finish: function(byteArray) {
var that = this;
- Module['FS_createPreloadedFile'](PATH.dirname(this.name), PATH.basename(this.name), byteArray, true, true, function() {
+ Module['FS_createPreloadedFile'](this.name, null, byteArray, true, true, function() {
Module['removeRunDependency']('fp ' + that.name);
}, function() {
if (that.audio) {
diff --git a/tools/jsrun.py b/tools/jsrun.py
index 571e9cee..91038f6e 100644
--- a/tools/jsrun.py
+++ b/tools/jsrun.py
@@ -12,13 +12,14 @@ def timeout_run(proc, timeout, note='unnamed process', full_output=False):
out = proc.communicate()
return '\n'.join(out) if full_output else out[0]
-def run_js(filename, engine=None, args=[], check_timeout=False, stdout=PIPE, stderr=None, cwd=None, full_output=False):
+def run_js(filename, engine=None, args=[], check_timeout=False, stdin=None, stdout=PIPE, stderr=None, cwd=None, full_output=False):
if type(engine) is not list:
engine = [engine]
command = engine + [filename] + (['--'] if 'd8' in engine[0] or 'jsc' in engine[0] else []) + args
return timeout_run(
Popen(
command,
+ stdin=stdin,
stdout=stdout,
stderr=stderr,
cwd=cwd),