fix a bug where ARR_CYCLES_DISABLE are disabled with distributed app

In order to enable ARR_CYCLES_DISABLE, we need to set ARR_CYCLES_DISABLE as environment variable when launch the app.
So, embedded ARR_CYCLES_DISABLE variable into app

http://hipbyte.myjetbrains.com/youtrack/issue/RM-245
This commit is contained in:
Watson
2013-08-23 12:33:49 +09:00
parent 790107a8d4
commit ee06e07cde
2 changed files with 12 additions and 0 deletions

View File

@@ -441,6 +441,11 @@ main(int argc, char **argv)
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retval = 0;
EOS
if ENV['ARR_CYCLES_DISABLE']
main_txt << <<EOS
setenv("ARR_CYCLES_DISABLE", "1", true);
EOS
end
main_txt << "[SpecLauncher launcher];\n" if spec_mode
main_txt << <<EOS
RubyMotionInit(argc, argv);

View File

@@ -190,6 +190,13 @@ int
main(int argc, char **argv)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
EOS
if ENV['ARR_CYCLES_DISABLE']
main_txt << <<EOS
setenv("ARR_CYCLES_DISABLE", "1", true);
EOS
end
main_txt << <<EOS
RubyMotionInit(argc, argv);
NSApplication *app = [NSApplication sharedApplication];
[app setDelegate:[NSClassFromString(@"#{delegate_class}") new]];