mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-16 21:21:56 +08:00
enable vm debug logs if app.vm_debug_logs is set to true
This commit is contained in:
committed by
Watson
parent
dc9f2c400a
commit
d2491653e9
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user