Re: can PB boilerplate text be changed?
Re: can PB boilerplate text be changed?
- Subject: Re: can PB boilerplate text be changed?
- From: Andy Lee <email@hidden>
- Date: Sat, 18 May 2002 11:34:31 -0400
At 7:17 AM -0400 5/18/02, Timothy Larkin wrote:
On 2002.05.18 01:57, "Donald S. Hall" <email@hidden> wrote:
At the start of a file created by Project Builder are a series of comments
containing author and copyright info. These contain generic text, which is
stored in the project file InfoPlist.strings. Can this data be changed
somewhere so that the copyright statement, etc. can be made specific before
a new project is created?
The organization name can be changed by adding properties to
com.apple.ProjectBuilder.plist.
Create a sub-dictionary named PBXCustomTemplateMacroDefinitions. Under that
create a key, ORGANIZATIONNAME, with a string value defining the name
itself, eg, "Apps & More Software Design".
If you prefer the command line, or want to put this into a "PB tweak"
script, you can do this:
defaults write com.apple.ProjectBuilder
'PBXCustomTemplateMacroDefinitions' '{ORGANIZATIONNAME = "Apps & More
Software Design" ; }'
For changes not covered by these defaults keys, you can edit the
template files that ProjectBuilder uses. There are four sets of .h
and .m templates under /Developer/ProjectBuilder Extras/File
Templates/Cocoa. For example, to suit my preferences, I edited each
of these eight files as follows:
* removed the line containing the project name
* added a line with the CVS $Revision$ tag
* fiddled with whitespace
* moved opening braces to their own line
I kept copies of the original template files for future reference
(for example, in case I want to put the project name back and can't
remember the key for it).
I think installing new versions of the Dev Tools restores the default
versions of these template files, so you might want to keep a copy of
your customizations off to the side somewhere -- perhaps to be
reinstalled by the above-mentioned "PB tweak" script.
I suspect you can also customize InfoPlist.strings in the *project*
templates (as opposed to the *file* templates), but I haven't tried
that.
There is almost certainly another key that would change the copyright year,
but I don't know its name.
It seems to be YEAR, judging by the file templates provided with the
April Dev Tools. I think it used to be hard-coded in the templates
to 2001 (!), so the YEAR key may be new.
--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.