mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-19 01:51:09 +00:00
* Framework/PCProjectManager.m: Fix problem with closing project.
* Framework/PCProjectr.m: Ditto. * Framework/PCMakefileFactory.m: Support for root build directory added. * Framework/PCProjectBuilder.m: Code cleanup. * Framework/PCProjectEditor.m: Enable usage of parser. Start testing process. * Framework/PCProjectWindows.m: Enable tooltips for buttons. * Framework/PCPrefController.m: setRootBuildDir: fix. * PCAppController.m: applicationWillTerminate: Remove file from build dir on application quit. This code still needs review (also removed build dir because of use PCFileManager's method). * Modules/Editors/ProjectCenter/PCEditor.m: browserItemsForItem: Crashes if file is not supported by parser. Fixed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@24353 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d5c82c42a2
commit
3793013f03
16 changed files with 455 additions and 274 deletions
|
@ -1,3 +1,20 @@
|
||||||
|
2007-01-15 Sergii Stoian <stoyan255@gmail.com>
|
||||||
|
|
||||||
|
* Framework/PCProjectManager.m: Fix problem with closing project.
|
||||||
|
* Framework/PCProjectr.m: Ditto.
|
||||||
|
* Framework/PCMakefileFactory.m: Support for root build directory added.
|
||||||
|
* Framework/PCProjectBuilder.m: Code cleanup.
|
||||||
|
* Framework/PCProjectEditor.m: Enable usage of parser. Start testing process.
|
||||||
|
* Framework/PCProjectWindows.m: Enable tooltips for buttons.
|
||||||
|
* Framework/PCPrefController.m: setRootBuildDir: fix.
|
||||||
|
|
||||||
|
* PCAppController.m: applicationWillTerminate: Remove file from build dir on
|
||||||
|
application quit. This code still needs review (also removed build dir because of
|
||||||
|
use PCFileManager's method).
|
||||||
|
|
||||||
|
* Modules/Editors/ProjectCenter/PCEditor.m: browserItemsForItem: Crashes if file
|
||||||
|
is not supported by parser. Fixed.
|
||||||
|
|
||||||
2007-01-12 Sergii Stoian <stoyan255@gmail.com>
|
2007-01-12 Sergii Stoian <stoyan255@gmail.com>
|
||||||
|
|
||||||
* Framework/PCProjectBuilder.m: Parsing of error output almost complete,
|
* Framework/PCProjectBuilder.m: Parsing of error output almost complete,
|
||||||
|
|
|
@ -32,12 +32,12 @@ ProjectCenter 0.5
|
||||||
- Implement code parser (get it from CodeEditor?) [done!]
|
- Implement code parser (get it from CodeEditor?) [done!]
|
||||||
- Project Browser should show file structure. [done!]
|
- Project Browser should show file structure. [done!]
|
||||||
- Click on Browser item should move cursor to line in file [done!]
|
- Click on Browser item should move cursor to line in file [done!]
|
||||||
- Imlement pending adding/removal of files (history?) [done!]
|
- Imlement pending adding/removal of files (history?) stoyan
|
||||||
--- Project Builder:
|
--- Project Builder:
|
||||||
- Implement root build directory handling stoyan
|
- Implement root build directory handling stoyan
|
||||||
- Finish options handling stoyan
|
- Finish options handling stoyan
|
||||||
- Parse gcc output stoyan
|
- Parse gcc output [90% done!]
|
||||||
- Display warnings,errors,options etc. as clickable list stoyan
|
- Display warnings,errors,options etc. as clickable list [90% done!]
|
||||||
- Finish FileNameIcon (draggable, files can be dragged to it) stoyan
|
- Finish FileNameIcon (draggable, files can be dragged to it) stoyan
|
||||||
- Review all dialogs and situations when dialogs must be
|
- Review all dialogs and situations when dialogs must be
|
||||||
popped up stoyan
|
popped up stoyan
|
||||||
|
|
Binary file not shown.
|
@ -229,9 +229,9 @@
|
||||||
// ==== Tool Tips
|
// ==== Tool Tips
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
- (void)mouseEntered:(NSEvent *)theEvent
|
/*- (void)mouseEntered:(NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
// NSLog (@"mouseEntered");
|
NSLog (@"mouseEntered");
|
||||||
|
|
||||||
if (ttTimer == nil)
|
if (ttTimer == nil)
|
||||||
{
|
{
|
||||||
|
@ -381,7 +381,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,10 @@ static PCMakefileFactory *_factory = nil;
|
||||||
|
|
||||||
- (void)createMakefileForProject:(NSString *)prName
|
- (void)createMakefileForProject:(NSString *)prName
|
||||||
{
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
NSString *buildDir = [ud objectForKey:RootBuildDirectory];
|
||||||
|
NSString *buildName = [prName stringByAppendingPathExtension:@"build"];
|
||||||
|
|
||||||
NSAssert(prName, @"No project name given!");
|
NSAssert(prName, @"No project name given!");
|
||||||
|
|
||||||
AUTORELEASE(mfile);
|
AUTORELEASE(mfile);
|
||||||
|
@ -72,6 +76,13 @@ static PCMakefileFactory *_factory = nil;
|
||||||
[mfile appendString:@"#\n"];
|
[mfile appendString:@"#\n"];
|
||||||
|
|
||||||
[mfile appendString:@"\ninclude $(GNUSTEP_MAKEFILES)/common.make\n"];
|
[mfile appendString:@"\ninclude $(GNUSTEP_MAKEFILES)/common.make\n"];
|
||||||
|
|
||||||
|
if (![buildDir isEqualToString:@""])
|
||||||
|
{
|
||||||
|
[mfile appendString:
|
||||||
|
[NSString stringWithFormat:@"\nGNUSTEP_BUILD_DIR = %@\n",
|
||||||
|
[buildDir stringByAppendingPathComponent:buildName]]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)createPreambleForProject:(PCProject *)project
|
- (BOOL)createPreambleForProject:(PCProject *)project
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#import <ProjectCenter/PCPrefController.h>
|
#import <ProjectCenter/PCPrefController.h>
|
||||||
|
|
||||||
// TODO: rewrite it as PCPrefernces, use +sharedPreferences instead of
|
// TODO: rewrite it as PCPreferences, use +sharedPreferences instead of
|
||||||
// [NSUserDefaults standardUserDefaults] in every part of ProjectCenter
|
// [NSUserDefaults standardUserDefaults] in every part of ProjectCenter
|
||||||
|
|
||||||
@implementation PCPrefController
|
@implementation PCPrefController
|
||||||
|
@ -414,15 +414,24 @@ static PCPrefController *_prefCtrllr = nil;
|
||||||
|
|
||||||
- (void)setRootBuildDir:(id)sender
|
- (void)setRootBuildDir:(id)sender
|
||||||
{
|
{
|
||||||
NSArray *types = nil;
|
NSString *path;
|
||||||
NSString *path = [self selectFileWithTypes:types];
|
|
||||||
|
if (sender == rootBuildDirButton)
|
||||||
|
{
|
||||||
|
path = [self selectFileWithTypes:nil];
|
||||||
|
[rootBuildDirField setStringValue:path];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
path = [rootBuildDirField stringValue];
|
||||||
|
}
|
||||||
|
|
||||||
if (path)
|
if (path)
|
||||||
{
|
{
|
||||||
[rootBuildDirField setStringValue:path];
|
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:path
|
[[NSUserDefaults standardUserDefaults] setObject:path
|
||||||
forKey:RootBuildDirectory];
|
forKey:RootBuildDirectory];
|
||||||
[preferencesDict setObject:path forKey:RootBuildDirectory];
|
[preferencesDict setObject:path
|
||||||
|
forKey:RootBuildDirectory];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO: Split into several files with categories
|
// TODO: Split into several files with categories
|
||||||
// TODO: Take care of Libraries and Non Project Files
|
// TODO: Take care of Libraries(gnustep-gui, gnustep-base)
|
||||||
|
// and Non Project Files
|
||||||
|
|
||||||
#include <ProjectCenter/PCFileManager.h>
|
#include <ProjectCenter/PCFileManager.h>
|
||||||
#include <ProjectCenter/PCProjectManager.h>
|
#include <ProjectCenter/PCProjectManager.h>
|
||||||
|
@ -305,6 +306,7 @@ NSString
|
||||||
NSRunAlertPanel(@"Attention!",
|
NSRunAlertPanel(@"Attention!",
|
||||||
@"Could not keep a backup of the GNUMakefile!",
|
@"Could not keep a backup of the GNUMakefile!",
|
||||||
@"OK",nil,nil);
|
@"OK",nil,nil);
|
||||||
|
return NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,7 +472,7 @@ NSString
|
||||||
|
|
||||||
- (BOOL)close:(id)sender
|
- (BOOL)close:(id)sender
|
||||||
{
|
{
|
||||||
// PCLogInfo(self, @"Closing %@ project", projectName);
|
PCLogInfo(self, @"Closing %@ project", projectName);
|
||||||
|
|
||||||
// Save visible windows and panels positions to project dictionary
|
// Save visible windows and panels positions to project dictionary
|
||||||
if (isSubproject == NO)
|
if (isSubproject == NO)
|
||||||
|
@ -527,6 +529,12 @@ NSString
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Project Builder
|
||||||
|
/* if (projectBuilder)
|
||||||
|
{
|
||||||
|
[projectBuilder release];
|
||||||
|
}*/
|
||||||
|
|
||||||
// Project window
|
// Project window
|
||||||
if (sender != projectWindow)
|
if (sender != projectWindow)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
- (void)awakeFromNib
|
- (void)awakeFromNib
|
||||||
{
|
{
|
||||||
NSScrollView *errorScroll;
|
NSScrollView *errorScroll;
|
||||||
NSScrollView *scrollView2;
|
NSScrollView *logScroll;
|
||||||
|
|
||||||
[componentView retain];
|
[componentView retain];
|
||||||
[componentView removeFromSuperview];
|
[componentView removeFromSuperview];
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
[installButton setToolTip:@"Install"];
|
[installButton setToolTip:@"Install"];
|
||||||
// [installButton setImage:IMAGE(@"Install")];
|
// [installButton setImage:IMAGE(@"Install")];
|
||||||
|
|
||||||
[optionsButton setToolTip:@"Options"];
|
[optionsButton setToolTip:@"Build Options"];
|
||||||
// [optionsButton setImage:IMAGE(@"Options")];
|
// [optionsButton setImage:IMAGE(@"Options")];
|
||||||
|
|
||||||
[errorsCountField setStringValue:@""];
|
[errorsCountField setStringValue:@""];
|
||||||
|
@ -82,24 +82,26 @@
|
||||||
errorColumn = [[NSTableColumn alloc] initWithIdentifier:@"Error"];
|
errorColumn = [[NSTableColumn alloc] initWithIdentifier:@"Error"];
|
||||||
[errorColumn setEditable:NO];
|
[errorColumn setEditable:NO];
|
||||||
|
|
||||||
errorOutputTable = [[NSTableView alloc]
|
errorOutput = [[NSTableView alloc]
|
||||||
initWithFrame:NSMakeRect(0,0,209,111)];
|
initWithFrame:NSMakeRect(0,0,209,111)];
|
||||||
[errorOutputTable setAllowsMultipleSelection:NO];
|
[errorOutput setAllowsMultipleSelection:NO];
|
||||||
[errorOutputTable setAllowsColumnReordering:NO];
|
[errorOutput setAllowsColumnReordering:NO];
|
||||||
[errorOutputTable setAllowsColumnResizing:NO];
|
[errorOutput setAllowsColumnResizing:NO];
|
||||||
[errorOutputTable setAllowsEmptySelection:YES];
|
[errorOutput setAllowsEmptySelection:YES];
|
||||||
[errorOutputTable setAllowsColumnSelection:NO];
|
[errorOutput setAllowsColumnSelection:NO];
|
||||||
[errorOutputTable setRowHeight:19.0];
|
[errorOutput setRowHeight:19.0];
|
||||||
[errorOutputTable setCornerView:nil];
|
[errorOutput setCornerView:nil];
|
||||||
[errorOutputTable setHeaderView:nil];
|
[errorOutput setHeaderView:nil];
|
||||||
[errorOutputTable addTableColumn:errorImageColumn];
|
[errorOutput addTableColumn:errorImageColumn];
|
||||||
[errorOutputTable addTableColumn:errorColumn];
|
[errorOutput addTableColumn:errorColumn];
|
||||||
[errorOutputTable setDataSource:self];
|
[errorOutput setDataSource:self];
|
||||||
[errorOutputTable setBackgroundColor:[NSColor colorWithDeviceRed:0.88
|
[errorOutput setBackgroundColor:[NSColor colorWithDeviceRed:0.88
|
||||||
green:0.76
|
green:0.76
|
||||||
blue:0.60
|
blue:0.60
|
||||||
alpha:1.0]];
|
alpha:1.0]];
|
||||||
[errorOutputTable setDrawsGrid:NO];
|
[errorOutput setDrawsGrid:NO];
|
||||||
|
[errorOutput setTarget:self];
|
||||||
|
[errorOutput setAction:@selector(errorItemClick:)];
|
||||||
|
|
||||||
errorScroll = [[NSScrollView alloc] initWithFrame:NSMakeRect(0,0,464,120)];
|
errorScroll = [[NSScrollView alloc] initWithFrame:NSMakeRect(0,0,464,120)];
|
||||||
[errorScroll setHasHorizontalScroller:NO];
|
[errorScroll setHasHorizontalScroller:NO];
|
||||||
|
@ -107,55 +109,37 @@
|
||||||
[errorScroll setBorderType:NSBezelBorder];
|
[errorScroll setBorderType:NSBezelBorder];
|
||||||
[errorScroll setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
|
[errorScroll setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
|
||||||
|
|
||||||
/* errorOutput = [[NSTextView alloc]
|
[errorScroll setDocumentView:errorOutput];
|
||||||
initWithFrame:[[scrollView1 contentView] frame]];
|
RELEASE(errorOutput);
|
||||||
[errorOutput setRichText:NO];
|
|
||||||
[errorOutput setEditable:NO];
|
|
||||||
[errorOutput setSelectable:YES];
|
|
||||||
[errorOutput setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
|
||||||
[errorOutput setBackgroundColor:[NSColor colorWithDeviceRed:0.88
|
|
||||||
green:0.76
|
|
||||||
blue:0.60
|
|
||||||
alpha:1.0]];
|
|
||||||
[errorOutput setHorizontallyResizable:NO];
|
|
||||||
[errorOutput setVerticallyResizable:YES];
|
|
||||||
[errorOutput setMinSize:NSMakeSize(0, 0)];
|
|
||||||
[errorOutput setMaxSize:NSMakeSize(1E7, 1E7)];
|
|
||||||
[[errorOutput textContainer] setContainerSize:
|
|
||||||
NSMakeSize([errorOutput frame].size.width, 1e7)];
|
|
||||||
[[errorOutput textContainer] setWidthTracksTextView:YES];*/
|
|
||||||
|
|
||||||
[errorScroll setDocumentView:errorOutputTable];
|
|
||||||
RELEASE(errorOutputTable);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Log output
|
* Log output
|
||||||
*/
|
*/
|
||||||
scrollView2 = [[NSScrollView alloc]
|
logScroll = [[NSScrollView alloc]
|
||||||
initWithFrame:NSMakeRect (0, 0, 480, 133)];
|
initWithFrame:NSMakeRect (0, 0, 480, 133)];
|
||||||
[scrollView2 setHasHorizontalScroller:NO];
|
[logScroll setHasHorizontalScroller:NO];
|
||||||
[scrollView2 setHasVerticalScroller:YES];
|
[logScroll setHasVerticalScroller:YES];
|
||||||
[scrollView2 setBorderType: NSBezelBorder];
|
[logScroll setBorderType:NSBezelBorder];
|
||||||
[scrollView2 setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
|
[logScroll setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
|
||||||
|
|
||||||
logOutput = [[NSTextView alloc]
|
logOutput = [[NSTextView alloc]
|
||||||
initWithFrame:[[scrollView2 contentView] frame]];
|
initWithFrame:[[logScroll contentView] frame]];
|
||||||
[logOutput setRichText:NO];
|
[logOutput setRichText:NO];
|
||||||
[logOutput setEditable:NO];
|
[logOutput setEditable:NO];
|
||||||
[logOutput setSelectable:YES];
|
[logOutput setSelectable:YES];
|
||||||
[logOutput setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
[logOutput setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||||
[logOutput setBackgroundColor: [NSColor lightGrayColor]];
|
[logOutput setBackgroundColor:[NSColor lightGrayColor]];
|
||||||
[[logOutput textContainer] setWidthTracksTextView:YES];
|
[[logOutput textContainer] setWidthTracksTextView:YES];
|
||||||
[[logOutput textContainer] setHeightTracksTextView:YES];
|
[[logOutput textContainer] setHeightTracksTextView:YES];
|
||||||
[logOutput setHorizontallyResizable:NO];
|
[logOutput setHorizontallyResizable:NO];
|
||||||
[logOutput setVerticallyResizable:YES];
|
[logOutput setVerticallyResizable:YES];
|
||||||
[logOutput setMinSize:NSMakeSize (0, 0)];
|
[logOutput setMinSize:NSMakeSize(0, 0)];
|
||||||
[logOutput setMaxSize:NSMakeSize (1E7, 1E7)];
|
[logOutput setMaxSize:NSMakeSize(1E7, 1E7)];
|
||||||
[[logOutput textContainer] setContainerSize:
|
[[logOutput textContainer] setContainerSize:
|
||||||
NSMakeSize ([logOutput frame].size.width, 1e7)];
|
NSMakeSize ([logOutput frame].size.width, 1e7)];
|
||||||
[[logOutput textContainer] setWidthTracksTextView:YES];
|
[[logOutput textContainer] setWidthTracksTextView:YES];
|
||||||
|
|
||||||
[scrollView2 setDocumentView:logOutput];
|
[logScroll setDocumentView:logOutput];
|
||||||
RELEASE(logOutput);
|
RELEASE(logOutput);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -163,8 +147,8 @@
|
||||||
*/
|
*/
|
||||||
[split addSubview:errorScroll];
|
[split addSubview:errorScroll];
|
||||||
RELEASE (errorScroll);
|
RELEASE (errorScroll);
|
||||||
[split addSubview:scrollView2];
|
[split addSubview:logScroll];
|
||||||
RELEASE (scrollView2);
|
RELEASE (logScroll);
|
||||||
|
|
||||||
// [split adjustSubviews];
|
// [split adjustSubviews];
|
||||||
// [componentView addSubview:split];
|
// [componentView addSubview:split];
|
||||||
|
@ -293,8 +277,6 @@
|
||||||
_isBuilding = NO;
|
_isBuilding = NO;
|
||||||
_isCleaning = NO;
|
_isCleaning = NO;
|
||||||
|
|
||||||
makePath = [[NSUserDefaults standardUserDefaults] objectForKey:BuildTool];
|
|
||||||
|
|
||||||
if ([NSBundle loadNibNamed:@"Builder" owner:self] == NO)
|
if ([NSBundle loadNibNamed:@"Builder" owner:self] == NO)
|
||||||
{
|
{
|
||||||
PCLogError(self, @"error loading Builder NIB file!");
|
PCLogError(self, @"error loading Builder NIB file!");
|
||||||
|
@ -329,6 +311,21 @@
|
||||||
return componentView;
|
return componentView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)setMakePath
|
||||||
|
{
|
||||||
|
makePath = [[NSUserDefaults standardUserDefaults] objectForKey:BuildTool];
|
||||||
|
|
||||||
|
if (!makePath || ![[NSFileManager defaultManager] fileExistsAtPath:makePath])
|
||||||
|
{
|
||||||
|
NSRunAlertPanel(@"Build terminated",
|
||||||
|
@"Build tool not found.\nFile \"%@\" doesn't exist!",
|
||||||
|
@"OK", nil, nil, makePath);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
// --- Accessory
|
// --- Accessory
|
||||||
- (BOOL)isBuilding
|
- (BOOL)isBuilding
|
||||||
{
|
{
|
||||||
|
@ -374,7 +371,7 @@
|
||||||
NSString *tFString = [targetField stringValue];
|
NSString *tFString = [targetField stringValue];
|
||||||
NSArray *tFArray = [tFString componentsSeparatedByString:@" "];
|
NSArray *tFArray = [tFString componentsSeparatedByString:@" "];
|
||||||
|
|
||||||
if ([self stopBuild:self] == YES)
|
if ([self stopMake:self] == YES)
|
||||||
{// We've just stopped build process
|
{// We've just stopped build process
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -400,6 +397,10 @@
|
||||||
nextEL = ELNone;
|
nextEL = ELNone;
|
||||||
lastIndentString = @"";
|
lastIndentString = @"";
|
||||||
|
|
||||||
|
currentBuildPath = [[NSMutableArray alloc] initWithCapacity:1];
|
||||||
|
[currentBuildPath addObject:[currentProject projectPath]];
|
||||||
|
currentBuildFile = [[NSMutableString alloc] initWithString:@""];
|
||||||
|
|
||||||
statusString = [NSString stringWithString:@"Building..."];
|
statusString = [NSString stringWithString:@"Building..."];
|
||||||
[buildTarget setString:@"Build"];
|
[buildTarget setString:@"Build"];
|
||||||
[cleanButton setEnabled:NO];
|
[cleanButton setEnabled:NO];
|
||||||
|
@ -408,7 +409,51 @@
|
||||||
_isBuilding = YES;
|
_isBuilding = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)stopBuild:(id)sender
|
- (void)startClean:(id)sender
|
||||||
|
{
|
||||||
|
if ([self stopMake:self] == YES)
|
||||||
|
{// We've just stopped build process
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
|
||||||
|
objectForKey:PromptOnClean] isEqualToString:@"YES"])
|
||||||
|
{
|
||||||
|
if (NSRunAlertPanel(@"Clean Project?",
|
||||||
|
@"Do you really want to clean project '%@'?",
|
||||||
|
@"Yes", @"No", nil, [currentProject projectName])
|
||||||
|
== NSAlertAlternateReturn)
|
||||||
|
{
|
||||||
|
[cleanButton setState:NSOffState];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
statusString = [NSString stringWithString:@"Cleaning..."];
|
||||||
|
[buildTarget setString:@"Clean"];
|
||||||
|
[buildArgs addObject:@"clean"];
|
||||||
|
[buildButton setEnabled:NO];
|
||||||
|
[installButton setEnabled:NO];
|
||||||
|
[self build:self];
|
||||||
|
_isCleaning = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)startInstall:(id)sender
|
||||||
|
{
|
||||||
|
if ([self stopMake:self] == YES)
|
||||||
|
{// We've just stopped build process
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[buildTarget setString:@"Install"];
|
||||||
|
statusString = [NSString stringWithString:@"Installing..."];
|
||||||
|
[buildArgs addObject:@"install"];
|
||||||
|
[buildButton setEnabled:NO];
|
||||||
|
[cleanButton setEnabled:NO];
|
||||||
|
[self build:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)stopMake:(id)sender
|
||||||
{
|
{
|
||||||
// [makeTask isRunning] doesn't work here.
|
// [makeTask isRunning] doesn't work here.
|
||||||
// "waitpid 7045, result -1, error No child processes" is printed.
|
// "waitpid 7045, result -1, error No child processes" is printed.
|
||||||
|
@ -430,37 +475,45 @@
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)startClean:(id)sender
|
- (void)cleanupAfterMake
|
||||||
{
|
{
|
||||||
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
|
if (_isBuilding || _isCleaning)
|
||||||
objectForKey:PromptOnClean] isEqualToString:@"YES"])
|
|
||||||
{
|
{
|
||||||
if (NSRunAlertPanel(@"Clean Project?",
|
[buildStatusField setStringValue:[NSString stringWithFormat:
|
||||||
@"Do you really want to clean project '%@'?",
|
@"%@ - %@ terminated", [currentProject projectName], buildTarget]];
|
||||||
@"Yes", @"No", nil, [currentProject projectName])
|
}
|
||||||
== NSAlertAlternateReturn)
|
|
||||||
|
// Restore buttons state
|
||||||
|
if ([buildTarget isEqualToString:@"Build"])
|
||||||
|
{
|
||||||
|
[buildButton setState:NSOffState];
|
||||||
|
[cleanButton setEnabled:YES];
|
||||||
|
[installButton setEnabled:YES];
|
||||||
|
}
|
||||||
|
else if ([buildTarget isEqualToString:@"Clean"])
|
||||||
{
|
{
|
||||||
[cleanButton setState:NSOffState];
|
[cleanButton setState:NSOffState];
|
||||||
return;
|
[buildButton setEnabled:YES];
|
||||||
|
[installButton setEnabled:YES];
|
||||||
}
|
}
|
||||||
|
else if ([buildTarget isEqualToString:@"Install"])
|
||||||
|
{
|
||||||
|
[installButton setState:NSOffState];
|
||||||
|
[buildButton setEnabled:YES];
|
||||||
|
[cleanButton setEnabled:YES];
|
||||||
}
|
}
|
||||||
statusString = [NSString stringWithString:@"Cleaning..."];
|
|
||||||
[buildTarget setString:@"Clean"];
|
|
||||||
[buildArgs addObject:@"clean"];
|
|
||||||
[buildButton setEnabled:NO];
|
|
||||||
[installButton setEnabled:NO];
|
|
||||||
[self build:self];
|
|
||||||
_isCleaning = YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)startInstall:(id)sender
|
[buildArgs removeAllObjects];
|
||||||
{
|
[buildTarget setString:@"Default"];
|
||||||
[buildTarget setString:@"Install"];
|
|
||||||
statusString = [NSString stringWithString:@"Installing..."];
|
if (_isBuilding)
|
||||||
[buildArgs addObject:@"install"];
|
{
|
||||||
[buildButton setEnabled:NO];
|
[currentBuildPath release];
|
||||||
[cleanButton setEnabled:NO];
|
[currentBuildFile release];
|
||||||
[self build:self];
|
}
|
||||||
|
|
||||||
|
_isBuilding = NO;
|
||||||
|
_isCleaning = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)showOptionsPanel:(id)sender
|
- (void)showOptionsPanel:(id)sender
|
||||||
|
@ -472,52 +525,10 @@
|
||||||
[optionsPanel orderFront:nil];
|
[optionsPanel orderFront:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateErrorsCountField
|
|
||||||
{
|
|
||||||
NSString *string;
|
|
||||||
NSString *errorsString = [NSString stringWithString:@""];;
|
|
||||||
NSString *warningsString = [NSString stringWithString:@""];
|
|
||||||
|
|
||||||
if (errorsCount > 0)
|
|
||||||
{
|
|
||||||
if (errorsCount > 1)
|
|
||||||
{
|
|
||||||
errorsString = [NSString stringWithFormat:@"%i errors",
|
|
||||||
errorsCount];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
errorsString = [NSString stringWithString:@"1 error"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (warningsCount > 0)
|
|
||||||
{
|
|
||||||
if (warningsCount > 1)
|
|
||||||
{
|
|
||||||
warningsString = [NSString stringWithFormat:@"%i warnings",
|
|
||||||
warningsCount];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
warningsString = [NSString stringWithString:@"1 warning"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string = [NSString stringWithFormat:@"%@ %@", errorsString, warningsString];
|
|
||||||
[errorsCountField setStringValue:string];
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- Actions
|
// --- Actions
|
||||||
- (void)build:(id)sender
|
|
||||||
|
- (BOOL)prebuildCheck
|
||||||
{
|
{
|
||||||
NSPipe *logPipe;
|
|
||||||
NSPipe *errorPipe;
|
|
||||||
// NSDictionary *env = [[NSProcessInfo processInfo] environment];
|
|
||||||
|
|
||||||
//TODO: Support build options!!!
|
|
||||||
//NSDictionary *optionDict = [currentProject buildOptions];
|
|
||||||
|
|
||||||
// Checking prerequisites
|
// Checking prerequisites
|
||||||
if ([currentProject isProjectChanged])
|
if ([currentProject isProjectChanged])
|
||||||
{
|
{
|
||||||
|
@ -534,6 +545,37 @@
|
||||||
[currentProject save];
|
[currentProject save];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get make tool path
|
||||||
|
makePath = [[NSUserDefaults standardUserDefaults] objectForKey:BuildTool];
|
||||||
|
|
||||||
|
if (!makePath || ![[NSFileManager defaultManager] fileExistsAtPath:makePath])
|
||||||
|
{
|
||||||
|
NSRunAlertPanel(@"Build terminated",
|
||||||
|
@"Build tool not found.\nFile \"%@\" doesn't exist!",
|
||||||
|
@"OK", nil, nil, makePath);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create root build directory if not exist
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)build:(id)sender
|
||||||
|
{
|
||||||
|
NSPipe *logPipe;
|
||||||
|
NSPipe *errorPipe;
|
||||||
|
|
||||||
|
// TODO: Support build options!!!
|
||||||
|
// NSDictionary *optionDict = [currentProject buildOptions];
|
||||||
|
|
||||||
|
// Checking build conditions
|
||||||
|
if ([self prebuildCheck] == NO)
|
||||||
|
{
|
||||||
|
[self cleanupAfterMake];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Prepearing to building
|
// Prepearing to building
|
||||||
logPipe = [NSPipe pipe];
|
logPipe = [NSPipe pipe];
|
||||||
readHandle = [logPipe fileHandleForReading];
|
readHandle = [logPipe fileHandleForReading];
|
||||||
|
@ -563,7 +605,7 @@
|
||||||
// Run make task
|
// Run make task
|
||||||
[logOutput setString:@""];
|
[logOutput setString:@""];
|
||||||
[errorArray removeAllObjects];
|
[errorArray removeAllObjects];
|
||||||
[errorOutputTable reloadData];
|
[errorOutput reloadData];
|
||||||
|
|
||||||
[NOTIFICATION_CENTER addObserver:self
|
[NOTIFICATION_CENTER addObserver:self
|
||||||
selector:@selector(buildDidTerminate:)
|
selector:@selector(buildDidTerminate:)
|
||||||
|
@ -630,7 +672,7 @@
|
||||||
{
|
{
|
||||||
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
|
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
|
||||||
beforeDate:[NSDate distantFuture]];
|
beforeDate:[NSDate distantFuture]];
|
||||||
};
|
}
|
||||||
|
|
||||||
[self updateErrorsCountField];
|
[self updateErrorsCountField];
|
||||||
|
|
||||||
|
@ -652,38 +694,17 @@
|
||||||
if (errorsCount > 0)
|
if (errorsCount > 0)
|
||||||
{
|
{
|
||||||
[buildStatusField setStringValue:[NSString stringWithFormat:
|
[buildStatusField setStringValue:[NSString stringWithFormat:
|
||||||
@"%@ - %@ unsuccessful (%i errors)",
|
@"%@ - %@ failed (%i errors)",
|
||||||
[currentProject projectName], buildTarget, errorsCount]];
|
[currentProject projectName], buildTarget, errorsCount]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[buildStatusField setStringValue:[NSString stringWithFormat:
|
[buildStatusField setStringValue:[NSString stringWithFormat:
|
||||||
@"%@ - %@ unsuccessful",
|
@"%@ - %@ failed",
|
||||||
[currentProject projectName], buildTarget]];
|
[currentProject projectName], buildTarget]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rstore buttons state
|
|
||||||
if ([buildTarget isEqualToString:@"Build"])
|
|
||||||
{
|
|
||||||
[buildButton setState:NSOffState];
|
|
||||||
[cleanButton setEnabled:YES];
|
|
||||||
[installButton setEnabled:YES];
|
|
||||||
}
|
|
||||||
else if ([buildTarget isEqualToString:@"Clean"])
|
|
||||||
{
|
|
||||||
[cleanButton setState:NSOffState];
|
|
||||||
[buildButton setEnabled:YES];
|
|
||||||
[installButton setEnabled:YES];
|
|
||||||
}
|
|
||||||
else if ([buildTarget isEqualToString:@"Install"])
|
|
||||||
{
|
|
||||||
[installButton setState:NSOffState];
|
|
||||||
[buildButton setEnabled:YES];
|
|
||||||
[cleanButton setEnabled:YES];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Run post process if configured
|
// Run post process if configured
|
||||||
/* if (status && postProcess)
|
/* if (status && postProcess)
|
||||||
{
|
{
|
||||||
|
@ -691,11 +712,9 @@
|
||||||
postProcess = NULL;
|
postProcess = NULL;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
[buildArgs removeAllObjects];
|
|
||||||
[buildTarget setString:@"Default"];
|
|
||||||
|
|
||||||
_isBuilding = NO;
|
_isBuilding = NO;
|
||||||
_isCleaning = NO;
|
_isCleaning = NO;
|
||||||
|
[self cleanupAfterMake];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)popupChanged:(id)sender
|
- (void)popupChanged:(id)sender
|
||||||
|
@ -758,6 +777,42 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)updateErrorsCountField
|
||||||
|
{
|
||||||
|
NSString *string;
|
||||||
|
NSString *errorsString = [NSString stringWithString:@""];;
|
||||||
|
NSString *warningsString = [NSString stringWithString:@""];
|
||||||
|
|
||||||
|
if (errorsCount > 0)
|
||||||
|
{
|
||||||
|
if (errorsCount > 1)
|
||||||
|
{
|
||||||
|
errorsString = [NSString stringWithFormat:@"%i errors",
|
||||||
|
errorsCount];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorsString = [NSString stringWithString:@"1 error"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (warningsCount > 0)
|
||||||
|
{
|
||||||
|
if (warningsCount > 1)
|
||||||
|
{
|
||||||
|
warningsString = [NSString stringWithFormat:@"%i warnings",
|
||||||
|
warningsCount];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
warningsString = [NSString stringWithString:@"1 warning"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string = [NSString stringWithFormat:@"%@ %@", errorsString, warningsString];
|
||||||
|
[errorsCountField setStringValue:string];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation PCProjectBuilder (BuildLogging)
|
@implementation PCProjectBuilder (BuildLogging)
|
||||||
|
@ -790,39 +845,18 @@
|
||||||
- (void)logData:(NSData *)data
|
- (void)logData:(NSData *)data
|
||||||
error:(BOOL)yn
|
error:(BOOL)yn
|
||||||
{
|
{
|
||||||
NSString *s = nil;
|
NSString *dataString;
|
||||||
|
|
||||||
s = [[NSString alloc] initWithData:data
|
|
||||||
encoding:[NSString defaultCStringEncoding]];
|
|
||||||
|
|
||||||
if (yn)
|
|
||||||
{
|
|
||||||
[self logErrorString:s];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self logString:s error:yn newLine:NO];
|
|
||||||
}
|
|
||||||
|
|
||||||
RELEASE(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation PCProjectBuilder (ErrorLogging)
|
|
||||||
|
|
||||||
- (void)logErrorString:(NSString *)string
|
|
||||||
{
|
|
||||||
NSRange newLineRange;
|
NSRange newLineRange;
|
||||||
NSRange lineRange;
|
NSRange lineRange;
|
||||||
NSArray *items;
|
NSString *lineString;
|
||||||
|
|
||||||
// Send it to standard out anyway to see all make process errors
|
dataString = [[NSString alloc]
|
||||||
[self logString:string error:NO newLine:NO];
|
initWithData:data
|
||||||
|
encoding:[NSString defaultCStringEncoding]];
|
||||||
|
|
||||||
// Process new data
|
// Process new data
|
||||||
lineRange.location = 0;
|
lineRange.location = 0;
|
||||||
[errorString appendString:string];
|
[errorString appendString:dataString];
|
||||||
while (newLineRange.location != NSNotFound)
|
while (newLineRange.location != NSNotFound)
|
||||||
{
|
{
|
||||||
newLineRange = [errorString rangeOfString:@"\n"];
|
newLineRange = [errorString rangeOfString:@"\n"];
|
||||||
|
@ -836,13 +870,19 @@
|
||||||
// NSLog(@"<------%@------>", errorString);
|
// NSLog(@"<------%@------>", errorString);
|
||||||
|
|
||||||
lineRange.length = newLineRange.location+1;
|
lineRange.length = newLineRange.location+1;
|
||||||
string = [errorString substringWithRange:lineRange];
|
lineString = [errorString substringWithRange:lineRange];
|
||||||
items = [self parseErrorLine:string];
|
|
||||||
if (items)
|
|
||||||
{
|
|
||||||
[self addItems:items];
|
|
||||||
}
|
|
||||||
[errorString deleteCharactersInRange:lineRange];
|
[errorString deleteCharactersInRange:lineRange];
|
||||||
|
|
||||||
|
// Send it
|
||||||
|
if (_isBuilding)
|
||||||
|
{
|
||||||
|
[self parseBuildLine:lineString];
|
||||||
|
if (yn)
|
||||||
|
{
|
||||||
|
[self logErrorString:lineString];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self logString:lineString error:yn newLine:NO];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -850,15 +890,64 @@
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RELEASE(dataString);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)addItems:(NSArray *)items
|
- (void)parseBuildLine:(NSString *)string
|
||||||
{
|
{
|
||||||
[errorArray addObjectsFromArray:items];
|
NSArray *components = [string componentsSeparatedByString:@" "];
|
||||||
[errorOutputTable reloadData];
|
|
||||||
[errorOutputTable scrollRowToVisible:[errorArray count]-1];
|
if (!components)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([components containsObject:@"Compiling"] &&
|
||||||
|
[components containsObject:@"file"])
|
||||||
|
{
|
||||||
|
NSLog(@"Current build file: %@", [components objectAtIndex:3]);
|
||||||
|
[currentBuildFile setString:[components objectAtIndex:3]];
|
||||||
|
}
|
||||||
|
else if ([components containsObject:@"Entering"] &&
|
||||||
|
[components containsObject:@"directory"])
|
||||||
|
{
|
||||||
|
NSString *path;
|
||||||
|
NSString *pathComponent = [components objectAtIndex:3];
|
||||||
|
|
||||||
|
NSLog(@"Go down to %@", pathComponent);
|
||||||
|
path = [pathComponent
|
||||||
|
substringWithRange:NSMakeRange(1,[pathComponent length]-3)];
|
||||||
|
[currentBuildPath addObject:path];
|
||||||
|
NSLog(@"%@", [currentBuildPath lastObject]);
|
||||||
|
}
|
||||||
|
else if ([components containsObject:@"Leaving"] &&
|
||||||
|
[components containsObject:@"directory"])
|
||||||
|
{
|
||||||
|
NSLog(@"Go up from %@", [components objectAtIndex:3]);
|
||||||
|
[currentBuildPath removeLastObject];
|
||||||
|
NSLog(@"%@", [currentBuildPath lastObject]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation PCProjectBuilder (ErrorLogging)
|
||||||
|
|
||||||
|
- (void)logErrorString:(NSString *)string
|
||||||
|
{
|
||||||
|
NSArray *items;
|
||||||
|
|
||||||
|
items = [self parseErrorLine:string];
|
||||||
|
if (items)
|
||||||
|
{
|
||||||
|
[errorArray addObjectsFromArray:items];
|
||||||
|
[errorOutput reloadData];
|
||||||
|
[errorOutput scrollRowToVisible:[errorArray count]-1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (NSString *)lineTail:(NSString*)line afterString:(NSString*)string
|
- (NSString *)lineTail:(NSString*)line afterString:(NSString*)string
|
||||||
{
|
{
|
||||||
NSRange substrRange;
|
NSRange substrRange;
|
||||||
|
@ -884,7 +973,7 @@
|
||||||
NSString *message = [NSString stringWithString:@""];
|
NSString *message = [NSString stringWithString:@""];
|
||||||
NSMutableArray *items = [NSMutableArray arrayWithCapacity:1];
|
NSMutableArray *items = [NSMutableArray arrayWithCapacity:1];
|
||||||
NSMutableDictionary *errorItem;
|
NSMutableDictionary *errorItem;
|
||||||
NSString *indentString = @" ";
|
NSString *indentString = @"\t";
|
||||||
NSString *lastFile = @"";
|
NSString *lastFile = @"";
|
||||||
NSString *lastIncludedFile = @"";
|
NSString *lastIncludedFile = @"";
|
||||||
|
|
||||||
|
@ -914,8 +1003,11 @@
|
||||||
{
|
{
|
||||||
// NSLog(@"In file included from ");
|
// NSLog(@"In file included from ");
|
||||||
currentEL = ELIncluded;
|
currentEL = ELIncluded;
|
||||||
|
return nil;
|
||||||
file = [self lineTail:[components objectAtIndex:0]
|
file = [self lineTail:[components objectAtIndex:0]
|
||||||
afterString:@"In file included from "];
|
afterString:@"In file included from "];
|
||||||
|
file = [[currentBuildPath lastObject]
|
||||||
|
stringByAppendingPathComponent:file];
|
||||||
if ([file isEqualToString:lastFile])
|
if ([file isEqualToString:lastFile])
|
||||||
{
|
{
|
||||||
return nil;
|
return nil;
|
||||||
|
@ -926,6 +1018,7 @@
|
||||||
}
|
}
|
||||||
else if ([string rangeOfString:@"In function '"].location != NSNotFound)
|
else if ([string rangeOfString:@"In function '"].location != NSNotFound)
|
||||||
{
|
{
|
||||||
|
return nil;
|
||||||
file = [components objectAtIndex:0];
|
file = [components objectAtIndex:0];
|
||||||
message = [self lineTail:string afterString:@"In function "];
|
message = [self lineTail:string afterString:@"In function "];
|
||||||
currentEL = ELFunction;
|
currentEL = ELFunction;
|
||||||
|
@ -935,18 +1028,21 @@
|
||||||
currentEL = ELFile;
|
currentEL = ELFile;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
else if ([components count] > 2)
|
else if ([components count] > 3)
|
||||||
{
|
{
|
||||||
unsigned typeIndex;
|
unsigned typeIndex;
|
||||||
NSString *substr;
|
NSString *substr;
|
||||||
|
|
||||||
// file and includedFile
|
// file and includedFile
|
||||||
file = [components objectAtIndex:0];
|
// file = [components objectAtIndex:0];
|
||||||
if (lastEL == ELIncluded || [file isEqualToString:lastIncludedFile])
|
file = [[currentBuildPath lastObject]
|
||||||
|
stringByAppendingPathComponent:currentBuildFile];
|
||||||
|
if (lastEL == ELIncluded
|
||||||
|
|| [[components objectAtIndex:0] isEqualToString:lastIncludedFile])
|
||||||
{// first message after "In file included from"
|
{// first message after "In file included from"
|
||||||
// NSLog(@"Inlcuded File: %@", file);
|
// NSLog(@"Inlcuded File: %@", file);
|
||||||
includedFile = file;
|
includedFile = [components objectAtIndex:0];
|
||||||
file = lastFile;
|
file = includedFile;
|
||||||
currentEL = ELIncludedError;
|
currentEL = ELIncludedError;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -990,7 +1086,7 @@
|
||||||
{
|
{
|
||||||
if (lastEL == ELFunction)
|
if (lastEL == ELFunction)
|
||||||
{
|
{
|
||||||
indentString = @" ";
|
indentString = @"\t\t";
|
||||||
}
|
}
|
||||||
else if (lastEL == ELError)
|
else if (lastEL == ELError)
|
||||||
{
|
{
|
||||||
|
@ -1001,37 +1097,22 @@
|
||||||
{
|
{
|
||||||
indentString = @"";
|
indentString = @"";
|
||||||
}
|
}
|
||||||
else if (currentEL == ELIncludedError)
|
/* else if (currentEL == ELIncludedError)
|
||||||
{
|
{
|
||||||
indentString = @" ";
|
indentString = @"\t\t";
|
||||||
}
|
}*/
|
||||||
|
|
||||||
message = [NSString stringWithFormat:@"%@%@", indentString, message];
|
message = [NSString stringWithFormat:@"%@%@", indentString, message];
|
||||||
lastIndentString = [indentString copy];
|
lastIndentString = [indentString copy];
|
||||||
|
|
||||||
// Create array items
|
// Create array items
|
||||||
if ((lastEL == ELIncluded
|
/* else if ((lastEL == ELNone
|
||||||
|| ![includedFile isEqualToString:@""])
|
|
||||||
&& ![includedFile isEqualToString:lastIncludedFile])
|
|
||||||
{
|
|
||||||
NSString *incMessage = [NSString stringWithFormat:@" %@", includedFile];
|
|
||||||
|
|
||||||
// NSLog(@"Included: %@ != %@", includedFile, lastIncludedFile);
|
|
||||||
errorItem = [NSMutableDictionary dictionaryWithCapacity:1];
|
|
||||||
[errorItem setObject:@"" forKey:@"ErrorImage"];
|
|
||||||
[errorItem setObject:[file copy] forKey:@"File"];
|
|
||||||
[errorItem setObject:[includedFile copy] forKey:@"IncludedFile"];
|
|
||||||
[errorItem setObject:@"" forKey:@"Position"];
|
|
||||||
[errorItem setObject:@"" forKey:@"Type"];
|
|
||||||
[errorItem setObject:[incMessage copy] forKey:@"Error"];
|
|
||||||
|
|
||||||
[items addObject:errorItem];
|
|
||||||
}
|
|
||||||
else if ((lastEL == ELNone
|
|
||||||
|| ![file isEqualToString:lastFile]
|
|| ![file isEqualToString:lastFile]
|
||||||
|| lastEL == ELIncludedError)
|
|| lastEL == ELIncludedError)
|
||||||
&& currentEL != ELIncluded
|
&& currentEL != ELIncluded
|
||||||
&& currentEL != ELIncludedError)
|
&& currentEL != ELIncludedError)*/
|
||||||
|
if ((lastEL == ELNone || ![file isEqualToString:lastFile])
|
||||||
|
&& [includedFile isEqualToString:@""])
|
||||||
{
|
{
|
||||||
// NSLog(@"lastEL == ELNone (%@)", includedFile);
|
// NSLog(@"lastEL == ELNone (%@)", includedFile);
|
||||||
// NSLog(@"File: %@ != %@", file, lastFile);
|
// NSLog(@"File: %@ != %@", file, lastFile);
|
||||||
|
@ -1042,7 +1123,29 @@
|
||||||
[errorItem setObject:@"" forKey:@"Position"];
|
[errorItem setObject:@"" forKey:@"Position"];
|
||||||
[errorItem setObject:@"" forKey:@"Type"];
|
[errorItem setObject:@"" forKey:@"Type"];
|
||||||
|
|
||||||
attributedString = [[NSAttributedString alloc] initWithString:file
|
attributedString = [[NSAttributedString alloc]
|
||||||
|
initWithString:[file lastPathComponent]
|
||||||
|
attributes:attributes];
|
||||||
|
[errorItem setObject:[attributedString copy] forKey:@"Error"];
|
||||||
|
[attributedString release];
|
||||||
|
|
||||||
|
[items addObject:errorItem];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((lastEL == ELIncluded || currentEL == ELIncludedError)
|
||||||
|
&& ![includedFile isEqualToString:lastIncludedFile])
|
||||||
|
{
|
||||||
|
NSString *incMessage = [NSString stringWithFormat:@"%@", includedFile];
|
||||||
|
|
||||||
|
// NSLog(@"Included: %@ != %@", includedFile, lastIncludedFile);
|
||||||
|
errorItem = [NSMutableDictionary dictionaryWithCapacity:1];
|
||||||
|
[errorItem setObject:@"" forKey:@"ErrorImage"];
|
||||||
|
[errorItem setObject:[file copy] forKey:@"File"];
|
||||||
|
[errorItem setObject:[includedFile copy] forKey:@"IncludedFile"];
|
||||||
|
[errorItem setObject:@"" forKey:@"Position"];
|
||||||
|
[errorItem setObject:@"" forKey:@"Type"];
|
||||||
|
|
||||||
|
attributedString = [[NSAttributedString alloc] initWithString:incMessage
|
||||||
attributes:attributes];
|
attributes:attributes];
|
||||||
[errorItem setObject:[attributedString copy] forKey:@"Error"];
|
[errorItem setObject:[attributedString copy] forKey:@"Error"];
|
||||||
[attributedString release];
|
[attributedString release];
|
||||||
|
@ -1058,7 +1161,7 @@
|
||||||
[errorItem setObject:[type copy] forKey:@"Type"];
|
[errorItem setObject:[type copy] forKey:@"Type"];
|
||||||
[errorItem setObject:[message copy] forKey:@"Error"];
|
[errorItem setObject:[message copy] forKey:@"Error"];
|
||||||
|
|
||||||
// NSLog(@"Parsed message: %@ (%@)", message, includedFile);
|
// NSLog(@"Parsed message:%@ (%@)", message, includedFile);
|
||||||
|
|
||||||
[items addObject:errorItem];
|
[items addObject:errorItem];
|
||||||
|
|
||||||
|
@ -1067,7 +1170,7 @@
|
||||||
|
|
||||||
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
|
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
|
||||||
{
|
{
|
||||||
if (errorArray != nil && aTableView == errorOutputTable)
|
if (errorArray != nil && aTableView == errorOutput)
|
||||||
{
|
{
|
||||||
return [errorArray count];
|
return [errorArray count];
|
||||||
}
|
}
|
||||||
|
@ -1081,7 +1184,7 @@
|
||||||
{
|
{
|
||||||
NSDictionary *errorItem;
|
NSDictionary *errorItem;
|
||||||
|
|
||||||
if (errorArray != nil && aTableView == errorOutputTable)
|
if (errorArray != nil && aTableView == errorOutput)
|
||||||
{
|
{
|
||||||
errorItem = [errorArray objectAtIndex:rowIndex];
|
errorItem = [errorArray objectAtIndex:rowIndex];
|
||||||
|
|
||||||
|
@ -1091,4 +1194,16 @@
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)errorItemClick:(id)sender
|
||||||
|
{
|
||||||
|
int rowIndex = [errorOutput selectedRow];
|
||||||
|
NSDictionary *error = [errorArray objectAtIndex:rowIndex];
|
||||||
|
|
||||||
|
NSLog(@"%i: %@(%@): %@",
|
||||||
|
rowIndex,
|
||||||
|
[error objectForKey:@"File"],
|
||||||
|
[error objectForKey:@"IncludedFile"],
|
||||||
|
[error objectForKey:@"Error"]);
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -125,6 +125,7 @@
|
||||||
|
|
||||||
/* PCLogInfo(self, @"activeProjectDidChange to: %@",
|
/* PCLogInfo(self, @"activeProjectDidChange to: %@",
|
||||||
[rootProject projectName]);*/
|
[rootProject projectName]);*/
|
||||||
|
NSLog(@"activeProjectDidChange to: %@", [rootProject projectName]);
|
||||||
|
|
||||||
if (!rootProject)
|
if (!rootProject)
|
||||||
{
|
{
|
||||||
|
|
|
@ -411,7 +411,7 @@ NSString *PCEditorDidResignActiveNotification =
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parser
|
// Parser
|
||||||
/* parserClassName = [self classNameForBundleType:@"parser"
|
parserClassName = [self classNameForBundleType:@"parser"
|
||||||
andFile:[path lastPathComponent]];
|
andFile:[path lastPathComponent]];
|
||||||
if (parserClassName != nil)
|
if (parserClassName != nil)
|
||||||
{
|
{
|
||||||
|
@ -421,7 +421,7 @@ NSString *PCEditorDidResignActiveNotification =
|
||||||
inBundleType:@"parser"];
|
inBundleType:@"parser"];
|
||||||
[editor setParser:parser];
|
[editor setParser:parser];
|
||||||
RELEASE(parser);
|
RELEASE(parser);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
[editor openFileAtPath:path
|
[editor openFileAtPath:path
|
||||||
categoryPath:categoryPath
|
categoryPath:categoryPath
|
||||||
|
|
|
@ -645,8 +645,6 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
||||||
{
|
{
|
||||||
[[project projectWindow] showProjectLoadedFiles:self];
|
[[project projectWindow] showProjectLoadedFiles:self];
|
||||||
}
|
}
|
||||||
[[project projectWindow] orderFront:self];
|
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -709,6 +707,8 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
||||||
if (filePath != nil)
|
if (filePath != nil)
|
||||||
{
|
{
|
||||||
[self openProjectAt:filePath];
|
[self openProjectAt:filePath];
|
||||||
|
[[activeProject projectWindow] makeKeyAndOrderFront:self];
|
||||||
|
|
||||||
/* NSRunAlertPanel(@"Attention!",
|
/* NSRunAlertPanel(@"Attention!",
|
||||||
@"Couldn't open project %@!",
|
@"Couldn't open project %@!",
|
||||||
@"OK",nil,nil,
|
@"OK",nil,nil,
|
||||||
|
@ -921,7 +921,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
||||||
PCProject *currentProject = nil;
|
PCProject *currentProject = nil;
|
||||||
NSString *projectName = [aProject projectName];
|
NSString *projectName = [aProject projectName];
|
||||||
|
|
||||||
currentProject = RETAIN([loadedProjects objectForKey:projectName]);
|
currentProject = [loadedProjects objectForKey:projectName];
|
||||||
if (!currentProject)
|
if (!currentProject)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -948,7 +948,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
||||||
{
|
{
|
||||||
[launchPanel close];
|
[launchPanel close];
|
||||||
}
|
}
|
||||||
[self setActiveProject: nil];
|
[self setActiveProject:nil];
|
||||||
[self stopSaveTimer];
|
[self stopSaveTimer];
|
||||||
}
|
}
|
||||||
else if (currentProject == [self activeProject])
|
else if (currentProject == [self activeProject])
|
||||||
|
|
|
@ -67,10 +67,10 @@
|
||||||
{
|
{
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
|
|
||||||
[buildButton setToolTip:@"Build"];
|
[buildButton setToolTip:@"Project Builder"];
|
||||||
// [buildButton setImage:IMAGE(@"Build")];
|
// [buildButton setImage:IMAGE(@"Build")];
|
||||||
|
|
||||||
[launchButton setToolTip:@"Launch/Debug"];
|
[launchButton setToolTip:@"Project Launcher"];
|
||||||
// [launchButton setImage:IMAGE(@"Run")];
|
// [launchButton setImage:IMAGE(@"Run")];
|
||||||
if (![project isExecutable])
|
if (![project isExecutable])
|
||||||
{
|
{
|
||||||
|
@ -84,10 +84,10 @@
|
||||||
[loadedFilesButton setEnabled:NO];
|
[loadedFilesButton setEnabled:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
[findButton setToolTip:@"Find"];
|
[findButton setToolTip:@"Project Finder"];
|
||||||
// [findButton setImage:IMAGE(@"Find")];
|
// [findButton setImage:IMAGE(@"Find")];
|
||||||
|
|
||||||
[inspectorButton setToolTip:@"Inspector"];
|
[inspectorButton setToolTip:@"Project Inspector"];
|
||||||
// [inspectorButton setImage:IMAGE(@"Inspector")];
|
// [inspectorButton setImage:IMAGE(@"Inspector")];
|
||||||
|
|
||||||
[fileIcon setFileNameField:fileIconTitle];
|
[fileIcon setFileNameField:fileIconTitle];
|
||||||
|
@ -749,6 +749,8 @@
|
||||||
|
|
||||||
/* PCLogInfo(self, @"windowDidBecomeKey: activeSubproject %@",
|
/* PCLogInfo(self, @"windowDidBecomeKey: activeSubproject %@",
|
||||||
[[project activeSubproject] projectName]);*/
|
[[project activeSubproject] projectName]);*/
|
||||||
|
NSLog(@"windowDidBecomeKey: project %@",
|
||||||
|
[project projectName]);
|
||||||
|
|
||||||
if ([[project projectManager] rootActiveProject] != project)
|
if ([[project projectManager] rootActiveProject] != project)
|
||||||
{
|
{
|
||||||
|
@ -763,7 +765,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Workaround
|
// Workaround
|
||||||
if ([projectWindow isDocumentEdited])
|
if ([projectWindow isDocumentEdited])
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
/*
|
/*
|
||||||
* Button
|
* Button
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@interface PCButton : NSButton
|
@interface PCButton : NSButton
|
||||||
{
|
{
|
||||||
NSToolTipTag mainToolTip;
|
NSToolTipTag mainToolTip;
|
||||||
|
|
|
@ -51,11 +51,9 @@ typedef enum _ErrorLevel {
|
||||||
NSSplitView *split;
|
NSSplitView *split;
|
||||||
id buildStatusField;
|
id buildStatusField;
|
||||||
id targetField;
|
id targetField;
|
||||||
NSTextView *logOutput;
|
|
||||||
/// NSTextView *errorOutput;
|
|
||||||
|
|
||||||
// Error logging
|
// Error logging
|
||||||
NSTableView *errorOutputTable;
|
NSTableView *errorOutput;
|
||||||
NSTableColumn *errorImageColumn;
|
NSTableColumn *errorImageColumn;
|
||||||
NSTableColumn *errorColumn;
|
NSTableColumn *errorColumn;
|
||||||
NSMutableArray *errorArray;
|
NSMutableArray *errorArray;
|
||||||
|
@ -65,6 +63,13 @@ typedef enum _ErrorLevel {
|
||||||
ErrorLevel lastEL;
|
ErrorLevel lastEL;
|
||||||
ErrorLevel nextEL;
|
ErrorLevel nextEL;
|
||||||
NSString *lastIndentString;
|
NSString *lastIndentString;
|
||||||
|
int errorsCount;
|
||||||
|
int warningsCount;
|
||||||
|
|
||||||
|
// Output logging
|
||||||
|
NSTextView *logOutput;
|
||||||
|
NSMutableString *currentBuildFile;
|
||||||
|
NSMutableArray *currentBuildPath;
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
NSPopUpButton *popup;
|
NSPopUpButton *popup;
|
||||||
|
@ -86,9 +91,6 @@ typedef enum _ErrorLevel {
|
||||||
NSFileHandle *readHandle;
|
NSFileHandle *readHandle;
|
||||||
NSFileHandle *errorReadHandle;
|
NSFileHandle *errorReadHandle;
|
||||||
|
|
||||||
int errorsCount;
|
|
||||||
int warningsCount;
|
|
||||||
|
|
||||||
BOOL _isBuilding;
|
BOOL _isBuilding;
|
||||||
BOOL _isCleaning;
|
BOOL _isCleaning;
|
||||||
BOOL _isLogging;
|
BOOL _isLogging;
|
||||||
|
@ -99,6 +101,7 @@ typedef enum _ErrorLevel {
|
||||||
- (void)dealloc;
|
- (void)dealloc;
|
||||||
|
|
||||||
- (NSView *)componentView;
|
- (NSView *)componentView;
|
||||||
|
- (BOOL)setMakePath;
|
||||||
|
|
||||||
// --- Accessory
|
// --- Accessory
|
||||||
- (BOOL)isBuilding;
|
- (BOOL)isBuilding;
|
||||||
|
@ -109,8 +112,12 @@ typedef enum _ErrorLevel {
|
||||||
|
|
||||||
// --- Actions
|
// --- Actions
|
||||||
- (void)startBuild:(id)sender;
|
- (void)startBuild:(id)sender;
|
||||||
- (BOOL)stopBuild:(id)sender;
|
|
||||||
- (void)startClean:(id)sender;
|
- (void)startClean:(id)sender;
|
||||||
|
- (void)startInstall:(id)sender;
|
||||||
|
- (BOOL)stopMake:(id)sender;
|
||||||
|
- (void)cleanupAfterMake;
|
||||||
|
|
||||||
|
- (BOOL)prebuildCheck;
|
||||||
- (void)build:(id)sender;
|
- (void)build:(id)sender;
|
||||||
//- (void)buildDidTerminate;
|
//- (void)buildDidTerminate;
|
||||||
|
|
||||||
|
@ -119,6 +126,8 @@ typedef enum _ErrorLevel {
|
||||||
- (void)logStdOut:(NSNotification *)aNotif;
|
- (void)logStdOut:(NSNotification *)aNotif;
|
||||||
- (void)logErrOut:(NSNotification *)aNotif;
|
- (void)logErrOut:(NSNotification *)aNotif;
|
||||||
|
|
||||||
|
- (void)updateErrorsCountField;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface PCProjectBuilder (UserInterface)
|
@interface PCProjectBuilder (UserInterface)
|
||||||
|
@ -129,6 +138,8 @@ typedef enum _ErrorLevel {
|
||||||
|
|
||||||
@interface PCProjectBuilder (BuildLogging)
|
@interface PCProjectBuilder (BuildLogging)
|
||||||
|
|
||||||
|
- (void)parseBuildLine:(NSString *)string;
|
||||||
|
|
||||||
- (void)logString:(NSString *)string error:(BOOL)yn newLine:(BOOL)newLine;
|
- (void)logString:(NSString *)string error:(BOOL)yn newLine:(BOOL)newLine;
|
||||||
- (void)logData:(NSData *)data error:(BOOL)yn;
|
- (void)logData:(NSData *)data error:(BOOL)yn;
|
||||||
|
|
||||||
|
@ -137,7 +148,6 @@ typedef enum _ErrorLevel {
|
||||||
@interface PCProjectBuilder (ErrorLogging)
|
@interface PCProjectBuilder (ErrorLogging)
|
||||||
|
|
||||||
- (void)logErrorString:(NSString *)string;
|
- (void)logErrorString:(NSString *)string;
|
||||||
- (void)addItems:(NSArray *)items;
|
|
||||||
|
|
||||||
- (NSString *)lineTail:(NSString*)line afterString:(NSString*)string;
|
- (NSString *)lineTail:(NSString*)line afterString:(NSString*)string;
|
||||||
- (NSArray *)parseErrorLine:(NSString *)string;
|
- (NSArray *)parseErrorLine:(NSString *)string;
|
||||||
|
|
|
@ -472,7 +472,7 @@
|
||||||
NSEnumerator *enumerator;
|
NSEnumerator *enumerator;
|
||||||
NSDictionary *method;
|
NSDictionary *method;
|
||||||
NSDictionary *class;
|
NSDictionary *class;
|
||||||
NSMutableArray *items;
|
NSMutableArray *items = [NSMutableArray array];
|
||||||
|
|
||||||
NSLog(@"PCEditor: asked for browser items for: %@", item);
|
NSLog(@"PCEditor: asked for browser items for: %@", item);
|
||||||
|
|
||||||
|
@ -484,7 +484,6 @@
|
||||||
{
|
{
|
||||||
ASSIGN(parserClasses, [aParser classNames]);
|
ASSIGN(parserClasses, [aParser classNames]);
|
||||||
|
|
||||||
items = [NSMutableArray array];
|
|
||||||
enumerator = [parserClasses objectEnumerator];
|
enumerator = [parserClasses objectEnumerator];
|
||||||
while ((class = [enumerator nextObject]))
|
while ((class = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
|
@ -498,7 +497,6 @@
|
||||||
{
|
{
|
||||||
ASSIGN(parserMethods, [aParser methodNames]);
|
ASSIGN(parserMethods, [aParser methodNames]);
|
||||||
|
|
||||||
items = [NSMutableArray array];
|
|
||||||
enumerator = [parserMethods objectEnumerator];
|
enumerator = [parserMethods objectEnumerator];
|
||||||
while ((method = [enumerator nextObject]))
|
while ((method = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
#include <ProjectCenter/PCPrefController.h>
|
#include <ProjectCenter/PCPrefController.h>
|
||||||
#include <ProjectCenter/PCLogController.h>
|
#include <ProjectCenter/PCLogController.h>
|
||||||
|
#include <ProjectCenter/PCFileManager.h>
|
||||||
|
|
||||||
#include "PCAppController.h"
|
#include "PCAppController.h"
|
||||||
#include "PCMenuController.h"
|
#include "PCMenuController.h"
|
||||||
|
@ -123,7 +124,7 @@
|
||||||
|
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification
|
- (void)applicationDidFinishLaunching:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
NSString *connectionName = [NSString stringWithFormat:@"ProjectCenter"];
|
// NSString *connectionName = [NSString stringWithFormat:@"ProjectCenter"];
|
||||||
|
|
||||||
if ([[prefController objectForKey:DisplayLog] isEqualToString:@"YES"])
|
if ([[prefController objectForKey:DisplayLog] isEqualToString:@"YES"])
|
||||||
{
|
{
|
||||||
|
@ -180,21 +181,30 @@
|
||||||
|
|
||||||
- (void)applicationWillTerminate:(NSNotification *)notification
|
- (void)applicationWillTerminate:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
NSFileManager *fm;
|
||||||
|
PCFileManager *pcfm;
|
||||||
|
NSString *rootBuildDir;
|
||||||
|
NSArray *rootBuildDirList;
|
||||||
|
|
||||||
#ifdef DEVELOPMENT
|
#ifdef DEVELOPMENT
|
||||||
NSLog (@"--- Application WILL terminate");
|
NSLog (@"--- Application WILL terminate");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
if ([[[NSUserDefaults standardUserDefaults]
|
|
||||||
stringForKey:DeleteCacheWhenQuitting] isEqualToString:@"YES"])
|
|
||||||
{
|
|
||||||
[[NSFileManager defaultManager]
|
|
||||||
removeFileAtPath:[projectManager rootBuildPath]
|
|
||||||
handler:nil];
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
if ([[ud stringForKey:DeleteCacheWhenQuitting] isEqualToString:@"YES"])
|
||||||
|
{
|
||||||
|
fm = [NSFileManager defaultManager];
|
||||||
|
pcfm = [PCFileManager defaultManager];
|
||||||
|
|
||||||
|
rootBuildDir = [prefController objectForKey:RootBuildDirectory];
|
||||||
|
rootBuildDirList = [fm directoryContentsAtPath:rootBuildDir];
|
||||||
|
NSLog(@"The following files will be removed from directory \"%@\": %@",
|
||||||
|
rootBuildDir, rootBuildDirList);
|
||||||
|
[pcfm removeFiles:rootBuildDirList fromDirectory:rootBuildDir];
|
||||||
|
}
|
||||||
|
|
||||||
|
[ud synchronize];
|
||||||
|
|
||||||
//--- Cleanup
|
//--- Cleanup
|
||||||
if (doConnection)
|
if (doConnection)
|
||||||
|
|
Loading…
Reference in a new issue