1 #import <Cocoa/Cocoa.h>
2 #import "RInterpreter.h"
7 #include <sys/resource.h>
9 int main(int argc, char *argv[])
11 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
12 [[RInterpreter sharedInterpreter] setArgv:argv argc:argc];
13 NSDictionary *info = [[NSBundle mainBundle] infoDictionary];
14 Class Main = NSClassFromString([info objectForKey:@"NSPrincipalClass"]);
16 NSLog(@"Unable to locate principal class: %@",[info objectForKey:@"NSPrincipalClass"]);
20 //Let the application run its setup procedures
21 [Main sharedApplication];
22 [NSBundle loadNibNamed:[info objectForKey:@"NSMainNibFile"] owner:NSApp];
25 //Turn primary control over to the R event loop.
26 [[RInterpreter sharedInterpreter] run];