Fix web export build

This commit is contained in:
eska 2017-03-10 05:09:54 +01:00
parent 15c4d5006e
commit 1abf478eb9
4 changed files with 6 additions and 7 deletions

View file

@ -2,15 +2,13 @@
Import('env') Import('env')
env.Tool('textfile')
env.Tool('zip')
javascript_files = [ javascript_files = [
"os_javascript.cpp", "os_javascript.cpp",
"audio_driver_javascript.cpp", "audio_driver_javascript.cpp",
"javascript_main.cpp", "javascript_main.cpp",
"audio_server_javascript.cpp", "audio_server_javascript.cpp",
"javascript_eval.cpp" "power_javascript.cpp",
"javascript_eval.cpp",
] ]
env_javascript = env.Clone() env_javascript = env.Clone()

View file

@ -35,7 +35,7 @@ def get_flags():
def create(env): def create(env):
# remove Windows' .exe suffix # remove Windows' .exe suffix
return env.Clone(PROGSUFFIX='') return env.Clone(tools=['textfile', 'zip'], PROGSUFFIX='')
def escape_sources_backslashes(target, source, env, for_signature): def escape_sources_backslashes(target, source, env, for_signature):
@ -97,7 +97,6 @@ def configure(env):
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1']) env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
env.extra_suffix = '.webassembly' + env.extra_suffix env.extra_suffix = '.webassembly' + env.extra_suffix
else: else:
env.Append(CPPFLAGS=['-s', 'ASM_JS=1'])
env.Append(LINKFLAGS=['-s', 'ASM_JS=1']) env.Append(LINKFLAGS=['-s', 'ASM_JS=1'])
env.Append(LINKFLAGS=['--separate-asm']) env.Append(LINKFLAGS=['--separate-asm'])

View file

@ -28,7 +28,7 @@
/*************************************************************************/ /*************************************************************************/
#include "power_javascript.h" #include "power_javascript.h"
#include "core/error_macros.h" #include "error_macros.h"
bool PowerJavascript::UpdatePowerInfo() { bool PowerJavascript::UpdatePowerInfo() {
// TODO Javascript implementation // TODO Javascript implementation

View file

@ -30,6 +30,8 @@
#ifndef PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_ #ifndef PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_
#define PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_ #define PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_
#include "os/power.h"
class PowerJavascript { class PowerJavascript {
private: private:
int nsecs_left; int nsecs_left;