mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-15 16:11:25 +00:00
Remove files and dirs left from 0.3.x release
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@19496 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6f7a22551b
commit
c2ec8fcf20
13 changed files with 0 additions and 3768 deletions
56
ANNOUNCE
56
ANNOUNCE
|
@ -1,56 +0,0 @@
|
|||
Announcement
|
||||
************
|
||||
|
||||
This is version 0.3.5 of ProjectCenter.
|
||||
|
||||
What is ProjectCenter?
|
||||
======================
|
||||
|
||||
ProjectCenter is a clone of the NEXTSTEP ProjectBuilder application for
|
||||
GNUstep.
|
||||
|
||||
ProjectCenter is covered under the GNU Public License.
|
||||
|
||||
Noteworthy changes in version `0.3.5'.
|
||||
======================================
|
||||
|
||||
Many features have been polished and stabilised, see ChangeLog for the
|
||||
complete list of changes.
|
||||
|
||||
How can I get support for this software?
|
||||
========================================
|
||||
|
||||
You may wish to use the GNUstep discussion mailing list for general
|
||||
questions and discussion. Look at the GNUstep Web Pages for more
|
||||
information regarding GNUstep resources <http://www.gnustep.org/>
|
||||
|
||||
Where can you get it? How can you compile it?
|
||||
==============================================
|
||||
|
||||
You can download the sources from
|
||||
ftp://ftp.gnustep.org/pub/gnustep/dev-apps/.
|
||||
|
||||
Where do I send bug reports?
|
||||
============================
|
||||
|
||||
Bug reports can be sent to <bug-gnustep@gnu.org>.
|
||||
|
||||
Obtaining GNU Software
|
||||
======================
|
||||
|
||||
Check out the GNU web site. (`http://www.gnu.org/')
|
||||
|
||||
Check out the GNUstep web site. (`http://www.gnustep.org/')
|
||||
|
||||
Most GNU software is packed using the GNU `gzip' compression program.
|
||||
Source code is available on most sites distributing GNU software.
|
||||
|
||||
For information on how to order GNU software on tape, floppy or
|
||||
cd-rom, or printed GNU manuals, check the file etc/ORDERS in the GNU
|
||||
Emacs distribution or in GNUinfo/ORDERS on prep, or e-mail a request to:
|
||||
<gnu@gnu.org>
|
||||
|
||||
By ordering your GNU software from the FSF, you help us continue to
|
||||
develop more free software. Media revenues are our primary source of
|
||||
support. Donations to FSF are deductible on US tax returns.
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
#
|
||||
# GNUmakefile.preamble
|
||||
#
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Philippe C.D. Robert <probert@siggraph.org>
|
||||
#
|
||||
# This file is part of GNUstep
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library 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.
|
||||
#
|
||||
# If you are interested in a warranty or support for this source code,
|
||||
# contact Scott Christley at scottc@net-community.com
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#
|
||||
# Project specific makefile variables, and additional
|
||||
#
|
||||
# Do not put any Makefile rules in this file, instead they should
|
||||
# be put into Makefile.postamble.
|
||||
#
|
||||
|
||||
#
|
||||
# Flags dealing with compiling and linking
|
||||
#
|
||||
|
||||
# Additional flags to pass to the preprocessor
|
||||
ADDITIONAL_CPPFLAGS += -Wall
|
||||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
ADDITIONAL_OBJCFLAGS += -Wall
|
||||
|
||||
# Additional flags to pass to the C compiler
|
||||
ADDITIONAL_CFLAGS += -Wall
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../PCLib -I../..
|
||||
|
||||
# Additional LDFLAGS to pass to the linker
|
||||
ADDITIONAL_LDFLAGS +=
|
||||
|
||||
# Additional library directories the linker should search
|
||||
ADDITIONAL_LIB_DIRS += -L../PCLib/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
ADDITIONAL_TOOL_LIBS +=
|
||||
|
||||
PCAppProj_BUNDLE_LIBS = -lProjectCenter
|
||||
|
||||
#
|
||||
# Flags dealing with installing and uninstalling
|
||||
#
|
||||
|
||||
# Additional directories to be created during installation
|
||||
ADDITIONAL_INSTALL_DIRS +=
|
||||
|
||||
#
|
||||
# Local configuration
|
||||
#
|
||||
|
||||
BUNDLE_EXTENSION = .bundle
|
||||
BUNDLE_INSTALL_DIR = $(GNUSTEP_SYSTEM_ROOT)/Applications/ProjectCenter.app/Resources
|
||||
$(PACKAGE_NAME)_STANDARD_INSTALL = no
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* $FILENAME$ created by $USERNAME$ on $DATE$
|
||||
*
|
||||
* Project $PROJECTNAME$
|
||||
*
|
||||
* Project $PROJECTNAME$ is copyrighted by $USERNAME$ and
|
||||
* released under...
|
||||
*
|
||||
* Created with ProjectCenter - http://www.gnustep.org
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _$UCFILENAMESANSEXTENSION$_H_
|
||||
#define _$UCFILENAMESANSEXTENSION$_H_
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
@interface $FILENAMESANSEXTENSION$ : NSObject
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif // _$UCFILENAMESANSEXTENSION$_H_
|
||||
|
|
@ -1,253 +0,0 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org
|
||||
|
||||
Copyright (C) 2001 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.
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include "PCProject+UInterface.h"
|
||||
#include "PCBundleProject.h"
|
||||
#include "PCBundleProj.h"
|
||||
|
||||
#include <ProjectCenter/PCMakefileFactory.h>
|
||||
|
||||
#include <ProjectCenter/ProjectCenter.h>
|
||||
|
||||
//#define BUNDLE_INSTALL @"$(GNUSTEP_LOCAL_ROOT)/Library/Bundles/"
|
||||
#define BUNDLE_INSTALL @"$(GNUSTEP_INSTALLATION_DIR)/Library/Bundles/"
|
||||
|
||||
@interface PCBundleProject (CreateUI)
|
||||
|
||||
- (void)_initUI;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCBundleProject (CreateUI)
|
||||
|
||||
- (void)_initUI
|
||||
{
|
||||
NSTextField *textField;
|
||||
NSRect frame = {{84,120}, {80, 80}};
|
||||
|
||||
[super _initUI];
|
||||
|
||||
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,240,88,21)];
|
||||
[textField setAlignment: NSRightTextAlignment];
|
||||
[textField setBordered: NO];
|
||||
[textField setEditable: NO];
|
||||
[textField setBezeled: NO];
|
||||
[textField setDrawsBackground: NO];
|
||||
[textField setStringValue:@"Principal class:"];
|
||||
[projectProjectInspectorView addSubview:textField];
|
||||
RELEASE(textField);
|
||||
|
||||
frame = NSMakeRect(106,240,144,21);
|
||||
principalClassField =[[NSTextField alloc] initWithFrame:frame];
|
||||
[principalClassField setAlignment: NSLeftTextAlignment];
|
||||
[principalClassField setBordered: YES];
|
||||
[principalClassField setEditable: YES];
|
||||
[principalClassField setBezeled: YES];
|
||||
[principalClassField setDrawsBackground: YES];
|
||||
[principalClassField setStringValue:@""];
|
||||
[principalClassField setTarget:self];
|
||||
[principalClassField setAction:@selector(setPrincipalClass:)];
|
||||
[projectProjectInspectorView addSubview:principalClassField];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCBundleProject
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Init and free
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
rootObjects = [[NSArray arrayWithObjects: PCClasses,
|
||||
PCHeaders,
|
||||
PCOtherSources,
|
||||
PCGModels,
|
||||
PCImages,
|
||||
PCOtherResources,
|
||||
PCSubprojects,
|
||||
PCDocuFiles,
|
||||
PCSupportingFiles,
|
||||
PCLibraries,
|
||||
PCNonProject,
|
||||
nil] retain];
|
||||
|
||||
rootKeys = [[NSArray arrayWithObjects: @"Classes",
|
||||
@"Headers",
|
||||
@"Other Sources",
|
||||
@"Interfaces",
|
||||
@"Images",
|
||||
@"Other Resources",
|
||||
@"Subprojects",
|
||||
@"Documentation",
|
||||
@"Supporting Files",
|
||||
@"Libraries",
|
||||
@"Non Project Files",
|
||||
nil] retain];
|
||||
|
||||
rootCategories = [[NSDictionary
|
||||
dictionaryWithObjects:rootObjects forKeys:rootKeys] retain];
|
||||
|
||||
principalClassField = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[rootCategories release];
|
||||
[rootObjects release];
|
||||
[rootKeys release];
|
||||
[principalClassField release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Project
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (Class)builderClass
|
||||
{
|
||||
return [PCBundleProj class];
|
||||
}
|
||||
|
||||
- (BOOL)writeMakefile
|
||||
{
|
||||
NSString *tmp;
|
||||
NSData *mfd;
|
||||
NSString *mfl = [projectPath stringByAppendingPathComponent:@"GNUmakefile"];
|
||||
int i;
|
||||
PCMakefileFactory *mf = [PCMakefileFactory sharedFactory];
|
||||
NSDictionary *dict = [self projectDict];
|
||||
NSArray *classes = [dict objectForKey:PCClasses];
|
||||
NSString *iDir = [dict objectForKey:PCInstallDir];
|
||||
|
||||
// Save the project file
|
||||
[super writeMakefile];
|
||||
|
||||
if( [iDir isEqualToString:@""] )
|
||||
{
|
||||
iDir = [NSString stringWithString:BUNDLE_INSTALL];
|
||||
}
|
||||
|
||||
if ((tmp = [dict objectForKey:PCPrincipalClass]) &&
|
||||
[tmp isEqualToString:@""] == NO)
|
||||
{
|
||||
}
|
||||
else if ([classes count])
|
||||
{
|
||||
tmp = [[classes objectAtIndex:0] stringByDeletingPathExtension];
|
||||
}
|
||||
else tmp = [NSString string];
|
||||
|
||||
[mf createMakefileForProject:[self projectName]];
|
||||
|
||||
[mf appendString:@"include $(GNUSTEP_MAKEFILES)/common.make\n"];
|
||||
|
||||
[mf appendSubprojects:[dict objectForKey:PCSubprojects]];
|
||||
|
||||
[mf appendBundle];
|
||||
[mf appendBundleInstallDir:iDir];
|
||||
[mf appendPrincipalClass:tmp];
|
||||
[mf appendLibraries:[dict objectForKey:PCLibraries]];
|
||||
|
||||
[mf appendResources];
|
||||
for (i=0;i<[[self resourceFileKeys] count];i++)
|
||||
{
|
||||
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
|
||||
[mf appendResourceItems:[dict objectForKey:k]];
|
||||
}
|
||||
|
||||
[mf appendHeaders:[dict objectForKey:PCHeaders]];
|
||||
[mf appendClasses:[dict objectForKey:PCClasses]];
|
||||
[mf appendOtherSources:[dict objectForKey:PCOtherSources]];
|
||||
|
||||
[mf appendTailForBundle];
|
||||
|
||||
// Write the new file to disc!
|
||||
if ((mfd = [mf encodedMakefile]))
|
||||
{
|
||||
if ([mfd writeToFile:mfl atomically:YES])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSArray *)sourceFileKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)resourceFileKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCGModels,PCOtherResources,PCImages,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)otherKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)buildTargets
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)projectDescription
|
||||
{
|
||||
return @"GNUstep Objective-C bundle project";
|
||||
}
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
NSString *pc;
|
||||
|
||||
[super updateValuesFromProjectDict];
|
||||
|
||||
pc = [projectDict objectForKey:PCPrincipalClass];
|
||||
[principalClassField setStringValue:pc];
|
||||
}
|
||||
|
||||
- (void)setPrincipalClass:(id)sender
|
||||
{
|
||||
[projectDict setObject:[principalClassField stringValue]
|
||||
forKey:PCPrincipalClass];
|
||||
|
||||
[projectWindow setDocumentEdited:YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
{
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"activateContextHelpMode:",
|
||||
"alignCenter:",
|
||||
"alignJustified:",
|
||||
"alignLeft:",
|
||||
"alignRight:",
|
||||
"arrangeInFront:",
|
||||
"cancel:",
|
||||
"capitalizeWord:",
|
||||
"changeColor:",
|
||||
"changeFont:",
|
||||
"checkSpelling:",
|
||||
"close:",
|
||||
"complete:",
|
||||
"copy:",
|
||||
"copyFont:",
|
||||
"copyRuler:",
|
||||
"cut:",
|
||||
"delete:",
|
||||
"deleteBackward:",
|
||||
"deleteForward:",
|
||||
"deleteToBeginningOfLine:",
|
||||
"deleteToBeginningOfParagraph:",
|
||||
"deleteToEndOfLine:",
|
||||
"deleteToEndOfParagraph:",
|
||||
"deleteToMark:",
|
||||
"deleteWordBackward:",
|
||||
"deleteWordForward:",
|
||||
"deminiaturize:",
|
||||
"deselectAll:",
|
||||
"fax:",
|
||||
"hide:",
|
||||
"hideOtherApplications:",
|
||||
"indent:",
|
||||
"loosenKerning:",
|
||||
"lowerBaseline:",
|
||||
"lowercaseWord:",
|
||||
"makeKeyAndOrderFront:",
|
||||
"miniaturize:",
|
||||
"miniaturizeAll:",
|
||||
"moveBackward:",
|
||||
"moveBackwardAndModifySelection:",
|
||||
"moveDown:",
|
||||
"moveDownAndModifySelection:",
|
||||
"moveForward:",
|
||||
"moveForwardAndModifySelection:",
|
||||
"moveLeft:",
|
||||
"moveRight:",
|
||||
"moveToBeginningOfDocument:",
|
||||
"moveToBeginningOfLine:",
|
||||
"moveToBeginningOfParagraph:",
|
||||
"moveToEndOfDocument:",
|
||||
"moveToEndOfLine:",
|
||||
"moveToEndOfParagraph:",
|
||||
"moveUp:",
|
||||
"moveUpAndModifySelection:",
|
||||
"moveWordBackward:",
|
||||
"moveWordBackwardAndModifySelection:",
|
||||
"moveWordForward:",
|
||||
"moveWordForwardAndModifySelection:",
|
||||
"newDocument:",
|
||||
"ok:",
|
||||
"openDocument:",
|
||||
"orderBack:",
|
||||
"orderFront:",
|
||||
"orderFrontColorPanel:",
|
||||
"orderFrontDataLinkPanel:",
|
||||
"orderFrontFontPanel:",
|
||||
"orderFrontHelpPanel:",
|
||||
"orderFrontStandardAboutPanel:",
|
||||
"orderFrontStandardInfoPanel:",
|
||||
"orderOut:",
|
||||
"pageDown:",
|
||||
"pageUp:",
|
||||
"paste:",
|
||||
"pasteAsPlainText:",
|
||||
"pasteAsRichText:",
|
||||
"pasteFont:",
|
||||
"pasteRuler:",
|
||||
"performClose:",
|
||||
"performMiniaturize:",
|
||||
"performZoom:",
|
||||
"print:",
|
||||
"raiseBaseline:",
|
||||
"revertDocumentToSaved:",
|
||||
"runPageLayout:",
|
||||
"runToolbarCustomizationPalette:",
|
||||
"saveAllDocuments:",
|
||||
"saveDocument:",
|
||||
"saveDocumentAs:",
|
||||
"saveDocumentTo:",
|
||||
"scrollLineDown:",
|
||||
"scrollLineUp:",
|
||||
"scrollPageDown:",
|
||||
"scrollPageUp:",
|
||||
"scrollViaScroller:",
|
||||
"selectAll:",
|
||||
"selectLine:",
|
||||
"selectNextKeyView:",
|
||||
"selectParagraph:",
|
||||
"selectPreviousKeyView:",
|
||||
"selectText:",
|
||||
"selectText:",
|
||||
"selectToMark:",
|
||||
"selectWord:",
|
||||
"showContextHelp:",
|
||||
"showGuessPanel:",
|
||||
"showHelp:",
|
||||
"showWindow:",
|
||||
"stop:",
|
||||
"subscript:",
|
||||
"superscript:",
|
||||
"swapWithMark:",
|
||||
"takeDoubleValueFrom:",
|
||||
"takeFloatValueFrom:",
|
||||
"takeIntValueFrom:",
|
||||
"takeObjectValueFrom:",
|
||||
"takeStringValueFrom:",
|
||||
"terminate:",
|
||||
"tightenKerning:",
|
||||
"toggle:",
|
||||
"toggleContinuousSpellChecking:",
|
||||
"toggleRuler:",
|
||||
"toggleToolbarShown:",
|
||||
"toggleTraditionalCharacterShape:",
|
||||
"transpose:",
|
||||
"transposeWords:",
|
||||
"turnOffKerning:",
|
||||
"turnOffLigatures:",
|
||||
"underline:",
|
||||
"unhide:",
|
||||
"unhideAllApplications:",
|
||||
"unscript:",
|
||||
"uppercaseWord:",
|
||||
"useAllLigatures:",
|
||||
"useStandardKerning:",
|
||||
"useStandardLigatures:",
|
||||
"yank:",
|
||||
"zoom:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
Binary file not shown.
|
@ -1,67 +0,0 @@
|
|||
#
|
||||
# GNUmakefile - Generated by ProjectCenter
|
||||
# Written by Philippe C.D. Robert <phr@3dkit.org>
|
||||
#
|
||||
# NOTE: Do NOT change this file -- ProjectCenter maintains it!
|
||||
#
|
||||
# Put all of your customisations in GNUmakefile.preamble and
|
||||
# GNUmakefile.postamble
|
||||
#
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
#
|
||||
# Subprojects
|
||||
#
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Bundle
|
||||
#
|
||||
|
||||
PACKAGE_NAME = PCGormProj
|
||||
BUNDLE_NAME = PCGormProj
|
||||
PCGormProj_PRINCIPAL_CLASS = PCGormProj
|
||||
|
||||
|
||||
#
|
||||
# Additional libraries
|
||||
#
|
||||
|
||||
PCGormProj_LIBRARIES_DEPEND_UPON += -lProjectCenter
|
||||
|
||||
#
|
||||
# Resource files
|
||||
#
|
||||
|
||||
PCGormProj_RESOURCE_FILES= \
|
||||
PC.proj \
|
||||
main.m \
|
||||
BaseInterface.gorm
|
||||
|
||||
|
||||
#
|
||||
# Header files
|
||||
#
|
||||
|
||||
PCGormProj_HEADERS= \
|
||||
PCGormProj.h \
|
||||
PCGormProject.h
|
||||
|
||||
#
|
||||
# Class files
|
||||
#
|
||||
|
||||
PCGormProj_OBJC_FILES= \
|
||||
PCGormProj.m \
|
||||
PCGormProject.m
|
||||
|
||||
#
|
||||
# C files
|
||||
#
|
||||
|
||||
PCGormProj_C_FILES=
|
||||
|
||||
include ../GNUmakefile.bundles
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
|
@ -1,176 +0,0 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org
|
||||
|
||||
Copyright (C) 2001 Free Software Foundation
|
||||
Copyright (C) 2001 Pierre-Yves Rivaille
|
||||
|
||||
Authors: Philippe C.D. Robert <probert@siggraph.org>
|
||||
Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Description:
|
||||
|
||||
PCGormProj creates new project of the type GormApplication!
|
||||
|
||||
*/
|
||||
|
||||
#include "PCGormProj.h"
|
||||
#include "PCGormProject.h"
|
||||
|
||||
@implementation PCGormProj
|
||||
|
||||
static NSString *_projTypeName = @"GormApplication";
|
||||
static PCGormProj *_creator = nil;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ProjectType
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+ (id)sharedCreator
|
||||
{
|
||||
if (!_creator) {
|
||||
_creator = [[[self class] alloc] init];
|
||||
}
|
||||
return _creator;
|
||||
}
|
||||
|
||||
- (Class)projectClass
|
||||
{
|
||||
return [PCGormProject class];
|
||||
}
|
||||
|
||||
- (NSString *)projectTypeName
|
||||
{
|
||||
return _projTypeName;
|
||||
}
|
||||
|
||||
- (NSDictionary *)typeTable
|
||||
{
|
||||
NSString *_path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Info" ofType:@"table"];
|
||||
|
||||
return [NSDictionary dictionaryWithContentsOfFile:_path];
|
||||
}
|
||||
|
||||
- (PCProject *)createProjectAt:(NSString *)path
|
||||
{
|
||||
PCGormProject *project = nil;
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
|
||||
NSAssert(path,@"No valid project path provided!");
|
||||
|
||||
if ([fm createDirectoryAtPath:path attributes:nil]) {
|
||||
NSString *_file;
|
||||
NSString *_resourcePath;
|
||||
NSMutableDictionary *dict;
|
||||
NSDictionary *infoDict;
|
||||
NSString *plistFileName;
|
||||
NSString *projectFile;
|
||||
NSString *gormTemplatePath;
|
||||
|
||||
project = [[[PCGormProject alloc] init] autorelease];
|
||||
|
||||
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"PC" ofType:@"proj"];
|
||||
dict = [NSMutableDictionary dictionaryWithContentsOfFile:_file];
|
||||
|
||||
// Customise the project
|
||||
[dict setObject:[path lastPathComponent] forKey:PCProjectName];
|
||||
[dict setObject:[[project principalClass] description] forKey:PCProjType];
|
||||
|
||||
// Create the AppNameInfo.plist
|
||||
infoDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"Automatically generated!",@"NOTE",
|
||||
[path lastPathComponent],@"ApplicationName",
|
||||
@"",@"ApplicationDescription",
|
||||
@"",@"ApplicationIcon",
|
||||
@"0.1",@"ApplicationRelease",
|
||||
@"0.1",@"FullVersionID",
|
||||
@"",@"Authors",
|
||||
@"",@"URL",
|
||||
@"Copyright (C) 200x by ...",@"Copyright",
|
||||
@"Released under ...",@"CopyrightDescription", nil];
|
||||
plistFileName = [NSString stringWithFormat:@"%@Info.plist",[path lastPathComponent]];
|
||||
[infoDict writeToFile:[path stringByAppendingPathComponent:plistFileName] atomically:YES];
|
||||
|
||||
[dict setObject:[NSArray arrayWithObjects:plistFileName,nil]
|
||||
forKey:PCOtherResources];
|
||||
[dict setObject:[NSArray arrayWithObject:[NSString stringWithFormat: @"%@.gorm", [path lastPathComponent]]]
|
||||
forKey:PCGModels];
|
||||
[dict setObject:[NSString stringWithFormat: @"%@.gorm", [path lastPathComponent]]
|
||||
forKey:PCMainGModelFile];
|
||||
|
||||
// Save the project to disc
|
||||
projectFile = [NSString stringWithString:[path lastPathComponent]];
|
||||
projectFile = [projectFile stringByAppendingPathExtension:@"pcproj"];
|
||||
[dict writeToFile:[path stringByAppendingPathComponent:projectFile]
|
||||
atomically:YES];
|
||||
|
||||
/*
|
||||
* Copy the project files to the provided path
|
||||
*
|
||||
*/
|
||||
|
||||
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"postamble"];
|
||||
[fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.postamble"] handler:nil];
|
||||
|
||||
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"preamble"];
|
||||
[fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.preamble"] handler:nil];
|
||||
|
||||
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"main" ofType:@"m"];
|
||||
[fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"main.m"] handler:nil];
|
||||
|
||||
// Copy the gorm wrapper
|
||||
//gormTemplatePath = [path stringByAppendingPathComponent: @"BaseInterface.gorm"];
|
||||
gormTemplatePath = [path stringByAppendingPathComponent: [NSString stringWithFormat: @"%@.gorm", [path lastPathComponent]]];
|
||||
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"BaseInterface" ofType:@"gorm"];
|
||||
[fm copyPath:_file toPath:gormTemplatePath handler:nil];
|
||||
|
||||
// Resources
|
||||
_resourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
|
||||
[fm createDirectoryAtPath:_resourcePath attributes:nil];
|
||||
[fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Images"] attributes:nil];
|
||||
[fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Documentation"] attributes:nil];
|
||||
|
||||
// The path cannot be in the PC.project file!
|
||||
[project setProjectPath:path];
|
||||
|
||||
// Set the new dictionary - this causes the GNUmakefile to be written to disc
|
||||
if(![project assignProjectDict:dict]) {
|
||||
NSRunAlertPanel(@"Attention!",@"Could not load %@!",@"OK",nil,nil,path);
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
return project;
|
||||
}
|
||||
|
||||
- (PCProject *)openProjectAt:(NSString *)path
|
||||
{
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
|
||||
id obj;
|
||||
|
||||
NSLog(@"<%@ %x>: opening project at %@",[self class],self,path);
|
||||
|
||||
obj = [dict objectForKey:PCProjectBuilderClass];
|
||||
if ([obj isEqualToString:@"PCGormProj"]) {
|
||||
return [[[PCGormProject alloc] initWithProjectDictionary:dict path:[path stringByDeletingLastPathComponent]] autorelease];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,398 +0,0 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org
|
||||
|
||||
Copyright (C) 2001 Free Software Foundation
|
||||
|
||||
Authors: 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 "PCProject+UInterface.h"
|
||||
#include "PCGormProject.h"
|
||||
#include "PCGormProj.h"
|
||||
|
||||
#include <ProjectCenter/PCMakefileFactory.h>
|
||||
|
||||
@interface PCGormProject (CreateUI)
|
||||
|
||||
- (void)_initUI;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCGormProject (CreateUI)
|
||||
|
||||
- (void)_initUI
|
||||
{
|
||||
NSTextField *textField;
|
||||
NSRect frame = {{84,120}, {80, 80}};
|
||||
NSBox *_iconViewBox;
|
||||
NSBox *_appIconBox;
|
||||
|
||||
[super _initUI];
|
||||
|
||||
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(4,248,104,21)];
|
||||
[textField setAlignment: NSRightTextAlignment];
|
||||
[textField setBordered: NO];
|
||||
[textField setEditable: NO];
|
||||
[textField setBezeled: NO];
|
||||
[textField setDrawsBackground: NO];
|
||||
[textField setStringValue:@"App class:"];
|
||||
[projectProjectInspectorView addSubview:textField];
|
||||
RELEASE(textField);
|
||||
|
||||
appClassField =[[NSTextField alloc] initWithFrame:NSMakeRect(111,248,165,21)];
|
||||
[appClassField setAlignment: NSLeftTextAlignment];
|
||||
[appClassField setBordered: YES];
|
||||
[appClassField setEditable: YES];
|
||||
[appClassField setBezeled: YES];
|
||||
[appClassField setDrawsBackground: YES];
|
||||
[appClassField setStringValue:@""];
|
||||
[appClassField setTarget:self];
|
||||
[appClassField setAction:@selector(setAppClass:)];
|
||||
[projectProjectInspectorView addSubview:appClassField];
|
||||
|
||||
#if 0
|
||||
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,204,64,21)];
|
||||
[textField setAlignment: NSRightTextAlignment];
|
||||
[textField setBordered: NO];
|
||||
[textField setEditable: NO];
|
||||
[textField setBezeled: NO];
|
||||
[textField setDrawsBackground: NO];
|
||||
[textField setStringValue:@"App icon:"];
|
||||
[projectProjectInspectorView addSubview:textField];
|
||||
RELEASE(textField);
|
||||
|
||||
appImageField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,204,176,21)];
|
||||
[appImageField setAlignment: NSLeftTextAlignment];
|
||||
[appImageField setBordered: YES];
|
||||
[appImageField setEditable: NO];
|
||||
[appImageField setBezeled: YES];
|
||||
[appImageField setDrawsBackground: YES];
|
||||
[appImageField setStringValue:@""];
|
||||
[projectProjectInspectorView addSubview:appImageField];
|
||||
|
||||
setAppIconButton =[[NSButton alloc] initWithFrame:NSMakeRect(220,180,40,21)];
|
||||
[setAppIconButton setTitle:@"Set"];
|
||||
[setAppIconButton setTarget:self];
|
||||
[setAppIconButton setAction:@selector(setAppIcon:)];
|
||||
[projectProjectInspectorView addSubview:setAppIconButton];
|
||||
|
||||
clearAppIconButton =[[NSButton alloc] initWithFrame:NSMakeRect(180,180,40,21)];
|
||||
[clearAppIconButton setTitle:@"Clear"];
|
||||
[clearAppIconButton setTarget:self];
|
||||
[clearAppIconButton setAction:@selector(clearAppIcon:)];
|
||||
[projectProjectInspectorView addSubview:clearAppIconButton];
|
||||
|
||||
_box = [[NSBox alloc] init];
|
||||
[_box setFrame:frame];
|
||||
[_box setTitlePosition:NSNoTitle];
|
||||
[_box setBorderType:NSBezelBorder];
|
||||
[projectProjectInspectorView addSubview:_box];
|
||||
|
||||
appIconView = [[NSImageView alloc] initWithFrame:frame];
|
||||
[_box addSubview:appIconView];
|
||||
|
||||
RELEASE(_box);
|
||||
RELEASE(setAppIconButton);
|
||||
RELEASE(clearAppIconButton);
|
||||
RELEASE(appIconView);
|
||||
|
||||
#else
|
||||
// Application Icon
|
||||
_appIconBox = [[NSBox alloc] init];
|
||||
[_appIconBox setFrame:NSMakeRect(6,154,270,84)];
|
||||
[_appIconBox setContentViewMargins:NSMakeSize(4.0, 6.0)];
|
||||
[_appIconBox setTitle:@"Application Icon"];
|
||||
[projectProjectInspectorView addSubview:_appIconBox];
|
||||
RELEASE(_appIconBox);
|
||||
|
||||
appImageField = [[NSTextField alloc] initWithFrame:NSMakeRect(0,34,195,21)];
|
||||
[appImageField setAlignment: NSLeftTextAlignment];
|
||||
[appImageField setBordered: YES];
|
||||
[appImageField setEditable: YES];
|
||||
[appImageField setBezeled: YES];
|
||||
[appImageField setDrawsBackground: YES];
|
||||
[appImageField setStringValue:@""];
|
||||
[_appIconBox addSubview:appImageField];
|
||||
RELEASE(appImageField);
|
||||
|
||||
setAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(147,0,48,21)];
|
||||
[setAppIconButton setTitle:@"Set..."];
|
||||
[setAppIconButton setTarget:self];
|
||||
[setAppIconButton setAction:@selector(setAppIcon:)];
|
||||
[_appIconBox addSubview:setAppIconButton];
|
||||
RELEASE(setAppIconButton);
|
||||
|
||||
clearAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(95,0,48,21)];
|
||||
[clearAppIconButton setTitle:@"Clear"];
|
||||
[clearAppIconButton setTarget:self];
|
||||
[clearAppIconButton setAction:@selector(clearAppIcon:)];
|
||||
[_appIconBox addSubview:clearAppIconButton];
|
||||
RELEASE(clearAppIconButton);
|
||||
|
||||
frame = NSMakeRect(200,0,56,56);
|
||||
_iconViewBox = [[NSBox alloc] init];
|
||||
[_iconViewBox setFrame:frame];
|
||||
[_iconViewBox setTitlePosition:NSNoTitle];
|
||||
[_iconViewBox setBorderType:NSBezelBorder];
|
||||
[_appIconBox addSubview:_iconViewBox];
|
||||
RELEASE(_iconViewBox);
|
||||
|
||||
appIconView = [[NSImageView alloc] initWithFrame:frame];
|
||||
[_iconViewBox addSubview:appIconView];
|
||||
RELEASE(appIconView);
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCGormProject
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Init and free
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
rootObjects = [[NSArray arrayWithObjects: PCClasses,
|
||||
PCHeaders,
|
||||
PCOtherSources,
|
||||
PCGModels,
|
||||
PCImages,
|
||||
PCOtherResources,
|
||||
PCSubprojects,
|
||||
PCDocuFiles,
|
||||
PCSupportingFiles,
|
||||
PCLibraries,
|
||||
PCNonProject,
|
||||
nil] retain];
|
||||
|
||||
rootKeys = [[NSArray arrayWithObjects: @"Classes",
|
||||
@"Headers",
|
||||
@"Other Sources",
|
||||
@"Interfaces",
|
||||
@"Images",
|
||||
@"Other Resources",
|
||||
@"Subprojects",
|
||||
@"Documentation",
|
||||
@"Supporting Files",
|
||||
@"Libraries",
|
||||
@"Non Project Files",
|
||||
nil] retain];
|
||||
|
||||
rootCategories = [[NSDictionary
|
||||
dictionaryWithObjects:rootObjects forKeys:rootKeys] retain];
|
||||
|
||||
appClassField = nil;
|
||||
appImageField = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[rootCategories release];
|
||||
[rootObjects release];
|
||||
[rootKeys release];
|
||||
[appClassField release];
|
||||
[appImageField release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Project
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (Class)builderClass
|
||||
{
|
||||
return [PCGormProj class];
|
||||
}
|
||||
|
||||
- (BOOL)writeMakefile
|
||||
{
|
||||
NSData *mfd;
|
||||
NSString *mfl = [projectPath stringByAppendingPathComponent:@"GNUmakefile"];
|
||||
int i;
|
||||
PCMakefileFactory *mf = [PCMakefileFactory sharedFactory];
|
||||
NSDictionary *dict = [self projectDict];
|
||||
|
||||
// Save the project file
|
||||
[super writeMakefile];
|
||||
|
||||
// Create the new file
|
||||
[mf createMakefileForProject:[self projectName]];
|
||||
|
||||
[mf appendString:@"include $(GNUSTEP_MAKEFILES)/common.make\n"];
|
||||
|
||||
[mf appendSubprojects:[dict objectForKey:PCSubprojects]];
|
||||
|
||||
[mf appendApplication];
|
||||
[mf appendInstallDir:[dict objectForKey:PCInstallDir]];
|
||||
[mf appendAppIcon:[dict objectForKey:PCAppIcon]];
|
||||
|
||||
[mf appendString:[NSString stringWithFormat:@"%@_MAIN_MODEL_FILE=%@\n",[self projectName],[dict objectForKey:PCMainGModelFile]]];
|
||||
|
||||
[mf appendGuiLibraries:[dict objectForKey:PCLibraries]];
|
||||
[mf appendResources];
|
||||
for (i=0;i<[[self resourceFileKeys] count];i++)
|
||||
{
|
||||
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
|
||||
[mf appendResourceItems:[dict objectForKey:k]];
|
||||
}
|
||||
|
||||
[mf appendHeaders:[dict objectForKey:PCHeaders]];
|
||||
[mf appendClasses:[dict objectForKey:PCClasses]];
|
||||
[mf appendOtherSources:[dict objectForKey:PCOtherSources]];
|
||||
|
||||
[mf appendTailForApp];
|
||||
|
||||
// Write the new file to disc!
|
||||
if ((mfd = [mf encodedMakefile]))
|
||||
{
|
||||
if ([mfd writeToFile:mfl atomically:YES])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSArray *)sourceFileKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)resourceFileKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCGModels,PCOtherResources,PCImages,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)otherKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)buildTargets
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)projectDescription
|
||||
{
|
||||
return @"Project that handles GNUstep/ObjC based applications.";
|
||||
}
|
||||
|
||||
- (BOOL)isExecutable
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
NSRect frame = {{0,0}, {64, 64}};
|
||||
NSImage *image;
|
||||
NSString *path = nil;
|
||||
NSString *_icon;
|
||||
|
||||
[super updateValuesFromProjectDict];
|
||||
|
||||
[appClassField setStringValue:[projectDict objectForKey:PCAppClass]];
|
||||
[appImageField setStringValue:[projectDict objectForKey:PCAppIcon]];
|
||||
|
||||
if ((_icon = [projectDict objectForKey:PCAppIcon])) {
|
||||
path = [projectPath stringByAppendingPathComponent:_icon];
|
||||
}
|
||||
|
||||
if (path && (image = [[NSImage alloc] initWithContentsOfFile:path])) {
|
||||
frame.size = [image size];
|
||||
[appIconView setFrame:frame];
|
||||
[appIconView setImage:image];
|
||||
[appIconView display];
|
||||
RELEASE(image);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)clearAppIcon:(id)sender
|
||||
{
|
||||
[projectDict setObject:@"" forKey:PCAppIcon];
|
||||
[appImageField setStringValue:@"No Icon!"];
|
||||
[appIconView setImage:nil];
|
||||
[appIconView display];
|
||||
|
||||
[projectWindow setDocumentEdited:YES];
|
||||
}
|
||||
|
||||
- (void)setAppIcon:(id)sender
|
||||
{
|
||||
int result;
|
||||
NSArray *fileTypes = [NSImage imageFileTypes];
|
||||
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
|
||||
|
||||
[openPanel setAllowsMultipleSelection:NO];
|
||||
result = [openPanel runModalForDirectory:NSHomeDirectory()
|
||||
file:nil
|
||||
types:fileTypes];
|
||||
|
||||
if (result == NSOKButton) {
|
||||
NSArray *files = [openPanel filenames];
|
||||
NSString *imageFilePath = [files objectAtIndex:0];
|
||||
|
||||
if (![self setAppIconWithImageAtPath:imageFilePath]) {
|
||||
NSRunAlertPanel(@"Error while opening file!",
|
||||
@"Couldn't open %@", @"OK", nil, nil,imageFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)setAppIconWithImageAtPath:(NSString *)path
|
||||
{
|
||||
NSRect frame = {{0,0}, {64, 64}};
|
||||
NSImage *image;
|
||||
|
||||
if (!(image = [[NSImage alloc] initWithContentsOfFile:path])) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
[self addFile:path forKey:PCImages copy:YES];
|
||||
[projectDict setObject:[path lastPathComponent] forKey:PCAppIcon];
|
||||
|
||||
[appImageField setStringValue:[path lastPathComponent]];
|
||||
|
||||
frame.size = [image size];
|
||||
[appIconView setFrame:frame];
|
||||
[appIconView setImage:image];
|
||||
[appIconView display];
|
||||
RELEASE(image);
|
||||
|
||||
[projectWindow setDocumentEdited:YES];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)setAppClass:(id)sender
|
||||
{
|
||||
[projectDict setObject:[appClassField stringValue] forKey:PCAppClass];
|
||||
[projectWindow setDocumentEdited:YES];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,349 +0,0 @@
|
|||
/*
|
||||
GNUstep ProjectCenter - http://www.gnustep.org
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation
|
||||
|
||||
Authors: Philippe C.D. Robert <probert@siggraph.org>
|
||||
Modified by Daniel Luederwald <das_flip@gmx.de>
|
||||
|
||||
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 "PCProject+UInterface.h"
|
||||
#include "PCRenaissanceProject.h"
|
||||
#include "PCRenaissanceProj.h"
|
||||
|
||||
#include <ProjectCenter/PCMakefileFactory.h>
|
||||
|
||||
@interface PCRenaissanceProject (CreateUI)
|
||||
|
||||
- (void)_initUI;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCRenaissanceProject (CreateUI)
|
||||
|
||||
- (void)_initUI
|
||||
{
|
||||
NSTextField *textField;
|
||||
NSRect frame = {{84,120}, {80, 80}};
|
||||
NSBox *_iconViewBox;
|
||||
NSBox *_appIconBox;
|
||||
|
||||
[super _initUI];
|
||||
|
||||
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,256,64,21)];
|
||||
[textField setAlignment: NSRightTextAlignment];
|
||||
[textField setBordered: NO];
|
||||
[textField setEditable: NO];
|
||||
[textField setBezeled: NO];
|
||||
[textField setDrawsBackground: NO];
|
||||
[textField setStringValue:@"App class:"];
|
||||
[projectProjectInspectorView addSubview:textField];
|
||||
RELEASE(textField);
|
||||
|
||||
appClassField =[[NSTextField alloc] initWithFrame:NSMakeRect(111,248,165,21)];
|
||||
[appClassField setAlignment: NSLeftTextAlignment];
|
||||
[appClassField setBordered: YES];
|
||||
[appClassField setEditable: YES];
|
||||
[appClassField setBezeled: YES];
|
||||
[appClassField setDrawsBackground: YES];
|
||||
[appClassField setStringValue:@""];
|
||||
[appClassField setTarget:self];
|
||||
[appClassField setAction:@selector(setAppClass:)];
|
||||
[projectProjectInspectorView addSubview:appClassField];
|
||||
|
||||
// Application Icon
|
||||
_appIconBox = [[NSBox alloc] init];
|
||||
[_appIconBox setFrame:NSMakeRect(6,154,270,84)];
|
||||
[_appIconBox setContentViewMargins:NSMakeSize(4.0, 6.0)];
|
||||
[_appIconBox setTitle:@"Application Icon"];
|
||||
[projectProjectInspectorView addSubview:_appIconBox];
|
||||
RELEASE(_appIconBox);
|
||||
|
||||
appImageField = [[NSTextField alloc] initWithFrame:NSMakeRect(0,34,195,21)];
|
||||
[appImageField setAlignment: NSLeftTextAlignment];
|
||||
[appImageField setBordered: YES];
|
||||
[appImageField setEditable: YES];
|
||||
[appImageField setBezeled: YES];
|
||||
[appImageField setDrawsBackground: YES];
|
||||
[appImageField setStringValue:@""];
|
||||
[_appIconBox addSubview:appImageField];
|
||||
RELEASE(appImageField);
|
||||
|
||||
setAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(147,0,48,21)];
|
||||
[setAppIconButton setTitle:@"Set..."];
|
||||
[setAppIconButton setTarget:self];
|
||||
[setAppIconButton setAction:@selector(setAppIcon:)];
|
||||
[_appIconBox addSubview:setAppIconButton];
|
||||
RELEASE(setAppIconButton);
|
||||
|
||||
clearAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(95,0,48,21)];
|
||||
[clearAppIconButton setTitle:@"Clear"];
|
||||
[clearAppIconButton setTarget:self];
|
||||
[clearAppIconButton setAction:@selector(clearAppIcon:)];
|
||||
[_appIconBox addSubview:clearAppIconButton];
|
||||
RELEASE(clearAppIconButton);
|
||||
|
||||
frame = NSMakeRect(200,0,56,56);
|
||||
_iconViewBox = [[NSBox alloc] init];
|
||||
[_iconViewBox setFrame:frame];
|
||||
[_iconViewBox setTitlePosition:NSNoTitle];
|
||||
[_iconViewBox setBorderType:NSBezelBorder];
|
||||
[_appIconBox addSubview:_iconViewBox];
|
||||
RELEASE(_iconViewBox);
|
||||
|
||||
appIconView = [[NSImageView alloc] initWithFrame:frame];
|
||||
[_iconViewBox addSubview:appIconView];
|
||||
RELEASE(appIconView);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation PCRenaissanceProject
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Init and free
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
rootObjects = [[NSArray arrayWithObjects: PCClasses,
|
||||
PCHeaders,
|
||||
PCOtherSources,
|
||||
PCGModels,
|
||||
PCImages,
|
||||
PCOtherResources,
|
||||
PCSubprojects,
|
||||
PCDocuFiles,
|
||||
PCSupportingFiles,
|
||||
PCLibraries,
|
||||
PCNonProject,
|
||||
nil] retain];
|
||||
|
||||
rootKeys = [[NSArray arrayWithObjects: @"Classes",
|
||||
@"Headers",
|
||||
@"Other Sources",
|
||||
@"Interfaces",
|
||||
@"Images",
|
||||
@"Other Resources",
|
||||
@"Subprojects",
|
||||
@"Documentation",
|
||||
@"Supporting Files",
|
||||
@"Libraries",
|
||||
@"Non Project Files",
|
||||
nil] retain];
|
||||
|
||||
rootCategories = [[NSDictionary
|
||||
dictionaryWithObjects:rootObjects forKeys:rootKeys] retain];
|
||||
|
||||
appClassField = nil;
|
||||
appImageField = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
RELEASE(rootCategories);
|
||||
RELEASE(rootObjects);
|
||||
RELEASE(rootKeys);
|
||||
RELEASE(appClassField);
|
||||
RELEASE(appImageField);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Project
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
- (Class)builderClass
|
||||
{
|
||||
return [PCRenaissanceProj class];
|
||||
}
|
||||
|
||||
- (BOOL)writeMakefile
|
||||
{
|
||||
NSData *mfd;
|
||||
NSString *mfl = [projectPath stringByAppendingPathComponent:@"GNUmakefile"];
|
||||
int i;
|
||||
PCMakefileFactory *mf = [PCMakefileFactory sharedFactory];
|
||||
NSDictionary *dict = [self projectDict];
|
||||
|
||||
// Save the project file
|
||||
[super writeMakefile];
|
||||
|
||||
// Create the new file
|
||||
[mf createMakefileForProject:[self projectName]];
|
||||
|
||||
[mf appendString:@"include $(GNUSTEP_MAKEFILES)/common.make\n"];
|
||||
|
||||
[mf appendSubprojects:[dict objectForKey:PCSubprojects]];
|
||||
|
||||
[mf appendApplication];
|
||||
[mf appendInstallDir:[dict objectForKey:PCInstallDir]];
|
||||
[mf appendAppIcon:[dict objectForKey:PCAppIcon]];
|
||||
|
||||
[mf appendGuiLibraries:[dict objectForKey:PCLibraries]];
|
||||
[mf appendResources];
|
||||
for (i=0;i<[[self resourceFileKeys] count];i++)
|
||||
{
|
||||
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
|
||||
[mf appendResourceItems:[dict objectForKey:k]];
|
||||
}
|
||||
|
||||
[mf appendHeaders:[dict objectForKey:PCHeaders]];
|
||||
[mf appendClasses:[dict objectForKey:PCClasses]];
|
||||
[mf appendOtherSources:[dict objectForKey:PCOtherSources]];
|
||||
|
||||
[mf appendTailForApp];
|
||||
|
||||
// Write the new file to disc!
|
||||
if ((mfd = [mf encodedMakefile]))
|
||||
{
|
||||
if ([mfd writeToFile:mfl atomically:YES])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSArray *)sourceFileKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)resourceFileKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCGModels,PCOtherResources,PCImages,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)otherKeys
|
||||
{
|
||||
return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil];
|
||||
}
|
||||
|
||||
- (NSArray *)buildTargets
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)projectDescription
|
||||
{
|
||||
return @"Project that handles GNUstep/ObjC based applications.";
|
||||
}
|
||||
|
||||
- (BOOL)isExecutable
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
NSRect frame = {{0,0}, {64, 64}};
|
||||
NSImage *image;
|
||||
NSString *path = nil;
|
||||
NSString *_icon;
|
||||
|
||||
[super updateValuesFromProjectDict];
|
||||
|
||||
[appClassField setStringValue:[projectDict objectForKey:PCAppClass]];
|
||||
[appImageField setStringValue:[projectDict objectForKey:PCAppIcon]];
|
||||
|
||||
if ((_icon = [projectDict objectForKey:PCAppIcon])) {
|
||||
path = [projectPath stringByAppendingPathComponent:_icon];
|
||||
}
|
||||
|
||||
if (path && (image = [[NSImage alloc] initWithContentsOfFile:path])) {
|
||||
frame.size = [image size];
|
||||
[appIconView setFrame:frame];
|
||||
[appIconView setImage:image];
|
||||
[appIconView display];
|
||||
RELEASE(image);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)clearAppIcon:(id)sender
|
||||
{
|
||||
[projectDict setObject:@"" forKey:PCAppIcon];
|
||||
[appImageField setStringValue:@"No Icon!"];
|
||||
[appIconView setImage:nil];
|
||||
[appIconView display];
|
||||
|
||||
[projectWindow setDocumentEdited:YES];
|
||||
}
|
||||
|
||||
- (void)setAppIcon:(id)sender
|
||||
{
|
||||
int result;
|
||||
NSArray *fileTypes = [NSImage imageFileTypes];
|
||||
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
|
||||
|
||||
[openPanel setAllowsMultipleSelection:NO];
|
||||
result = [openPanel runModalForDirectory:NSHomeDirectory()
|
||||
file:nil
|
||||
types:fileTypes];
|
||||
|
||||
if (result == NSOKButton) {
|
||||
NSArray *files = [openPanel filenames];
|
||||
NSString *imageFilePath = [files objectAtIndex:0];
|
||||
|
||||
if (![self setAppIconWithImageAtPath:imageFilePath]) {
|
||||
NSRunAlertPanel(@"Error while opening file!",
|
||||
@"Couldn't open %@", @"OK", nil, nil,imageFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)setAppIconWithImageAtPath:(NSString *)path
|
||||
{
|
||||
NSRect frame = {{0,0}, {64, 64}};
|
||||
NSImage *image;
|
||||
|
||||
if (!(image = [[NSImage alloc] initWithContentsOfFile:path])) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
[self addFile:path forKey:PCImages copy:YES];
|
||||
[projectDict setObject:[path lastPathComponent] forKey:PCAppIcon];
|
||||
|
||||
[appImageField setStringValue:[path lastPathComponent]];
|
||||
|
||||
frame.size = [image size];
|
||||
[appIconView setFrame:frame];
|
||||
[appIconView setImage:image];
|
||||
[appIconView display];
|
||||
RELEASE(image);
|
||||
|
||||
[projectWindow setDocumentEdited:YES];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)setAppClass:(id)sender
|
||||
{
|
||||
[projectDict setObject:[appClassField stringValue] forKey:PCAppClass];
|
||||
[projectWindow setDocumentEdited:YES];
|
||||
}
|
||||
|
||||
@end
|
39
README
39
README
|
@ -1,39 +0,0 @@
|
|||
|
||||
ProjectCenter
|
||||
=============
|
||||
|
||||
This is ProjectCenter, the GNUstep IDE which is part of the GNUstep
|
||||
project and is copyrighted by the Free Softare Foundation. ProjectCenter
|
||||
is released under the GPL - see 'COPYING' for the details.
|
||||
|
||||
Further information can be found on the GNUstep site at www.gnustep.org
|
||||
on the ProjectCenter page
|
||||
|
||||
http://www.gnustep.org/developers/ProjectCenter.html
|
||||
|
||||
For the installation instructions read the INSTALL file.
|
||||
For a list of upcoming and/or planned features read the TODO file.
|
||||
For a list of changes in released versions read the ANNOUNCE file.
|
||||
|
||||
The main author of ProjectCenter is Philippe C.D. Robert, but others
|
||||
have contributed a lot to the current state of the project:
|
||||
|
||||
Code - Pierre-Yves Rivaille
|
||||
Nicola Perot
|
||||
Richard Frith-Macdonald
|
||||
Adam Fedor
|
||||
Serg Stoyan
|
||||
|
||||
UI - Many of the icons have been created by Andrew Lindsay
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
ProjectCenter 0.3.5 does NOT compile on Mac OS X due to some GNUstep
|
||||
specific code snippets. Please try the current code from CVS if you
|
||||
are interested in using ProjectCenter on Mac OS X.
|
||||
|
||||
We try to make the next release compile on this platform out of the box
|
||||
again.
|
||||
|
55
TODO
55
TODO
|
@ -1,55 +0,0 @@
|
|||
TODO
|
||||
****
|
||||
|
||||
This is the GNUstep ProjectCenter TODO list.
|
||||
Feel free to propose changes to this list or make suggestions!
|
||||
|
||||
ProjectCenter 0.4 Owner
|
||||
----------------- ------
|
||||
|
||||
- ProjectCenter localisation robert
|
||||
- Editor enhancements robert
|
||||
- Project Inspector completion serg
|
||||
- UI using Gorm and code cleanup serg
|
||||
- Initial user documentation ???
|
||||
|
||||
ProjectCenter 0.5
|
||||
-----------------
|
||||
|
||||
- Initial support for subprojects robert
|
||||
- Localisation support for GUI based projects robert
|
||||
- Review and cleanup of PC project bundles/templates robert
|
||||
- Direct code documentation (using autogsdoc) ???
|
||||
- Better integration with other tools (Gorm, CodeEditor, EasyDiff) ???
|
||||
|
||||
ProjectCenter 0.6
|
||||
-----------------
|
||||
|
||||
- ProjectBuilder enhancements ???
|
||||
- ProjectLauncher enhancements ???
|
||||
- Initial support for integrated debugging ???
|
||||
- More options for file creation ???
|
||||
|
||||
ProjectCenter 0.7
|
||||
-----------------
|
||||
|
||||
- Optimised support for integrated debugging ???
|
||||
- More project customisation possibilities ???
|
||||
- CVS integration ???
|
||||
|
||||
ProjectCenter 0.8
|
||||
-----------------
|
||||
|
||||
- An initial project wide find feature ???
|
||||
|
||||
ProjectCenter 0.9
|
||||
-----------------
|
||||
|
||||
- An initial class browser/documentation feature ???
|
||||
|
||||
ProjectCenter 1.0
|
||||
-----------------
|
||||
|
||||
Version 1.0 is aimed at stabilising and optimising existing features. There
|
||||
will not be any new features since 0.9.
|
||||
|
Loading…
Reference in a new issue