On Oct 2, 2008, at 3:24 PM, Craig Schamp wrote: I saw an open source project's build script which also deleted the Contents/Resources/TokenDefinitions.plist in the same block of code that deleted IFPkgFlagRelocatable from the Info.plist. Is this unnecessary? Is it a bad idea?
Well darn, you're right. I am confusing "relocatable" with "locator."
Installer has a Locator, which uses TokenDefinifitions to automatically find, say, an app that the user has dragged out of its original spot.
There's also a "relocation" flag that allows the user, during installation, to decide where to install, say, the many gigs of Jam Pack Loops.
My previous solution solved this second problem, so we need to solve the first one, also.
So, to turn off LOCATOR:
In a FLAT package, you need to get rid of the <relocate> and <locator> tokens from the PackageInfo file, which is an XML file in disguise.
This is not quite trivial to do from the command line, so what I'd do is to manually edit PackageInfo, stash a copy in your build sources, then ditto it over the generated one.
(This is an exceptionally lame hack. I'll probably get around to using the perl/foundation bridge to do the xml stuff sometime soon. If someone wants to pipe up, BY ALL MEANS.)
You would surround this with the "Expand/Flatten" lines from the other solution.
In a BUNDLE package, you need to delete FOO.pkg/Contents/Resources/TokenDefinitions.plist and also delete IFPkgPathMappings from the Info.plist file.
This can be done with these shell commands: rm FOO.pkg/Contents/Resources/TokenDefinitions.plist defaults delete FOO.pkg/Contents/Info IFPkgPathMappings
|