Skip to content
Browse files

define RUBYMOTION_VERSION

  • Loading branch information...
1 parent c66f4fa commit 522a042bdae03281108cdc94d3b2ea0d3f3d5134 @lrz lrz committed Oct 9, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/motion/project/builder.rb
View
5 lib/motion/project/builder.rb
@@ -245,7 +245,7 @@ def build(config, platform, opts)
#import <UIKit/UIKit.h>
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 @@ def build(config, platform, opts)
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 << <<EOS
retval = UIApplicationMain(argc, argv, nil, @"#{config.delegate_class}");
rb_exit(retval);

0 comments on commit 522a042

Please sign in to comment.
Something went wrong with that request. Please try again.