=================================================================== RCS file: /home/cvs/OpenXM/src/cfep/MyEnvironment.m,v retrieving revision 1.5 retrieving revision 1.7 diff -u -p -r1.5 -r1.7 --- OpenXM/src/cfep/MyEnvironment.m 2016/10/03 07:42:29 1.5 +++ OpenXM/src/cfep/MyEnvironment.m 2018/10/18 06:29:42 1.7 @@ -135,7 +135,7 @@ if ([s compare: @"PATH"] == NSOrderedSame) { char *path; NSString *defaultPath; - defaultPath=@"/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/sw/bin:/sw/sbin:/usr/local/bin"; + defaultPath=@"/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/opt/local/bin:/opt/local/sbin:/opt/bin:/opt/sbin:/usr/local/bin"; path = getenv("PATH"); if (!path) { s = [NSString stringWithCString: path length: strlen(path)]; @@ -170,20 +170,17 @@ [super dealloc]; } +(int) checkX { - return 1; - // I need a sample code for runningApplications. 2016.09.30 - /* + /* still use an deprecated functions */ NSEnumerator *apps = [[[NSWorkspace sharedWorkspace] launchedApplications] objectEnumerator ]; NSDictionary *dicApp; while (dicApp = [apps nextObject]) { - if ([@"X11" compare: [dicApp objectForKey: @"NSApplicationName"]] == NSOrderedSame) { + if ([@"XQuartz" compare: [dicApp objectForKey: @"NSApplicationName"]] == NSOrderedSame) { NSLog(@"X11 is running.\n"); return 1; } } NSLog(@"X11 is NOT running.\n"); - return 0; - */ + return 0; } -(void) showForDebug { NSLog(@"OpenXM_HOME=%@\n",OpenXM_HOME);