Re: Somewhat OT - Creating a Project Template from Working Project With Shell Script
Re: Somewhat OT - Creating a Project Template from Working Project With Shell Script
- Subject: Re: Somewhat OT - Creating a Project Template from Working Project With Shell Script
- From: Tommy Nordgren <email@hidden>
- Date: Thu, 15 Jun 2006 05:19:21 +0200
On 15 jun 2006, at 03.07, Rush Manbert wrote:
Rush Manbert wrote:
Let's say that I have a working project. It's called libtemplate
and it actually builds a static library that does nothing. The
reason that I have it is that it is set up the way that I want all
of my new static library projects to be set up.
I know how to edit the project.pbxproject. file to make this be a
project template that names the targets and the products correctly
based on the new project name, and I have a TemplateInfo.plist
file that handles file renaming and content swizzling.
I want all of my developers to use the project template that I
derive from this project. But since we might change our standard
configuration in the future, I might need to change the original
project and regenerate the project template from the changes. In
order for my developers to use the project template, it needs to
be copied into a folder within their ~/Library directory tree.
It seems like my best approach to generating the project template
is to write a script that knows how to do it. That wouldn't be a
problem, except that I need to replace all instances of
"libtemplate" in the project file with "«PROJECTNAME»".
What I would like to do is just cat the project file and run it
through sed to do the string replacement, but I think those funny
chevron characters are going to be a problem. Does anyone know of
some other way to do this using shell-level tools? Would perl
handle the wacky characters?
Found the answer. Perl is the way to go. The pack() function is
your friend for inserting those pesky UTF-8 codes.
- Rush
_______________________________________________
You don't have to use pack for that. Just put the line
use utf8;
early in your perl script, and write the entire script using the utf8
encoding
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden