version 1.3, 2007/10/07 06:04:55 |
version 1.5, 2016/10/03 07:42:29 |
|
|
if ([s compare: @"PATH"] == NSOrderedSame) { |
if ([s compare: @"PATH"] == NSOrderedSame) { |
char *path; |
char *path; |
NSString *defaultPath; |
NSString *defaultPath; |
defaultPath=@"/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/sw/bin:/sw/sbin:/usr/local/bin"; |
defaultPath=@"/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/sw/bin:/sw/sbin:/usr/local/bin"; |
path = getenv("PATH"); |
path = getenv("PATH"); |
if (!path) { |
if (!path) { |
s = [NSString stringWithCString: path length: strlen(path)]; |
s = [NSString stringWithCString: path length: strlen(path)]; |
|
|
[super dealloc]; |
[super dealloc]; |
} |
} |
+(int) checkX { |
+(int) checkX { |
|
return 1; |
|
// I need a sample code for runningApplications. 2016.09.30 |
|
/* |
NSEnumerator *apps = [[[NSWorkspace sharedWorkspace] launchedApplications] objectEnumerator ]; |
NSEnumerator *apps = [[[NSWorkspace sharedWorkspace] launchedApplications] objectEnumerator ]; |
NSDictionary *dicApp; |
NSDictionary *dicApp; |
while (dicApp = [apps nextObject]) { |
while (dicApp = [apps nextObject]) { |
|
|
} |
} |
NSLog(@"X11 is NOT running.\n"); |
NSLog(@"X11 is NOT running.\n"); |
return 0; |
return 0; |
|
*/ |
} |
} |
-(void) showForDebug { |
-(void) showForDebug { |
NSLog(@"OpenXM_HOME=%@\n",OpenXM_HOME); |
NSLog(@"OpenXM_HOME=%@\n",OpenXM_HOME); |
|
|
} |
} |
+(int) isX11Installed { |
+(int) isX11Installed { |
NSFileManager *manager = [NSFileManager defaultManager]; |
NSFileManager *manager = [NSFileManager defaultManager]; |
if ([manager fileExistsAtPath: @"/usr/X11R6/bin/X"]) return 1; |
if ([manager fileExistsAtPath: @"/opt/X11/bin/X"]) return 1; |
else return 0; |
else return 0; |
} |
} |
+(int) isGccInstalled { |
+(int) isGccInstalled { |