CFBundleIdentifier support for Apps.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39153 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2015-11-05 01:19:53 +00:00
parent e28350370e
commit 950ad36c3a
9 changed files with 59 additions and 33 deletions

View file

@ -1,3 +1,13 @@
2015-11-05 Riccardo Mottola <rm@gnu.org>
* Modules/Projects/Application/PCAppProject+Inspector.h
* Modules/Projects/Application/PCAppProject+Inspector.m
* Headers/ProjectCenter/PCDefines.h
* Modules/Projects/Application/PCAppProject.h
* Modules/Projects/Application/PCAppProject.m
* Modules/Projects/Application/Resources/Inspector.gorm
CFBundleIdentifier support for Apps.
2015-11-02 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditorView.m

View file

@ -147,6 +147,7 @@ static NSString * const PCLinkerOptions = @"LINKEROPTIONS";
static NSString * const PCObjCCompilerOptions = @"OBJC_COMPILEROPTIONS";
static NSString * const PCPrincipalClass = @"PRINCIPAL_CLASS";
static NSString * const PCAuthors = @"PROJECT_AUTHORS";
static NSString * const PCBundleIdentifier = @"BUNDLE_IDENTIFIER";
static NSString * const PCCopyright = @"PROJECT_COPYRIGHT";
static NSString * const PCCopyrightDescription = @"PROJECT_COPYRIGHT_DESC";
static NSString * const PCProjectCreator = @"PROJECT_CREATOR";

View file

@ -1,9 +1,10 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
Copyright (C) 2001-2015 Free Software Foundation
Author: Serg Stoyan <stoyan@on.com.ua>
Riccardo Mottola <rm@gnu.org>
This file is part of GNUstep.
@ -37,8 +38,9 @@
// ----------------------------------------------------------------------------
// --- Actions
// ----------------------------------------------------------------------------
- (void)setAppType:(id)sender;
- (void)setAppClass:(id)sender;
- (IBAction)setAppType:(id)sender;
- (IBAction)setAppClass:(id)sender;
- (IBAction)setBundleIdentifier:(id)sender;
- (void)clearAppIcon:(id)sender;
- (BOOL)setAppIconWithFileAtPath:(NSString *)path;

View file

@ -94,7 +94,7 @@ cleanup(NSMutableDictionary *m, NSString *k)
// Help text view
[helpText setDrawsBackground:NO];
[helpText setTextColor:[NSColor darkGrayColor]];
[helpText setFont:[NSFont systemFontOfSize:11.0]];
[helpText setFont:[NSFont systemFontOfSize:10.0]];
[helpText setText:@"Click on the field and drop file in the box above"];
// Document types buttons
@ -133,7 +133,7 @@ cleanup(NSMutableDictionary *m, NSString *k)
// --- Actions
// ----------------------------------------------------------------------------
- (void)setAppType:(id)sender
- (IBAction)setAppType:(id)sender
{
NSString *appType = [appTypeField stringValue];
NSMutableArray *libs = [[projectDict objectForKey:PCLibraries] mutableCopy];
@ -152,13 +152,20 @@ cleanup(NSMutableDictionary *m, NSString *k)
[self setProjectDictObject:appType forKey:PCAppType notify:YES];
}
- (void)setAppClass:(id)sender
- (IBAction)setAppClass:(id)sender
{
[self setProjectDictObject:[appClassField stringValue]
forKey:PCPrincipalClass
notify:YES];
}
- (IBAction)setBundleIdentifier:(id)sender
{
[self setProjectDictObject:[bundleIdentifierField stringValue]
forKey:PCBundleIdentifier
notify:YES];
}
// Application Icon
- (void)clearAppIcon:(id)sender
{
@ -556,6 +563,7 @@ cleanup(NSMutableDictionary *m, NSString *k)
// Project Attributes view
[appTypeField selectItemWithTitle:[projectDict objectForKey:PCAppType]];
[appClassField setStringValue:[projectDict objectForKey: PCPrincipalClass]];
[bundleIdentifierField setStringValue:[projectDict objectForKey: PCBundleIdentifier]];
[appImageField setStringValue:[projectDict objectForKey:PCAppIcon]];
[helpFileField setStringValue:[projectDict objectForKey:PCHelpFile]];

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001-2004 Free Software Foundation
Copyright (C) 2001-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Riccardo Mottola
Description: This is the project type 'Application' for GNUstep. You never
should create it yourself but use PCAppProj for doing this.
@ -54,6 +55,7 @@
IBOutlet PCAppTextField *appImageField;
IBOutlet PCAppTextField *helpFileField;
IBOutlet PCAppTextField *mainNIBField;
IBOutlet NSTextField *bundleIdentifierField;
IBOutlet NSTextView *helpText;
IBOutlet PCFileNameIcon *iconView;

View file

@ -1,7 +1,7 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001-2012 Free Software Foundation
Copyright (C) 2001-2015 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
@ -228,7 +228,7 @@
[projectDict setObject:[NSArray arrayWithObjects:[mainNibFile lastPathComponent], @"Main.gsmarkup", @"MainMenu-GNUstep.gsmarkup", @"MainMenu-OSX.gsmarkup", nil]
forKey:PCInterfaces];
// Info-gnutstep.plist
// Info-gnustep.plist
_file = [projBundle pathForResource:@"Info" ofType:@"gnustep"];
infoDict = [[NSMutableDictionary alloc] initWithContentsOfFile:_file];
[infoDict setObject:projectName forKey:@"ApplicationName"];
@ -237,6 +237,7 @@
forKey:@"NSMainNibFile"];
[infoDict setObject:[projectDict objectForKey:PCPrincipalClass]
forKey:@"NSPrincipalClass"];
[infoDict setObject:[projectDict objectForKey:PCBundleIdentifier] forKey:@"CFBundleIdentifier"];
// Write to ProjectNameInfo.plist
_file = [NSString stringWithFormat:@"%@Info.plist",projectName];
@ -410,6 +411,7 @@
[self writeInfoEntry:@"ApplicationIcon" forKey:PCAppIcon];
[self writeInfoEntry:@"ApplicationName" forKey:PCProjectName];
[self writeInfoEntry:@"ApplicationRelease" forKey:PCRelease];
[self writeInfoEntry:@"CFBundleIdentifier" forKey:PCBundleIdentifier];
[self writeInfoEntry:@"Authors" forKey:PCAuthors];
[self writeInfoEntry:@"Copyright" forKey:PCCopyright];
[self writeInfoEntry:@"CopyrightDescription" forKey:PCCopyrightDescription];

View file

@ -2,11 +2,15 @@
"## Comment" = "Do NOT change this file, Gorm maintains it";
FirstResponder = {
Actions = (
"clearAppIcon:",
"clearFile:",
"clearHelpFile:",
"clearMainNib:",
"docFieldSet:",
"setAppType:",
"removeDocType:",
"setAppClass:",
"setAppType:",
"setBundleIdentifier:",
"setDocBasedApp:",
"setDocIcon:",
"setFile:",
@ -16,31 +20,30 @@
};
PCAppProject = {
Actions = (
"clearAppIcon:",
"clearHelpFile:",
"clearMainNib:",
"setAppClass:",
"setFile:",
"clearFile:",
"addDocType:",
"removeDocType:",
"setCurrentLanguage:",
"showDocTypesPanel:",
"setDocBasedApp:",
"docFieldSet:",
"setAppType:"
"setAppType:",
"setBundleIdentifier:",
"setDocBasedApp:"
);
Outlets = (
projectAttributesView,
appTypeField,
appClassField,
iconView,
setFieldButton,
clearFieldButton,
appImageField,
helpFileField,
mainNIBField,
bundleIdentifierField,
helpText,
iconView,
docTypesButton,
docTypesPanel,
addDocTypeButton,
removeDocTypeButton,
docBasedAppButton,
docTypesScroll,
docTypeLabel,
docTypeField,
docNameLabel,
@ -52,18 +55,9 @@
docRoleLabel,
docRoleField,
docClassLabel,
docClassField,
docTypesList,
typeColumn,
nameColumn,
extensionsColumn,
iconColumn,
roleColumn,
classColumn,
appTypeField,
helpText
docClassField
);
Super = NSObject;
Super = PCProject;
};
PCAppTextField = {
Actions = (
@ -79,4 +73,11 @@
);
Super = NSImageView;
};
PCProject = {
Actions = (
);
Outlets = (
);
Super = NSObject;
};
}