diff --git a/PCLib/PCProject.m b/PCLib/PCProject.m index 83d5bae..8157a7e 100644 --- a/PCLib/PCProject.m +++ b/PCLib/PCProject.m @@ -276,7 +276,7 @@ toolField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,256,176,21)]; [toolField setAlignment: NSLeftTextAlignment]; [toolField setBordered: YES]; - [toolField setEditable: NO]; + [toolField setEditable: YES]; [toolField setBezeled: YES]; [toolField setDrawsBackground: YES]; [toolField setStringValue:@""]; @@ -962,6 +962,13 @@ else if ( sender == toolField ) { [projectDict setObject:newEntry forKey:PCBuildTool]; + + if( ![[NSFileManager defaultManager] isExecutableFileAtPath:newEntry] ) + { + NSRunAlertPanel(@"Build Tool Error!", + @"No valid executable found at '%@'!", + @"OK",nil,nil,newEntry); + } } else if ( sender == ccOptField ) { diff --git a/PCLib/PCProjectBuilder.m b/PCLib/PCProjectBuilder.m index 2f1c33a..151137f 100644 --- a/PCLib/PCProjectBuilder.m +++ b/PCLib/PCProjectBuilder.m @@ -280,13 +280,20 @@ - (id)initWithProject:(PCProject *)aProject { - NSAssert(aProject,@"No project specified!"); + NSAssert(aProject,@"No project specified!"); - if ((self = [super init])) { - makePath = [[NSString stringWithString:@"/usr/bin/make"] retain]; - currentProject = aProject; - } - return self; + if ((self = [super init])) { + makePath = [[aProject projectDict] objectForKey:PCBuildTool]; + + if( [makePath isEqualToString:@""] ) + { + makePath = [NSString stringWithString:@"/usr/bin/make"]; + } + + RETAIN(makePath); + currentProject = aProject; + } + return self; } - (void)dealloc