mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-15 16:11:25 +00:00
2007-06-05 Sergii Stoian <stoyan255@gmail.com>
* Framework/PCProjectBuilder.m: Added parsing of gcc error output. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@25220 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d6da8e6f6b
commit
b4044a3d1f
8 changed files with 153 additions and 210 deletions
|
@ -1,3 +1,7 @@
|
|||
2007-06-05 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Framework/PCProjectBuilder.m: Added parsing of gcc error output.
|
||||
|
||||
2007-04-27 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* PCProjectLauncher.m ([-debug:]): Fixed determining the path of
|
||||
|
@ -5,7 +9,7 @@
|
|||
xxx.app/xxx and obj/xxx. Fixed path printed in error message when
|
||||
gdb is not found. (Originally from a patch by Friedrich
|
||||
<frido@q-software-solutions.de>)
|
||||
|
||||
|
||||
2007-04-27 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* PCProject.m ([-execToolName]): Fixed typo where 'ExecuToolName'
|
||||
|
@ -14,7 +18,7 @@
|
|||
we're using openapp, so that we use 'openapp ./Gorm.app' but
|
||||
'opentool autogsdoc'. This fixes running application/tool
|
||||
projects.
|
||||
|
||||
|
||||
2007-03-06 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* GNUmakefile: Set GNUSTEP_MAKEFILES using gnustep-config if not yet set.
|
||||
|
@ -30,7 +34,7 @@
|
|||
* PCFileManager.m ([-createDirectoriesIfNeededAtPath:]): Avoid
|
||||
infinite loop that would be triggered the first time you tried to
|
||||
build your project.
|
||||
|
||||
|
||||
2007-02-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* GNUmakefile.bundles (BUNDLE_INSTALL_DIR): Fixed definition basing
|
||||
|
|
24
Framework/English.lproj/BuilderOptions.gorm/data.classes
Normal file
24
Framework/English.lproj/BuilderOptions.gorm/data.classes
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"popupChanged:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCProjectBuilder = {
|
||||
Actions = (
|
||||
"popupChanged:"
|
||||
);
|
||||
Outlets = (
|
||||
buildArgsField,
|
||||
debugButton,
|
||||
verboseButton,
|
||||
optionsPanel,
|
||||
profileButton,
|
||||
sharedLibsButton,
|
||||
targetPopup
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
BIN
Framework/English.lproj/BuilderOptions.gorm/data.info
Normal file
BIN
Framework/English.lproj/BuilderOptions.gorm/data.info
Normal file
Binary file not shown.
BIN
Framework/English.lproj/BuilderOptions.gorm/objects.gorm
Normal file
BIN
Framework/English.lproj/BuilderOptions.gorm/objects.gorm
Normal file
Binary file not shown.
|
@ -103,6 +103,7 @@ ProjectCenter_LOCALIZED_RESOURCE_FILES = \
|
|||
ProjectWindow.gorm \
|
||||
BuilderPanel.gorm \
|
||||
Builder.gorm \
|
||||
BuilderOptions.gorm \
|
||||
NewSubproject.gorm \
|
||||
NewFile.gorm \
|
||||
ProjectInspector.gorm \
|
||||
|
|
|
@ -46,13 +46,66 @@
|
|||
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
|
||||
#endif
|
||||
|
||||
@implementation PCProjectBuilder (UserInterface)
|
||||
@implementation PCProjectBuilder
|
||||
|
||||
- (id)initWithProject:(PCProject *)aProject
|
||||
{
|
||||
NSAssert(aProject, @"No project specified!");
|
||||
|
||||
// PCLogInfo(self, @"initWithProject %@", [aProject projectName]);
|
||||
|
||||
if ((self = [super init]))
|
||||
{
|
||||
project = aProject;
|
||||
buildTarget = [[NSMutableString alloc] initWithString:@"Default"];
|
||||
buildArgs = [[NSMutableArray array] retain];
|
||||
postProcess = NULL;
|
||||
makeTask = nil;
|
||||
_isBuilding = NO;
|
||||
_isCleaning = NO;
|
||||
_isCVLoaded = NO;
|
||||
|
||||
if ([NSBundle loadNibNamed:@"Builder" owner:self] == NO)
|
||||
{
|
||||
PCLogError(self, @"error loading Builder NIB file!");
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog (@"PCProjectBuilder: dealloc");
|
||||
#endif
|
||||
|
||||
[buildTarget release];
|
||||
[buildArgs release];
|
||||
[makePath release];
|
||||
|
||||
// PCLogInfo(self, @"componentView RC: %i", [componentView retainCount]);
|
||||
// PCLogInfo(self, @"RC: %i", [self retainCount]);
|
||||
[componentView release];
|
||||
[errorArray release];
|
||||
[errorString release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
NSScrollView *errorScroll;
|
||||
NSScrollView *logScroll;
|
||||
|
||||
if (_isCVLoaded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NSLog(@"ProjectBuilder awakeFromNib");
|
||||
|
||||
[componentView retain];
|
||||
[componentView removeFromSuperview];
|
||||
|
||||
|
@ -156,157 +209,8 @@
|
|||
// [split adjustSubviews];
|
||||
// [componentView addSubview:split];
|
||||
// RELEASE (split);
|
||||
}
|
||||
|
||||
- (void) _createOptionsPanel
|
||||
{
|
||||
NSView *cView = nil;
|
||||
NSTextField *textField = nil;
|
||||
|
||||
optionsPanel = [[NSPanel alloc]
|
||||
initWithContentRect: NSMakeRect (100, 100, 300, 120)
|
||||
styleMask: NSTitledWindowMask | NSClosableWindowMask
|
||||
backing: NSBackingStoreBuffered
|
||||
defer: YES];
|
||||
[optionsPanel setDelegate: self];
|
||||
[optionsPanel setReleasedWhenClosed: NO];
|
||||
[optionsPanel setTitle: @"Build Options"];
|
||||
cView = [optionsPanel contentView];
|
||||
|
||||
// Args
|
||||
textField = [[NSTextField alloc] initWithFrame: NSMakeRect (8,91,60,21)];
|
||||
[textField setAlignment: NSRightTextAlignment];
|
||||
[textField setBordered: NO];
|
||||
[textField setEditable: NO];
|
||||
[textField setBezeled: NO];
|
||||
[textField setDrawsBackground: NO];
|
||||
[textField setStringValue: @"Arguments:"];
|
||||
[cView addSubview: textField];
|
||||
|
||||
RELEASE (textField);
|
||||
|
||||
// Args message
|
||||
buildTargetArgsField = [[NSTextField alloc]
|
||||
initWithFrame: NSMakeRect (70, 91, 220, 21)];
|
||||
[buildTargetArgsField setAlignment: NSLeftTextAlignment];
|
||||
[buildTargetArgsField setBordered: NO];
|
||||
[buildTargetArgsField setEditable: YES];
|
||||
[buildTargetArgsField setBezeled: YES];
|
||||
[buildTargetArgsField setDrawsBackground: YES];
|
||||
[buildTargetArgsField setStringValue: @""];
|
||||
[buildTargetArgsField setDelegate: self];
|
||||
[buildTargetArgsField setTarget: self];
|
||||
[buildTargetArgsField setAction: @selector (setArguments:)];
|
||||
[cView addSubview: buildTargetArgsField];
|
||||
|
||||
// RELEASE (buildTargetArgsField);
|
||||
|
||||
// Host
|
||||
textField = [[NSTextField alloc] initWithFrame: NSMakeRect (8,67,60,21)];
|
||||
[textField setAlignment: NSRightTextAlignment];
|
||||
[textField setBordered: NO];
|
||||
[textField setEditable: NO];
|
||||
[textField setBezeled: NO];
|
||||
[textField setDrawsBackground: NO];
|
||||
[textField setStringValue: @"Host:"];
|
||||
[cView addSubview: textField];
|
||||
|
||||
RELEASE (textField);
|
||||
|
||||
// Host message
|
||||
buildTargetHostField = [[NSTextField alloc]
|
||||
initWithFrame: NSMakeRect (70, 67, 220, 21)];
|
||||
[buildTargetHostField setAlignment: NSLeftTextAlignment];
|
||||
[buildTargetHostField setBordered: NO];
|
||||
[buildTargetHostField setEditable: YES];
|
||||
[buildTargetHostField setBezeled: YES];
|
||||
[buildTargetHostField setDrawsBackground: YES];
|
||||
[buildTargetHostField setStringValue: @"localhost"];
|
||||
[buildTargetHostField setDelegate: self];
|
||||
[buildTargetHostField setTarget: self];
|
||||
[buildTargetHostField setAction: @selector (setHost:)];
|
||||
[cView addSubview: buildTargetHostField];
|
||||
|
||||
// RELEASE (buildTargetArgsField);
|
||||
|
||||
// Target
|
||||
textField = [[NSTextField alloc]
|
||||
initWithFrame: NSMakeRect (8, 40, 60, 21)];
|
||||
[textField setAlignment: NSRightTextAlignment];
|
||||
[textField setBordered: NO];
|
||||
[textField setBezeled: NO];
|
||||
[textField setEditable: NO];
|
||||
[textField setSelectable: NO];
|
||||
[textField setDrawsBackground: NO];
|
||||
[textField setStringValue: @"Target:"];
|
||||
[textField setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
|
||||
[cView addSubview: textField];
|
||||
|
||||
RELEASE(textField);
|
||||
|
||||
// Target popup
|
||||
popup = [[NSPopUpButton alloc]
|
||||
initWithFrame: NSMakeRect (70, 40, 220, 21)];
|
||||
[popup addItemWithTitle: @"Default"];
|
||||
[popup addItemWithTitle: @"Debug"];
|
||||
[popup addItemWithTitle: @"Profile"];
|
||||
[popup addItemWithTitle: @"Tarball"];
|
||||
[popup addItemWithTitle: @"RPM"];
|
||||
[popup setTarget: self];
|
||||
[popup setAction: @selector (popupChanged:)];
|
||||
[popup setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
|
||||
[cView addSubview: popup];
|
||||
|
||||
RELEASE (popup);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectBuilder
|
||||
|
||||
- (id)initWithProject:(PCProject *)aProject
|
||||
{
|
||||
NSAssert(aProject, @"No project specified!");
|
||||
|
||||
// PCLogInfo(self, @"initWithProject %@", [aProject projectName]);
|
||||
|
||||
if ((self = [super init]))
|
||||
{
|
||||
project = aProject;
|
||||
buildTarget = [[NSMutableString alloc] initWithString:@"Default"];
|
||||
buildArgs = [[NSMutableArray array] retain];
|
||||
postProcess = NULL;
|
||||
makeTask = nil;
|
||||
_isBuilding = NO;
|
||||
_isCleaning = NO;
|
||||
|
||||
if ([NSBundle loadNibNamed:@"Builder" owner:self] == NO)
|
||||
{
|
||||
PCLogError(self, @"error loading Builder NIB file!");
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#ifdef DEVELOPMENT
|
||||
NSLog (@"PCProjectBuilder: dealloc");
|
||||
#endif
|
||||
|
||||
[buildTarget release];
|
||||
[buildArgs release];
|
||||
[makePath release];
|
||||
|
||||
// PCLogInfo(self, @"componentView RC: %i", [componentView retainCount]);
|
||||
// PCLogInfo(self, @"RC: %i", [self retainCount]);
|
||||
[componentView release];
|
||||
[errorArray release];
|
||||
[errorString release];
|
||||
|
||||
[super dealloc];
|
||||
_isCVLoaded = YES;
|
||||
}
|
||||
|
||||
- (NSView *)componentView
|
||||
|
@ -519,15 +423,6 @@
|
|||
_isCleaning = NO;
|
||||
}
|
||||
|
||||
- (void)showOptionsPanel:(id)sender
|
||||
{
|
||||
if (!optionsPanel)
|
||||
{
|
||||
[self _createOptionsPanel];
|
||||
}
|
||||
[optionsPanel orderFront:nil];
|
||||
}
|
||||
|
||||
// --- Actions
|
||||
|
||||
- (BOOL)prebuildCheck
|
||||
|
@ -734,18 +629,6 @@
|
|||
[self cleanupAfterMake];
|
||||
}
|
||||
|
||||
- (void)popupChanged:(id)sender
|
||||
{
|
||||
NSString *target = [targetField stringValue];
|
||||
|
||||
target = [NSString stringWithFormat:
|
||||
@"%@ with args ' %@ '",
|
||||
[popup titleOfSelectedItem],
|
||||
[buildTargetArgsField stringValue]];
|
||||
|
||||
[targetField setStringValue: target];
|
||||
}
|
||||
|
||||
- (void)logStdOut:(NSNotification *)aNotif
|
||||
{
|
||||
NSData *data;
|
||||
|
@ -1224,3 +1107,34 @@
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCProjectBuilder (Options)
|
||||
|
||||
- (void)showOptionsPanel:(id)sender
|
||||
{
|
||||
if (!optionsPanel)
|
||||
{
|
||||
if ([NSBundle loadNibNamed:@"BuilderOptions" owner:self] == NO)
|
||||
{
|
||||
PCLogError(self, @"error loading BuilderOptions NIB file!");
|
||||
return;
|
||||
}
|
||||
[targetPopup addItemsWithTitles:[project buildTargets]];
|
||||
}
|
||||
|
||||
[optionsPanel makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
- (void)popupChanged:(id)sender
|
||||
{
|
||||
NSString *target = [targetField stringValue];
|
||||
|
||||
target = [NSString stringWithFormat:
|
||||
@"%@ with args ' %@ '",
|
||||
[targetPopup titleOfSelectedItem],
|
||||
[buildArgsField stringValue]];
|
||||
|
||||
[targetField setStringValue:target];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -42,6 +42,26 @@ typedef enum _ErrorLevel {
|
|||
|
||||
@interface PCProjectBuilder : NSObject
|
||||
{
|
||||
PCProject *project;
|
||||
NSDictionary *currentOptions;
|
||||
|
||||
NSString *makePath;
|
||||
NSString *statusString;
|
||||
NSMutableString *buildTarget;
|
||||
NSMutableArray *buildArgs;
|
||||
SEL postProcess;
|
||||
NSTask *makeTask;
|
||||
|
||||
NSFileHandle *readHandle;
|
||||
NSFileHandle *errorReadHandle;
|
||||
|
||||
BOOL _isBuilding;
|
||||
BOOL _isCleaning;
|
||||
BOOL _isLogging;
|
||||
BOOL _isErrorLogging;
|
||||
|
||||
// Component view
|
||||
BOOL _isCVLoaded;
|
||||
NSBox *componentView;
|
||||
PCButton *buildButton;
|
||||
PCButton *cleanButton;
|
||||
|
@ -49,8 +69,8 @@ typedef enum _ErrorLevel {
|
|||
PCButton *optionsButton;
|
||||
NSTextField *errorsCountField;
|
||||
NSSplitView *split;
|
||||
id buildStatusField;
|
||||
id targetField;
|
||||
NSTextField *buildStatusField;
|
||||
NSTextField *targetField;
|
||||
|
||||
// Error logging
|
||||
NSTableView *errorOutput;
|
||||
|
@ -71,30 +91,14 @@ typedef enum _ErrorLevel {
|
|||
NSMutableString *currentBuildFile;
|
||||
NSMutableArray *currentBuildPath;
|
||||
|
||||
// Options
|
||||
NSPopUpButton *popup;
|
||||
// Options panel
|
||||
NSPanel *optionsPanel;
|
||||
NSTextField *buildTargetHostField;
|
||||
NSTextField *buildTargetArgsField;
|
||||
|
||||
// Variables
|
||||
PCProject *project;
|
||||
NSDictionary *currentOptions;
|
||||
|
||||
NSString *makePath;
|
||||
NSString *statusString;
|
||||
NSMutableString *buildTarget;
|
||||
NSMutableArray *buildArgs;
|
||||
SEL postProcess;
|
||||
NSTask *makeTask;
|
||||
|
||||
NSFileHandle *readHandle;
|
||||
NSFileHandle *errorReadHandle;
|
||||
|
||||
BOOL _isBuilding;
|
||||
BOOL _isCleaning;
|
||||
BOOL _isLogging;
|
||||
BOOL _isErrorLogging;
|
||||
NSPopUpButton *targetPopup;
|
||||
NSTextField *buildArgsField;
|
||||
NSButton *debugButton;
|
||||
NSButton *profileButton;
|
||||
NSButton *sharedLibsButton;
|
||||
NSButton *verboseButton;
|
||||
}
|
||||
|
||||
- (id)initWithProject:(PCProject *)aProject;
|
||||
|
@ -121,8 +125,6 @@ typedef enum _ErrorLevel {
|
|||
- (void)build:(id)sender;
|
||||
//- (void)buildDidTerminate;
|
||||
|
||||
- (void)popupChanged:(id)sender;
|
||||
|
||||
- (void)logStdOut:(NSNotification *)aNotif;
|
||||
- (void)logErrOut:(NSNotification *)aNotif;
|
||||
|
||||
|
@ -130,12 +132,6 @@ typedef enum _ErrorLevel {
|
|||
|
||||
@end
|
||||
|
||||
@interface PCProjectBuilder (UserInterface)
|
||||
|
||||
- (void)_createOptionsPanel;
|
||||
|
||||
@end
|
||||
|
||||
@interface PCProjectBuilder (BuildLogging)
|
||||
|
||||
- (void)parseBuildLine:(NSString *)string;
|
||||
|
@ -154,4 +150,8 @@ typedef enum _ErrorLevel {
|
|||
|
||||
@end
|
||||
|
||||
@interface PCProjectBuilder (Options)
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,8 +7,8 @@ ADDITIONAL_CPPFLAGS +=
|
|||
ADDITIONAL_INCLUDE_DIRS += -I../../../ -I../../../Headers
|
||||
ADDITIONAL_LIB_DIRS += -L../../../Framework/ProjectCenter.framework/Versions/Current
|
||||
|
||||
BUNDLE_INSTALL_DIR = $(GNUSTEP_APPS)/ProjectCenter.app/Resources
|
||||
# $(BUNDLE_NAME)_STANDARD_INSTALL = no
|
||||
BUNDLE_INSTALL_DIR = $(GNUSTEP_SYSTEM_ROOT)/Applications/ProjectCenter.app/Resources
|
||||
$(BUNDLE_NAME)_STANDARD_INSTALL = no
|
||||
|
||||
DO_LIB_LINK=no
|
||||
ifeq ($(GNUSTEP_TARGET_OS), mingw32)
|
||||
|
|
Loading…
Reference in a new issue