Add new wrapper emscons, which sets EMSCRIPTEN_TOOL_PATH in environment.
This way the Emscripten Tool no longer has to be copied to root build directory.
This commit is contained in:
Родитель
6346adec3b
Коммит
c013660606
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python2
|
||||
|
||||
'''
|
||||
Wrapping the scons invocation, EMSCRIPTEN_TOOL_PATH is set in the process
|
||||
environment, and can be used to locate the emscripten SCons Tool.
|
||||
Example:
|
||||
# Load emscripten Tool
|
||||
my_env = Environment(tools=['emscripten'], toolpath=[os.environ['EMSCRIPTEN_TOOL_PATH']])
|
||||
'''
|
||||
|
||||
import os, subprocess, sys
|
||||
from tools import shared
|
||||
|
||||
tool_path = os.path.join(shared.path_from_root('tools'), 'scons', 'site_scons', 'site_tools', 'emscripten')
|
||||
|
||||
env = os.environ.copy()
|
||||
env[ 'EMSCRIPTEN_TOOL_PATH' ] = tool_path
|
||||
|
||||
exit(subprocess.call(sys.argv[1:], env=env))
|
||||
|
Загрузка…
Ссылка в новой задаче