Re: Can't pipe files to compileHelp
Re: Can't pipe files to compileHelp
- Subject: Re: Can't pipe files to compileHelp
- From: Jim Correia <email@hidden>
- Date: Sun, 4 Aug 2002 15:23:35 -0400
On Sunday, August 4, 2002, at 02:51 PM, Bill Cheeseman wrote:
I believe you're mistaken about this. Apple's example of a shell script
phase (in Jaguar) omits the #!/bin/sh at the top of the script.
And it works
just fine. I believe this is because you type /bin/sh into the
Shell text
field in the script phase build setting in PB, and this generates the
shebang for you. If you look at the build log, you see that this
does output
#!/bin/sh just before PB executes the script itself.
I could be mistaken. I was shooting from the hip and didn't check
my facts beforehand. Sorry about that.
Is "shebang" a technical Unix term?
It is the common term for the #! line at the top of the script.
There's something wrong with your example, but I can't quite
figure how to
fix it. Or maybe I can. The whole idea is that Help.plist should be a
generated file, yet your project has it already in place.
The project has it in place because it needs to be copied to the
right directory during the Bundle Resources phase. You've either
got to generate it after the app links in the right place in the
application bundle, or generate it someplace else before link time,
and let Project Builder copy it to the right location for you.
If you remove it from your project before building, the project
will appear to build OK.
However, it fails at run time with an exception saying, basically,
that it
can't find Help.plist. The script did generate Help.plist and put
it in the
project file, but it never gets put into the built application bundle.
Because you removed it from the project...
So I think there has to a copy phase in the project, to move the build
Help.plist file into the built application bundle. Am I right
about this?
This aspect of PB is new to me, and I haven't tried it yet.
In a "real" project, since Help.plist is a strictly generated file,
I'd probably generate it into the builds folder and reference it
there so it would land in the source folder and want to be checked
into revision control.
I think you're saying the same thing I am, except I don't follow
the second
half of what you're saying: "reference it there so it would land in the
source folder and want to be checked into revision control." How
exactly
would this be accomplished? I do care about localization, by the
way, so
having it in English.lproj is important.
Also, I notice that the build folder ends up with a "DerivedSources"
subsubfolder. Is that where the Help.plist file should be placed?
I don't think there is explicit support for derived resources, so
you may have to roll your own or ask on the Project Builder list.
If you want to generate the file, you can generate it somewhere
into the builds folder, then you'll have to add it to the project
so it is copied during the build phase. I have a project that does
this, not with resources, but with a helper app that is bundled in
the main bundle. There is a chicken and egg problem. The file has
to exist to add it to the project first, so I had to build the
sub-target first, add the file. Once you create the reference, PB
will remember it even when you make clean.
The generated resources stuff is new to me too (I'm curious about
how/if people integrate genstrings with their builds...).
Maybe the path of least resistance is to generate it into me
English.lproj folder and if you are using CVS or something with a
similar facility, just add Help.plist to the local .cvsignore file?
You are getting to and past the end of my practical experience with
Project Builder. Maybe someone on the PB list has better/more
complete advice for how to deal with generated resources.
Jim
_______________________________________________
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.