Re: "Allow Relocation" Bugs
Re: "Allow Relocation" Bugs
- Subject: Re: "Allow Relocation" Bugs
- From: John Gee <email@hidden>
- Date: Wed, 6 May 2009 18:13:35 +1200
On 01/05/2009, at 20:26 , sandeep chaudhary wrote:
I am working on PackageMaker and build a installer which will
install some applications to user specified location. I am using
the command line utility to build and run the package from package
maker. But i am facing a problem with this. When i open the .pmdoc
file, i found the "relocatable" check box is checked every time. So
i have to uncheck all checkboxes , save .pmdoc file and run command
to build the package every time. I want to turned off all
checkboxes by default when i open the .pmdoc file. So that there is
no need to uncheck all check boxes manually and resave the .pmdoc
file .How can i solve this problem.
Two possible work-arounds:
1) You may be able to get the setting to stick by using an absolute
path to the source root for the contents. Some of the PackageMaker 3
bugs related to settings in the UI being lost only occur when using a
relative path.
2) You may be able to override the behaviour after building the
installer. Bill Coderre posted some interesting suggestions last year
to work-around this problem. Unfortunately I failed to find his
original post, but here is a fragment of the perl I am currently using
for building installers. My recollection is that relocatable is
implemented in the generated package using IFPkgPathMappings. This
code runs after generating the package, to undo the effects of
"Allows relocation".
# Remove "Allows relocation" on application.
my $plainInfo = "$fullSandpitPath/$outputName/Contents/Info";
system "defaults", "delete", $plainInfo, "IFPkgPathMappings";
my $naughtyFile = "$fullSandpitPath/$outputName/Contents/
Resources/TokenDefinitions.plist";
system "rm", "-rf", $naughtyFile;
--
John Gee, ADInstruments
Programmers live in interesting times...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden