enable vm debug logs if app.vm_debug_logs is set to true

This commit is contained in:
Laurent Sansonetti
2015-02-03 18:21:01 +01:00
committed by Watson
parent dc9f2c400a
commit d2491653e9
2 changed files with 5 additions and 0 deletions

View File

@@ -170,6 +170,7 @@ EOS
end
payload_c_txt << <<EOS
}
extern bool ruby_vm_debug_logs;
extern "C"
jint
JNI_OnLoad(JavaVM *vm, void *reserved)
@@ -180,6 +181,7 @@ JNI_OnLoad(JavaVM *vm, void *reserved)
return -1;
}
assert(env != NULL);
#{App.config.vm_debug_logs ? 'ruby_vm_debug_logs = true;' : ''}
rb_vm_init("#{App.config.package_path}", "#{App.config.rubymotion_env_value}", "#{Motion::Version}", env);
void *top_self = rb_vm_top_self();
EOS

View File

@@ -97,6 +97,8 @@ module Motion; module Project;
:logs_components, :version_code, :version_name, :permissions, :features,
:services, :application_class, :manifest, :theme
attr_accessor :vm_debug_logs # Non-public.
def initialize(project_dir, build_mode)
super
@main_activity = 'MainActivity'
@@ -114,6 +116,7 @@ module Motion; module Project;
@version_name = '1.0'
@application_class = nil
@theme = "@android:style/Theme.Holo"
@vm_debug_logs = false
@manifest = AndroidManifest.new
construct_manifest