Various fixes and cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@19527 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-06-15 20:41:49 +00:00
parent cc6f1ede8b
commit cfe02368c5
77 changed files with 759 additions and 844 deletions

View file

@ -1,7 +1,7 @@
Announcement
************
This is version 0.3.5 of ProjectCenter.
This is version 0.4.0 of ProjectCenter.
What is ProjectCenter?
======================
@ -14,11 +14,28 @@ What is ProjectCenter?
distribution fees, for others to use the program. You should read the
COPYING file for more information.
Noteworthy changes in version `0.3.5'.
Noteworthy changes in version `0.4.0'.
======================================
Many features have been polished and stabilised, see ChangeLog for the
complete list of changes.
* A lot of refactoring and cleanup made
* Some parts of interface were recreated using GORM
* Most part of Project Inspector is completed
* Finished Loaded Files
* Stability issues fixed in Project Builder
* Interaces fixes were made in Project Launcher
* Added subprojects support
* Preferences recreated and cleaned up
* Many browser fixes were made in Project Window
* Much time was spent to fix stability problems
How can I get support for this software?
========================================

View file

@ -5,4 +5,4 @@ Richard Frith-Macdonald <rfm@gnu.org>
Nicola Pero <n.pero@mi.flashnet.it>
Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
Adam Fedor <fedor@gnu.org>
Daniel Luederwald <das_flip@gmx.de>

View file

@ -1,3 +1,34 @@
2004-06-15 Serg Stoyan <stoyan255@ukr.net>
* Library/PCProjectManager.m:
(convertLegacyProject:atPath:): added and implemented for conversion
of old projects.
(closeProject:): check if panels visible before performing close.
* Libarary/PCProject.m:
(fileTypesForCategoryKey:): moved implementation here from PC*Project
classes.
(dirForCategory:): ditto.
* Library/PCProjectEditor.m:
(editorDidClose:): remove calling to setActiveEditor:.
(editorDidResignActive:): check if editor belongs to current project.
(editorDidBecomeActive:): fix checking if editor belongs to current
project.
* Library/PCProjectBrowser.m:
(projectDictDidChange:): Fix detection of project changed.
* Modules/ApplicationProject/*.[hm]:
* Modules/BundleProject/*.[hm]:
* Modules/LibraryProject/*.[hm]:
* Modules/RenaissanceProject/*.[hm]:
* Modules/ToolProject/*.[hm]:
Default location of non-localized resources changed to Resources
subdir in project directory layout. No more Documentation and Images
subdirectories.
Removed PCProject overridings that are identical. Cleaned up.
2004-06-14 Serg Stoyan <stoyan255@ukr.net>
* Library/PCFileManager.m:

View file

@ -16,12 +16,3 @@ Here is the quick way of building and installing ProjectCenter:
make install;
By default ProjectCenter gets installed under GNUSTEP_SYSTEM_ROOT.
Important!
==========
When ProjectCenter fails to launch due to a missing bundle path, you can set
it using GNUstep's defaults tool ie. to:
defaults write ProjectCenter BundlePaths /TheProperPath/Library/ProjectCenter

View file

@ -49,12 +49,6 @@ PCServer (don't used)
----------
THOUGHTS:
----------
- test Projects and Files operations (Project and File menu entries);
- GORMify Prefernces;
- make PC prefernces changes applying immediately after changing;
- finish Preferences;
- remember ProjectWindow, BuildPanel, LaunchPanel, LoadedFilesPanel
geometry and visibility on per project basis;
- remember splitviews geometry on per project basis;
- try to incorporate CodeEditor approach
- implement PCProjectFinder and PCFindPanel GUI;
@ -64,4 +58,13 @@ THOUGHTS:
and "Add Class", "Add Header" and so on checkbox;
- "New File in Project..." panel should provide "Create Header",
"Create Class" and so on checkbox.
Localization:
~~~~~~~~~~~~~
- On project creation, all resources go to Resources subdir and placed into
GNUmakefile as *_RESOURCE_FILES;
- If some file from [PC*Proj localizableKeys] categories selected as
"Localizable Resource", that file removed from *_RESOURCE_FILES and placed
into *_LOCALIZED_RESOURCE_FILES (Resources->Language.lproj);
- in PC.project add LANGUAGES=();
- in PC.project add LOCALIZED_FILES=();

View file

@ -21,7 +21,7 @@ ProjectCenter 0.5
- Add more project types stoyan
- Localization support for projects stoyan
- Add pending files adding/removing stoyan
- Add pending add/removal of files stoyan
- Editor enhancements (syntax highlighting, etc.) stoyan
- Finish ProjectWindow and its contents (Browser, FileIcon) stoyan
- ProjectBuilder enhancements (warnings,errors,options etc.) stoyan

View file

@ -62,13 +62,8 @@ ProjectCenter_HEADER_FILES = \
\
PCDefines.h \
ProjectCenter.h \
ProjectEditor.h \
ProjectType.h \
Server.h \
ProjectComponent.h \
PreferenceController.h \
ProjectBuilder.h \
ProjectDebugger.h
Server.h
#
# Class files

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Author: Philippe C.D. Robert
Serg Stoyan
@ -33,9 +33,8 @@
@interface PCBundleLoader : NSObject
{
id delegate; // The PCAppController!
NSMutableArray *loadedBundles;
id delegate; // The PCAppController!
NSMutableArray *loadedBundles;
}
//----------------------------------------------------------------------------

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -25,9 +25,6 @@
#include "PCBundleLoader.h"
#include "PCDefines.h"
//#include "PreferenceController.h"
#include "ProjectEditor.h"
#include "ProjectDebugger.h"
#include "PCLogController.h"

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -175,6 +175,7 @@ static NSString * const PCSupportingFiles = @"SUPPORTING_FILES";
static NSString * const PCLibraries = @"LIBRARIES";
static NSString * const PCNonProject = @"NON_PROJECT_FILES";
static NSString * const PCGSMarkupFiles = @"INTERFACES";
static NSString * const PCLanguages = @"LANGUAGES";
static NSString * const PCBuildTool = @"BUILDTOOL";
static NSString * const PCCompilerOptions = @"COMPILEROPTIONS";

View file

@ -1,10 +1,27 @@
/*
* PCEditor.h created by probert on 2002-01-29 20:37:28 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 _PCEditor_h_
#define _PCEditor_h_

View file

@ -1,18 +1,32 @@
/*
* PCEditor.m created by probert on 2002-01-29 20:37:27 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 "PCProjectEditor.h"
#include "PCEditor.h"
#include "PCEditorView.h"
#include "ProjectComponent.h"
#include "PCLogController.h"
@ -543,7 +557,6 @@
- (BOOL)becomeFirstResponder
{
NSLog(@"PCEditor: becomeFirstResponder");
[[NSNotificationCenter defaultCenter]
postNotificationName:PCEditorDidBecomeActiveNotification
object:self];

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002 Free Software Foundation
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002 Free Software Foundation
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -40,11 +40,11 @@
@class PCProjectLauncher;
@class PCProjectEditor;
#ifndef GNUSTEP_BASE_VERSION
/*#ifndef GNUSTEP_BASE_VERSION
@protocol ProjectBuilder;
#else
#include <ProjectCenter/ProjectBuilder.h>
#endif
#endif*/
extern NSString *PCProjectDictDidChangeNotification;
extern NSString *PCProjectDictDidSaveNotification;
@ -129,7 +129,6 @@ extern NSString *PCProjectDictDidSaveNotification;
- (NSArray *)resourceFileKeys;
- (NSArray *)otherKeys;
- (NSArray *)allowableSubprojectTypes;
- (NSArray *)defaultLocalizableKeys;
- (NSArray *)localizableKeys;
- (BOOL)isEditableCategory:(NSString *)category;

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -26,7 +26,6 @@
#include "PCFileManager.h"
#include "PCProject.h"
#include "PCDefines.h"
#include "ProjectBuilder.h"
#include "PCProjectWindow.h"
#include "PCProjectBrowser.h"
@ -460,11 +459,6 @@ NSString
return nil;
}
- (NSArray *)defaultLocalizableKeys
{
return nil;
}
- (NSArray *)localizableKeys
{
return nil;
@ -490,6 +484,35 @@ NSString
- (NSArray *)fileTypesForCategoryKey:(NSString *)key
{
if ([key isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
}
else if ([key isEqualToString:PCHeaders])
{
return [NSArray arrayWithObjects:@"h",nil];
}
else if ([key isEqualToString:PCOtherSources])
{
return [NSArray arrayWithObjects:@"c",@"C",@"m",nil];
}
else if ([key isEqualToString:PCInterfaces])
{
return [NSArray arrayWithObjects:@"gmodel",@"gorm",nil];
}
else if ([key isEqualToString:PCImages])
{
return [NSImage imageFileTypes];
}
else if ([key isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
else if ([key isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
}
return nil;
}
@ -511,6 +534,14 @@ NSString
- (NSString *)dirForCategoryKey:(NSString *)key
{
if ([key isEqualToString:PCInterfaces]
|| [key isEqualToString:PCImages]
|| [key isEqualToString:PCOtherResources]
|| [key isEqualToString:PCDocuFiles])
{
return [projectPath stringByAppendingPathComponent:@"Resources"];
}
return projectPath;
}

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -398,21 +398,19 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)projectDictDidChange:(NSNotification *)aNotif
{
PCProject *changedProject = nil;
PCProject *activeProject = nil;
PCProject *changedProject = [aNotif object];
if (!browser)
{
return;
}
changedProject = [aNotif object];
activeProject = [[project projectManager] activeProject];
if (changedProject == project || changedProject == activeProject)
if (changedProject != project && changedProject != [project activeSubproject])
{
[self reloadLastColumn];
return;
}
[self reloadLastColumn];
}
@end

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -28,16 +28,10 @@
#include <AppKit/AppKit.h>
#ifndef GNUSTEP_BASE_VERSION
@protocol ProjectComponent;
#else
#include <ProjectCenter/ProjectComponent.h>
#endif
@class PCProject;
@class PCButton;
@interface PCProjectBuilder : NSObject <ProjectComponent>
@interface PCProjectBuilder : NSObject
{
NSBox *componentView;
PCButton *buildButton;

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,12 +1,27 @@
/*
* PCProjectEditor.h created by probert on 2002-02-10 09:27:10 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 _PCProjectEditor_h_
#define _PCProjectEditor_h_
@ -23,12 +38,6 @@
@class NSView;
@class NSScrollView;
#ifndef GNUSTEP_BASE_VERSION
@protocol ProjectComponent;
#else
#include <ProjectCenter/ProjectComponent.h>
#endif
@interface PCProjectEditor : NSObject
{
PCProject *project;

View file

@ -1,12 +1,27 @@
/*
* PCProjectEditor.m created by probert on 2002-02-10 09:27:09 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 "PCProjectWindow.h"
@ -14,7 +29,6 @@
#include "PCProjectEditor.h"
#include "PCEditor.h"
#include "PCEditorView.h"
#include "ProjectComponent.h"
#include "PCLogController.h"
@ -253,8 +267,6 @@ NSString *PCEditorDidResignActiveNotification =
{
PCEditor *editor = [editorsDict objectForKey:path];
NSLog(@"PCProjectEditor: orderFrontEditorForFile");
if ([editor isWindowed])
{
[editor show];
@ -286,7 +298,7 @@ NSString *PCEditorDidResignActiveNotification =
- (void)closeActiveEditor:(id)sender
{
[[self activeEditor] closeFile:self save:YES];
[activeEditor closeFile:self save:YES];
}
- (void)closeEditorForFile:(NSString *)file
@ -448,10 +460,11 @@ NSString *PCEditorDidResignActiveNotification =
- (void)editorDidClose:(NSNotification *)aNotif
{
PCEditor *editor = [aNotif object];
PCEditor *editor = [aNotif object];
PCProjectBrowser *browser = nil;
// It is not our editor
if ([editorsDict objectForKey:[editor path]] != editor)
if ([editor projectEditor] != self)
{
return;
}
@ -465,14 +478,15 @@ NSString *PCEditorDidResignActiveNotification =
lastEditorKey = [[editorsDict allKeys] lastObject];
[componentView setContentView:[lastEditor componentView]];
// [[project projectWindow] makeFirstResponder:[lastEditor editorView]];
[self setActiveEditor:lastEditor];
[[project projectWindow] makeFirstResponder:[lastEditor editorView]];
}
else
{
// [[project projectWindow] makeFirstResponder:scrollView];
browser = [project projectBrowser];
[browser setPath:[browser pathToSelectedCategory]];
[[project projectWindow] makeFirstResponder:scrollView];
[componentView setContentView:scrollView];
[self setActiveEditor:nil];
}
}
@ -481,10 +495,7 @@ NSString *PCEditorDidResignActiveNotification =
PCEditor *editor = [aNotif object];
NSString *categoryPath = nil;
NSLog(@"PCPE: editorDidBecomeActive: %@", [editor path]);
if ([editorsDict objectForKey:[editor path]] != editor
|| activeEditor == editor)
if ([editor projectEditor] != self || activeEditor == editor)
{
return;
}
@ -495,13 +506,19 @@ NSString *PCEditorDidResignActiveNotification =
if (categoryPath)
{
PCLogInfo(self, @"set browser path: %@", categoryPath);
[[project projectBrowser] setPath:categoryPath];
}
}
- (void)editorDidResignActive:(NSNotification *)aNotif
{
PCEditor *editor = [aNotif object];
if ([editor projectEditor] != self)
{
return;
}
[self setActiveEditor:nil];
}

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -28,16 +28,10 @@
#include <AppKit/AppKit.h>
#ifndef GNUSTEP_BASE_VERSION
@protocol ProjectComponent;
#else
#include <ProjectCenter/ProjectComponent.h>
#endif
@class PCProject;
@class PCButton;
@interface PCProjectLauncher : NSObject <ProjectComponent>
@interface PCProjectLauncher : NSObject
{
PCProject *project; // Not retained!
NSDictionary *currentOptions; // Not retained!

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,6 +1,27 @@
/*
* Project ProjectCenter
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 _PCProjectLoadedFiles_h_
#define _PCProjectLoadedFiles_h_

View file

@ -1,6 +1,27 @@
/*
* Project ProjectCenter
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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"

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -39,17 +39,9 @@
@class NewSubprojectController;
#ifndef GNUSTEP_BASE_VERSION
@protocol ProjectBuilder;
@protocol ProjectDelegate;
#else
#include <ProjectCenter/ProjectBuilder.h>
#include <ProjectCenter/ProjectDelegate.h>
#endif
extern NSString *PCActiveProjectDidChangeNotification;
@interface PCProjectManager : NSObject <ProjectBuilder>
@interface PCProjectManager : NSObject
{
id delegate;
id prefController;
@ -141,6 +133,9 @@ extern NSString *PCActiveProjectDidChangeNotification;
// ==== Project actions
// ============================================================================
- (NSString *)convertLegacyProject:(NSMutableDictionary *)pDict
atPath:(NSString *)aPath;
// Returns the loaded project if the builder class is known, nil else.
- (PCProject *)loadProjectAt:(NSString *)aPath;

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -44,8 +44,6 @@
#include "PCServer.h"
#include "ProjectType.h"
#include "ProjectBuilder.h"
#include "ProjectComponent.h"
NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
@ -394,6 +392,108 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
// ==== Project actions
// ============================================================================
- (NSString *)convertLegacyProject:(NSMutableDictionary *)pDict
atPath:(NSString *)aPath
{
NSString *pPath = nil;
NSString *projectClassName = nil;
NSString *projectTypeName = nil;
NSString *_projectPath = nil;
NSFileManager *fm = [NSFileManager defaultManager];
NSString *_resPath = nil;
NSArray *_fromDirArray = nil;
NSString *_fromDirPath = nil;
NSString *_file = nil;
NSString *_2file = nil;
int i = 0;
id<ProjectType> projectCreator;
NSMutableArray *otherResArray = nil;
NSString *plistFile = nil;
projectClassName = [pDict objectForKey:PCProjectBuilderClass];
if (projectClassName == nil)
{
// Project created by 0.4 release or later
return nil;
}
// Gorm project type doesn't exists anymore
if ([projectClassName isEqualToString:@"PCGormProj"])
{
projectTypeName = [NSString stringWithString:@"Application"];
projectClassName = [projectTypes objectForKey:projectTypeName];
}
// Handling directory layout
_projectPath = [aPath stringByDeletingLastPathComponent];
_resPath = [_projectPath stringByAppendingPathComponent:@"Resources"];
[fm createDirectoryAtPath:_resPath attributes:nil];
// Documents
_fromDirPath = [_projectPath stringByAppendingPathComponent:@"Documentation"];
_fromDirArray = [fm directoryContentsAtPath:_fromDirPath];
if (_fromDirArray)
{
for (i = 0; i < [_fromDirArray count]; i++)
{
_file = [_fromDirPath
stringByAppendingPathComponent:[_fromDirArray objectAtIndex:i]];
_2file = [_resPath
stringByAppendingPathComponent:[_fromDirArray objectAtIndex:i]];
[fm movePath:_file toPath:_2file handler:nil];
}
}
[fm removeFileAtPath:_fromDirPath handler:nil];
// Images
_fromDirPath = [_projectPath stringByAppendingPathComponent:@"Images"];
_fromDirArray = [fm directoryContentsAtPath:_fromDirPath];
if (_fromDirArray)
{
for (i = 0; i < [_fromDirArray count]; i++)
{
_file = [_fromDirPath
stringByAppendingPathComponent:[_fromDirArray objectAtIndex:i]];
_2file = [_resPath
stringByAppendingPathComponent:[_fromDirArray objectAtIndex:i]];
[fm movePath:_file toPath:_2file handler:nil];
}
}
[fm removeFileAtPath:_fromDirPath handler:nil];
// Info-gnustep.plist
plistFile = [NSString stringWithFormat:@"%@Info.plist",
[pDict objectForKey:PCProjectName]];
_file = [_projectPath stringByAppendingPathComponent:plistFile];
_2file = [_resPath stringByAppendingPathComponent:
[NSString stringWithString:@"Info-gnustep.plist"]];
[fm movePath:_file toPath:_2file handler:nil];
otherResArray = [NSMutableArray
arrayWithArray:[pDict objectForKey:PCOtherResources]];
[otherResArray removeObject:plistFile];
[otherResArray addObject:@"Info-gnustep.plist"];
[pDict setObject:otherResArray forKey:PCOtherResources];
// GNUmakefiles will be generated in [PCProject initWithProjectDictionary:]
// Remove obsolete records from project dictionary and write to PC.project
pPath = [[aPath stringByDeletingLastPathComponent]
stringByAppendingPathComponent:@"PC.project"];
projectCreator = [NSClassFromString(projectClassName) sharedCreator];
projectTypeName = [projectCreator projectTypeName];
[pDict setObject:projectTypeName forKey:PCProjectType];
[pDict removeObjectForKey:PCProjectBuilderClass];
[pDict removeObjectForKey:PCPrincipalClass];
if ([pDict writeToFile:pPath atomically:YES] == YES)
{
// [[NSFileManager defaultManager] removeFileAtPath:aPath handler:nil];
}
return projectClassName;
}
- (PCProject *)loadProjectAt:(NSString *)aPath
{
NSMutableDictionary *projectFile = nil;
@ -405,15 +505,14 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
projectFile = [NSMutableDictionary dictionaryWithContentsOfFile:aPath];
// For compatibility with 0.3.x projects
projectClassName = [projectFile objectForKey:PCProjectBuilderClass];
// Gorm project type doesn't exists anymore
if ([projectClassName isEqualToString:@"PCGormProj"])
projectClassName = [self convertLegacyProject:projectFile atPath:aPath];
if (projectClassName)
{
projectTypeName = [NSString stringWithString:@"Application"];;
projectClassName = [projectTypes objectForKey:projectTypeName];
projectTypeName = nil;
aPath = [[aPath stringByDeletingLastPathComponent]
stringByAppendingPathComponent:@"PC.project"];
}
// No conversion were taken
if (projectClassName == nil)
{
projectTypeName = [projectFile objectForKey:PCProjectType];
@ -422,24 +521,6 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
projectCreator = [NSClassFromString(projectClassName) sharedCreator];
if (projectTypeName == nil)
{
NSString *pPath = nil;
pPath = [[aPath stringByDeletingLastPathComponent]
stringByAppendingPathComponent:@"PC.project"];
// [[NSFileManager defaultManager] removeFileAtPath:aPath handler:nil];
[projectFile removeObjectForKey:PCProjectBuilderClass];
projectTypeName = [projectCreator projectTypeName];
[projectFile setObject:projectTypeName forKey:PCProjectType];
[projectFile removeObjectForKey:PCPrincipalClass];
[projectFile writeToFile:pPath atomically:YES];
aPath = pPath;
}
if ((project = [projectCreator openProjectAt:aPath]))
{
PCLogStatus(self, @"Project %@ loaded as %@",
@ -759,10 +840,22 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
if ([loadedProjects count] == 0)
{
if (projectInspector) [projectInspector close];
if (loadedFilesPanel) [loadedFilesPanel close];
if (buildPanel) [buildPanel close];
if (launchPanel) [launchPanel close];
if (projectInspector)
{
[projectInspector close];
}
if (loadedFilesPanel && [loadedFilesPanel isVisible])
{
[loadedFilesPanel close];
}
if (buildPanel && [buildPanel isVisible])
{
[buildPanel close];
}
if (launchPanel && [launchPanel isVisible])
{
[launchPanel close];
}
[self setActiveProject: nil];
[self stopSaveTimer];
}

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -112,7 +112,7 @@
[buildButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[buildButton setButtonType: NSMomentaryPushButton];
[toolbarView addSubview: buildButton];
[buildButton setShowTooltip:YES];
// [buildButton setShowTooltip:YES];
RELEASE (buildButton);
launchButton = [[PCButton alloc] initWithFrame: NSMakeRect(44,5,43,43)];
@ -124,7 +124,7 @@
[launchButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[launchButton setButtonType: NSMomentaryPushButton];
[toolbarView addSubview: launchButton];
[launchButton setShowTooltip:YES];
// [launchButton setShowTooltip:YES];
RELEASE (launchButton);
editorButton = [[PCButton alloc] initWithFrame: NSMakeRect(88,5,43,43)];
@ -136,7 +136,7 @@
[editorButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[editorButton setButtonType: NSMomentaryPushButton];
[toolbarView addSubview: editorButton];
[editorButton setShowTooltip:YES];
// [editorButton setShowTooltip:YES];
RELEASE (editorButton);
findButton = [[PCButton alloc] initWithFrame: NSMakeRect(132,5,43,43)];
@ -148,7 +148,7 @@
[findButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[findButton setButtonType: NSMomentaryPushButton];
[toolbarView addSubview: findButton];
[findButton setShowTooltip:YES];
// [findButton setShowTooltip:YES];
RELEASE (findButton);
inspectorButton = [[PCButton alloc] initWithFrame: NSMakeRect(176,5,43,43)];
@ -160,7 +160,7 @@
[inspectorButton setAutoresizingMask:(NSViewMaxXMargin | NSViewMinYMargin)];
[inspectorButton setButtonType: NSMomentaryPushButton];
[toolbarView addSubview: inspectorButton];
[inspectorButton setShowTooltip:YES];
// [inspectorButton setShowTooltip:YES];
RELEASE (inspectorButton);
@ -720,7 +720,7 @@
PCProject *changedProject = [aNotif object];
if (changedProject != project
&& [[project projectManager] activeProject] != changedProject)
&& changedProject != [project activeSubproject])
{
return;
}

View file

@ -67,7 +67,7 @@ extern NSString *PCProjectBuildDidStopNotification;
@class PCProject;
#ifndef GNUSTEP_BASE_VERSION
/*#ifndef GNUSTEP_BASE_VERSION
@protocol ProjectEditor;
@protocol ProjectDebugger;
@protocol PreferenceController;
@ -75,7 +75,7 @@ extern NSString *PCProjectBuildDidStopNotification;
#include <ProjectCenter/PreferenceController.h>
#include <ProjectCenter/ProjectEditor.h>
#include <ProjectCenter/ProjectDebugger.h>
#endif
#endif*/
@interface PCServer : NSObject <Server>
{
@ -96,9 +96,9 @@ extern NSString *PCProjectBuildDidStopNotification;
- (BOOL)registerProjectSubmenu:(NSMenu *)menu;
- (BOOL)registerFileSubmenu:(NSMenu *)menu;
- (BOOL)registerToolsSubmenu:(NSMenu *)menu;
- (BOOL)registerPrefController:(id<PreferenceController>)prefs;
/*- (BOOL)registerPrefController:(id<PreferenceController>)prefs;
- (BOOL)registerEditor:(id<ProjectEditor>)anEditor;
- (BOOL)registerDebugger:(id<ProjectDebugger>)aDebugger;
- (BOOL)registerDebugger:(id<ProjectDebugger>)aDebugger;*/
- (PCProject *)activeProject;
- (NSString*)pathToActiveProject;

View file

@ -68,7 +68,7 @@
return NO;
}
- (BOOL)registerPrefController:(id<PreferenceController>)prefs
/*- (BOOL)registerPrefController:(id<PreferenceController>)prefs
{
return NO;
}
@ -81,7 +81,7 @@
- (BOOL)registerDebugger:(id<ProjectDebugger>)aDebugger
{
return NO;
}
}*/
- (PCProject *)activeProject
{

View file

@ -1,12 +1,27 @@
/*
* PCSplitView.h created by probert on 2002-01-27 13:36:09 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 _PCSPLITVIEW_H_
#define _PCSPLITVIEW_H_

View file

@ -1,12 +1,27 @@
/*
* PCSplitView.m created by probert on 2002-01-27 13:36:08 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 "PCSplitView.h"

View file

@ -1,9 +1,9 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
Authors: Philippe C.D. Robert
This file is part of GNUstep.

View file

@ -1,9 +1,9 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Copyright (C) 2000-2004 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
Authors: Philippe C.D. Robert
This file is part of GNUstep.

View file

@ -1,12 +1,27 @@
/*
* PCTextFinder.h created by probert on 2002-02-03 13:23:01 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
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 _PCTEXTFINDER_H_
#define _PCTEXTFINDER_H_

View file

@ -1,18 +1,27 @@
/*
* PCTextFinder.m created by probert on 2002-02-03 13:22:59 +0000
*
* Project ProjectCenter
*
* Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/
/*
* This code is heavily based on Ali Ozers TextFinder. All credits belong
* to Ali!
*
*/
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2002-2004 Free Software Foundation
Authors: This code is heavily based on Ali Ozers TextFinder.
All credits belong to Ali!
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 "PCTextFinder.h"
#include "PCDefines.h"

View file

@ -44,10 +44,8 @@
#include <ProjectCenter/PCTextFinder.h>
#include <ProjectCenter/PCMakefileFactory.h>
#include <ProjectCenter/ProjectEditor.h>
#include <ProjectCenter/ProjectType.h>
#include <ProjectCenter/Server.h>
#include <ProjectCenter/ProjectComponent.h>
#endif

View file

@ -29,7 +29,7 @@
@class PCProject;
#ifndef GNUSTEP_BASE_VERSION
/*#ifndef GNUSTEP_BASE_VERSION
@protocol PreferenceController;
@protocol ProjectEditor;
@protocol ProjectDebugger;
@ -37,16 +37,16 @@
#include <ProjectCenter/PreferenceController.h>
#include <ProjectCenter/ProjectEditor.h>
#include <ProjectCenter/ProjectDebugger.h>
#endif
#endif*/
@protocol Server
- (BOOL)registerProjectSubmenu:(NSMenu *)menu;
- (BOOL)registerFileSubmenu:(NSMenu *)menu;
- (BOOL)registerToolsSubmenu:(NSMenu *)menu;
- (BOOL)registerPrefController:(id<PreferenceController>)prefs;
/*- (BOOL)registerPrefController:(id<PreferenceController>)prefs;
- (BOOL)registerEditor:(id<ProjectEditor>)anEditor;
- (BOOL)registerDebugger:(id<ProjectDebugger>)aDebugger;
- (BOOL)registerDebugger:(id<ProjectDebugger>)aDebugger;*/
- (PCProject *)activeProject;
- (NSString*)pathToActiveProject;

View file

@ -3,7 +3,7 @@
Copyright (C) 2004 Free Software Foundation
Author: Serg Stoyan
Authors: Serg Stoyan
This file is part of GNUstep.

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2004 Free Software Foundation
Authors: Serg Stoyan

View file

@ -1,9 +1,9 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Serg Stoyan
This file is part of GNUstep.
@ -51,7 +51,6 @@
rootEntries = [[NSDictionary
dictionaryWithObjects:rootCategories forKeys:rootKeys] retain];
}
return self;
@ -80,67 +79,12 @@
return @"Project that contains subprojects.";
}
- (BOOL)isExecutable
{
return NO;
}
- (NSString *)execAggregateName
{
return nil;
}
- (NSArray *)fileTypesForCategoryKey:(NSString *)category
{
if ([category isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
return nil;
}
- (NSString *)dirForCategory:(NSString *)category
{
return projectPath;
}
- (NSArray *)buildTargets
{
return nil;
}
- (NSArray *)sourceFileKeys
{
return nil;
}
- (NSArray *)resourceFileKeys
{
return nil;
}
- (NSArray *)otherKeys
{
return [NSArray arrayWithObjects:PCSupportingFiles,nil];
}
- (NSArray *)allowableSubprojectTypes
{
return [NSArray arrayWithObjects:
@"Application", @"Bundle", @"Library", @"Tool", nil];
}
- (NSArray *)defaultLocalizableKeys
{
return nil;
}
- (NSArray *)localizableKeys
{
return nil;
}
@end
@implementation PCAggregateProject (GeneratedFiles)

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.

View file

@ -1,9 +1,12 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: PCAppProj creates new project of the type Application!
This file is part of GNUstep.
@ -22,12 +25,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
PCAppProj creates new project of the type Application!
*/
#include "ProjectCenter/PCFileCreator.h"
#include "ProjectCenter/PCMakefileFactory.h"
@ -73,7 +70,8 @@ static PCAppProj *_creator = nil;
{
NSString *_file = nil;
NSString *_2file = nil;
// NSString *_resourcePath = nil;
NSString *_resourcePath = nil;
// NSString *_lresourcePath = nil;
NSString *projectName = nil;
NSMutableDictionary *projectDict = nil;
NSDictionary *infoDict = nil;
@ -122,16 +120,14 @@ static PCAppProj *_creator = nil;
[[PCMakefileFactory sharedFactory] createPostambleForProject:project];
// 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];
/* _lresourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];*/
_resourcePath = [path stringByAppendingPathComponent:@"Resources"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];
// Main NIB
mainNibFile = [path stringByAppendingPathComponent:
mainNibFile = [_resourcePath stringByAppendingPathComponent:
[NSString stringWithFormat:@"%@.gorm", projectName]];
_file = [projBundle pathForResource:@"Main" ofType:@"gorm"];
@ -145,8 +141,7 @@ static PCAppProj *_creator = nil;
// Create the Info-gnutstep.plist
infoDict = [NSDictionary dictionaryWithObjectsAndKeys:
@"Generated by ProjectCenter, do not edit", @"!",
// @"", @"ApplicationDescription",
// @"", @"ApplicationIcon",
@"No description avaliable!", @"ApplicationDescription",
projectName, @"ApplicationName",
@"0.1", @"ApplicationRelease",
[NSArray array], @"Authors",
@ -154,16 +149,14 @@ static PCAppProj *_creator = nil;
@"Released under...", @"CopyrightDescription",
@"0.1", @"FullVersionID",
projectName, @"NSExecutable",
// @"", @"NSIcon",
[mainNibFile lastPathComponent], @"NSMainNibFile",
[projectDict objectForKey:PCPrincipalClass], @"NSPrincipalClass",
@"Application", @"NSRole",
// @"", @"URL",
nil];
[infoDict
writeToFile:[path stringByAppendingPathComponent:@"Info-gnustep.plist"]
atomically:YES];
_2file = [_resourcePath
stringByAppendingPathComponent:@"Info-gnustep.plist"];
[infoDict writeToFile:_2file atomically:YES];
// Add Info-gnustep.plist into OTHER_RESOURCES
[projectDict

View file

@ -1,9 +1,14 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: This is the project type 'Application' for GNUstep. You never
should create it yourself but use PCAppProj for doing this.
Otherwise needed files don't get copied to the right place.
This file is part of GNUstep.
@ -22,14 +27,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
This is the project type 'Application' for GNUstep. You never should create
it yourself but use PCAppProj for doing this. Otherwise needed files don't
get copied to the right place.
*/
#ifndef _PCAppProj_PCAppProject_h_
#define _PCAppProj_PCAppProject_h_

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
@ -86,7 +87,8 @@
{
NSString *infoFile = nil;
infoFile = [path stringByAppendingPathComponent:@"Info-gnustep.plist"];
infoFile = [self dirForCategoryKey:PCOtherResources];
infoFile = [infoFile stringByAppendingPathComponent:@"Info-gnustep.plist"];
if ([[NSFileManager defaultManager] fileExistsAtPath:infoFile])
{
infoDict = [[NSMutableDictionary alloc] initWithContentsOfFile:infoFile];
@ -137,56 +139,6 @@
return [NSString stringWithString:@"openapp"];
}
- (NSArray *)fileTypesForCategoryKey:(NSString *)key
{
// NSLog(@"fileTypesForCategoryKey: %@", key);
if ([key isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
}
else if ([key isEqualToString:PCHeaders])
{
return [NSArray arrayWithObjects:@"h",nil];
}
else if ([key isEqualToString:PCOtherSources])
{
return [NSArray arrayWithObjects:@"c",@"C",@"m",nil];
}
else if ([key isEqualToString:PCInterfaces])
{
return [NSArray arrayWithObjects:@"gmodel",@"gorm",nil];
}
else if ([key isEqualToString:PCImages])
{
return [NSImage imageFileTypes];
}
else if ([key isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
else if ([key isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
}
return nil;
}
- (NSString *)dirForCategoryKey:(NSString *)key
{
if ([key isEqualToString:PCImages])
{
return [projectPath stringByAppendingPathComponent:@"Images"];
}
else if ([key isEqualToString:PCDocuFiles])
{
return [projectPath stringByAppendingPathComponent:@"Documentation"];
}
return projectPath;
}
- (NSArray *)buildTargets
{
return [NSArray arrayWithObjects:
@ -202,7 +154,7 @@
- (NSArray *)resourceFileKeys
{
return [NSArray arrayWithObjects:
PCInterfaces, PCOtherResources, PCImages, nil];
PCInterfaces, PCImages, PCOtherResources, PCDocuFiles, nil];
}
- (NSArray *)otherKeys
@ -214,12 +166,7 @@
- (NSArray *)allowableSubprojectTypes
{
return [NSArray arrayWithObjects:
@"Bundle", @"Tool", @"Library", nil];
}
- (NSArray *)defaultLocalizableKeys
{
return [NSArray arrayWithObjects: PCInterfaces, nil];
@"Aggregate", @"Bundle", @"Tool", @"Library", nil];
}
- (NSArray *)localizableKeys
@ -377,7 +324,8 @@
[infoDict setObject:[self convertExtensions] forKey:@"NSTypes"];
[self writeInfoEntry:@"URL" forKey:PCURL];
infoFile = [projectPath stringByAppendingPathComponent:@"Info-gnustep.plist"];
infoFile = [self dirForCategoryKey:PCOtherResources];
infoFile = [infoFile stringByAppendingPathComponent:@"Info-gnustep.plist"];
return [infoDict writeToFile:infoFile atomically:YES];
}
@ -476,20 +424,25 @@
}
// Resources
// TODO: proper support for localization
/* [mf appendString:
[NSString stringWithFormat:@"%@_LANGUAGES = English\n", projectName]];
[mf appendString:
[NSString stringWithFormat:@"%@_LOCALIZED_RESOURCE_FILES = ", projectName]];
*/
[mf appendResources];
for (i = 0; i < [[self resourceFileKeys] count]; i++)
{
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
NSMutableArray *resources = [[projectDict objectForKey:k] mutableCopy];
NSString *resourceItem = nil;
if ([k isEqualToString:PCImages])
for (j = 0; j < [resources count]; j++)
{
for (j=0; j<[resources count]; j++)
{
[resources replaceObjectAtIndex:j
withObject:[NSString stringWithFormat:@"Images/%@",
[resources objectAtIndex:j]]];
}
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}
[mf appendResourceItems:resources];
@ -527,16 +480,12 @@
{
[mff appendString:@"\n#\n# Application\n#\n"];
[mff appendString:
[NSString stringWithFormat:@"PACKAGE_NAME = %@\n",projectName]];
[NSString stringWithFormat:@"PACKAGE_NAME = %@\n", projectName]];
[mff appendString:
[NSString stringWithFormat:@"APP_NAME = %@\n",projectName]];
[NSString stringWithFormat:@"APP_NAME = %@\n", projectName]];
[mff appendString:[NSString stringWithFormat:@"%@_APPLICATION_ICON = %@\n",
projectName, [projectDict objectForKey:PCAppIcon]]];
// TODO: proper support for localisation
//[self appendString:[NSString stringWithFormat:@"%@_LANGUAGES=English\n",pnme]];
//[self appendString:[NSString stringWithFormat:@"%@_LOCALIZED_RESOURCE_FILES=Localizable.strings\n",pnme]];
}
- (void)appendTail:(PCMakefileFactory *)mff

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: creates new project of the type Bundle!
@ -72,7 +73,8 @@ static PCBundleProj *_creator = nil;
NSString *projectName = nil;
NSString *_file = nil;
NSString *_2file = nil;
// NSString *_resourcePath;
// NSString *_lresourcePath;
NSString *_resourcePath;
PCFileCreator *pcfc = [PCFileCreator sharedCreator];
project = [[[PCBundleProject alloc] init] autorelease];
@ -115,14 +117,10 @@ static PCBundleProj *_creator = nil;
[[PCMakefileFactory sharedFactory] createPostambleForProject:project];
// Resources
/* _resourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
/* _lresourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];*/
[fm createDirectoryAtPath:
[path stringByAppendingPathComponent:@"Images"]
attributes:nil];
[fm createDirectoryAtPath:
[path stringByAppendingPathComponent:@"Documentation"]
attributes:nil];
_resourcePath = [path stringByAppendingPathComponent:@"Resources"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];
// Set the new dictionary - this causes the GNUmakefile to be written
if (![project assignProjectDict:projectDict])

View file

@ -1,9 +1,14 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: This is the project type 'Bundle' for GNUstep. You never
should create it yourself but use PCBundleProj for doing this.
Otherwise needed files don't get copied to the right place.
This file is part of GNUstep.
@ -22,15 +27,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
This is the project type 'Bundle' for GNUstep. You never should create
it yourself but use PCBundleProj for doing this. Otherwise needed files don't
get copied to the right place.
*/
#ifndef _PCBUNDLEPROJECT_H
#define _PCBUNDLEPROJECT_H

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
@ -100,64 +101,6 @@
return @"GNUstep Objective-C bundle project";
}
- (BOOL)isExecutable
{
return NO;
}
- (NSString *)execToolName
{
return nil;
}
- (NSArray *)fileTypesForCategoryKey:(NSString *)category
{
if ([category isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
}
else if ([category isEqualToString:PCHeaders])
{
return [NSArray arrayWithObjects:@"h",nil];
}
else if ([category isEqualToString:PCOtherSources])
{
return [NSArray arrayWithObjects:@"c",@"C",@"m",nil];
}
else if ([category isEqualToString:PCInterfaces])
{
return [NSArray arrayWithObjects:@"gmodel",@"gorm",nil];
}
else if ([category isEqualToString:PCImages])
{
return [NSImage imageFileTypes];
}
else if ([category isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
else if ([category isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
}
return nil;
}
- (NSString *)dirForCategory:(NSString *)category
{
if ([category isEqualToString:PCImages])
{
return [projectPath stringByAppendingPathComponent:@"Images"];
}
else if ([category isEqualToString:PCDocuFiles])
{
return [projectPath stringByAppendingPathComponent:@"Documentation"];
}
return projectPath;
}
- (NSArray *)buildTargets
{
return [NSArray arrayWithObjects:
@ -182,12 +125,7 @@
- (NSArray *)allowableSubprojectTypes
{
return [NSArray arrayWithObjects:
@"Bundle", @"Tool", @"Library", nil];
}
- (NSArray *)defaultLocalizableKeys
{
return [NSArray arrayWithObjects:PCInterfaces, nil];
@"Aggregate", @"Bundle", @"Tool", @"Library", nil];
}
- (NSArray *)localizableKeys
@ -234,15 +172,14 @@
{
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
NSMutableArray *resources = [[projectDict objectForKey:k] mutableCopy];
NSString *resourceItem = nil;
if ([k isEqualToString:PCImages])
for (j = 0; j < [resources count]; j++)
{
for (j=0; j<[resources count]; j++)
{
[resources replaceObjectAtIndex:j
withObject:[NSString stringWithFormat:@"Images/%@",
[resources objectAtIndex:j]]];
}
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}
[mf appendResourceItems:resources];

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.

View file

@ -1,9 +1,12 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: Creates new project of the type Library!
This file is part of GNUstep.
@ -22,13 +25,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
PCLibProj creates new project of the type Application!
*/
#include <ProjectCenter/PCFileCreator.h>
#include "ProjectCenter/PCMakefileFactory.h"
@ -77,7 +73,8 @@ static PCLibProj *_creator = nil;
NSString *projectName = nil;
NSString *_file = nil;
NSString *_2file = nil;
// NSString *_resourcePath;
// NSString *_lresourcePath;
NSString *_resourcePath;
PCFileCreator *pcfc = [PCFileCreator sharedCreator];
project = [[[PCLibProject alloc] init] autorelease];
@ -118,17 +115,14 @@ static PCLibProj *_creator = nil;
[[PCMakefileFactory sharedFactory] createPostambleForProject:project];
// Resources
/*
_resourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];
*/
_file = [path stringByAppendingPathComponent:@"Images"];
[fm createDirectoryAtPath:_file attributes:nil];
_file = [path stringByAppendingPathComponent:@"Documentation"];
[fm createDirectoryAtPath:_file attributes:nil];
/* _lresourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];*/
_resourcePath = [path stringByAppendingPathComponent:@"Resources"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];
_file = [projectBundle pathForResource:@"Version" ofType:@""];
_2file = [path stringByAppendingPathComponent:@"Version"];
_2file = [_resourcePath stringByAppendingPathComponent:@"Version"];
[fm copyPath:_file toPath:_2file handler:nil];
// Set the new dictionary - this causes the GNUmakefile

View file

@ -1,9 +1,14 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: This is the project type 'Library' for GNUstep. You never
should create it yourself but use PCLibProj for doing this.
Otherwise needed files don't get copied to the right place.
This file is part of GNUstep.
@ -22,14 +27,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
This is the project type 'Library' for GNUstep. You never should create it
yourself but use PCLibProj for doing this. Otherwise needed files don't get
copied to the right place.
*/
#ifndef _PCLIBPROJECT_H
#define _PCLIBPROJECT_H

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
@ -91,64 +92,6 @@
return @"GNUstep Objective-C library project";
}
- (BOOL)isExecutable
{
return NO;
}
- (NSString *)execToolName
{
return nil;
}
- (NSArray *)fileTypesForCategoryKey:(NSString *)category
{
if ([category isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
}
else if ([category isEqualToString:PCHeaders])
{
return [NSArray arrayWithObjects:@"h",nil];
}
else if ([category isEqualToString:PCOtherSources])
{
return [NSArray arrayWithObjects:@"c",@"C",@"m",nil];
}
else if ([category isEqualToString:PCInterfaces])
{
return [NSArray arrayWithObjects:@"gmodel",@"gorm",nil];
}
else if ([category isEqualToString:PCImages])
{
return [NSImage imageFileTypes];
}
else if ([category isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
else if ([category isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
}
return nil;
}
- (NSString *)dirForCategory:(NSString *)category
{
if ([category isEqualToString:PCImages])
{
return [projectPath stringByAppendingPathComponent:@"Images"];
}
else if ([category isEqualToString:PCDocuFiles])
{
return [projectPath stringByAppendingPathComponent:@"Documentation"];
}
return projectPath;
}
- (NSArray *)buildTargets
{
return [NSArray arrayWithObjects:
@ -176,11 +119,6 @@
@"Bundle", @"Tool", nil];
}
- (NSArray *)defaultLocalizableKeys
{
return [NSArray arrayWithObjects:PCInterfaces, nil];
}
- (NSArray *)localizableKeys
{
return [NSArray arrayWithObjects:
@ -225,15 +163,14 @@
{
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
NSMutableArray *resources = [[projectDict objectForKey:k] mutableCopy];
NSString *resourceItem = nil;
if ([k isEqualToString:PCImages])
for (j = 0; j < [resources count]; j++)
{
for (j=0; j<[resources count]; j++)
{
[resources replaceObjectAtIndex:j
withObject:[NSString stringWithFormat:@"Images/%@",
[resources objectAtIndex:j]]];
}
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}
[mf appendResourceItems:resources];

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2003-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Modified by Daniel Luederwald <das_flip@gmx.de>
Authors: Philippe C.D. Robert
Daniel Luederwald
Serg Stoyan
This file is part of GNUstep.

View file

@ -1,13 +1,14 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Copyright (C) 2001 Pierre-Yves Rivaille
Copyright (C) 2001-2004 Free Software Foundation
Authors: Philippe C.D. Robert <phr@3dkit.org>
Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
Authors: Philippe C.D. Robert
Pierre-Yves Rivaille
Daniel Luederwald
Serg Stoyan
Modified by Daniel Luederwald <das_flip@gmx.de>
Description: Creates new project of the type RenaissanceApplication!
This file is part of GNUstep.
@ -26,12 +27,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
PCRenaissanceProj creates new project of the type RenaissanceApplication!
*/
#include "ProjectCenter/PCFileCreator.h"
#include "ProjectCenter/PCMakefileFactory.h"
@ -62,7 +57,7 @@ static PCRenaissanceProj *_creator = nil;
- (NSString *)projectTypeName
{
return @"RenaissanceApplication";
return @"Renaissance Application";
}
- (PCProject *)createProjectAt:(NSString *)path
@ -79,7 +74,8 @@ static PCRenaissanceProj *_creator = nil;
NSString *projectName = nil;
NSString *_file = nil;
NSString *_2file = nil;
// NSString *_resourcePath = nil;
// NSString *_lresourcePath = nil;
NSString *_resourcePath = nil;
NSDictionary *infoDict = nil;
NSString *mainMarkup = nil;
PCFileCreator *fc = [PCFileCreator sharedCreator];
@ -125,47 +121,47 @@ static PCRenaissanceProj *_creator = nil;
// GNUmakefile.postamble
[[PCMakefileFactory sharedFactory] createPostambleForProject:project];
_file = [projectBundle pathForResource:@"MainMenu-GNUstep"
ofType:@"gsmarkup"];
_2file = [path stringByAppendingPathComponent:
@"MainMenu-GNUstep.gsmarkup"];
[fm copyPath:_file toPath:_2file handler:nil];
_file = [projectBundle pathForResource:@"MainMenu-OSX"
ofType:@"gsmarkup"];
_2file = [path stringByAppendingPathComponent:@"MainMenu-OSX.gsmarkup"];
[fm copyPath:_file toPath:_2file handler:nil];
// GNUmakefile.postamble
[[PCMakefileFactory sharedFactory] createPostambleForProject:project];
// Resources
/* _lresourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];*/
_resourcePath = [path stringByAppendingPathComponent:@"Resources"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];
#ifdef GNUSTEP
_file = [projectBundle pathForResource:@"MainMenu-GNUstep"
ofType:@"gsmarkup"];
_2file = [_resourcePath stringByAppendingPathComponent:
@"MainMenu-GNUstep.gsmarkup"];
mainMarkup = [NSString stringWithString:@"MainMenu-GNUstep.gsmarkup"];
[fm copyPath:_file toPath:_2file handler:nil];
#else
_file = [projectBundle pathForResource:@"MainMenu-OSX"
ofType:@"gsmarkup"];
_2file = [_resourcePath stringByAppendingPathComponent:
@"MainMenu-OSX.gsmarkup"];
[fm copyPath:_file toPath:_2file handler:nil];
mainMarkup = [NSString stringWithString:@"MainMenu-OSX.gsmarkup"];
#endif
[projectDict setObject:mainMarkup forKey:PCMainInterfaceFile];
_file = [projectBundle pathForResource:@"Main" ofType:@"gsmarkup"];
_2file = [path stringByAppendingPathComponent:@"Main.gsmarkup"] ;
_2file = [_resourcePath stringByAppendingPathComponent:@"Main.gsmarkup"];
[fm copyPath:_file toPath:_2file handler:nil];
[projectDict setObject:
[NSArray arrayWithObjects:@"Main.gsmarkup",mainMarkup,nil]
forKey:PCInterfaces];
// GNUmakefile.postamble
[[PCMakefileFactory sharedFactory] createPostambleForProject:project];
// Resources
/* _resourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];*/
_2file = [path stringByAppendingPathComponent:@"Images"];
[fm createDirectoryAtPath:_2file attributes:nil];
_2file = [path stringByAppendingPathComponent:@"Documentation"];
[fm createDirectoryAtPath:_2file attributes:nil];
// Create the Info-gnustep.plist
infoDict = [NSDictionary dictionaryWithObjectsAndKeys:
@"Generated by ProjectCenter, do not edit", @"!",
// @"", @"ApplicationDescription",
// @"", @"ApplicationIcon",
@"", @"ApplicationDescription",
@"", @"ApplicationIcon",
projectName, @"ApplicationName",
@"0.1", @"ApplicationRelease",
[NSArray array], @"Authors",
@ -173,16 +169,16 @@ static PCRenaissanceProj *_creator = nil;
@"Released under...", @"CopyrightDescription",
@"0.1", @"FullVersionID",
projectName, @"NSExecutable",
// @"", @"NSIcon",
@"", @"NSIcon",
mainMarkup, @"GSMainMarkupFile",
[projectDict objectForKey:PCPrincipalClass], @"NSPrincipalClass",
@"Application", @"NSRole",
// @"", @"URL",
@"", @"URL",
nil];
[infoDict
writeToFile:[path stringByAppendingPathComponent:@"Info-gnustep.plist"]
atomically:YES];
_2file = [_resourcePath
stringByAppendingPathComponent:@"Info-gnustep.plist"];
[infoDict writeToFile:_2file atomically:YES];
[projectDict
setObject:[NSArray arrayWithObjects:@"Info-gnustep.plist",nil]

View file

@ -1,9 +1,14 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: This is the project type 'Application' for GNUstep. You never
should create it yourself but use PCAppProj for doing this.
Otherwise needed files don't get copied to the right place.
This file is part of GNUstep.
@ -22,14 +27,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
This is the project type 'Application' for GNUstep. You never should create
it yourself but use PCAppProj for doing this. Otherwise needed files don't
get copied to the right place.
*/
#ifndef _PCRenaissanceProject_h_
#define _PCRenaissanceProject_h_

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
@ -137,54 +138,6 @@
return [NSString stringWithString:@"openapp"];
}
- (NSArray *)fileTypesForCategoryKey:(NSString *)key
{
if ([key isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
}
else if ([key isEqualToString:PCHeaders])
{
return [NSArray arrayWithObjects:@"h",nil];
}
else if ([key isEqualToString:PCOtherSources])
{
return [NSArray arrayWithObjects:@"c",@"C",@"m",nil];
}
else if ([key isEqualToString:PCInterfaces])
{
return [NSArray arrayWithObjects:@"gmodel",@"gorm",nil];
}
else if ([key isEqualToString:PCImages])
{
return [NSImage imageFileTypes];
}
else if ([key isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
else if ([key isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
}
return nil;
}
- (NSString *)dirForCategoryKey:(NSString *)key
{
if ([key isEqualToString:PCImages])
{
return [projectPath stringByAppendingPathComponent:@"Images"];
}
else if ([key isEqualToString:PCDocuFiles])
{
return [projectPath stringByAppendingPathComponent:@"Documentation"];
}
return projectPath;
}
- (NSArray *)buildTargets
{
return [NSArray arrayWithObjects:
@ -212,12 +165,7 @@
- (NSArray *)allowableSubprojectTypes
{
return [NSArray arrayWithObjects:
@"Bundle", @"Tool", @"Library", nil];
}
- (NSArray *)defaultLocalizableKeys
{
return [NSArray arrayWithObjects: PCInterfaces, nil];
@"Aggregate", @"Bundle", @"Tool", @"Library", nil];
}
- (NSArray *)localizableKeys
@ -389,7 +337,8 @@
[infoDict setObject:[self convertExtensions] forKey:@"NSTypes"];
[self writeInfoEntry:@"URL" forKey:PCURL];
infoFile = [projectPath stringByAppendingPathComponent:@"Info-gnustep.plist"];
infoFile = [self dirForCategoryKey:PCOtherResources];
infoFile = [infoFile stringByAppendingPathComponent:@"Info-gnustep.plist"];
return [infoDict writeToFile:infoFile atomically:YES];
}
@ -493,15 +442,14 @@
{
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
NSMutableArray *resources = [[projectDict objectForKey:k] mutableCopy];
NSString *resourceItem = nil;
if ([k isEqualToString:PCImages])
{
for (j=0; j<[resources count]; j++)
{
[resources replaceObjectAtIndex:j
withObject:[NSString stringWithFormat:@"Images/%@",
[resources objectAtIndex:j]]];
}
for (j = 0; j < [resources count]; j++)
{
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}
[mf appendResourceItems:resources];
@ -545,10 +493,6 @@
[mff appendString:[NSString stringWithFormat:@"%@_APPLICATION_ICON = %@\n",
projectName, [projectDict objectForKey:PCAppIcon]]];
// TODO: proper support for localisation
//[self appendString:[NSString stringWithFormat:@"%@_LANGUAGES=English\n",pnme]];
//[self appendString:[NSString stringWithFormat:@"%@_LOCALIZED_RESOURCE_FILES=Localizable.strings\n",pnme]];
}
- (void)appendTail:(PCMakefileFactory *)mff

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.

View file

@ -1,9 +1,12 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: Creates new project of the type Tool!
This file is part of GNUstep.
@ -22,12 +25,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
PCToolProj creates new project of the type Tool!
*/
#include "ProjectCenter/PCFileCreator.h"
#include "ProjectCenter/PCMakefileFactory.h"
@ -73,7 +70,8 @@ static PCToolProj *_creator = nil;
{
NSString *_file = nil;
NSString *_2file = nil;
// NSString *_resourcePath;
// NSString *_lresourcePath;
NSString *_resourcePath;
NSMutableDictionary *projectDict = nil;
NSBundle *projectBundle = nil;
NSString *projectName = nil;
@ -108,12 +106,10 @@ static PCToolProj *_creator = nil;
[[PCMakefileFactory sharedFactory] createPostambleForProject:project];
// Resources
/* _resourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
/* _lresourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];*/
_2file = [path stringByAppendingPathComponent:@"Images"];
[fm createDirectoryAtPath:_2file attributes:nil];
_2file = [path stringByAppendingPathComponent:@"Documentation"];
[fm createDirectoryAtPath:_2file attributes:nil];
_resourcePath = [path stringByAppendingPathComponent:@"Resources"];
[fm createDirectoryAtPath:_resourcePath attributes:nil];
// Create the Info-gnustep.plist
infoDict = [NSDictionary dictionaryWithObjectsAndKeys:
@ -129,9 +125,9 @@ static PCToolProj *_creator = nil;
@"Released under...", @"CopyrightDescription",
nil];
[infoDict
writeToFile:[path stringByAppendingPathComponent:@"Info-gnustep.plist"]
atomically:YES];
_2file = [_resourcePath
stringByAppendingPathComponent:@"Info-gnustep.plist"];
[infoDict writeToFile:_2file atomically:YES];
[projectDict
setObject:[NSArray arrayWithObjects:@"Info-gnustep.plist",nil]

View file

@ -1,9 +1,14 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
Description: This is the project type 'Tool' for GNUstep. You never should
create it yourself but use PCToolProj for doing this. Otherwise
needed files don't get copied to the right place.
This file is part of GNUstep.
@ -22,14 +27,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
/*
Description:
This is the project type 'Tool' for GNUstep. You never should create
it yourself but use PCToolProj for doing this. Otherwise needed files don't
get copied to the right place.
*/
#ifndef _PCTOOLPROJECT_H
#define _PCTOOLPROJECT_H

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2004 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
@ -124,50 +125,6 @@
return [NSString stringWithString:@"opentool"];
}
- (NSArray *)fileTypesForCategoryKey:(NSString *)category
{
if ([category isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
}
else if ([category isEqualToString:PCHeaders])
{
return [NSArray arrayWithObjects:@"h",nil];
}
else if ([category isEqualToString:PCOtherSources])
{
return [NSArray arrayWithObjects:@"c",@"C",@"m",nil];
}
else if ([category isEqualToString:PCImages])
{
return [NSImage imageFileTypes];
}
else if ([category isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
else if ([category isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
}
return nil;
}
- (NSString *)dirForCategory:(NSString *)category
{
if ([category isEqualToString:PCImages])
{
return [projectPath stringByAppendingPathComponent:@"Images"];
}
else if ([category isEqualToString:PCDocuFiles])
{
return [projectPath stringByAppendingPathComponent:@"Documentation"];
}
return projectPath;
}
- (NSArray *)buildTargets
{
return [NSArray arrayWithObjects:
@ -191,13 +148,7 @@
- (NSArray *)allowableSubprojectTypes
{
return [NSArray arrayWithObjects:
@"Bundle", @"Library", nil];
}
- (NSArray *)defaultLocalizableKeys
{
return [NSArray arrayWithObjects:PCOtherResources,PCDocuFiles,nil];
return [NSArray arrayWithObjects:@"Bundle", @"Library", nil];
}
- (NSArray *)localizableKeys
@ -247,12 +198,12 @@
[self writeInfoEntry:@"Copyright" forKey:PCCopyright];
[self writeInfoEntry:@"CopyrightDescription" forKey:PCCopyrightDescription];
infoFile = [projectPath stringByAppendingPathComponent:@"Info-gnustep.plist"];
infoFile = [self dirForCategoryKey:PCOtherSources];
infoFile = [infoFile stringByAppendingPathComponent:@"Info-gnustep.plist"];
return [infoDict writeToFile:infoFile atomically:YES];
}
- (BOOL)writeMakefile
{
PCMakefileFactory *mf = [PCMakefileFactory sharedFactory];
@ -290,15 +241,14 @@
{
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
NSMutableArray *resources = [[projectDict objectForKey:k] mutableCopy];
NSString *resourceItem = nil;
if ([k isEqualToString:PCImages])
for (j = 0; j < [resources count]; j++)
{
for (j=0; j<[resources count]; j++)
{
[resources replaceObjectAtIndex:j
withObject:[NSString stringWithFormat:@"Images/%@",
[resources objectAtIndex:j]]];
}
resourceItem = [NSString stringWithFormat:@"Resources/%@",
[resources objectAtIndex:j]];
[resources replaceObjectAtIndex:j
withObject:resourceItem];
}
[mf appendResourceItems:resources];