TooProject update related cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/UNSTABLE_0_4@18975 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-03-30 16:09:38 +00:00
parent b4d586aeb8
commit bd0f495c2d
22 changed files with 132 additions and 160 deletions

View file

@ -80,8 +80,8 @@ Images/subprojectSuitcaseH.tiff \
Modules/ApplicationProject/ApplicationProject.bundle \
Modules/BundleProject/BundleProject.bundle \
Modules/LibraryProject/LibraryProject.bundle \
Modules/ToolProject/ToolProject.bundle \
Modules/RenaissanceProject/RenaissanceProject.bundle
Modules/RenaissanceProject/RenaissanceProject.bundle \
Modules/ToolProject/ToolProject.bundle
#

View file

@ -171,7 +171,6 @@ static NSString * const PCLibraries = @"LIBRARIES";
static NSString * const PCNonProject = @"NON_PROJECT_FILES";
static NSString * const PCGSMarkupFiles = @"INTERFACES";
static NSString * const PCAppIcon = @"APPLICATIONICON";
static NSString * const PCBuildTool = @"BUILDTOOL";
static NSString * const PCCompilerOptions = @"COMPILEROPTIONS";
static NSString * const PCPreprocessorOptions = @"CPPOPTIONS";
@ -200,17 +199,25 @@ static NSString * const PCSearchHeaders = @"SEARCH_HEADER_DIRS";
static NSString * const PCSearchLibs = @"SEARCH_LIB_DIRS";
// Application specific
static NSString * const PCAppIcon = @"APPLICATIONICON";
static NSString * const PCMainInterfaceFile = @"MAININTERFACE";
static NSString * const PCHelpFile = @"HELP_FILE";
// Library specific
static NSString * const PCHeadersToInstall = @"HEADERS_TO_INSTALL";
static NSString * const PCHeadersInstallDir = @"HEADERS_INSTALL_DIR";
// Bundle specific
static NSString * const PCBundleExtension = @"BUNDLE_EXTENSION";
// Uncategorized
static NSString * const PCToolIcon = @"TOOLICON";
static NSString * const PCProjectBuilderClass = @"PROJECT_BUILDER"; // Will be removed
// Tool specific
static NSString * const PCToolIcon = @"TOOL_ICON";
static NSString * const PCPackageName = @"PACKAGE_NAME";
static NSString * const PCLibraryVar = @"LIBRARY_VAR";
// Will be removed
static NSString * const PCProjectBuilderClass = @"PROJECT_BUILDER";
#endif // _PCDEFINES_H_

View file

@ -1,12 +1,26 @@
/*
* PCMakefileFactory.h created by probert on 2002-02-28 22:16:26 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCMAKEFILEFACTORY_H_
#define _PCMAKEFILEFACTORY_H_
@ -17,8 +31,8 @@
@interface PCMakefileFactory : NSObject
{
NSMutableString *mfile;
NSString *pnme;
NSMutableString *mfile;
NSString *pnme;
}
+ (PCMakefileFactory *)sharedFactory;
@ -41,16 +55,6 @@
- (NSData *)encodedMakefile;
- (void)appendTailForTool;
@end
@interface PCMakefileFactory (ToolProject)
- (void)appendTool;
- (void)appendToolIcon:(NSString*)icn;
- (void)appendToolLibraries:(NSArray*)array;
@end
#endif // _PCMAKEFILEFACTORY_H_

View file

@ -1,10 +1,26 @@
/*
* PCMakefileFactory.m created by probert on 2002-02-28 22:16:25 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include "PCDefines.h"
#include "PCProject.h"
@ -309,56 +325,5 @@ static PCMakefileFactory *_factory = nil;
return [mfile dataUsingEncoding:[NSString defaultCStringEncoding]];
}
// Should be removed
- (void)appendTailForTool
{
[self appendString:@"\n\n"];
[self appendString:@"-include GNUmakefile.preamble\n"];
[self appendString:@"-include GNUmakefile.local\n"];
[self appendString:@"include $(GNUSTEP_MAKEFILES)/aggregate.make\n"];
[self appendString:@"include $(GNUSTEP_MAKEFILES)/tool.make\n"];
[self appendString:@"-include GNUmakefile.postamble\n"];
}
@end
@implementation PCMakefileFactory (ToolProject)
- (void)appendTool
{
[self appendString:COMMENT_TOOL];
[self appendString:[NSString stringWithFormat:@"PACKAGE_NAME=%@\n",pnme]];
[self appendString:[NSString stringWithFormat:@"TOOL_NAME=%@\n",pnme]];
}
- (void)appendToolIcon:(NSString*)icn
{
[self appendString:
[NSString stringWithFormat:@"%@_TOOL_ICON=%@\n",pnme, icn]];
}
- (void)appendToolLibraries:(NSArray*)array
{
[self appendString:COMMENT_LIBRARIES];
[self appendString:[NSString stringWithFormat:@"%@_TOOL_LIBS += ",pnme]];
if( array && [array count] )
{
NSString *tmp;
NSEnumerator *enumerator = [array objectEnumerator];
while ((tmp = [enumerator nextObject]) )
{
if (![tmp isEqualToString:@"gnustep-base"])
{
[self appendString:[NSString stringWithFormat:@"-l%@ ",tmp]];
}
}
}
}
@end

View file

@ -59,16 +59,12 @@ extern NSString *PCProjectDictDidSaveNotification;
NSView *builderContentView;
NSView *debuggerContentView;
// For compatibility. Should be changed later
NSView *projectProjectInspectorView;
//
NSMutableDictionary *projectDict;
NSString *projectName;
NSString *projectPath;
NSArray *rootKeys; // CLASS_FILES
NSArray *rootCategories; // Classes
NSArray *rootKeys; // e.g. CLASS_FILES
NSArray *rootCategories; // e.g. Classes
NSDictionary *rootEntries; // Initialised by subclasses
NSMutableDictionary *buildOptions;
@ -85,7 +81,8 @@ extern NSString *PCProjectDictDidSaveNotification;
- (void)setProjectManager:(PCProjectManager *)aManager;
- (BOOL)close:(id)sender;
- (void)dealloc;
- (BOOL)saveProjectWindowsAndPanels;
- (BOOL)saveProjectWindowsAndPanels; // Not finished
// ============================================================================
// ==== Accessory methods
@ -113,32 +110,29 @@ extern NSString *PCProjectDictDidSaveNotification;
// ==== To be overriden!
// ===========================================================================
- (BOOL)isEditableCategory:(NSString *)category;
// TEMP! For compatibility with old PC*Project subclasses
- (void)updateValuesFromProjectDict;
// Project Attributes Inspector
- (NSView *)projectAttributesView;
- (Class)builderClass;
// Subclasses need to call this before their customised implementation!
- (BOOL)writeMakefile;
- (NSString *)projectDescription; // Project type
- (BOOL)isExecutable;
- (NSString *)execToolName;
- (NSArray *)fileTypesForCategoryKey:(NSString *)key;
- (NSString *)dirForCategoryKey:(NSString *)key;
- (NSArray *)buildTargets;
- (NSArray *)sourceFileKeys;
- (NSArray *)resourceFileKeys;
- (NSArray *)otherKeys;
- (NSArray *)buildTargets;
- (NSArray *)allowableSubprojectTypes;
- (NSArray *)defaultLocalizableKeys;
- (NSArray *)localizableKeys;
// Returns a string describing the project type
- (NSString *)projectDescription;
- (BOOL)isEditableCategory:(NSString *)category;
// Returns NO by default.
- (BOOL)isExecutable;
- (NSString *)execToolName;
// Subclasses need to call this before their customised implementation!
- (BOOL)writeMakefile;
// ============================================================================
// ==== File Handling

View file

@ -356,29 +356,6 @@ NSString
// ==== To be overriden
// ============================================================================
- (BOOL)isEditableCategory:(NSString *)category
{
NSString *key = [self keyForCategory:category];
if ([key isEqualToString:PCClasses]
|| [key isEqualToString:PCHeaders]
|| [key isEqualToString:PCSupportingFiles]
|| [key isEqualToString:PCDocuFiles]
|| [key isEqualToString:PCOtherSources]
|| [key isEqualToString:PCOtherResources]
|| [key isEqualToString:PCNonProject])
{
return YES;
}
return NO;
}
// TEMP! For compatibility with old PC*Project subclasses
- (void)updateValuesFromProjectDict
{
}
- (NSView *)projectAttributesView
{
return nil;
@ -449,6 +426,24 @@ NSString
return nil;
}
- (BOOL)isEditableCategory:(NSString *)category
{
NSString *key = [self keyForCategory:category];
if ([key isEqualToString:PCClasses]
|| [key isEqualToString:PCHeaders]
|| [key isEqualToString:PCSupportingFiles]
|| [key isEqualToString:PCDocuFiles]
|| [key isEqualToString:PCOtherSources]
|| [key isEqualToString:PCOtherResources]
|| [key isEqualToString:PCNonProject])
{
return YES;
}
return NO;
}
// Saves backup file
- (BOOL)writeMakefile
{

View file

@ -1,7 +1,7 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$

View file

@ -1,7 +1,7 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$

View file

@ -1,7 +1,7 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$

View file

@ -1,7 +1,7 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$

View file

@ -1,7 +1,7 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$

View file

@ -1,11 +1,13 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$
Created: $DATE$ by $USERNAME$
Application Controller
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public

View file

@ -1,11 +1,13 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$
Created: $DATE$ by $USERNAME$
Application Controller
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public

View file

@ -1,7 +1,7 @@
/*
Project: $PROJECTNAME$
Copyright (C) 200_ Free Software Foundation
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$

View file

@ -1,6 +1,5 @@
{
APPKIT = "GNUSTEP-GUI";
APPLICATIONICON = "";
BUILDTOOL = "/usr/bin/make";
BUNDLE_EXTENSION = ".bundle";
CLASS_FILES = ();

View file

@ -12,9 +12,9 @@ GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
SUBPROJECTS = \
ApplicationProject \
BundleProject \
ToolProject \
LibraryProject \
RenaissanceProject
RenaissanceProject \
ToolProject
include $(GNUSTEP_MAKEFILES)/aggregate.make

View file

@ -85,7 +85,6 @@ static PCLibProj *_creator = nil;
projectDict = [NSMutableDictionary dictionaryWithContentsOfFile:_file];
// Customise the project
[project setProjectName:[path lastPathComponent]];
[projectDict setObject:[path lastPathComponent] forKey:PCProjectName];
[projectDict setObject:[self projectTypeName] forKey:PCProjectType];
// The path cannot be in the PC.project file!

View file

@ -22,24 +22,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#include "PCLibProject.h"
#include "PCLibProj.h"
#include <ProjectCenter/PCMakefileFactory.h>
@interface PCLibProject (CreateUI)
- (void)_initUI;
@end
@implementation PCLibProject (CreateUI)
- (void)_initUI
{
}
@end
#include "PCLibProject.h"
#include "PCLibProj.h"
@implementation PCLibProject

View file

@ -1,6 +1,5 @@
{
APPKIT = "GNUSTEP-GUI";
APPLICATIONICON = "";
BUILDTOOL = "/usr/bin/make";
CLASS_FILES = ();
COMPILEROPTIONS = "";

View file

@ -1,5 +1,11 @@
/*
AppController.h
Project: $PROJECTNAME$
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$
Created: $DATE$ by $USERNAME$
GNUstep Renaissance Application Controller

View file

@ -1,5 +1,11 @@
/*
AppController.h
Project: $PROJECTNAME$
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$
Created: $DATE$ by $USERNAME$
GNUstep Renaissance Application Controller

View file

@ -1,4 +1,12 @@
/*
Project: $PROJECTNAME$
Copyright (C) $YEAR$ Free Software Foundation
Author: $FULLUSERNAME$
Created: $DATE$ by $USERNAME$
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either