From 522a042bdae03281108cdc94d3b2ea0d3f3d5134 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Tue, 9 Oct 2012 14:18:57 +0200 Subject: [PATCH] define RUBYMOTION_VERSION --- lib/motion/project/builder.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index 9eabd812..e016af88 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -245,7 +245,7 @@ EOS #import extern "C" { - void rb_define_const(void *, const char *, void *); + void rb_define_global_const(const char *, void *); void rb_rb2oc_exc_handler(void); void rb_exit(int); void RubyMotionInit(int argc, char **argv); @@ -334,7 +334,8 @@ EOS else config.development? ? 'development' : 'release' end - main_txt << "rb_define_const([NSObject class], \"RUBYMOTION_ENV\", @\"#{rubymotion_env}\");\n" + main_txt << "rb_define_global_const(\"RUBYMOTION_ENV\", @\"#{rubymotion_env}\");\n" + main_txt << "rb_define_global_const(\"RUBYMOTION_VERSION\", @\"#{Motion::Version}\");\n" main_txt << <