mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-13 01:29:00 +08:00
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:
@@ -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);
|
||||
|
||||
@@ -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]];
|
||||
|
||||
Reference in New Issue
Block a user