=================================================================== RCS file: /home/cvs/OpenXM/src/cfep/MyEnvironment.m,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -p -r1.1.1.1 -r1.2 --- OpenXM/src/cfep/MyEnvironment.m 2006/03/03 23:31:12 1.1.1.1 +++ OpenXM/src/cfep/MyEnvironment.m 2006/03/06 08:55:31 1.2 @@ -127,6 +127,26 @@ }else{ [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:/usr/X11R6/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= [NSDictionary dictionaryWithObject: [NSFont fontWithName: @"Courier" size: 12] forKey: @"NSFont"];