[BACK]Return to MyEnvironment.m CVS log [TXT][DIR] Up to [local] / OpenXM / src / cfep

Diff for /OpenXM/src/cfep/MyEnvironment.m between version 1.1 and 1.5

version 1.1, 2006/03/03 23:31:12 version 1.5, 2016/10/03 07:42:29
Line 127 
Line 127 
     }else{      }else{
       [myUnixEnvironment setObject: s forKey: @"DYLD_LIBRARY_PATH"];        [myUnixEnvironment setObject: s forKey: @"DYLD_LIBRARY_PATH"];
     }      }
   
       s = NSHomeDirectory();
       [myUnixEnvironment setObject: s forKey: @"HOME"];
   
       s = NSLocalizedString(@"PATH",nil);
       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";
             path = getenv("PATH");
             if (!path) {
               s = [NSString stringWithCString: path length: strlen(path)];
                   s = [s stringByAppendingString: @":"];
                   s = [s stringByAppendingString: defaultPath];
                   [myUnixEnvironment setObject: s forKey: @"PATH"];
          } else [myUnixEnvironment setObject: defaultPath forKey: @"PATH"];
       } else {
              [myUnixEnvironment setObject: s forKey: @"PATH"];
       }
   
   
     myDefaultTypingAttributes=      myDefaultTypingAttributes=
       [NSDictionary dictionaryWithObject: [NSFont fontWithName: @"Courier" size: 12] forKey: @"NSFont"];        [NSDictionary dictionaryWithObject: [NSFont fontWithName: @"Courier" size: 12] forKey: @"NSFont"];
Line 150 
Line 170 
   [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]) {
Line 160 
Line 183 
   }    }
   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);
Line 195 
Line 219 
 -(NSDictionary *)getMyDefaultTypingAttributes {  -(NSDictionary *)getMyDefaultTypingAttributes {
   return myDefaultTypingAttributes;    return myDefaultTypingAttributes;
 }  }
   +(int) isX11Installed {
     NSFileManager *manager = [NSFileManager defaultManager];
     if ([manager fileExistsAtPath: @"/opt/X11/bin/X"]) return 1;
     else return 0;
   }
   +(int) isGccInstalled {
     NSFileManager *manager = [NSFileManager defaultManager];
     if ([manager fileExistsAtPath: @"/usr/bin/gcc"]) return 1;
     else return 0;
   }
   
   
   
 @end  @end

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>